rc-scripts/trunk/rc.d: rc.shutdown rc.sysinit

baggins cvs at pld-linux.org
Thu Jan 12 16:29:16 CET 2006


Author: baggins
Date: Thu Jan 12 16:29:13 2006
New Revision: 6795

Modified:
   rc-scripts/trunk/rc.d/rc.shutdown
   rc-scripts/trunk/rc.d/rc.sysinit
Log:
- skip swap/quota/acct in vserver


Modified: rc-scripts/trunk/rc.d/rc.shutdown
==============================================================================
--- rc-scripts/trunk/rc.d/rc.shutdown	(original)
+++ rc-scripts/trunk/rc.d/rc.shutdown	Thu Jan 12 16:29:13 2006
@@ -37,13 +37,15 @@
 # Write to wtmp file before unmounting /var
 halt -w
 
-# Turn off swap, then unmount file systems.
-run_cmd "Turning off swap" swapoff -a
+if ! is_yes "$VSERVER"; then
+	# Turn off swap, then unmount file systems.
+	run_cmd "Turning off swap" swapoff -a
 
-[ -x /etc/rc.d/rc.acct ] && /etc/rc.d/rc.acct stop
+	[ -x /etc/rc.d/rc.acct ] && /etc/rc.d/rc.acct stop
 
-if [ -x /sbin/quotaoff ]; then
-	run_cmd "Turning off quotas for local filesystems" /sbin/quotaoff -a
+	if [ -x /sbin/quotaoff ]; then
+		run_cmd "Turning off quotas for local filesystems" /sbin/quotaoff -a
+	fi
 fi
 
 if ! is_yes "$VSERVER"; then

Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit	(original)
+++ rc-scripts/trunk/rc.d/rc.sysinit	Thu Jan 12 16:29:13 2006
@@ -746,25 +746,22 @@
 		' /proc/mounts /etc/fstab
 		ok
 	fi
-fi
 
-if [ "$_RUN_QUOTACHECK" = "1" -a -x /sbin/quotacheck ]; then
-	run_cmd "Checking filesystem quotas" /sbin/quotacheck -vnugRa
-fi
 
-# Turn on quota
-if [ -x /sbin/quotaon ]; then
-	run_cmd "Turning on quotas for local filesystems" /sbin/quotaon -aug
-fi
+	if [ "$_RUN_QUOTACHECK" = "1" -a -x /sbin/quotacheck ]; then
+		run_cmd "Checking filesystem quotas" /sbin/quotacheck -vnugRa
+	fi
 
-[ -n "$SELINUX" ] && [ -f /.autorelabel ] && relabel_selinux
+	# Turn on quota
+	if [ -x /sbin/quotaon ]; then
+		run_cmd "Turning on quotas for local filesystems" /sbin/quotaon -aug
+	fi
 
-# Turn on process accounting
-if [ -x /etc/rc.d/rc.acct ]; then
-	/etc/rc.d/rc.acct start
-fi
+	# Turn on process accounting
+	if [ -x /etc/rc.d/rc.acct ]; then
+		/etc/rc.d/rc.acct start
+	fi
 
-if ! is_yes "$VSERVER"; then
 	# Set the clock if timezone definition wasn't available (eg. /usr not mounted)
 	if is_yes "$TIME_SETUP_DELAYED"; then
 		if run_cmd "$(nls 'Setting clock')$CLOCKDEF" /sbin/hwclock $CLOCKFLAGS; then
@@ -786,6 +783,8 @@
 	/sbin/sysctl -e -p /etc/sysctl.conf > /dev/null 2>&1
 fi
 
+[ -n "$SELINUX" ] && [ -f /.autorelabel ] && relabel_selinux
+
 # Clean up /.
 rm -f /fastboot /fsckoptions /forcefsck /halt /poweroff
 
@@ -830,9 +829,11 @@
 chown root:root /tmp/.ICE-unix
 [ -n "$SELINUX" ] && restorecon /tmp/.ICE-unix >/dev/null 2>&1
 
-# Right, now turn on swap in case we swap to files
-swapon -a >/dev/null 2>&1
-run_cmd "Enabling swap space" /bin/true
+if ! is_yes "$VSERVER"; then
+	# Right, now turn on swap in case we swap to files
+	swapon -a >/dev/null 2>&1
+	run_cmd "Enabling swap space" /bin/true
+fi
 
 # If a SCSI tape has been detected, load the st module unconditionally
 # since many SCSI tapes don't deal well with st being loaded and unloaded


More information about the pld-cvs-commit mailing list