[Pkg-sysvinit-devel] Bug#344547: please use "-f" in umount
Robert Millan
rmh at aybabtu.com
Fri Dec 23 17:30:12 UTC 2005
Package: initscripts
Version: 2.86.ds1-6
Severity: wishlist
Tags: patch
Hi,
There's a bug in kFreeBSD which causes killall5 not to work properly (actualy,
not to work at all). In this conditions, it is common that umounting a
local filesystem or remounting / as readonly fail, because there is a stale
process using these filesystems.
I think it'd be a good thing if "-f" was always passed to umount and to "mount
-o ro,remount", since AFAICT there's no situation in which, during system halt
sequence, you'd want such operations to abort, leaving the kernel with
filesystems mounted read-write, thus potentialy causing corruption in the fs.
Please consider this patch. It should be harmless if your system works
properly, but can prevent problems in awkward situations like this one.
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-k7
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Versions of packages initscripts depends on:
ii coreutils 5.93-5 The GNU core utilities
ii dpkg 1.13.11.0.1 package maintenance system for Deb
ii e2fsprogs 1.38-2 ext2 file system utilities and lib
ii libc6 2.3.5-8.1 GNU C Library: Shared libraries an
ii lsb-base 3.0-11 Linux Standard Base 3.0 init scrip
ii util-linux 2.12p-8 Miscellaneous system utilities
initscripts recommends no packages.
-- no debconf information
-------------- next part --------------
diff -ur sysvinit-2.86.ds1.old/debian/initscripts/etc/init.d/umountfs sysvinit-2.86.ds1/debian/initscripts/etc/init.d/umountfs
--- sysvinit-2.86.ds1.old/debian/initscripts/etc/init.d/umountfs 2005-12-23 18:23:17.485223000 +0100
+++ sysvinit-2.86.ds1/debian/initscripts/etc/init.d/umountfs 2005-12-23 18:23:59.258873280 +0100
@@ -38,7 +38,7 @@
esac
DIRS="$DIRS $DIR"
done
- umount -r -d $DIRS
+ umount -f -r -d $DIRS
)
log_action_end_msg $?
diff -ur sysvinit-2.86.ds1.old/debian/initscripts/etc/init.d/umountroot sysvinit-2.86.ds1/debian/initscripts/etc/init.d/umountroot
--- sysvinit-2.86.ds1.old/debian/initscripts/etc/init.d/umountroot 2005-12-23 18:23:17.500221000 +0100
+++ sysvinit-2.86.ds1/debian/initscripts/etc/init.d/umountroot 2005-12-23 18:24:06.497772800 +0100
@@ -21,7 +21,7 @@
do_stop () {
[ "$VERBOSE" != no ] && log_action_begin_msg "Mounting root filesystem read-only"
- mount -n -o remount,ro /
+ mount -f -n -o remount,ro /
[ "$VERBOSE" != no ] && log_action_end_msg $?
}
More information about the Pkg-sysvinit-devel
mailing list