[Pkg-sysvinit-devel] Bug#763965: initscripts: systemd.automount with option noauto in fstab should not mount mountpoint

Jakobus Schürz jakob at xundeenergie.at
Sat Oct 4 10:56:46 UTC 2014


Package: initscripts
Version: 2.88dsf-41+deb7u1
Severity: normal
Tags: patch

Dear Maintainer,

using systemd-automount trys to and mounts mountpoints, which have the
option "noauto" in fstab. 

exactly: the combination of "comment=systemd.automount,noauto" mounts
all this mountpoints on bootup. The problem is the file
/lib/init/mount-functions.sh

systemd puts automountpoints in mtab with "systemd-1" as device. The
mount-functions.sh ignores this and tries to mount all this mountpoints.

The patch


--- sysvinit-2.88dsf/debian/src/initscripts/lib/init/mount-functions.sh	2013-07-14 19:19:01.000000000 +0200
+++ /lib/init/mount-functions.sh	2014-10-04 12:10:55.377855961 +0200
@@ -215,6 +215,12 @@ domount () {
 	    DEVNAME=$FSTYPE
 	fi
 
+	case "$DEVNAME" in
+		systemd-1)
+			return
+			;;
+	esac
+
 	# Get the mount options from /etc/fstab
 	if read_fstab_entry "$MTPT" "$FSTYPE"; then
 		case "$MNT_OPTS" in


changes the behavior to the wanted. automountpoints with systemds
automount-mechanic and noauto stay unmounted on bootup.

Jakob


-- System Information:
Debian Release: 7.6
  APT prefers stable
  APT policy: (900, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-0.bpo.2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to de_AT.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initscripts depends on:
ii  coreutils       8.13-3.5
ii  debianutils     4.3.2
ii  libc6           2.13-38+deb7u4
ii  lsb-base        4.1+Debian8+deb7u1
ii  mount           2.20.1-5.3
ii  sysv-rc         2.88dsf-41+deb7u1
ii  sysvinit-utils  2.88dsf-41+deb7u1

Versions of packages initscripts recommends:
ii  e2fsprogs  1.42.5-1.1
ii  psmisc     22.19-1+deb7u1

initscripts suggests no packages.

-- Configuration Files:
/etc/init.d/halt changed [not included]
/etc/init.d/mountnfs.sh changed [not included]

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mount-functions.sh.patch
Type: text/x-diff
Size: 413 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20141004/ef59c2c5/attachment.patch>


More information about the Pkg-sysvinit-devel mailing list