Guest User

Untitled

a guest
Sep 14th, 2011
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: usbhdd_um
  4. # Required-Start:
  5. # Required-Stop:
  6. # Should-Start:
  7. # Should-stop:
  8. # Default-Start:
  9. # Default-Stop: 0 6
  10. # Short-Description: This script will unmount the default USB HDD.
  11. ### END INIT INFO
  12.  
  13. #
  14. # This script will unmount the default USB HDD if the entry exists in /etc/fstab
  15. # Version 1 by Crogge ([email protected])
  16. #
  17.  
  18. . /lib/lsb/init-functions
  19.  
  20. case "$1" in
  21. start)
  22. ;;
  23. stop)
  24. echo "USBHDD unmount script started, searching default device..."
  25. if grep UUID=994a2324-d844-458d-b971-0342021548d1 /etc/fstab
  26. then
  27. echo "Trying to unmount the default USB HDD..."
  28. /bin/umount /media/usbhdd
  29. fi
  30. exit 0
  31. ;;
  32. esac
Advertisement
Add Comment
Please, Sign In to add comment