Package: mount
Version: 2.13-8

When a mount point with spaces exists, it is not umounted at shutdown.

I have this line in my fstab:
/mbf/Linked\040Pictures /mbf_employee/Linked\040Pictures none bind 0 0

Then after executing a 'shutdown -h now' I get these messages near
the end of the shutdown procedure:
Unmounting local filesystems...umount2: No such file or directory
umount: /mbf_employee/Linked040Pictures: not found
failed.
Will now halt.

The problem is not with the umount program itself, because if I type
this command at the command line as root:
umount /mbf_employee/Linked\ Pictures
it unmounts just fine.

The problem is in the script /etc/init.d/umountfs because it is
passing wrong arguments to the umount command.

This bug is the same as this Ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/32455
That bugreport contains a patch which I adapted to Debian's
umountfs script. I don't claim that this is the best way to
solve the problem, but it has worked for me so far.

Thanks,
James

--- umountfsorig        2008-01-02 17:25:52.000000000 -0500
+++ umountfs    2008-01-03 08:15:14.000000000 -0500
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 ### BEGIN INIT INFO
 # Provides:          umountfs
 # Required-Start:
@@ -63,7 +63,7 @@
 
        REG_MTPTS=""
        TMPFS_MTPTS=""
-       while read DEV MTPT FSTYPE REST
+       while read -r DEV MTPT FSTYPE REST
        do
                case "$MTPT" in
                  
/|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/lib/init/rw)
@@ -138,11 +138,17 @@
                if [ "$VERBOSE" = no ]
                then
                        log_action_begin_msg "Unmounting local
                        filesystems"
-                       umount -f -r -d $REG_MTPTS
+                       for ARG in $REG_MTPTS
+                       do
+                               umount -f -r -d "$(printf %b $(echo $ARG
| sed -r 's/(\\[0-7]{3})([0-7])/\1\\06\2/g'))"
+                       done
                        log_action_end_msg $?
                else
                        log_daemon_msg "Will now unmount local
                        filesystems"
-                       umount -f -v -r -d $REG_MTPTS
+                       for ARG in $REG_MTPTS
+                       do
+                               umount -f -r -d "$(printf %b $(echo $ARG
| sed -r 's/(\\[0-7]{3})([0-7])/\1\\06\2/g'))"
+                       done
                        log_end_msg $?
                fi
        fi
-- 
  
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - The way an email service should be




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to