From 2355f51b9e8276d03553a1f3dab987734904b938 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 29 Mar 2009 16:21:29 +0200 Subject: [PATCH] initscripts: run dhcpcd without -q, drop sysklogd, use metalog. Bump revision. --HG-- extra : convert_revision : 92395e9344284f2cfea1ee983d26b191fcfd77d8 --- templates/initscripts/files/defaults/rc.conf | 6 +-- templates/initscripts/files/rc.d/checkfs | 6 +-- templates/initscripts/files/rc.d/cleartmp | 3 +- templates/initscripts/files/rc.d/locale | 15 ++---- templates/initscripts/files/rc.d/mountfs | 3 +- templates/initscripts/files/rc.d/network | 5 +- .../initscripts/files/rc.d/persistent_rules | 6 +-- templates/initscripts/files/rc.d/random_seed | 3 +- templates/initscripts/files/rc.d/swap | 3 +- templates/initscripts/files/rc.d/sysclock | 3 +- templates/initscripts/files/rc.d/udev_events | 3 +- templates/initscripts/files/rc.shutdown | 51 +++++++------------ templates/initscripts/template | 2 +- 13 files changed, 37 insertions(+), 72 deletions(-) diff --git a/templates/initscripts/files/defaults/rc.conf b/templates/initscripts/files/defaults/rc.conf index 8ff5553451e..e29f9003eb8 100755 --- a/templates/initscripts/files/defaults/rc.conf +++ b/templates/initscripts/files/defaults/rc.conf @@ -1,17 +1,15 @@ udevd=yes udev_events=yes -klogd=yes -syslogd=yes checkfs=yes mountfs=yes swap=yes sysclock=yes random_seed=yes auto_ifconfig=no -dhcpcd_flags="-qL" +dhcpcd_flags="-L" network=yes cleartmp=yes locale=yes persistent_rules=yes dmesg=yes -newsyslog=no newsyslog_flags="-b" +metalog=yes diff --git a/templates/initscripts/files/rc.d/checkfs b/templates/initscripts/files/rc.d/checkfs index 9eaf204c8cc..e225daaee51 100755 --- a/templates/initscripts/files/rc.d/checkfs +++ b/templates/initscripts/files/rc.d/checkfs @@ -15,17 +15,15 @@ NETFS="$NETFS,nofuse,nofuseblk" checkfs_start() { - echo -n "Mounting root read-only... " + echo "Mounting root read-only." mount -n -o remount,ro / - show_rval FORCEFSCK= [ -f /forcefsck ] && FORCEFSCK="-- -f" - echo "Checking local filesystems... " + echo "Checking local filesystems..." fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null fsckret=$? - echo if [ ${fsckret} -gt 1 ]; then echo "failed!" if [ $((${fsckret}&2)) -eq 2 ]; then diff --git a/templates/initscripts/files/rc.d/cleartmp b/templates/initscripts/files/rc.d/cleartmp index 4f66706c3d0..2f250354252 100755 --- a/templates/initscripts/files/rc.d/cleartmp +++ b/templates/initscripts/files/rc.d/cleartmp @@ -12,7 +12,7 @@ stop_cmd=":" cleartmp_start() { - echo -n "Clearing temporary files... " + echo "Clearing temporary files." rm -f /etc/nologin &>/dev/null rm -f /etc/shutdownpid &>/dev/null @@ -22,7 +22,6 @@ cleartmp_start() (cd /var/run && find . ! -type d -exec rm -f -- {} \; ) : > /var/run/utmp chmod 0664 /var/run/utmp - show_rval } load_rc_config $name diff --git a/templates/initscripts/files/rc.d/locale b/templates/initscripts/files/rc.d/locale index a8b08356f01..a975a9143e9 100755 --- a/templates/initscripts/files/rc.d/locale +++ b/templates/initscripts/files/rc.d/locale @@ -21,33 +21,29 @@ locale_start() # Check if requested locale was already created if ! $(locale -a|grep -q $LOCALE.utf8); then [ ! -d /usr/lib/locale ] && mkdir -p /usr/lib/locale - echo -n "Building locale: $LOCALE... " + echo "Building locale: $LOCALE." localedef -i ${LOCALE} -f UTF-8 ${LOCALE} - show_rval fi # Set user defined locale [ -z "$LOCALE" ] && LOCALE="en_US" - echo -n "Setting locale: $LOCALE... " + echo "Setting locale: $LOCALE." echo "export LANG=$LOCALE" >> /etc/profile.d/locale.sh - show_rval if echo "$LOCALE" | grep -qi utf ; then if [ -n "$KEYMAP" ]; then - echo -n "Loading keyboard map: $KEYMAP... " + echo "Loading keyboard map: $KEYMAP." loadkeys -q -u $KEYMAP - show_rval fi else if [ -n "$KEYMAP" ]; then - echo -n "Loading keyboard map: $KEYMAP... " + echo "Loading keyboard map: $KEYMAP." loadkeys -q $KEYMAP - show_rval fi fi if [ -n "$CONSOLEFONT" ]; then - echo -n "Loading console font: $CONSOLEFONT... " + echo "Loading console font: $CONSOLEFONT." # CONSOLEMAP in UTF-8 shouldn't be used if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | grep -qi utf ; then CONSOLEMAP="" @@ -62,7 +58,6 @@ locale_start() >/dev/null 2>&1 fi done - show_rval fi } diff --git a/templates/initscripts/files/rc.d/mountfs b/templates/initscripts/files/rc.d/mountfs index f6398e87800..b1ffb391b07 100755 --- a/templates/initscripts/files/rc.d/mountfs +++ b/templates/initscripts/files/rc.d/mountfs @@ -15,7 +15,7 @@ NETFS="$NETFS,noshfs,nofuse,nofuseblk" mountfs_start() { - echo -n "Mounting local filesystems... " + echo "Mounting local filesystems." mount -n -o remount,rw / rm -f /etc/mtab* # make sure / gets written to /etc/mtab @@ -27,7 +27,6 @@ mountfs_start() fi # now mount all the local filesystems mount -a -t $NETFS - echo "done." } load_rc_config $name diff --git a/templates/initscripts/files/rc.d/network b/templates/initscripts/files/rc.d/network index 674664656ad..e43b7f130c6 100755 --- a/templates/initscripts/files/rc.d/network +++ b/templates/initscripts/files/rc.d/network @@ -87,7 +87,7 @@ network_start() tmp="$net_interfaces" fi - echo -n 'Configuring network interfaces:' + echo 'Configuring network interfaces.' for int in ${tmp}; do eval argslist=\$ifconfig_$int @@ -106,8 +106,6 @@ network_start() continue fi - echo -n " $int" - # If $ifconfig_xxN is empty, then use # /etc/ifconfig.xxN, which we know exists due to # an earlier test. @@ -165,7 +163,6 @@ network_start() done configured_interfaces="$configured_interfaces $int" done - echo "." fi # Check $defaultroute, then /etc/mygate, for the name or address diff --git a/templates/initscripts/files/rc.d/persistent_rules b/templates/initscripts/files/rc.d/persistent_rules index 48ffccfaf69..d902aa00d71 100755 --- a/templates/initscripts/files/rc.d/persistent_rules +++ b/templates/initscripts/files/rc.d/persistent_rules @@ -14,16 +14,14 @@ persistent_start() { # Adding persistent network/cdrom generated rules if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then - echo -n "Adding persistent cdrom udev rules... " + echo "Adding persistent cdrom udev rules." cat /dev/.udev/tmp-rules--70-persistent-cd.rules \ >> /etc/udev/rules.d/70-persistent-cd.rules - show_rval fi if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then - echo -n "Adding persistent network udev rules... " + echo "Adding persistent network udev rules." cat /dev/.udev/tmp-rules--70-persistent-net.rules \ >> /etc/udev/rules.d/70-persistent-net.rules - show_rval fi } diff --git a/templates/initscripts/files/rc.d/random_seed b/templates/initscripts/files/rc.d/random_seed index 225e450430e..da414d7c42e 100755 --- a/templates/initscripts/files/rc.d/random_seed +++ b/templates/initscripts/files/rc.d/random_seed @@ -12,9 +12,8 @@ stop_cmd=":" rseed_start() { if [ -f /var/run/random-seed ]; then - echo -n "Initializing random seed... " + echo "Initializing random seed." cat /var/run/random-seed >/dev/urandom - show_rval fi } diff --git a/templates/initscripts/files/rc.d/swap b/templates/initscripts/files/rc.d/swap index e3a89af8795..9e642b0e625 100755 --- a/templates/initscripts/files/rc.d/swap +++ b/templates/initscripts/files/rc.d/swap @@ -11,9 +11,8 @@ stop_cmd=":" swap_start() { - echo -n "Activating swap... " + echo "Activating swap." swapon -a - show_rval } load_rc_config $name diff --git a/templates/initscripts/files/rc.d/sysclock b/templates/initscripts/files/rc.d/sysclock index c4ed9193e9a..679692cbfcb 100755 --- a/templates/initscripts/files/rc.d/sysclock +++ b/templates/initscripts/files/rc.d/sysclock @@ -11,7 +11,7 @@ stop_cmd=":" sysclock_start() { - echo -n "Configuring system clock... " + echo "Configuring system clock." [ ! -d /var/lib/hwclock ] && mkdir -p /var/lib/hwclock if [ ! -f /var/lib/hwclock/adjtime ]; then echo "0.0 0 0.0" > /var/lib/hwclock/adjtime @@ -22,7 +22,6 @@ sysclock_start() fi hwclock $HWCLOCK_PARAMS 2>&1 >/dev/null - show_rval } load_rc_config $name diff --git a/templates/initscripts/files/rc.d/udev_events b/templates/initscripts/files/rc.d/udev_events index bc8d324eb86..270bd4ecc3b 100755 --- a/templates/initscripts/files/rc.d/udev_events +++ b/templates/initscripts/files/rc.d/udev_events @@ -11,10 +11,9 @@ stop_cmd=":" udev_events_start() { - echo -n "Waiting for udev uevents... " + echo "Waiting for udev uevents." udevadm trigger udevadm settle - echo "done." } load_rc_config $name diff --git a/templates/initscripts/files/rc.shutdown b/templates/initscripts/files/rc.shutdown index 3c395a82fc7..43cabd85e95 100755 --- a/templates/initscripts/files/rc.shutdown +++ b/templates/initscripts/files/rc.shutdown @@ -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 diff --git a/templates/initscripts/template b/templates/initscripts/template index b92792eb2b5..5e50da459b4 100644 --- a/templates/initscripts/template +++ b/templates/initscripts/template @@ -1,7 +1,7 @@ # Template file for 'initscripts' pkgname=initscripts version=2009.03 -revision=1 +revision=2 build_style=custom-install short_desc="xbps base system init scripts" maintainer="Juan RP "