Bug#238963: Merging mountkernfs and mountvirtfs
Hi,
Could you apply /etc/init.d/mountkernfs explanations about each
filesystems into /etc/init.d/mountvirtfs for future notes?
Plus this patch disables "set -e", see #232122.
Except for this, it's fine for me.
I plan to adopt the patch written by Nathanael Nerode
<neroden@twcny.rr.com> in #230857. So I don't set any Conflicts: with
initscripts.
Regards,
-- gotom
--- mountvirtfs.org 2004-04-17 10:54:46.000000000 +0900
+++ mountvirtfs 2004-04-17 10:54:19.000000000 +0900
@@ -8,10 +8,16 @@
# only if not mounted yet, and only updates /etc/mtab
# if it is writable and there is a need.
#
+# The same function was provided by mountkernfs in
+# glibc package, and it was integrated into this file.
+# - 2004-04-17 GOTO Masanori <gotom@debian.org>
+#
# Version: @(#)mountvirtfs 2.85-12 21-Mar-2004 miquels
#
-set -e
+# "set -e" is harmful because this script is failed when mount
+# operation is not succeeded under non-default filesystem layout.
+#set -e
PATH=/lib/init:/bin:/sbin
@@ -97,6 +103,10 @@
domount sysfs "" /sys
# Mount /dev/pts. Create master ptmx node if needed.
+#
+# As of 2.5.68, devpts is not automounted when using devfs. So we
+# mount devpts if it is compiled in (older devfs didn't require it
+# to be compiled in at all).
if dir_writable /dev && [ ! -c /dev/ptmx ]
then
mknod --mode=666 /dev/ptmx c 5 2
@@ -104,6 +114,22 @@
domount devpts "" /dev/pts -ogid=$TTYGRP,mode=$TTYMODE
# Mount tmpfs (formerly shmfs).
+#
+# tmpfs is formerly known as shmfs, which is needed to use POSIX
+# shared memory functions. shmfs was introduced in kernel 2.3.3x,
+# but its name was changed in early kernel 2.4. So we need to
+# check both shmfs and tmpfs.
+#
+# The early days in kernel 2.3.3x, there was only shmfs. Then
+# tmpfs was introduced. Kernel 2.3.x - 2.5.44 has both shmfs and
+# tmpfs. If CONFIG_TMPFS is disabled, shmfs becomes unavailable,
+# but tmpfs is still listed in /proc/filesystems for SYSV shared
+# memory and anonymous memory. As of 2.5.45, shmfs is vanished from
+# /proc/filesystems entry, and CONFIG_TMPFS is affected only tmpfs.
+#
+# tmpfs can be used as memory filesystem, so you can limit tmpfs
+# max size using /etc/default/tmpfs to prevent user from
+# consuming system memory.
if [ -n "$TMPFS_SIZE" ]
then
tmpfs_opt="-osize=${TMPFS_SIZE}"
@@ -111,6 +137,14 @@
domount tmpfs shmfs /dev/shm $tmpfs_opt
# Mount usbfs/usbdevfs if /proc/bus/usb is present.
+#
+# usbfs/usbdevfs is used for USB related binaries/libraries.
+# "usbfs" and "usbdevfs" is the exact same filesystem.
+# "usbdevfs" was renamed to "usbfs" by linux usb developers,
+# because people sometimes mistook it as a part of devfs. usbfs
+# will be altered by other filesystem (e.g. sysfs), and no
+# package does not use it, then this mount operation should be
+# dropped.
if [ -d /proc/bus/usb ]
then
domount usbfs usbdevfs /proc/bus/usb
Reply to: