diff options
author | Bill Nottingham <notting@redhat.com> | 2004-11-01 19:14:18 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2004-11-01 19:14:18 +0000 |
commit | d39710983aa00105653475f6e8b908130bc5a4c0 (patch) | |
tree | 0bbb2db257f70534bd54e8db79c8f980eead91b9 /rc.d | |
parent | 60e9d11be1e1b6e6aa05875459a32c0a3e7b10b1 (diff) | |
download | initscripts-d39710983aa00105653475f6e8b908130bc5a4c0.tar initscripts-d39710983aa00105653475f6e8b908130bc5a4c0.tar.gz initscripts-d39710983aa00105653475f6e8b908130bc5a4c0.tar.bz2 initscripts-d39710983aa00105653475f6e8b908130bc5a4c0.tar.xz initscripts-d39710983aa00105653475f6e8b908130bc5a4c0.zip |
revert some stuff
Diffstat (limited to 'rc.d')
-rwxr-xr-x | rc.d/rc.sysinit | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index b1d1808c..0613d0d3 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -11,6 +11,10 @@ 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 @@ -68,7 +72,8 @@ 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 @@ -110,8 +115,9 @@ else PRODUCT=`sed "s/ release.*//g" /etc/redhat-release` echo "$PRODUCT" fi -if [ "$PROMPT" = "yes" ]; then - echo -e $"\t\tPress 'I' to enter interactive startup." +if [ "$PROMPT" != "no" ]; then + echo -en $"\t\tPress 'I' to enter interactive startup." + echo fi # Fix console loglevel @@ -119,14 +125,15 @@ if [ -n "$LOGLEVEL" ]; then /bin/dmesg -n $LOGLEVEL fi -[ -x /sbin/start_udev ] && /sbin/start_udev +if [ -f /etc/udev/udev.conf ];then + . /etc/udev/udev.conf +fi -# Only read this once. -cmdline=$(cat /proc/cmdline) +[ -x /sbin/start_udev ] && /sbin/start_udev # 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 @@ -159,19 +166,19 @@ eval `kmodule | while read devtype mod ; do done` load_module () { - LC_ALL=C fgrep -q "$1" /etc/hotplug/blacklist 2>/dev/null || modprobe $1 >/dev/null 2>&1 + LC_ALL=C fgrep -q "$1" /etc/hotplug/blacklist || modprobe $1 >/dev/null 2>&1 } # IDE for module in $ide ; do - load_module $module + load_module $module >/dev/null 2>&1 done # SCSI for module in `/sbin/modprobe -c | awk '/^alias[[:space:]]+scsi_hostadapter[[:space:]]/ { print $3 }'` $scsi; do - load_module $module + load_module $module >/dev/null 2>&1 done -load_module floppy +load_module floppy >/dev/null 2>&1 echo -n $" storage" @@ -185,26 +192,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 + load_module $DEVICE >/dev/null 2>&1 done popd >/dev/null 2>&1 for module in $network ; do - load_module $module + load_module $module >/dev/null 2>&1 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 + load_module $module >/dev/null 2>&1 done echo -n $" audio" # Everything else (duck and cover) for module in $other ; do - load_module $module + load_module $module >/dev/null 2>&1 done echo -n $" done" @@ -218,7 +225,7 @@ echo "raidautorun /dev/md0" | nash --quiet RHGB_STARTED=0 mount -n /dev/pts -if strstr "$cmdline" rhgb && [ "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then +if LC_ALL=C fgrep rhgb /proc/cmdline > /dev/null 2>&1 && [ "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then LC_MESSAGES= /usr/bin/rhgb RHGB_STARTED=1 fi @@ -296,9 +303,12 @@ 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/`uname -r`/kernel/drivers/acpi/* ; do + for module in /lib/modules/$unamer/kernel/drivers/acpi/* ; do insmod $module >/dev/null 2>&1 done fi @@ -324,7 +334,7 @@ elif [ -f /.autofsck ]; then AUTOFSCK_OPT=-f fi - if [ "$PROMPT" = "yes" ]; then + if [ "$PROMPT" != "no" ]; 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= @@ -373,7 +383,7 @@ if [ -z "$fastboot" -a "$READONLY" != "yes" -a "X$ROOTFSTYPE" != "Xnfs" -a "X$RO else rootdev=/ fi - if [ "${RHGB_STARTED}" != "0" -a -w /etc/rhgb/temp/rhgb-console ]; then + if [ "${RHGB_STARTED}" != "" -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" @@ -549,7 +559,7 @@ if [ -f /etc/raidtab ]; then for i in `awk '{if ($1=="raiddev") print $2}' /etc/raidtab` do - RAIDDEV=${i##*/} # RAIDDEV=`basename $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 @@ -636,7 +646,7 @@ _RUN_QUOTACHECK=0 if [ -z "$fastboot" ]; then STRING=$"Checking filesystems" echo $STRING - if [ "${RHGB_STARTED}" != "0" -a -w /etc/rhgb/temp/rhgb-console ]; then + if [ "${RHGB_STARTED}" != "" -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" @@ -690,7 +700,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 strstr "$cmdline" rhgb && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then +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 LC_MESSAGES= /usr/bin/rhgb RHGB_STARTED=1 fi @@ -913,14 +923,12 @@ dmesg -s 131072 > /var/log/dmesg # create the crash indicator flag to warn on crashes, offer fsck with timeout touch /.autofsck &> /dev/null -if [ "$PROMPT" = "yes" ]; then - kill -TERM `/sbin/pidof getkey` >/dev/null 2>&1 -fi +kill -TERM `/sbin/pidof getkey` >/dev/null 2>&1 } & if strstr "$cmdline" confirm ; then touch /var/run/confirm fi -if [ "$PROMPT" = "yes" ]; then +if [ "$PROMPT" != "no" ]; then /sbin/getkey i && touch /var/run/confirm fi wait @@ -929,3 +937,4 @@ wait if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then /usr/bin/rhgb-client --sysinit fi + |