Skip to content

Instantly share code, notes, and snippets.

@bliz937
Last active August 5, 2016 06:57
Show Gist options
  • Save bliz937/944aec0417669f7e495d4c94388ee996 to your computer and use it in GitHub Desktop.
Save bliz937/944aec0417669f7e495d4c94388ee996 to your computer and use it in GitHub Desktop.
#!/bin/bash
UN_MOUNT="/dev/sdb"
IMAGE="/home/home/image.img"
while [ 1 ]; do
umount $(UN_MOUNT)*
if [ $? -eq 0 ]; then
dd if=$(IMAGE) of=$(UN_MOUNT)
fi
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment