[Initng-svn] r2361 - in initng: initfiles/system tools
svn at initng.thinktux.net
svn at initng.thinktux.net
Thu Dec 8 11:14:44 CET 2005
Author: jimmy
Date: Thu Dec 8 11:14:44 2005
New Revision: 2361
Modified:
initng/initfiles/system/bootmisc.ii
initng/initfiles/system/initial.ii
initng/initfiles/system/swap.ii
initng/tools/shutdown_script
Log:
Do swapoff in swap.ii not shutdown_script, also reset pam in bootmisc. and disable
hotplug on shutdown in initial.ii
Modified: initng/initfiles/system/bootmisc.ii
==============================================================================
--- initng/initfiles/system/bootmisc.ii (original)
+++ initng/initfiles/system/bootmisc.ii Thu Dec 8 11:14:44 2005
@@ -38,10 +38,6 @@
# Remove /var/run/utmpx (bug from the past)
@rm@ -f /var/run/utmpx &> /dev/null
-# Reset pam_console permissions
-if [ -x @/sbin/pam_console_apply@ ] && [ ! -c /dev/.devfsd ] ; then
- @/sbin/pam_console_apply@ -r >/dev/null &
-fi
#
# Clean up /tmp directory
@@ -75,5 +71,12 @@
exit 0
};
+ script stop = {
+ # Reset pam_console permissions
+ if [ -x @/sbin/pam_console_apply@ ] && [ ! -c /dev/.devfsd ] ; then
+ @/sbin/pam_console_apply@ -r >/dev/null &
+ fi
+ };
+
}
# vim:ts=4
Modified: initng/initfiles/system/initial.ii
==============================================================================
--- initng/initfiles/system/initial.ii (original)
+++ initng/initfiles/system/initial.ii Thu Dec 8 11:14:44 2005
@@ -156,4 +156,13 @@
wait
exit 0
};
+
+ script stop = {
+
+ # Increase the debug level a bit
+ @/sbin/dmesg@ -n 2
+
+ # Disable hotplug requests
+ echo "" > /proc/sys/kernel/hotplug
+ };
}
Modified: initng/initfiles/system/swap.ii
==============================================================================
--- initng/initfiles/system/swap.ii (original)
+++ initng/initfiles/system/swap.ii Thu Dec 8 11:14:44 2005
@@ -3,9 +3,6 @@
need = system/initial system/mountroot;
exec start = @/sbin/swapon@;
exec_args start = -a;
-# start {
-# #!@/bin/bash@
-# @/sbin/swapon@ -a
-# exit $?
-# }
+ exec stop = @/sbin/swapoff@;
+ exec_args stop = -a;
}
Modified: initng/tools/shutdown_script
==============================================================================
--- initng/tools/shutdown_script (original)
+++ initng/tools/shutdown_script Thu Dec 8 11:14:44 2005
@@ -44,31 +44,10 @@
sleep 1
-
-echo "Reset pam_console permissions ..."
-if [ -x /sbin/pam_console_apply ] && [ ! -c /dev/.devfsd ]
-then
- /sbin/pam_console_apply -r
-fi
-
-# We need to properly terminate devfsd to save the permissions
-if [ -n "$(ps --no-heading -C 'devfsd')" ]
-then
- echo "Stopping devfsd ..."
- killall -15 devfsd &>/dev/null
-fi
-
# Try to unmount all tmpfs filesystems not in use, else a deadlock may
# occure, bug #13599.
umount -art tmpfs &>/dev/null
-if [ -n "$(swapon -s 2>/dev/null)" ]
-then
- echo "Deactivating swap"
- swapoff -a &>/dev/null
-fi
-
-
# Unmounting should use /proc/mounts and work with/without devfsd running
# Credits for next function to unmount loop devices, goes to:
More information about the Initng-svn
mailing list