setup a rpi image for burning on linux [raspberrypi]

based on:
http://www.forum-raspberrypi.de/Thread-tutorial-festplatten-sd-image-unter-linux-einbinden-mounten

setup your raspbian image:
#file -s 2017-06-21-raspbian-jessie-lite.img
sudo mkdir -p /mnt/sda2
cd ~/Downloads
sudo mount 2017-06-21-raspbian-jessie-lite.img /mnt/sda2 -o offset=$((8192*512))
cd /mnt/sda2/
sudo touch ssh
cd
sudo umount /mnt/sda2
cd ~/Downloads
sudo mount 2017-06-21-raspbian-jessie-lite.img /mnt/sda2 -o offset=$((94208*512))
cd /mnt/sda2/etc/wpa_supplicant/
sudo nano wpa_supplicant.conf

now add your wlan at the end like:
network={
ssid="YOUR_WLAN_SSID"
psk="YOUR_WLAN_PASSWORD"
}

and unmount the image:
cd
sudo umount /mnt/sda2