]> git.pld-linux.org Git - packages/VirtualBox.git/commitdiff
simplify umounting auto/th/VirtualBox-4.2.12-8
authorElan Ruusamäe <glen@delfi.ee>
Sun, 2 Jun 2013 20:19:53 +0000 (23:19 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 2 Jun 2013 20:19:53 +0000 (23:19 +0300)
VirtualBox-vboxsf.init

index 0011bf0ec2ea73580d1befebd510baf9878cf950..992c151df9168eb7a6891851d0ede352b6097324 100755 (executable)
@@ -19,26 +19,18 @@ start() {
        fi
 
        modprobe -s $VBOX_MODULE
+       run_cmd "Mount VirtualBox Shared Folders:" mount -a -t vboxsf
        touch /var/lock/subsys/vboxsf
 }
 
 stop() {
-       # umount vboxsf mounts, no retry, just don't stack them :)
-       local mount errors out rc=0
-       show "Unmounting vboxsf file systems"; busy
-       awk '$3 == "vboxsf" {print $2}' /proc/mounts | while read mount; do
-               if ! umount "$mount"; then
-                       rc=$?
-               fi
-       done
-       if [ $rc = 0 ]; then
-               ok
-       else
-               fail
+       if [ ! -f  /var/lock/subsys/vboxsf ]; then
+               return
        fi
+       run_cmd "Unmount VirtualBox Shared Folders:" umount -a -t vboxsf
 
        # NOTE: rmmod will say module in use if there are remaining mounts
-       /sbin/rmmod $VBOX_MODULE
+       rmmod -s $VBOX_MODULE
 
        rm -f /var/lock/subsys/vboxsf
 }
This page took 0.415963 seconds and 4 git commands to generate.