initscripts: run dhcpcd without -q, drop sysklogd, use metalog.
Bump revision. --HG-- extra : convert_revision : 92395e9344284f2cfea1ee983d26b191fcfd77d8
This commit is contained in:
parent
2115c77e53
commit
2355f51b9e
13 changed files with 37 additions and 72 deletions
|
@ -9,15 +9,12 @@ export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|||
. /etc/rc.subr
|
||||
. /etc/rc.conf
|
||||
|
||||
# avoid staircase effect
|
||||
stty onlcr
|
||||
|
||||
echo " "
|
||||
echo "*** Initiating shutdown ***"
|
||||
echo " "
|
||||
|
||||
[ -x /etc/rc.local.shutdown ] && /etc/rc.local.shutdown
|
||||
|
||||
echo "****************************************************"
|
||||
echo " STOPPING SERVICES "
|
||||
echo "****************************************************"
|
||||
|
||||
if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
|
||||
# Shutdown daemons
|
||||
files=$(rcorder -k shutdown ${rcshutdown_rcorder_flags} /etc/rc.d/*)
|
||||
|
@ -28,22 +25,21 @@ if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
|
|||
fi
|
||||
|
||||
echo
|
||||
echo "*****************************************************"
|
||||
echo " SYSTEM GOING DOWN "
|
||||
echo "*****************************************************"
|
||||
|
||||
# Terminate all processes
|
||||
echo -n "Sending SIGTERM to processes... "
|
||||
killall5 -15 &> /dev/null
|
||||
sleep 5
|
||||
show_rval
|
||||
echo "Sending SIGTERM to processes."
|
||||
killall5 -15 > /dev/null
|
||||
|
||||
echo -n "Sending SIGKILL to processes... "
|
||||
killall5 -9 &> /dev/null
|
||||
sleep 1
|
||||
show_rval
|
||||
echo "Sending SIGKILL to processes."
|
||||
killall5 -9 > /dev/null
|
||||
|
||||
echo -n "Saving random seed... "
|
||||
echo "Saving random seed."
|
||||
dd if=/dev/urandom of=/var/run/random-seed count=1 bs=512 2> /dev/null
|
||||
show_rval
|
||||
|
||||
echo -n "Saving system clock... "
|
||||
echo "Saving system clock."
|
||||
if [ "$TIMEZONE" != "" -a -e "/usr/share/zoneinfo/$TIMEZONE" ]; then
|
||||
rm -f /etc/localtime
|
||||
cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
|
||||
|
@ -56,7 +52,6 @@ else
|
|||
HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime"
|
||||
fi
|
||||
hwclock $HWCLOCK_PARAMS
|
||||
show_rval
|
||||
|
||||
# removing psmouse module to fix some reboot issues on newer laptops
|
||||
modprobe -r psmouse >/dev/null 2>&1
|
||||
|
@ -64,36 +59,26 @@ modprobe -r psmouse >/dev/null 2>&1
|
|||
# Write to wtmp file before unmounting
|
||||
halt -w
|
||||
|
||||
echo -n "Deactivating swap... "
|
||||
echo "Deactivating swap."
|
||||
swapoff -a
|
||||
show_rval
|
||||
|
||||
echo -n "Unmounting filesystems... "
|
||||
echo "Unmounting filesystems."
|
||||
umount -a -r -t noramfs,notmpfs,nosysfs,noproc
|
||||
show_rval
|
||||
|
||||
if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
|
||||
if [ -x /sbin/lvm -a -d /sys/block ]; then
|
||||
echo -n "Deactivating LVM2 groups... "
|
||||
echo "Deactivating LVM2 groups."
|
||||
lvm vgchange --ignorelockingfailure -an >/dev/null 2>&1
|
||||
show_rval
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "Remounting root filesystem read-only... "
|
||||
echo "Remounting root filesystem read-only."
|
||||
mount -n -o remount,ro /
|
||||
show_rval
|
||||
|
||||
# Power off or reboot
|
||||
if [ "$RUNLEVEL" = "0" ]; then
|
||||
echo
|
||||
echo "*** POWER OFF ***"
|
||||
echo
|
||||
poweroff -d -f -h -i
|
||||
else
|
||||
echo
|
||||
echo "*** REBOOTING ***"
|
||||
echo
|
||||
# if kexec is installed and a kernel is loaded, use it
|
||||
[ -x /sbin/kexec ] && /sbin/kexec -e > /dev/null 2>&1
|
||||
reboot -d -f -i
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue