initscripts: run dhcpcd without -q, drop sysklogd, use metalog.

Bump revision.

--HG--
extra : convert_revision : 92395e9344284f2cfea1ee983d26b191fcfd77d8
This commit is contained in:
Juan RP 2009-03-29 16:21:29 +02:00
parent 2115c77e53
commit 2355f51b9e
13 changed files with 37 additions and 72 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -11,9 +11,8 @@ stop_cmd=":"
swap_start()
{
echo -n "Activating swap... "
echo "Activating swap."
swapon -a
show_rval
}
load_rc_config $name

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 <xtraeme@gmail.com>"