Mount points including spaces are not umounted at shutdown
Bug #32455 reported by
Gary Coady
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When a mount point with spaces exists, it is not unmounted at shutdown:
in /etc/mtab
/dev/sda1 /media/
See the getmntent manpage for the /etc/mtab syntax:
Since fields in the mtab and fstab files are separated by whitespace, octal escapes are used to represent the four characters space (\040), tab (\011), newline (\012) and backslash (\134) in those files when they occur in one of the four strings in a mntent structure.
Related branches
Changed in sysvinit: | |
assignee: | keybuk → nobody |
To post a comment you must log in.
This patch includes a few changes:
read takes a -d flag, so it doesn't strip out backslashes.
It echoes $DIR into a sed command, to replace certain octal sequences with the appropriate whitespace.
Couldn't get escaping of backslashes, etc. to work reliably in bash, dash - so I moved to calling umount individually on each directory, rather than using $DIRS (dash seemed to use different backslash escaping rules).
Tested somewhat in bash and dash so far.