initscripts: misc changes, bump to 2009-03.

--HG--
extra : convert_revision : 97fb9127cb91659331f1574a19a8871fed30a0ab
This commit is contained in:
Juan RP 2009-03-26 10:07:50 +01:00
parent a4ee56a799
commit a3190ec48c
13 changed files with 60 additions and 57 deletions

View File

@ -10,46 +10,48 @@ name="checkfs"
start_cmd="checkfs_start"
stop_cmd=":"
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk"
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs"
NETFS="$NETFS,nofuse,nofuseblk"
checkfs_start()
{
echo -n "=> Mounting root read-only... "
echo -n "Mounting root read-only... "
mount -n -o remount,ro /
show_rval
FORCEFSCK=
[ -f /forcefsck ] && FORCEFSCK="-- -f"
echo -n "=> Checking filesystems... "
if grep -qw quiet /proc/cmdline; then
fsck -A -T -C -a -t $NETFS $FORCEFSCK >/dev/null 2>&1
else
fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null
fi
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
echo
echo "********************** REBOOT REQUIRED *********************"
echo "* *"
echo "* The system will be rebooted automatically in 15 seconds. *"
echo "* *"
echo "************************************************************"
echo "************** REBOOT REQUIRED *************"
echo
sleep 15
echo " The system will be rebooted automatically"
echo " in 5 seconds."
echo
echo "********************************************"
echo
sleep 5
else
echo
echo "***************** FILESYSTEM CHECK FAILED ****************"
echo "* *"
echo "* Please repair manually and reboot. Note that the root *"
echo "* file system is currently mounted read-only. To remount *"
echo "* it read-write type: mount -n -o remount,rw / *"
echo "* When you exit the maintenance shell the system will *"
echo "* reboot automatically. *"
echo "* *"
echo "************************************************************"
echo "********* FILESYSTEM CHECK FAILED ************"
echo
echo " Please repair manually and reboot. Note that"
echo " the root filesystem is currently mounted"
echo " read-only. To remount it read-write type:"
echo
echo " mount -n -o remount,rw /"
echo
echo " When you exit the maintenance shell the system"
echo " will reboot automatically."
echo
echo "************************************************"
echo
sulogin -p
fi
@ -59,7 +61,6 @@ checkfs_start()
reboot -f
exit 0
fi
show_rval
}
load_rc_config $name

View File

