Bug#917139: Do not ignore unmounting of "/run/mount" and "/run/media" in "/etc/init.d/umountfs"

Dmitry Bogatov KAction at debian.org
Mon Dec 24 14:17:37 GMT 2018


control: severity -1 important
justification: Possible data loss

[ May I as you to limit text with to 72? ]

[2018-12-23 07:35] "Gong S." <pthfdr at protonmail.ch>
> Package: initscripts
> Version: 2.93-1

> In "/etc/init.d/umountfs" line 28, everything under "/run/*" is not
> unmounted when shut ting down or rebooting the system, and this
> includes "/run/mount" and "/run/media".

Correct.

> Also it is not uncommon to symlink "/media" and "/mnt" to said
> locations as it does not leave automatically created folders after a
> reboot.

No doubt. Since /run is tmpfs, it is wiped on reboot.

> So if you mount disks as a normal user using "pmount" or "udisks",
> they are not unmount ed, resulting in data loss.

You want to say, that "pmount" and "udisks" are fine with /media
pointing to nowhere?

> I suggest you that you should only ignore "/run/lock" and "/run/shm"
> (if exist, as spec ified in "/etc/default/tmpfs").

Not that I understand in consequences of its presense/absesnce, but at
least /run/rpc_pipefs should be added to preserve current behaviour.

Question is, are there is some other filesystems, mounted under /run,
that should be ignored in `umountfs'?

Below I propose prelimitary patch:

diff --git a/debian/src/initscripts/etc/init.d/umountfs b/debian/src/initscripts/etc/init.d/umountfs
index 70ce46c8..60d61adf 100755
--- a/debian/src/initscripts/etc/init.d/umountfs
+++ b/debian/src/initscripts/etc/init.d/umountfs
@@ -25,7 +25,7 @@ do_stop () {
 	do
 		echo "$PROTECTED_MOUNTS" | grep -qs "^$DEV $MTPT " && continue
 		case "$MTPT" in
-		  /|/usr|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/sys/*|/run|/run/*|/dev/vcs)
+		  /|/usr|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/sys/*|/run|/run/lock|/run/shm|/run/rpc_pipefs/dev/vcs)
 			continue
 			;;
 		esac




More information about the Debian-init-diversity mailing list