* Carsten Hey [2012-05-11 00:58 +0200]: > * Carsten Hey [2012-04-30 02:00 +0200]: > > * Roger Leigh [2012-04-29 23:19 +0100]: > > > > > how do other distributions handle noauto in this situation? Do they > > > > > respect it, ignore it, or not look at fstab at all? > > > > > > > > ... > > > > > > For current systems, I think it's useful to know what systemd and > > > upstart are doing. systemd is simple enough to test on Debian; > > > for upstart we can look at Ubuntu. ... > > > So if all the others choose to not respect noauto for specific > > > mounts, that's a point in favour of doing that. > > > > Being consistent to other init systems in Debian makes sense. I'll send > > an other mail after knowing this. > > I installed Fedora 16 (uses systemd as init and was released in November > 2011) and the just released Ubuntu LTS (uses upstart) into a KVM > container and added a noauto sysfs line for /sys that matches (besides > noauto) their default mount options to /etc/fstab on both systems. > > On both systems, /sys was mounted despite the noauto sysfs entry.
In my previous mail I forgot to mention if others ignore the fstab entry completely or only ignore the noauto option. systemd/Fedora and upstart/Ubuntu ignore the noauto option but respect the other options (or at least some of them). I tested this by adding relatime as mount option to the noauto sysfs entry on Ubuntu and replacing relatime with strictatime on Fedora. I also tested this with the same result for /proc on Fedora. The attached yet untested patch adapts initscripts to match the behaviour of the other systems. Regards Carsten
>From ac727044e3c0a0d71e9bebdb7268aed4b823acc3 Mon Sep 17 00:00:00 2001 From: Carsten Hey <cars...@debian.org> Date: Fri, 15 Jun 2012 17:36:06 +0200 Subject: [PATCH] initscripts: ignore noauto option in fstab for sysfs and proc For both filesystem types, the noauto option is only ignored for the default moint point. systemd in Fedore 16 also ignores the noauto option for both filesystem types with their default mount point, but respects other options, i.e., the entry is not completely ignored. upstart in the recent Ubuntu LTS release behaves the same way for sysfs. If it also does so for proc has not been tested. This commit fixes Debian bug #670106. --- debian/src/initscripts/lib/init/mount-functions.sh | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/debian/src/initscripts/lib/init/mount-functions.sh b/debian/src/initscripts/lib/init/mount-functions.sh index 4b5bf09..ca10dad 100644 --- a/debian/src/initscripts/lib/init/mount-functions.sh +++ b/debian/src/initscripts/lib/init/mount-functions.sh @@ -184,8 +184,24 @@ domount () { if read_fstab_entry "$MTPT" "$FSTYPE"; then case "$MNT_OPTS" in noauto|*,noauto|noauto,*|*,noauto,*) - return + case "$FSTYPE" in + sysfs) + if [ "$MTPT" != /sys ]; then + return + fi + ;; + proc) + if [ "$MTPT" != /proc ]; then + return + fi + ;; + *) + return + ;; + esac ;; + esac + case "$MNT_OPTS" in ?*) FSTAB_OPTS="-o$MNT_OPTS" ;; -- 1.7.2.5