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
|
@ -1,17 +1,15 @@
|
||||||
udevd=yes
|
udevd=yes
|
||||||
udev_events=yes
|
udev_events=yes
|
||||||
klogd=yes
|
|
||||||
syslogd=yes
|
|
||||||
checkfs=yes
|
checkfs=yes
|
||||||
mountfs=yes
|
mountfs=yes
|
||||||
swap=yes
|
swap=yes
|
||||||
sysclock=yes
|
sysclock=yes
|
||||||
random_seed=yes
|
random_seed=yes
|
||||||
auto_ifconfig=no
|
auto_ifconfig=no
|
||||||
dhcpcd_flags="-qL"
|
dhcpcd_flags="-L"
|
||||||
network=yes
|
network=yes
|
||||||
cleartmp=yes
|
cleartmp=yes
|
||||||
locale=yes
|
locale=yes
|
||||||
persistent_rules=yes
|
persistent_rules=yes
|
||||||
dmesg=yes
|
dmesg=yes
|
||||||
newsyslog=no newsyslog_flags="-b"
|
metalog=yes
|
||||||
|
|
|
@ -15,17 +15,15 @@ NETFS="$NETFS,nofuse,nofuseblk"
|
||||||
|
|
||||||
checkfs_start()
|
checkfs_start()
|
||||||
{
|
{
|
||||||
echo -n "Mounting root read-only... "
|
echo "Mounting root read-only."
|
||||||
mount -n -o remount,ro /
|
mount -n -o remount,ro /
|
||||||
show_rval
|
|
||||||
|
|
||||||
FORCEFSCK=
|
FORCEFSCK=
|
||||||
[ -f /forcefsck ] && FORCEFSCK="-- -f"
|
[ -f /forcefsck ] && FORCEFSCK="-- -f"
|
||||||
|
|
||||||
echo "Checking local filesystems... "
|
echo "Checking local filesystems..."
|
||||||
fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null
|
fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null
|
||||||
fsckret=$?
|
fsckret=$?
|
||||||
echo
|
|
||||||
if [ ${fsckret} -gt 1 ]; then
|
if [ ${fsckret} -gt 1 ]; then
|
||||||
echo "failed!"
|
echo "failed!"
|
||||||
if [ $((${fsckret}&2)) -eq 2 ]; then
|
if [ $((${fsckret}&2)) -eq 2 ]; then
|
||||||
|
|
|
@ -12,7 +12,7 @@ stop_cmd=":"
|
||||||
|
|
||||||
cleartmp_start()
|
cleartmp_start()
|
||||||
{
|
{
|
||||||
echo -n "Clearing temporary files... "
|
echo "Clearing temporary files."
|
||||||
|
|
||||||
rm -f /etc/nologin &>/dev/null
|
rm -f /etc/nologin &>/dev/null
|
||||||
rm -f /etc/shutdownpid &>/dev/null
|
rm -f /etc/shutdownpid &>/dev/null
|
||||||
|
@ -22,7 +22,6 @@ cleartmp_start()
|
||||||
(cd /var/run && find . ! -type d -exec rm -f -- {} \; )
|
(cd /var/run && find . ! -type d -exec rm -f -- {} \; )
|
||||||
: > /var/run/utmp
|
: > /var/run/utmp
|
||||||
chmod 0664 /var/run/utmp
|
chmod 0664 /var/run/utmp
|
||||||
show_rval
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
|
@ -21,33 +21,29 @@ locale_start()
|
||||||
# Check if requested locale was already created
|
# Check if requested locale was already created
|
||||||
if ! $(locale -a|grep -q $LOCALE.utf8); then
|
if ! $(locale -a|grep -q $LOCALE.utf8); then
|
||||||
[ ! -d /usr/lib/locale ] && mkdir -p /usr/lib/locale
|
[ ! -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}
|
localedef -i ${LOCALE} -f UTF-8 ${LOCALE}
|
||||||
show_rval
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set user defined locale
|
# Set user defined locale
|
||||||
[ -z "$LOCALE" ] && LOCALE="en_US"
|
[ -z "$LOCALE" ] && LOCALE="en_US"
|
||||||
echo -n "Setting locale: $LOCALE... "
|
echo "Setting locale: $LOCALE."
|
||||||
echo "export LANG=$LOCALE" >> /etc/profile.d/locale.sh
|
echo "export LANG=$LOCALE" >> /etc/profile.d/locale.sh
|
||||||
show_rval
|
|
||||||
|
|
||||||
if echo "$LOCALE" | grep -qi utf ; then
|
if echo "$LOCALE" | grep -qi utf ; then
|
||||||
if [ -n "$KEYMAP" ]; then
|
if [ -n "$KEYMAP" ]; then
|
||||||
echo -n "Loading keyboard map: $KEYMAP... "
|
echo "Loading keyboard map: $KEYMAP."
|
||||||
loadkeys -q -u $KEYMAP
|
loadkeys -q -u $KEYMAP
|
||||||
show_rval
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -n "$KEYMAP" ]; then
|
if [ -n "$KEYMAP" ]; then
|
||||||
echo -n "Loading keyboard map: $KEYMAP... "
|
echo "Loading keyboard map: $KEYMAP."
|
||||||
loadkeys -q $KEYMAP
|
loadkeys -q $KEYMAP
|
||||||
show_rval
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$CONSOLEFONT" ]; then
|
if [ -n "$CONSOLEFONT" ]; then
|
||||||
echo -n "Loading console font: $CONSOLEFONT... "
|
echo "Loading console font: $CONSOLEFONT."
|
||||||
# CONSOLEMAP in UTF-8 shouldn't be used
|
# CONSOLEMAP in UTF-8 shouldn't be used
|
||||||
if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | grep -qi utf ; then
|
if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | grep -qi utf ; then
|
||||||
CONSOLEMAP=""
|
CONSOLEMAP=""
|
||||||
|
@ -62,7 +58,6 @@ locale_start()
|
||||||
>/dev/null 2>&1
|
>/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
show_rval
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ NETFS="$NETFS,noshfs,nofuse,nofuseblk"
|
||||||
|
|
||||||
mountfs_start()
|
mountfs_start()
|
||||||
{
|
{
|
||||||
echo -n "Mounting local filesystems... "
|
echo "Mounting local filesystems."
|
||||||
mount -n -o remount,rw /
|
mount -n -o remount,rw /
|
||||||
rm -f /etc/mtab*
|
rm -f /etc/mtab*
|
||||||
# make sure / gets written to /etc/mtab
|
# make sure / gets written to /etc/mtab
|
||||||
|
@ -27,7 +27,6 @@ mountfs_start()
|
||||||
fi
|
fi
|
||||||
# now mount all the local filesystems
|
# now mount all the local filesystems
|
||||||
mount -a -t $NETFS
|
mount -a -t $NETFS
|
||||||
echo "done."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
|
@ -87,7 +87,7 @@ network_start()
|
||||||
tmp="$net_interfaces"
|
tmp="$net_interfaces"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n 'Configuring network interfaces:'
|
echo 'Configuring network interfaces.'
|
||||||
for int in ${tmp}; do
|
for int in ${tmp}; do
|
||||||
eval argslist=\$ifconfig_$int
|
eval argslist=\$ifconfig_$int
|
||||||
|
|
||||||
|
@ -106,8 +106,6 @@ network_start()
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n " $int"
|
|
||||||
|
|
||||||
# If $ifconfig_xxN is empty, then use
|
# If $ifconfig_xxN is empty, then use
|
||||||
# /etc/ifconfig.xxN, which we know exists due to
|
# /etc/ifconfig.xxN, which we know exists due to
|
||||||
# an earlier test.
|
# an earlier test.
|
||||||
|
@ -165,7 +163,6 @@ network_start()
|
||||||
done
|
done
|
||||||
configured_interfaces="$configured_interfaces $int"
|
configured_interfaces="$configured_interfaces $int"
|
||||||
done
|
done
|
||||||
echo "."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check $defaultroute, then /etc/mygate, for the name or address
|
# Check $defaultroute, then /etc/mygate, for the name or address
|
||||||
|
|
|
@ -14,16 +14,14 @@ persistent_start()
|
||||||
{
|
{
|
||||||
# Adding persistent network/cdrom generated rules
|
# Adding persistent network/cdrom generated rules
|
||||||
if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
|
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 \
|
cat /dev/.udev/tmp-rules--70-persistent-cd.rules \
|
||||||
>> /etc/udev/rules.d/70-persistent-cd.rules
|
>> /etc/udev/rules.d/70-persistent-cd.rules
|
||||||
show_rval
|
|
||||||
fi
|
fi
|
||||||
if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
|
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 \
|
cat /dev/.udev/tmp-rules--70-persistent-net.rules \
|
||||||
>> /etc/udev/rules.d/70-persistent-net.rules
|
>> /etc/udev/rules.d/70-persistent-net.rules
|
||||||
show_rval
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,8 @@ stop_cmd=":"
|
||||||
rseed_start()
|
rseed_start()
|
||||||
{
|
{
|
||||||
if [ -f /var/run/random-seed ]; then
|
if [ -f /var/run/random-seed ]; then
|
||||||
echo -n "Initializing random seed... "
|
echo "Initializing random seed."
|
||||||
cat /var/run/random-seed >/dev/urandom
|
cat /var/run/random-seed >/dev/urandom
|
||||||
show_rval
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,8 @@ stop_cmd=":"
|
||||||
|
|
||||||
swap_start()
|
swap_start()
|
||||||
{
|
{
|
||||||
echo -n "Activating swap... "
|
echo "Activating swap."
|
||||||
swapon -a
|
swapon -a
|
||||||
show_rval
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
|
@ -11,7 +11,7 @@ stop_cmd=":"
|
||||||
|
|
||||||
sysclock_start()
|
sysclock_start()
|
||||||
{
|
{
|
||||||
echo -n "Configuring system clock... "
|
echo "Configuring system clock."
|
||||||
[ ! -d /var/lib/hwclock ] && mkdir -p /var/lib/hwclock
|
[ ! -d /var/lib/hwclock ] && mkdir -p /var/lib/hwclock
|
||||||
if [ ! -f /var/lib/hwclock/adjtime ]; then
|
if [ ! -f /var/lib/hwclock/adjtime ]; then
|
||||||
echo "0.0 0 0.0" > /var/lib/hwclock/adjtime
|
echo "0.0 0 0.0" > /var/lib/hwclock/adjtime
|
||||||
|
@ -22,7 +22,6 @@ sysclock_start()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
hwclock $HWCLOCK_PARAMS 2>&1 >/dev/null
|
hwclock $HWCLOCK_PARAMS 2>&1 >/dev/null
|
||||||
show_rval
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
|
@ -11,10 +11,9 @@ stop_cmd=":"
|
||||||
|
|
||||||
udev_events_start()
|
udev_events_start()
|
||||||
{
|
{
|
||||||
echo -n "Waiting for udev uevents... "
|
echo "Waiting for udev uevents."
|
||||||
udevadm trigger
|
udevadm trigger
|
||||||
udevadm settle
|
udevadm settle
|
||||||
echo "done."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
|
@ -9,15 +9,12 @@ export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
. /etc/rc.subr
|
. /etc/rc.subr
|
||||||
. /etc/rc.conf
|
. /etc/rc.conf
|
||||||
|
|
||||||
# avoid staircase effect
|
|
||||||
stty onlcr
|
|
||||||
|
|
||||||
echo " "
|
|
||||||
echo "*** Initiating shutdown ***"
|
|
||||||
echo " "
|
|
||||||
|
|
||||||
[ -x /etc/rc.local.shutdown ] && /etc/rc.local.shutdown
|
[ -x /etc/rc.local.shutdown ] && /etc/rc.local.shutdown
|
||||||
|
|
||||||
|
echo "****************************************************"
|
||||||
|
echo " STOPPING SERVICES "
|
||||||
|
echo "****************************************************"
|
||||||
|
|
||||||
if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
|
if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
|
||||||
# Shutdown daemons
|
# Shutdown daemons
|
||||||
files=$(rcorder -k shutdown ${rcshutdown_rcorder_flags} /etc/rc.d/*)
|
files=$(rcorder -k shutdown ${rcshutdown_rcorder_flags} /etc/rc.d/*)
|
||||||
|
@ -28,22 +25,21 @@ if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
echo "*****************************************************"
|
||||||
|
echo " SYSTEM GOING DOWN "
|
||||||
|
echo "*****************************************************"
|
||||||
|
|
||||||
# Terminate all processes
|
# Terminate all processes
|
||||||
echo -n "Sending SIGTERM to processes... "
|
echo "Sending SIGTERM to processes."
|
||||||
killall5 -15 &> /dev/null
|
killall5 -15 > /dev/null
|
||||||
sleep 5
|
|
||||||
show_rval
|
|
||||||
|
|
||||||
echo -n "Sending SIGKILL to processes... "
|
echo "Sending SIGKILL to processes."
|
||||||
killall5 -9 &> /dev/null
|
killall5 -9 > /dev/null
|
||||||
sleep 1
|
|
||||||
show_rval
|
|
||||||
|
|
||||||
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
|
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
|
if [ "$TIMEZONE" != "" -a -e "/usr/share/zoneinfo/$TIMEZONE" ]; then
|
||||||
rm -f /etc/localtime
|
rm -f /etc/localtime
|
||||||
cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
|
cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
|
||||||
|
@ -56,7 +52,6 @@ else
|
||||||
HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime"
|
HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime"
|
||||||
fi
|
fi
|
||||||
hwclock $HWCLOCK_PARAMS
|
hwclock $HWCLOCK_PARAMS
|
||||||
show_rval
|
|
||||||
|
|
||||||
# removing psmouse module to fix some reboot issues on newer laptops
|
# removing psmouse module to fix some reboot issues on newer laptops
|
||||||
modprobe -r psmouse >/dev/null 2>&1
|
modprobe -r psmouse >/dev/null 2>&1
|
||||||
|
@ -64,36 +59,26 @@ modprobe -r psmouse >/dev/null 2>&1
|
||||||
# Write to wtmp file before unmounting
|
# Write to wtmp file before unmounting
|
||||||
halt -w
|
halt -w
|
||||||
|
|
||||||
echo -n "Deactivating swap... "
|
echo "Deactivating swap."
|
||||||
swapoff -a
|
swapoff -a
|
||||||
show_rval
|
|
||||||
|
|
||||||
echo -n "Unmounting filesystems... "
|
echo "Unmounting filesystems."
|
||||||
umount -a -r -t noramfs,notmpfs,nosysfs,noproc
|
umount -a -r -t noramfs,notmpfs,nosysfs,noproc
|
||||||
show_rval
|
|
||||||
|
|
||||||
if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
|
if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
|
||||||
if [ -x /sbin/lvm -a -d /sys/block ]; 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
|
lvm vgchange --ignorelockingfailure -an >/dev/null 2>&1
|
||||||
show_rval
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Remounting root filesystem read-only... "
|
echo "Remounting root filesystem read-only."
|
||||||
mount -n -o remount,ro /
|
mount -n -o remount,ro /
|
||||||
show_rval
|
|
||||||
|
|
||||||
# Power off or reboot
|
# Power off or reboot
|
||||||
if [ "$RUNLEVEL" = "0" ]; then
|
if [ "$RUNLEVEL" = "0" ]; then
|
||||||
echo
|
|
||||||
echo "*** POWER OFF ***"
|
|
||||||
echo
|
|
||||||
poweroff -d -f -h -i
|
poweroff -d -f -h -i
|
||||||
else
|
else
|
||||||
echo
|
|
||||||
echo "*** REBOOTING ***"
|
|
||||||
echo
|
|
||||||
# if kexec is installed and a kernel is loaded, use it
|
# if kexec is installed and a kernel is loaded, use it
|
||||||
[ -x /sbin/kexec ] && /sbin/kexec -e > /dev/null 2>&1
|
[ -x /sbin/kexec ] && /sbin/kexec -e > /dev/null 2>&1
|
||||||
reboot -d -f -i
|
reboot -d -f -i
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'initscripts'
|
# Template file for 'initscripts'
|
||||||
pkgname=initscripts
|
pkgname=initscripts
|
||||||
version=2009.03
|
version=2009.03
|
||||||
revision=1
|
revision=2
|
||||||
build_style=custom-install
|
build_style=custom-install
|
||||||
short_desc="xbps base system init scripts"
|
short_desc="xbps base system init scripts"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
|
Loading…
Reference in New Issue