aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initscripts.spec19
-rwxr-xr-xrc.d/rc6
-rwxr-xr-xrc.d/rc.sysinit61
-rw-r--r--sysconfig.txt6
-rw-r--r--sysconfig/init2
-rw-r--r--sysconfig/init.s3904
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp2
-rw-r--r--sysconfig/network-scripts/network-functions7
8 files changed, 58 insertions, 49 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 5c2b9a64..6d0facdf 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -1,6 +1,6 @@
Summary: The inittab file and the /etc/init.d scripts.
Name: initscripts
-Version: 7.93
+Version: 7.94
License: GPL
Group: System Environment/Base
Release: 1
@@ -206,6 +206,23 @@ rm -rf $RPM_BUILD_ROOT
%ghost %attr(0664,root,utmp) /var/run/utmp
%changelog
+* Sun Oct 31 2004 Florian La Roche <laroche@redhat.com>
+- /etc/rc.d/rc: use "LC_ALL=C grep" for small speedup
+- /etc/rc.d/rc.sysinit:
+ - change to use PROMPT=no as default, use kernel options 'forcefsck'
+ and 'confirm' instead
+ - do not compute "version", this is not used at all
+ - do not read udev.conf, this seems to be all in the start_udev script
+ - fix detection of "nomodules" kernel command line option
+ - read /proc/cmdline earlier and convert rhgb to use that, too
+ - load_module(): change redirection to /dev/null
+ - some checks for RHGB_STARTED="" looked strange
+- /etc/sysconfig/network-scripts/ifup-ppp:
+ - remove a call to basename with shell builtins
+- /etc/sysconfig/network-scripts/network-functions:
+ - remove some calls to basename/sed with shell builtins
+- sysconfig.txt: document new PROMPT=no default
+
* Mon Oct 18 2004 Bill Nottingham <notting@redhat.com> 7.93-1
- translation updates
- fix handling of GATEWAYDEV (#133575, <pekkas@netcore.fi>)
diff --git a/rc.d/rc b/rc.d/rc
index db221f8e..626fcaac 100755
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -56,7 +56,7 @@ for i in /etc/rc$runlevel.d/K* ; do
|| continue
# Bring the subsystem down.
- if egrep -q "(killproc |action )" $i ; then
+ if LC_ALL=C egrep -q "(killproc |action )" $i ; then
$i stop
else
action $"Stopping $subsys: " $i stop
@@ -84,7 +84,7 @@ for i in /etc/rc$runlevel.d/S* ; do
export LC_ALL=C
exec $i start
fi
- if egrep -q "(daemon |action |success |failure )" $i 2>/dev/null \
+ if LC_ALL=C egrep -q "(daemon |action |success |failure )" $i 2>/dev/null \
|| [ "$subsys" = "single" -o "$subsys" = "local" ]; then
$i start
else
@@ -94,4 +94,4 @@ done
rm -f /var/run/confirm
if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then
/usr/bin/rhgb-client --quit
-fi \ No newline at end of file
+fi
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 0613d0d3..b1d1808c 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -11,10 +11,6 @@ if [ -z "$IN_INITLOG" -a -x /sbin/initlog ]; then
fi
HOSTNAME=`/bin/hostname`
-HOSTTYPE=`uname -m`
-unamer=`uname -r`
-eval version=`echo $unamer | awk -F '.' '{ print "(" $1 " " $2 ")" }'`
-
if [ -f /etc/sysconfig/network ]; then
. /etc/sysconfig/network
fi
@@ -72,8 +68,7 @@ relabel_selinux() {
fi
}
-
-
+HOSTTYPE=`uname -m`
if [ "$HOSTTYPE" != "s390" -a "$HOSTTYPE" != "s390x" ]; then
last=0
for i in `LC_ALL=C grep '^[0-9].*respawn:/sbin/mingetty' /etc/inittab | sed 's/^.* tty\([0-9][0-9]*\).*/\1/g'`; do
@@ -115,9 +110,8 @@ else
PRODUCT=`sed "s/ release.*//g" /etc/redhat-release`
echo "$PRODUCT"
fi
-if [ "$PROMPT" != "no" ]; then
- echo -en $"\t\tPress 'I' to enter interactive startup."
- echo
+if [ "$PROMPT" = "yes" ]; then
+ echo -e $"\t\tPress 'I' to enter interactive startup."
fi
# Fix console loglevel
@@ -125,15 +119,14 @@ if [ -n "$LOGLEVEL" ]; then
/bin/dmesg -n $LOGLEVEL
fi
-if [ -f /etc/udev/udev.conf ];then
- . /etc/udev/udev.conf
-fi
-
[ -x /sbin/start_udev ] && /sbin/start_udev
+# Only read this once.
+cmdline=$(cat /proc/cmdline)
+
# Initialize hardware
if [ -f /proc/sys/kernel/modprobe ]; then
- if ! strstr cmdline nomodules && [ -f /proc/modules ] ; then
+ if ! strstr "$cmdline" nomodules && [ -f /proc/modules ] ; then
sysctl -w kernel.modprobe="/sbin/modprobe" >/dev/null 2>&1
sysctl -w kernel.hotplug="/sbin/hotplug" >/dev/null 2>&1
else
@@ -166,19 +159,19 @@ eval `kmodule | while read devtype mod ; do
done`
load_module () {
- LC_ALL=C fgrep -q "$1" /etc/hotplug/blacklist || modprobe $1 >/dev/null 2>&1
+ LC_ALL=C fgrep -q "$1" /etc/hotplug/blacklist 2>/dev/null || modprobe $1 >/dev/null 2>&1
}
# IDE
for module in $ide ; do
- load_module $module >/dev/null 2>&1
+ load_module $module
done
# SCSI
for module in `/sbin/modprobe -c | awk '/^alias[[:space:]]+scsi_hostadapter[[:space:]]/ { print $3 }'` $scsi; do
- load_module $module >/dev/null 2>&1
+ load_module $module
done
-load_module floppy >/dev/null 2>&1
+load_module floppy
echo -n $" storage"
@@ -192,26 +185,26 @@ interfaces=`ls ifcfg* | LC_ALL=C egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)'
for i in $interfaces ; do
eval $(LC_ALL=C fgrep "DEVICE=" ifcfg-$i)
- load_module $DEVICE >/dev/null 2>&1
+ load_module $DEVICE
done
popd >/dev/null 2>&1
for module in $network ; do
- load_module $module >/dev/null 2>&1
+ load_module $module
done
echo -n $" network"
# Sound
for module in `/sbin/modprobe -c | awk '/^alias[[:space:]]+snd-card-[[:digit:]]+[[:space:]]/ { print $3 }'` $audio; do
- load_module $module >/dev/null 2>&1
+ load_module $module
done
echo -n $" audio"
# Everything else (duck and cover)
for module in $other ; do
- load_module $module >/dev/null 2>&1
+ load_module $module
done
echo -n $" done"
@@ -225,7 +218,7 @@ echo "raidautorun /dev/md0" | nash --quiet
RHGB_STARTED=0
mount -n /dev/pts
-if LC_ALL=C fgrep rhgb /proc/cmdline > /dev/null 2>&1 && [ "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
+if strstr "$cmdline" rhgb && [ "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
LC_MESSAGES= /usr/bin/rhgb
RHGB_STARTED=1
fi
@@ -303,12 +296,9 @@ fi
update_boot_stage RChostname
action $"Setting hostname ${HOSTNAME}: " hostname ${HOSTNAME}
-# Only read this once.
-cmdline=$(cat /proc/cmdline)
-
# Initialiaze ACPI bits
if [ -d /proc/acpi ]; then
- for module in /lib/modules/$unamer/kernel/drivers/acpi/* ; do
+ for module in /lib/modules/`uname -r`/kernel/drivers/acpi/* ; do
insmod $module >/dev/null 2>&1
done
fi
@@ -334,7 +324,7 @@ elif [ -f /.autofsck ]; then
AUTOFSCK_OPT=-f
fi
- if [ "$PROMPT" != "no" ]; then
+ if [ "$PROMPT" = "yes" ]; then
if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then
if /sbin/getkey -c $AUTOFSCK_TIMEOUT -m $"Press N within %d seconds to not force file system integrity check..." n ; then
AUTOFSCK_OPT=
@@ -383,7 +373,7 @@ if [ -z "$fastboot" -a "$READONLY" != "yes" -a "X$ROOTFSTYPE" != "Xnfs" -a "X$RO
else
rootdev=/
fi
- if [ "${RHGB_STARTED}" != "" -a -w /etc/rhgb/temp/rhgb-console ]; then
+ if [ "${RHGB_STARTED}" != "0" -a -w /etc/rhgb/temp/rhgb-console ]; then
fsck -T -a $rootdev $fsckoptions > /etc/rhgb/temp/rhgb-console
else
initlog -c "fsck -T -a $rootdev $fsckoptions"
@@ -559,7 +549,7 @@ if [ -f /etc/raidtab ]; then
for i in `awk '{if ($1=="raiddev") print $2}' /etc/raidtab`
do
- RAIDDEV=`basename $i`
+ RAIDDEV=${i##*/} # RAIDDEV=`basename $i`
RAIDSTAT=`LC_ALL=C grep "^$RAIDDEV : active" /proc/mdstat`
if [ -z "$RAIDSTAT" ]; then
# First scan the /etc/fstab for the "noauto"-flag
@@ -646,7 +636,7 @@ _RUN_QUOTACHECK=0
if [ -z "$fastboot" ]; then
STRING=$"Checking filesystems"
echo $STRING
- if [ "${RHGB_STARTED}" != "" -a -w /etc/rhgb/temp/rhgb-console ]; then
+ if [ "${RHGB_STARTED}" != "0" -a -w /etc/rhgb/temp/rhgb-console ]; then
fsck -T -R -A -a $fsckoptions > /etc/rhgb/temp/rhgb-console
else
initlog -c "fsck -T -R -A -a $fsckoptions"
@@ -700,7 +690,7 @@ fi
action $"Mounting local filesystems: " mount -a -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs -O no_netdev
# Start the graphical boot, if necessary and not done yet.
-if LC_ALL=C fgrep rhgb /proc/cmdline > /dev/null 2>&1 && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
+if strstr "$cmdline" rhgb && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
LC_MESSAGES= /usr/bin/rhgb
RHGB_STARTED=1
fi
@@ -923,12 +913,14 @@ dmesg -s 131072 > /var/log/dmesg
# create the crash indicator flag to warn on crashes, offer fsck with timeout
touch /.autofsck &> /dev/null
-kill -TERM `/sbin/pidof getkey` >/dev/null 2>&1
+if [ "$PROMPT" = "yes" ]; then
+ kill -TERM `/sbin/pidof getkey` >/dev/null 2>&1
+fi
} &
if strstr "$cmdline" confirm ; then
touch /var/run/confirm
fi
-if [ "$PROMPT" != "no" ]; then
+if [ "$PROMPT" = "yes" ]; then
/sbin/getkey i && touch /var/run/confirm
fi
wait
@@ -937,4 +929,3 @@ wait
if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then
/usr/bin/rhgb-client --sysinit
fi
-
diff --git a/sysconfig.txt b/sysconfig.txt
index 0a7fa9aa..fa889d49 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -116,7 +116,11 @@ Files in /etc/sysconfig
A command to set the color to 'normal'. Defaults to nasty
ANSI sequences output by echo -e.
PROMPT=yes|no
- Set to 'no' to disable the key check for interactive mode.
+ Set to 'yes' to enable the key check for interactive mode as well as
+ asking if a filesystem check should be done. Default is 'no' and
+ the kernel command line option "forcefsck" can be used to check the
+ filesystems and "confirm" can be used to enable interactive startup
+ questions.
obsoleted values from earlier releases:
diff --git a/sysconfig/init b/sysconfig/init
index 1ffeaea6..a1b03f04 100644
--- a/sysconfig/init
+++ b/sysconfig/init
@@ -19,5 +19,3 @@ SETCOLOR_WARNING="echo -en \\033[0;33m"
SETCOLOR_NORMAL="echo -en \\033[0;39m"
# default kernel loglevel on boot (syslog will reset this)
LOGLEVEL=3
-# Set to anything other than 'no' to allow hotkey interactive startup...
-PROMPT=yes
diff --git a/sysconfig/init.s390 b/sysconfig/init.s390
index 79955f07..f3266798 100644
--- a/sysconfig/init.s390
+++ b/sysconfig/init.s390
@@ -2,6 +2,8 @@
# verbose => old-style bootup
# anything else => new style bootup without ANSI colors or positioning
BOOTUP=serial
+# Turn on graphical boot
+GRAPHICAL=no
# column to start "[ OK ]" label in
RES_COL=60
# terminal sequence to move to that column. You could change this
@@ -17,5 +19,3 @@ SETCOLOR_WARNING=
SETCOLOR_NORMAL=
# default kernel loglevel on boot (syslog will reset this)
LOGLEVEL=3
-# Set to anything other than 'no' to allow hotkey interactive startup...
-PROMPT=no
diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp
index 3d26ebe8..2e7e8184 100755
--- a/sysconfig/network-scripts/ifup-ppp
+++ b/sysconfig/network-scripts/ifup-ppp
@@ -11,7 +11,7 @@ if [ "${1}" = daemon ] ; then
shift
else
# just in case a full path to the configuration file is passed in
- CONFIG=$(basename $1)
+ CONFIG=${1##*/} # CONFIG=$(basename $1)
[ -f "${CONFIG}" ] || CONFIG=ifcfg-${1}
source_config
# don't start ppp-watch by xDSL
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 249978a6..5b9429d2 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -32,11 +32,10 @@ need_config ()
source_config ()
{
- DEVNAME=`basename $CONFIG | sed 's/^ifcfg-//g'`
-
- if basename $CONFIG | grep -q '[^g]-' ; then
+ DEVNAME=${CONFIG##*/ifcfg-} #DEVNAME=`basename $CONFIG | sed 's/^ifcfg-//g'`
+ if echo ${CONFIG##*/} | grep -q '[^g]-' ; then
PARENTCONFIG=`echo $CONFIG | sed 's/-[^-]*$//g'`
- PARENTDEVNAME=`basename $PARENTCONFIG | sed 's/^ifcfg-//g'`
+ PARENTDEVNAME=${PARENTCONFIG##*/ifcfg-}
[ -f $PARENTCONFIG ] || {
echo $"Missing config file $PARENTCONFIG." >&2
exit 1