cvs commit: LFS/bootscripts/lfs/init.d rc

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Thu Jun 3 21:04:47 PDT 2004


nathan      04/06/03 22:04:47

  Modified:    bootscripts CHANGELOG
               bootscripts/lfs/init.d rc
  Log:
  Disabled the logging until further notice.  It prevented / from getting
  remounted ro, as it was connected to /var/log/boot.log
  
  Revision  Changes    Path
  1.98      +1 -0      LFS/bootscripts/CHANGELOG
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/CHANGELOG,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- CHANGELOG	4 Jun 2004 03:29:05 -0000	1.97
  +++ CHANGELOG	4 Jun 2004 04:04:46 -0000	1.98
  @@ -4,6 +4,7 @@
   	  events, which may start up new daemons
   	* Added elementry bootup logging support.  If it can write to
   	  /var/log/boot.log, it will
  +	* Removed logging support, it kept / from being remounted ro
   
   n/a - June 2, 2004
   
  
  
  
  1.4       +16 -16    LFS/bootscripts/lfs/init.d/rc
  
  Index: rc
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/lfs/init.d/rc,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- rc	4 Jun 2004 03:29:05 -0000	1.3
  +++ rc	4 Jun 2004 04:04:46 -0000	1.4
  @@ -7,11 +7,13 @@
   . /etc/sysconfig/rc
   . $rc_functions
   
  -# Function used for logging
  +# Function used for logging, reports unable to write errors with the test,
  +# and fails to allow / to be mounted ro on shutdown.  It is not suggested
  +# for use yet.
   logboot()
   {
  -	if [ -w "/var/log/boot.log" ]; then
  -		( "$@" | tee /var/log/boot.log && exit $PIPESTATUS )
  +	if echo -n >> /var/log/boot.log; then
  +		( "$@" | tee -a /var/log/boot.log && exit $PIPESTATUS )
   	else
   		"$@"
   	fi
  @@ -27,7 +29,7 @@
   
   if [ "$runlevel" = "" ]
   then
  -        logboot echo "Usage: $0 <runlevel>" >&2
  +        echo "Usage: $0 <runlevel>" >&2
           exit 1
   fi
   
  @@ -36,7 +38,7 @@
   
   if [ ! -d $rc_base/rc$runlevel.d ]
   then
  -        logboot echo "$rc_base/rc$runlevel.d does not exist"
  +        echo "$rc_base/rc$runlevel.d does not exist"
           exit 1
   fi
   
  @@ -57,21 +59,19 @@
                   then
                           if [ ! -f $prev_start ] && [ ! -f $sysinit_start ]
                           then
  -                                logboot echo -n -e $WARNING
  -                                logboot echo "$i can't be executed because it was"
  -                                logboot echo "not started in the previous runlevel ($previous)"
  -                                logboot echo -n -e $NORMAL
  +                                echo -n -e $WARNING
  +                                echo "$i can't be executed because it was"
  +                                echo "not started in the previous runlevel ($previous)"
  +                                echo -n -e $NORMAL
                                   continue
                           fi
                   fi
  -                logboot echo -n "$i stop:"
  -                logboot $i stop
  -                logboot echo
  +                $i stop
                   error_value=$?
   
                   if [ "$error_value" != "0" ]
                   then
  -                        logboot print_error_msg
  +                        print_error_msg
                   fi
           done
   fi
  @@ -91,14 +91,14 @@
           check_script_status
   
   	case $runlevel in
  -                0|6) logboot echo -n "$i stop:"  && logboot $i stop	;;
  -		*)   logboot echo -n "$i start:" && logboot $i start	;;
  +                0|6) $i stop	;;
  +		*)   $i start	;;
   	esac
           error_value=$?
   
           if [ "$error_value" != "0" ]
           then
  -                logboot print_error_msg
  +                print_error_msg
           fi
   done
   
  
  
  



More information about the lfs-book mailing list