[Pkg-sysvinit-commits] r970 - in sysvinit/trunk/debian: . initscripts initscripts/etc/init.d

Petter Reinholdtsen pere at costa.debian.org
Mon Sep 25 08:42:08 UTC 2006


Author: pere
Date: 2006-09-25 08:42:07 +0000 (Mon, 25 Sep 2006)
New Revision: 970

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh
   sysvinit/trunk/debian/initscripts/rcS.5
Log:
  * New default/tmpfs options RUN_SIZE and LOCK_SIZE, controlling the
    tmpfs size.  Modified the mount code to also use TMPFS_SIZE as a
    fallback value if set.

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2006-09-24 07:36:50 UTC (rev 969)
+++ sysvinit/trunk/debian/changelog	2006-09-25 08:42:07 UTC (rev 970)
@@ -3,6 +3,9 @@
   * Improve manual entry for RAMRUN and RAMLOCK.
   * Update mtab entry for /var/run/ when RAMRUN is enabled to match
     the options used when mounting it.
+  * New default/tmpfs options RUN_SIZE and LOCK_SIZE, controlling the
+    tmpfs size.  Modified the mount code to also use TMPFS_SIZE as a
+    fallback value if set.
 
  -- Petter Reinholdtsen <pere at debian.org>  Sun, 24 Sep 2006 09:18:11 +0200
 

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh	2006-09-24 07:36:50 UTC (rev 969)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountkernfs.sh	2006-09-25 08:42:07 UTC (rev 970)
@@ -45,11 +45,15 @@
 
 	# Mount /var/run and /var/lock as tmpfs if enabled
 	if [ yes = "$RAMRUN" ] ; then
-		domount tmpfs "" /var/run varrun -omode=0755,nosuid
+		RUN_OPT=
+		[ "${RUN_SIZE:=$TMPFS_SIZE}" ] && RUN_OPT=",size=$RUN_SIZE"
+		domount tmpfs "" /var/run varrun -omode=0755,nosuid$RUN_OPT
 		touch /var/run/.ramfs
 	fi
 	if [ yes = "$RAMLOCK" ] ; then
-		domount tmpfs "" /var/lock varlock -omode=1777,nodev,noexec,nosuid
+		LOCK_OPT=
+		[ "${LOCK_SIZE:=$TMPFS_SIZE}" ] && LOCK_OPT=",size=$LOCK_SIZE"
+		domount tmpfs "" /var/lock varlock -omode=1777,nodev,noexec,nosuid$LOCK_OPT
 		touch /var/lock/.ramfs
 	fi
 

Modified: sysvinit/trunk/debian/initscripts/rcS.5
===================================================================
--- sysvinit/trunk/debian/initscripts/rcS.5	2006-09-24 07:36:50 UTC (rev 969)
+++ sysvinit/trunk/debian/initscripts/rcS.5	2006-09-25 08:42:07 UTC (rev 970)
@@ -100,10 +100,14 @@
 .IP \fBRAMRUN\fP
 Make /var/run/ available as a ram file system (tmpfs).  Will also disable
 cleaning of /var/run/ during boot.  Set to 'yes' to enable, to 'no' to disable.
+The size of the tmpfs can be controlled using TMPFS_SIZE and RUN_SIZE in
+/etc/defaults/tmpfs.
 
 .IP \fBRAMLOCK\fP
 Make /var/lock/ available as a ram file system (tmpfs).  Will also disable
 cleaning of /var/lock/ during boot.  Set to 'yes' to enable, to 'no' to disable.
+The size of the tmpfs can be controlled using TMPFS_SIZE and LOCK_SIZE in
+/etc/defaults/tmpfs.
 
 .SH NOTE
 The \fBEDITMOTD\fP variable is no longer used.




More information about the Pkg-sysvinit-commits mailing list