@ -12,7 +12,7 @@ stop_cmd=":"
cleartmp_start()
{
echo -n "=> Clearing temporary files... "
echo -n "Clearing temporary files... "
rm -f /etc/nologin &>/dev/null
rm -f /etc/shutdownpid &>/dev/null

View File

@ -19,35 +19,35 @@ locale_start()
chmod 755 /etc/profile.d/locale.sh
# Check if requested locale was already created
if $(locale -a|grep -q $LOCALE); then
if ! $(locale -a|grep -q $LOCALE.utf8); then
[ ! -d /usr/lib/locale ] && mkdir -p /usr/lib/locale
echo -n "=> Building locale: $LOCALE... "
localedef -i ${LOCALE%.*} -f UTF-8 ${LOCALE}
echo -n "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 -n "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 -n "Loading keyboard map: $KEYMAP... "
loadkeys -q -u $KEYMAP
show_rval
fi
else
if [ -n "$KEYMAP" ]; then
echo -n "=> Loading keyboard map: $KEYMAP... "
echo -n "Loading keyboard map: $KEYMAP... "
loadkeys -q $KEYMAP
show_rval
fi
fi
if [ -n "$CONSOLEFONT" ]; then
echo -n "=> Loading console font: $CONSOLEFONT... "
echo -n "Loading console font: $CONSOLEFONT... "
# CONSOLEMAP in UTF-8 shouldn't be used
if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | grep -qi utf ; then
CONSOLEMAP=""

View File

@ -10,11 +10,12 @@ name="mountfs"
start_cmd="mountfs_start"
stop_cmd=":"
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk"
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs"
NETFS="$NETFS,noshfs,nofuse,nofuseblk"
mountfs_start()
{
echo -n "=> Mounting local filesystems... "
echo -n "Mounting local filesystems... "
mount -n -o remount,rw /
rm -f /etc/mtab*
# make sure / gets written to /etc/mtab

View File

@ -21,7 +21,7 @@ network_start()
{
# set hostname, turn on network
#
echo "=> Starting network."
echo "Starting network."
# If $hostname is set, use it for my Internet name,
# otherwise use /etc/myname
@ -30,7 +30,7 @@ network_start()
hostname=$(cat /etc/myname)
fi
if [ -n "$hostname" ]; then
echo "=> Setting hostname: $hostname."
echo "Setting hostname: $hostname."
hostname $hostname
fi
@ -87,7 +87,7 @@ network_start()
tmp="$net_interfaces"
fi
echo -n '=> Configuring network interfaces:'
echo -n 'Configuring network interfaces:'
for int in ${tmp}; do
eval argslist=\$ifconfig_$int
@ -200,11 +200,11 @@ network_start()
network_stop()
{
echo "=> Stopping network."
echo "Stopping network."
# down interfaces
#
echo -n '=> Downing network interfaces:'
echo -n 'Downing network interfaces:'
if [ "$net_interfaces" != NO ]; then
if checkyesno auto_ifconfig; then
tmp=$(ls /sys/class/net/eth*)

View File

@ -14,13 +14,13 @@ 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 -n "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 -n "Adding persistent network udev rules... "
cat /dev/.udev/tmp-rules--70-persistent-net.rules \
>> /etc/udev/rules.d/70-persistent-net.rules
show_rval

View File

@ -12,7 +12,7 @@ stop_cmd=":"
rseed_start()
{
if [ -f /var/run/random-seed ]; then
echo -n "=> Initializing random seed... "
echo -n "Initializing random seed... "
cat /var/run/random-seed >/dev/urandom
show_rval
fi

View File

@ -11,7 +11,7 @@ stop_cmd=":"
swap_start()
{
echo -n "=> Activating swap... "
echo -n "Activating swap... "
swapon -a
show_rval
}

View File

@ -11,7 +11,7 @@ stop_cmd=":"
sysclock_start()
{
echo -n "=> Configuring system clock... "
echo -n "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

View File

@ -11,7 +11,7 @@ stop_cmd=":"
udev_events_start()
{
echo -n "=> Waiting for udev uevents... "
echo -n "Waiting for udev uevents... "
udevadm trigger
udevadm settle
echo "done."

View File

@ -27,22 +27,23 @@ if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
done
fi
echo
# Terminate all processes
echo -n "=> Sending SIGTERM to processes... "
echo -n "Sending SIGTERM to processes... "
killall5 -15 &> /dev/null
sleep 5
show_rval
echo -n "=> Sending SIGKILL to processes... "
echo -n "Sending SIGKILL to processes... "
killall5 -9 &> /dev/null
sleep 1
show_rval
echo -n "=> Saving random seed... "
echo -n "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 -n "Saving system clock... "
if [ "$TIMEZONE" != "" -a -e "/usr/share/zoneinfo/$TIMEZONE" ]; then
rm -f /etc/localtime
cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
@ -63,23 +64,23 @@ modprobe -r psmouse >/dev/null 2>&1
# Write to wtmp file before unmounting
halt -w
echo -n "=> Deactivating swap... "
echo -n "Deactivating swap... "
swapoff -a
show_rval
echo -n "=> Unmounting filesystems... "
echo -n "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 -n "Deactivating LVM2 groups... "
lvm vgchange --ignorelockingfailure -an >/dev/null 2>&1
show_rval
fi
fi
echo -n "=> Remounting root filesystem read-only... "
echo -n "Remounting root filesystem read-only... "
mount -n -o remount,ro /
show_rval

View File

@ -545,7 +545,7 @@ run_rc_command()
# setup the command to run, and run it
#
echo "=> Starting ${name}."
echo "Starting ${name}."
if [ -n "$_chroot" ]; then
_doit="\
${_env:+env $_env }\
@ -595,7 +595,7 @@ $command $rc_flags $command_args"
# send the signal to stop
#
echo "=> Stopping ${name}."
echo "Stopping ${name}."
_doit="kill -${sig_stop:-TERM} $rc_pid"
if [ -n "$_user" ]; then
_doit="su -m $_user -c 'sh -c \"$_doit\"'"
@ -624,7 +624,7 @@ $command $rc_flags $command_args"
fi
exit 1
fi
echo "=> Reloading ${name} config files."
echo "Reloading ${name} config files."
if ! eval $_precmd && [ -z "$rc_force" ]; then
return 1
fi

View File

@ -1,6 +1,6 @@
# Template file for 'initscripts'
pkgname=initscripts
version=2009.01
version=2009.03
build_style=custom-install
short_desc="xbps base system init scripts"
maintainer="Juan RP <xtraeme@gmail.com>"