Skip to content

Instantly share code, notes, and snippets.

@ckujau
Last active January 1, 2016 03:59
Show Gist options
  • Save ckujau/8089118 to your computer and use it in GitHub Desktop.
Save ckujau/8089118 to your computer and use it in GitHub Desktop.
mount/umount smb shares demo
#!/bin/sh
#
# Mount/unmount SMB shares
#
case $1 in
mount)
logger -s "$0 sleeping 60 seconds..."
sleep 60
mount -t cifs -o ro,guest //server/share1 /mnt/share1
mount -t cifs -o rw,username=foo,password=secret //server/share2 /mnt/share2
;;
umount)
umount /mnt/share1
umount /mnt/share2
;;
*)
echo "Usage: `basename $0` [mount|umount]"
exit 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment