[Pkg-sysvinit-commits] r405 - in sysvinit/trunk/debian: . initscripts/etc/default initscripts/etc/init.d initscripts/share initscripts/share/doc initscripts/share/doc/initscripts

Thomas Hood jdthood-guest at costa.debian.org
Mon Dec 19 18:40:57 UTC 2005


Author: jdthood-guest
Date: 2005-12-19 18:40:56 +0000 (Mon, 19 Dec 2005)
New Revision: 405

Added:
   sysvinit/trunk/debian/initscripts/share/doc/
   sysvinit/trunk/debian/initscripts/share/doc/initscripts/
   sysvinit/trunk/debian/initscripts/share/doc/initscripts/README.Debian
Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/default/tmpfs
   sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs
Log:
Move mounting of tmpfs's earlier

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2005-12-19 18:19:59 UTC (rev 404)
+++ sysvinit/trunk/debian/changelog	2005-12-19 18:40:56 UTC (rev 405)
@@ -1,4 +1,4 @@
-sysvinit (2.86.ds1-8~2) unstable; urgency=low
+sysvinit (2.86.ds1-8~3) unstable; urgency=low
 
   [ Petter Reinholdtsen ]
   * Upload to unstable  (Closes: #341075)
@@ -9,6 +9,7 @@
   * Override lintian warnings re: top-level dirs
   * Check for files under mountpoints more thoroughly
   * Don't fail to install on file-rc systems  (Closes: #343993)
+  * mountvirtfs: Mount tmpfs's earlier; move long comment to README.Debian
 
  -- Thomas Hood <jdthood at yahoo.co.uk>  Sun, 18 Dec 2005 00:00:58 +0100
 

Modified: sysvinit/trunk/debian/initscripts/etc/default/tmpfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/default/tmpfs	2005-12-19 18:19:59 UTC (rev 404)
+++ sysvinit/trunk/debian/initscripts/etc/default/tmpfs	2005-12-19 18:40:56 UTC (rev 405)
@@ -1,5 +1,9 @@
-# TMPFS_SIZE sets the maximum size (in bytes) that /dev/shm can use.
-# By default, the kernel sets this to half of available memory.
-# Note that the size will be rounded down to a multiple of the page size,
-# i.e., 4096 bytes.
-TMPFS_SIZE=
+# DEVSHM_SIZE sets the maximum size (in bytes) that /dev/shm can use.
+# SLASHRUN_SIZE sets the maximum size (in bytes) that /run can use.
+# Both of these default to the value of TMPFS_SIZE if the latter is set
+# and to half of installed RAM (the kernel's default) if not.
+#
+# The size will be rounded down to a multiple of the page size, namely, 4096 bytes.
+
+# DEVSHM_SIZE=
+# SLASHRUN_SIZE=

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs	2005-12-19 18:19:59 UTC (rev 404)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountvirtfs	2005-12-19 18:40:56 UTC (rev 405)
@@ -135,6 +135,9 @@
 }
 
 do_start () {
+	#
+	# Initialize mtab
+	#
 	DO_MTAB=
 	MOUNT_N=-n
 	MTAB_PATH="$(readlink -f /etc/mtab || :)"
@@ -151,18 +154,42 @@
 			fi
 			;;
 	esac
-
 	if [ "$DO_MTAB" ] && [ ! -f /etc/mtab ]
 	then
 		:> /etc/mtab
 	fi
-	
 	if selinux_enabled && which restorecon >/dev/null && [ -r /etc/mtab ]
 	then
 		restorecon /etc/mtab
 	fi
 
 	#
+	# Mount /run
+	#
+	RUN_OPT=
+	if [ "$RUN_SIZE" ]
+	then
+		RUN_OPT="-osize=$RUN_SIZE"
+	elif [ "$TMPFS_SIZE" ]
+	then
+		RUN_OPT="-osize=$TMPFS_SIZE"
+	fi
+	domount tmpfs "" /run -omode=755 $RUN_OPT
+
+	#
+	# Mount /dev/shm
+	#
+	SHM_OPT=
+	if [ "$SHM_SIZE" ]
+	then
+		SHM_OPT="-osize=$SHM_SIZE"
+	elif [ "$TMPFS_SIZE" ]
+	then
+		SHM_OPT="-osize=$TMPFS_SIZE"
+	fi
+	domount tmpfs shmfs /dev/shm $SHM_OPT
+
+	#
 	# Mount /proc
 	#
 	domount proc "" /proc
@@ -213,50 +240,7 @@
 		fi
 	fi
 
-	# Regarding tmpfs:
 	#
-	# Around kernel version 2.3.3x, a memory based filesystem was
-	# introduced to support POSIX shared memory, called 'shmfs'. 
-	# Later this filesystem was extended for general usage and a
-	# "tmpfs" could be mounted. The CONFIG_TMPFS kernel compile option
-	# must be set to 'y', as it is for Debian kernels.
-	#
-	# Early in the 2.4 kernel series, shmfs was renamed to tmpfs, but
-	# could be mounted using either 'shmfs' or 'tmpfs'. Starting with
-	# kernel version 2.5.44, the 'shmfs' alias was dropped.
-	#
-	# Confusingly, in kernels 2.3.x - 2.5.43 where both "shmfs" and
-	# "tmpfs" are present, disabling CONFIG_TMPFS actually removes
-	# support for shmfs, but tmpfs is still listed in /proc/filesystems
-	# to support SYSV and POSIX shared memory, and it should still be
-	# mounted under /dev/shm.
-	#
-	# Recommendation: always enable CONFIG_TMPFS and always mount
-	# using the tmpfs type. Forget about shmfs.
-	# 
-	# Tmpfs can be used as memory filesystem, so you can limit tmpfs
-	# max size using /etc/default/tmpfs to prevent tmpfs from using
-	# up all system memory.
-
-	#
-	# Mount /run
-	#
-	if [ "$RUNFS_SIZE" ]
-	then
-		RUNFS_OPT="-osize=${RUNFS_SIZE}"
-	fi
-	domount tmpfs "" /run -omode=755 $RUNFS_OPT
-
-	#
-	# Mount /dev/shm
-	#
-	if [ "$TMPFS_SIZE" ]
-	then
-		TMPFS_OPT="-osize=${TMPFS_SIZE}"
-	fi
-	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.

Added: sysvinit/trunk/debian/initscripts/share/doc/initscripts/README.Debian
===================================================================
--- sysvinit/trunk/debian/initscripts/share/doc/initscripts/README.Debian	2005-12-19 18:19:59 UTC (rev 404)
+++ sysvinit/trunk/debian/initscripts/share/doc/initscripts/README.Debian	2005-12-19 18:40:56 UTC (rev 405)
@@ -0,0 +1,25 @@
+tmpfs
+-----
+
+Around kernel version 2.3.3x, a memory based filesystem was
+introduced to support POSIX shared memory, called 'shmfs'. 
+Later this filesystem was extended for general usage and a
+"tmpfs" could be mounted. The CONFIG_TMPFS kernel compile option
+must be set to 'y', as it is for Debian kernels.
+
+Early in the 2.4 kernel series, shmfs was renamed to tmpfs, but
+could be mounted using either 'shmfs' or 'tmpfs'. Starting with
+kernel version 2.5.44, the 'shmfs' alias was dropped.
+
+Confusingly, in kernels 2.3.x - 2.5.43 where both "shmfs" and
+"tmpfs" are present, disabling CONFIG_TMPFS actually removes
+support for shmfs, but tmpfs is still listed in /proc/filesystems
+to support SYSV and POSIX shared memory, and it should still be
+mounted under /dev/shm.
+
+Recommendation: always enable CONFIG_TMPFS and always mount
+using the tmpfs type. Forget about shmfs.
+
+Tmpfs can be used as memory filesystem, so you can limit tmpfs
+max size using /etc/default/tmpfs to prevent tmpfs from using
+up all system memory.




More information about the Pkg-sysvinit-commits mailing list