From 08d59fa7913d46b8d1a52499b5c1a7983e635bc7 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sun, 21 Jun 1998 21:12:48 +0000 Subject: Fix bug track problems (#677, #731, #734, E-mail). --- initscripts.spec | 364 ++++++++++++++++--------------------- rc.d/init.d/network | 2 +- rc.d/rc.sysinit | 34 +++- src/usernetctl.c | 2 +- sysconfig/network-scripts/ifup | 8 +- sysconfig/network-scripts/ifup-ipx | 1 + 6 files changed, 186 insertions(+), 225 deletions(-) diff --git a/initscripts.spec b/initscripts.spec index 2c332363..70fe380e 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -15,168 +15,267 @@ This package contains the scripts use to boot a system, change run levels, and shut the system down cleanly. It also contains the scripts that activate and deactivate most network interfaces. -%changelog +%prep +%setup -* Sun Jun 07 1998 Erik Troan +%build +make CFLAGS="$RPM_OPT_FLAGS" + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/etc +make ROOT=$RPM_BUILD_ROOT install +mkdir -p $RPM_BUILD_ROOT/var/run/netreport +chown root.root $RPM_BUILD_ROOT/var/run/netreport +chmod u=rwx,g=rwx,o=rx $RPM_BUILD_ROOT/var/run/netreport + +for i in 0 1 2 3 4 5 6 ; do + file=$RPM_BUILD_ROOT/etc/rc.d/rc$i.d + mkdir $file + chown root.root $file + chmod u=rwx,g=rx,o=rx $file +done +# Can't store symlinks in a CVS archive +ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K80random +ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc1.d/S20random +ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc2.d/S20random +ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S20random +ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc4.d/S20random +ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S20random +ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K80random + +ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K95nfsfs +ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc1.d/K95nfsfs +ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc2.d/K95nfsfs +ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S15nfsfs +ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc4.d/S15nfsfs +ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S15nfsfs +ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K95nfsfs + +ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K97network +ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc1.d/K97network +ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc2.d/S10network +ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S10network +ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc4.d/S10network +ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S10network +ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K97network + +ln -s ../init.d/killall $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K90killall +ln -s ../init.d/killall $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K90killall + +ln -s ../init.d/halt $RPM_BUILD_ROOT/etc/rc.d/rc0.d/S00halt +ln -s ../init.d/halt $RPM_BUILD_ROOT/etc/rc.d/rc6.d/S00reboot + +ln -s ../init.d/single $RPM_BUILD_ROOT/etc/rc.d/rc1.d/S00single + +ln -s ../rc.local $RPM_BUILD_ROOT/etc/rc.d/rc2.d/S99local +ln -s ../rc.local $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S99local +ln -s ../rc.local $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S99local + + +%post +if [ ! -f /var/log/wtmp ]; then + touch /var/log/wtmp +fi + +chkconfig --add random +chkconfig --add nfsfs +chkconfig --add network + +%postun +if [ $1 = 0 ]; then + chkconfig --del random + chkconfig --del nfsfs + chkconfig --del network +fi + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%dir /etc/sysconfig/network-scripts +%config %verify(not md5 mtime size) /etc/adjtime +/etc/sysconfig/network-scripts/ifdown +%config /sbin/ifdown +%config /etc/sysconfig/network-scripts/ifdown-post +/etc/sysconfig/network-scripts/ifup +%config /sbin/ifup +%config /etc/sysconfig/network-scripts/network-functions +%config /etc/sysconfig/network-scripts/ifup-post +%config /etc/sysconfig/network-scripts/ifdhcpc-done +%config /etc/sysconfig/network-scripts/ifcfg-lo +%config /etc/sysconfig/network-scripts/ifdown-ppp +%config /etc/sysconfig/network-scripts/ifdown-sl +%config /etc/sysconfig/network-scripts/ifup-ppp +%config /etc/sysconfig/network-scripts/ifup-sl +%config /etc/sysconfig/network-scripts/ifup-routes +%config /etc/sysconfig/network-scripts/ifup-plip +%config /etc/sysconfig/network-scripts/ifup-aliases +%config /etc/sysconfig/network-scripts/ifup-ipx +%config /etc/inittab +%dir /etc/rc.d +%config /etc/rc.d/rc.sysinit +%dir /etc/rc.d/rc0.d +%config(missingok) /etc/rc.d/rc0.d/* +%dir /etc/rc.d/rc1.d +%config(missingok) /etc/rc.d/rc1.d/* +%dir /etc/rc.d/rc2.d +%config(missingok) /etc/rc.d/rc2.d/* +%dir /etc/rc.d/rc3.d +%config(missingok) /etc/rc.d/rc3.d/* +%dir /etc/rc.d/rc4.d +%config(missingok) /etc/rc.d/rc4.d/* +%dir /etc/rc.d/rc5.d +%config(missingok) /etc/rc.d/rc5.d/* +%dir /etc/rc.d/rc6.d +%config(missingok) /etc/rc.d/rc6.d/* +%dir /etc/rc.d/init.d +%config(missingok) /etc/rc.d/init.d/* +%config /etc/rc.d/rc +%config /etc/rc.d/rc.local +%config /etc/profile.d/lang.sh +/sbin/setsysfont +/bin/doexec +/bin/ipcalc +/bin/usleep +/usr/sbin/usernetctl +/sbin/netreport +/usr/man/man1/doexec.1 +/usr/man/man1/ipcalc.1 +/usr/man/man1/usleep.1 +/usr/man/man1/usernetctl.1 +/usr/man/man1/netreport.1 +%dir /var/run/netreport +%config /etc/ppp/ip-up +%config /etc/ppp/ip-down +%doc sysconfig.txt + +%changelog +* Sun Jun 07 1998 Erik Troan - rc.sysinit looks for bootfile= as well as BOOT_IMAGE to set /lib/modules/preferred symlink * Mon Jun 01 1998 Erik Troan - - ipcalc should *never* have been setgid anything - depmod isn't run properly for non-serial numbered kernels * Wed May 06 1998 Donnie Barnes - - added system font and language setting * Mon May 04 1998 Michael K. Johnson - - Added missing files to packagelist. * Sat May 02 1998 Michael K. Johnson - - Added lots of linuxconf support. Should still work on systems that do not have linuxconf installed, but linuxconf gives enhanced support. - In concert with linuxconf, added IPX support. Updated docs to reflect it. * Fri May 01 1998 Erik Troan - - rc.sysinit uses preferred directory * Sun Apr 05 1998 Erik Troan - - updated rc.sysinit to deal with kernel versions with release numbers * Sun Mar 22 1998 Erik Troan - - use ipcalc to calculate the netmask if one isn't specified * Tue Mar 10 1998 Erik Troan - - added and made use of ipcalc * Tue Mar 10 1998 Erik Troan - - removed unnecessary dhcp log from /tmp * Mon Mar 09 1998 Erik Troan - - if bootpc fails, take down the device * Mon Mar 09 1998 Erik Troan - - added check for mktemp failure * Thu Feb 05 1998 Erik Troan - - fixed support for user manageable cloned devices * Mon Jan 12 1998 Michael K. Johnson - - /sbin/ isn't always in $PATH, so call /sbin/route in ifup-routes * Wed Dec 31 1997 Erik Troan - - touch /var/lock/subsys/kerneld after cleaning out /var/lock/subsys - the logic for when /var/lock/subsys/kerneld is touched was backwards * Tue Dec 30 1997 Erik Troan - - tried to get /proc stuff right one more time (uses -t nonfs,proc now) - added support for /fsckoptions - changed 'yse' to 'yes' in KERNELD= line * Tue Dec 09 1997 Erik Troan - - set domainname to "" if none is specified in /etc/sysconfig/network - fix /proc mounting to get it in /etc/mtab * Mon Dec 08 1997 Michael K. Johnson - - fixed inheritance for clone devices * Fri Nov 07 1997 Erik Troan - - added sound support to rc.sysinit * Fri Nov 07 1997 Michael K. Johnson - - Added missing "then" clause * Thu Nov 06 1997 Michael K. Johnson - - Fixed DEBUG option in ifup-ppp - Fixed PPP persistance - Only change IP forwarding if necessary * Tue Oct 28 1997 Donnie Barnes - - removed the skeleton init script - added the ability to 'nice' daemons * Tue Oct 28 1997 Erik Troan - - touch /var/lock/subsys/kerneld if it's running, and after mounting /var - applied dhcp fix * Thu Oct 23 1997 Donnie Barnes - - added status|restart to init scripts * Thu Oct 23 1997 Michael K. Johnson - - touch random seed file before chmod'ing it. * Wed Oct 15 1997 Erik Troan - - run domainname if NISDOMAIN is set * Wed Oct 15 1997 Michael K. Johnson - - Make the random seed file mode 600. * Tue Oct 14 1997 Michael K. Johnson - - bring down ppp devices if ifdown-ppp is called while ifup-ppp is sleeping. * Mon Oct 13 1997 Erik Troan - - moved to new chkconfig conventions * Sat Oct 11 1997 Erik Troan - - fixed rc.sysinit for hwclock compatibility * Thu Oct 09 1997 Erik Troan - - run 'ulimit -c 0' before running scripts in daemon function * Wed Oct 08 1997 Donnie Barnes - - added chkconfig support - made all rc*.d symlinks have missingok flag * Mon Oct 06 1997 Erik Troan - - fixed network-scripts to allow full pathnames as config files - removed some old 3.0.3 pcmcia device handling * Wed Oct 01 1997 Michael K. Johnson - - /var/run/netreport needs to be group-writable now that /sbin/netreport is setguid instead of setuid. * Tue Sep 30 1997 Michael K. Johnson - - Added network-functions to spec file. - Added report functionality to usernetctl. - Fixed bugs I introduced into usernetctl while adding clone device support. - Clean up entire RPM_BUILD_ROOT directory in %clean. * Mon Sep 29 1997 Michael K. Johnson - - Clone device support in network scripts, rc scripts, and usernetctl. - Disassociate from controlling tty in PPP and SLIP startup scripts, since they act as daemons. @@ -184,36 +283,29 @@ that activate and deactivate most network interfaces. the CVS archive. * Tue Sep 23 1997 Donnie Barnes - - added mktemp support to ifup * Thu Sep 18 1997 Donnie Barnes - - fixed some init.d/functions bugs for stopping httpd * Tue Sep 16 1997 Donnie Barnes - - reworked status() to adjust for processes that change their argv[0] in the process table. The process must still have it's "name" in the argv[0] string (ala sendmail: blah blah). * Mon Sep 15 1997 Erik Troan - - fixed bug in FORWARD_IPV4 support * Sun Sep 14 1997 Erik Troan - - added support for FORWARD_IPV4 variable * Thu Sep 11 1997 Donald Barnes - - added status function to functions along with better killproc handling. - added /sbin/usleep binary (written by me) and man page - changed BuildRoot to /var/tmp instead of /tmp * Tue Jun 10 1997 Michael K. Johnson - - /sbin/netreport sgid rather than suid. - /var/run/netreport writable by group root. @@ -222,11 +314,9 @@ that activate and deactivate most network interfaces. and ip-down.local exist. * Tue Jun 03 1997 Michael K. Johnson - - Added missing -f to [ invocation in ksyms check. * Fri May 23 1997 Michael K. Johnson - - Support for net event notification: Call /sbin/netreport to request that SIGIO be sent to you whenever a network interface changes status (won't work for brining up SLIP @@ -238,195 +328,47 @@ that activate and deactivate most network interfaces. - Moved ifup and ifdown to /sbin * Tue Apr 15 1997 Michael K. Johnson - - usernetctl put back in ifdown - support for slaved interfaces * Wed Apr 02 1997 Erik Troan - - Created ifup-post from old ifup - PPP, PLIP, and generic ifup use ifup-post * Fri Mar 28 1997 Erik Troan - - Added DHCP support - Set hostname via reverse name lookup after configuring a networking device if the current hostname is (none) or localhost * Tue Mar 18 1997 Erik Troan - - Got rid of xargs dependency in halt script - Don't mount /proc twice (unmount it in between) - sulogin and filesystem unmounting only happened for a corrupt root filesystem -- it now happens when other filesystems are corrupt as well * Tue Mar 04 1997 Michael K. Johnson - -PPP fixes and additions +- PPP fixes and additions * Mon Mar 03 1997 Erik Troan - -Mount proc before trying to start kerneld so we can test for /proc/ksyms -properly. +- Mount proc before trying to start kerneld so we can test for /proc/ksyms + properly. * Wed Feb 26 1997 Michael K. Johnson - -Added MTU for PPP. - -Put PPPOPTIONS at the end of the options string instead of at the -beginning so that they override other options. Gives users more rope... - -Don't do module-based stuff on non-module systems. Ignore errors if -st module isn't there and we try to load it. +- Added MTU for PPP. +- Put PPPOPTIONS at the end of the options string instead of at the + beginning so that they override other options. Gives users more rope... +- Don't do module-based stuff on non-module systems. Ignore errors if + st module isn't there and we try to load it. * Tue Feb 25 1997 Michael K. Johnson - -Changed ifup-ppp and ifdown-ppp not to use doexec, because the argv[0] -provided by doexec goes away when pppd gets swapped out. - -ifup-ppp now sets remotename to the logical name of the device. -This will BREAK current PAP setups on netcfg-managed interfaces, -but we needed to do this to add a reasonable interface-specific -PAP editor to netcfg. +- Changed ifup-ppp and ifdown-ppp not to use doexec, because the argv[0] + provided by doexec goes away when pppd gets swapped out. +- ifup-ppp now sets remotename to the logical name of the device. + This will BREAK current PAP setups on netcfg-managed interfaces, + but we needed to do this to add a reasonable interface-specific + PAP editor to netcfg. * Fri Feb 07 1997 Erik Troan - -1) Added usernetctl wrapper for user mode ifup and ifdown's and man page -2) Rewrote ppp and slip kill and retry code -3) Added doexec and man page - -%prep -%setup - -%build -make CFLAGS="$RPM_OPT_FLAGS" - -%install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/etc -make ROOT=$RPM_BUILD_ROOT install -mkdir -p $RPM_BUILD_ROOT/var/run/netreport -chown root.root $RPM_BUILD_ROOT/var/run/netreport -chmod u=rwx,g=rwx,o=rx $RPM_BUILD_ROOT/var/run/netreport - -for i in 0 1 2 3 4 5 6 ; do - file=$RPM_BUILD_ROOT/etc/rc.d/rc$i.d - mkdir $file - chown root.root $file - chmod u=rwx,g=rx,o=rx $file -done - -# Can't store symlinks in a CVS archive -ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K80random -ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc1.d/S20random -ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc2.d/S20random -ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S20random -ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc4.d/S20random -ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S20random -ln -s ../init.d/random $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K80random - -ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K95nfsfs -ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc1.d/K95nfsfs -ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc2.d/K95nfsfs -ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S15nfsfs -ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc4.d/S15nfsfs -ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S15nfsfs -ln -s ../init.d/nfsfs $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K95nfsfs - -ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K97network -ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc1.d/K97network -ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc2.d/S10network -ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S10network -ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc4.d/S10network -ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S10network -ln -s ../init.d/network $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K97network - -ln -s ../init.d/killall $RPM_BUILD_ROOT/etc/rc.d/rc0.d/K90killall -ln -s ../init.d/killall $RPM_BUILD_ROOT/etc/rc.d/rc6.d/K90killall - -ln -s ../init.d/halt $RPM_BUILD_ROOT/etc/rc.d/rc0.d/S00halt -ln -s ../init.d/halt $RPM_BUILD_ROOT/etc/rc.d/rc6.d/S00reboot - -ln -s ../init.d/single $RPM_BUILD_ROOT/etc/rc.d/rc1.d/S00single - -ln -s ../rc.local $RPM_BUILD_ROOT/etc/rc.d/rc2.d/S99local -ln -s ../rc.local $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S99local -ln -s ../rc.local $RPM_BUILD_ROOT/etc/rc.d/rc5.d/S99local - - -%post -if [ ! -f /var/log/wtmp ]; then - touch /var/log/wtmp -fi - -chkconfig --add random -chkconfig --add nfsfs -chkconfig --add network - -%postun -if [ $1 = 0 ]; then - chkconfig --del random - chkconfig --del nfsfs - chkconfig --del network -fi - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%dir /etc/sysconfig/network-scripts -%config %verify(not md5 mtime size) /etc/adjtime -/etc/sysconfig/network-scripts/ifdown -%config /sbin/ifdown -%config /etc/sysconfig/network-scripts/ifdown-post -/etc/sysconfig/network-scripts/ifup -%config /sbin/ifup -%config /etc/sysconfig/network-scripts/network-functions -%config /etc/sysconfig/network-scripts/ifup-post -%config /etc/sysconfig/network-scripts/ifdhcpc-done -%config /etc/sysconfig/network-scripts/ifcfg-lo -%config /etc/sysconfig/network-scripts/ifdown-ppp -%config /etc/sysconfig/network-scripts/ifdown-sl -%config /etc/sysconfig/network-scripts/ifup-ppp -%config /etc/sysconfig/network-scripts/ifup-sl -%config /etc/sysconfig/network-scripts/ifup-routes -%config /etc/sysconfig/network-scripts/ifup-plip -%config /etc/sysconfig/network-scripts/ifup-aliases -%config /etc/sysconfig/network-scripts/ifup-ipx -%config /etc/inittab -%dir /etc/rc.d -%config /etc/rc.d/rc.sysinit -%dir /etc/rc.d/rc0.d -%config(missingok) /etc/rc.d/rc0.d/* -%dir /etc/rc.d/rc1.d -%config(missingok) /etc/rc.d/rc1.d/* -%dir /etc/rc.d/rc2.d -%config(missingok) /etc/rc.d/rc2.d/* -%dir /etc/rc.d/rc3.d -%config(missingok) /etc/rc.d/rc3.d/* -%dir /etc/rc.d/rc4.d -%config(missingok) /etc/rc.d/rc4.d/* -%dir /etc/rc.d/rc5.d -%config(missingok) /etc/rc.d/rc5.d/* -%dir /etc/rc.d/rc6.d -%config(missingok) /etc/rc.d/rc6.d/* -%dir /etc/rc.d/init.d -%config(missingok) /etc/rc.d/init.d/* -%config /etc/rc.d/rc -%config /etc/rc.d/rc.local -%config /etc/profile.d/lang.sh -/sbin/setsysfont -/bin/doexec -/bin/ipcalc -/bin/usleep -/usr/sbin/usernetctl -/sbin/netreport -/usr/man/man1/doexec.1 -/usr/man/man1/ipcalc.1 -/usr/man/man1/usleep.1 -/usr/man/man1/usernetctl.1 -/usr/man/man1/netreport.1 -%dir /var/run/netreport -%config /etc/ppp/ip-up -%config /etc/ppp/ip-down -%doc sysconfig.txt +- Added usernetctl wrapper for user mode ifup and ifdown's and man page +- Rewrote ppp and slip kill and retry code +- Added doexec and man page diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 4d0c764b..3bb2afd5 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -2,7 +2,7 @@ # # network Bring up/down networking # -# chkconfig: 345 10 97 +# chkconfig: 2345 10 97 # description: Activates/Deactivates all network interfaces configured to \ # start at boot time. # probe: true diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index e53253cf..fc846522 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -52,7 +52,7 @@ if [ ! -f /fastboot ]; then echo "*** Dropping you to a shell; the system will reboot" echo "*** when you leave the shell." - PS1="(Repair filesystem) #"; export PS1 + PS1="(Repair filesystem) \#"; export PS1 sulogin echo "Unmounting file systems" @@ -119,6 +119,20 @@ if [ -n $USEMODULES ]; then if echo $1 | grep '^BOOT_IMAGE=' > /dev/null ; then image=`echo $1 | awk -F= '{ print $2 }'` kernelfile=`/sbin/lilo -I $image` + firstkernelfile=`/sbin/lilo -I $image` + kernelfile="$firstkernelfile" + # Traverse symbolic links + while [ -L "$kernelfile" ]; do + newkernelfile="`ls -l $kernelfile | awk '-F-> ' '{print $2}'`" + if [ "${newkernelfile#/}" != "$newkernelfile" ]; then + # newkernelfile is an absolut path + kernelfile=$newkernelfile + else + kernelfile="${kernelfile%$(basename $kernelfile)}$newkernelfile" + fi + # Check if we're looping + [ "$kernelfile" = "$firstkernelfile" ] && break + done elif echo $1 | grep '^bootfile=' > /dev/null ; then kernelfile=`echo $1 | awk -F= '{ print $2 }'` fi @@ -136,7 +150,7 @@ if [ -n $USEMODULES ]; then fi fi -if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then +if [ -x /sbin/depmod -a -n "$USEMODULES" -a ! -f /proc/sys/kernel/modprobe ]; then # Get ready for kerneld if module support in the kernel echo -n "Finding module dependencies... " if [ -e /lib/modules/preferred ]; then @@ -182,7 +196,7 @@ if [ ! -f /fastboot ]; then echo "*** Dropping you to a shell; the system will reboot" echo "*** when you leave the shell." - PS1="(Repair filesystem) #"; export PS1 + PS1="(Repair filesystem) \#"; export PS1 sulogin echo "Unmounting file systems" @@ -256,14 +270,20 @@ else CLOCK=/sbin/clock fi -if [ $UTC = "true" ]; then +case "$UTC" in + yes|true) CLOCKFLAGS="$CLOCKFLAGS -u"; echo -n " (utc)" -fi -if [ $ARC = "true" ]; then + ;; +esac + +case "$ARC" in + yes|true) CLOCKFLAGS="$CLOCKFLAGS -A"; echo -n " (arc)" -fi + ;; +esac + echo -n ": " $CLOCK $CLOCKFLAGS diff --git a/src/usernetctl.c b/src/usernetctl.c index bad10c96..0a8011eb 100644 --- a/src/usernetctl.c +++ b/src/usernetctl.c @@ -87,7 +87,7 @@ int userCtl(char * file) { chptr = contents; while (*chptr != '\n') chptr++; end = chptr + 1; - while (chptr > contents && isspace(*chptr)) chptr--; + while (chptr >= contents && isspace(*chptr)) chptr--; *(++chptr) = '\0'; if (!strncmp(contents, "USERCTL=", 8)) { diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 18505370..a0675948 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -173,10 +173,8 @@ if [ "$IPSETUP" != yes ]; then fi fi -case $CONFIG in - eth*) - /etc/sysconfig/network-scripts/ifup-ipx $CONFIG - ;; -esac +if [ "$IPX" = yes ]; then + /etc/sysconfig/network-scripts/ifup-ipx $DEVICE +fi exec /etc/sysconfig/network-scripts/ifup-post $CONFIG diff --git a/sysconfig/network-scripts/ifup-ipx b/sysconfig/network-scripts/ifup-ipx index b04fda67..848af535 100755 --- a/sysconfig/network-scripts/ifup-ipx +++ b/sysconfig/network-scripts/ifup-ipx @@ -22,6 +22,7 @@ cd /etc/sysconfig/network-scripts . network-functions CONFIG=$1 +[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG source_config for frametype in 802_2 802_3 ETHERII SNAP ; do -- cgit v1.2.1