Author: jim
Date: 2005-03-16 16:18:06 -0700 (Wed, 16 Mar 2005)
New Revision: 4771

Modified:
   trunk/bootscripts/contrib/init.d/rc-Interactive
   trunk/bootscripts/contrib/livecd/network
   trunk/bootscripts/contrib/lsb/lib/init-functions
   trunk/bootscripts/lfs/init.d/checkfs
   trunk/bootscripts/lfs/init.d/cleanfs
   trunk/bootscripts/lfs/init.d/console
   trunk/bootscripts/lfs/init.d/functions
   trunk/bootscripts/lfs/init.d/modules
   trunk/bootscripts/lfs/init.d/mountkernfs
   trunk/bootscripts/lfs/init.d/network
   trunk/bootscripts/lfs/init.d/rc
   trunk/bootscripts/lfs/init.d/sendsignals
   trunk/bootscripts/lfs/init.d/sysctl
   trunk/bootscripts/lfs/init.d/udev
   trunk/bootscripts/lfs/sysconfig/network-devices/ifdown
   trunk/bootscripts/lfs/sysconfig/network-devices/ifup
   trunk/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static
   trunk/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static-route
Log:
Change if then statements to a consistant form

Modified: trunk/bootscripts/contrib/init.d/rc-Interactive
===================================================================
--- trunk/bootscripts/contrib/init.d/rc-Interactive     2005-03-16 22:48:49 UTC 
(rev 4770)
+++ trunk/bootscripts/contrib/init.d/rc-Interactive     2005-03-16 23:18:06 UTC 
(rev 4771)
@@ -23,8 +23,7 @@
 
 [ "${1}" != "" ] && runlevel=${1}
 
-if [ "${runlevel}" = "" ]
-then
+if [ "${runlevel}" = "" ]; then
        echo "Usage: ${0} <runlevel>" >&2
        exit 1
 fi
@@ -76,8 +75,7 @@
 
 # End addition for interactive startup
 
-if [ ! -d ${rc_base}/rc${runlevel}.d ]
-then
+if [ ! -d ${rc_base}/rc${runlevel}.d ]; then
        boot_mesg "${rc_base}/rc${runlevel}.d does not exist." ${WARNING}
        boot_mesg_flush
        exit 1
@@ -85,8 +83,7 @@
 
 # Attempt to stop all service started by previous runlevel,
 # and killed in this runlevel
-if [ "${previous}" != "N" ]
-then
+if [ "${previous}" != "N" ]; then
        for i in $(ls -v ${rc_base}/rc${runlevel}.d/K* 2> /dev/null)
        do
                check_script_status
@@ -95,10 +92,8 @@
                prev_start=$rc_base/rc$previous.d/S[0-9][0-9]$suffix
                sysinit_start=$rc_base/rcsysinit.d/S[0-9][0-9]$suffix
 
-               if [ "${runlevel}" != "0" ] && [ "${runlevel}" != "6" ]
-               then
-                       if [ ! -f ${prev_start} ] && [ ! -f ${sysinit_start} ]
-                       then
+               if [ "${runlevel}" != "0" ] && [ "${runlevel}" != "6" ]; then
+                       if [ ! -f ${prev_start} ] && [ ! -f ${sysinit_start} ]; 
then
                                boot_log "${i} cant be started in runlevel 
${runlevel}, because it was not started in runlevel ${previous}"
                                boot_mesg -n "WARNING:\n\n${i} can't be" 
${WARNING}
                                boot_mesg -n " executed because it was not"
@@ -112,8 +107,7 @@
                ${i} stop
                error_value=${?}
 
-               if [ "${error_value}" != "0" ]
-               then
+               if [ "${error_value}" != "0" ]; then
                        print_error_msg
                fi
        done
@@ -122,8 +116,7 @@
 #Start all functions in this runlevel
 for i in $( ls -v ${rc_base}/rc${runlevel}.d/S* 2> /dev/null)
 do
-       if [ "${previous}" != "N" ]
-       then
+       if [ "${previous}" != "N" ]; then
                suffix=${i#$rc_base/rc$runlevel.d/S[0-9][0-9]}
                stop=$rc_base/rc$runlevel.d/K[0-9][0-9]$suffix
                prev_start=$rc_base/rc$previous.d/S[0-9][0-9]$suffix
@@ -170,8 +163,7 @@
        esac
        error_value=${?}
 
-       if [ "${error_value}" != "0" ]
-       then
+       if [ "${error_value}" != "0" ]; then
                print_error_msg
        fi
 done

Modified: trunk/bootscripts/contrib/livecd/network
===================================================================
--- trunk/bootscripts/contrib/livecd/network    2005-03-16 22:48:49 UTC (rev 
4770)
+++ trunk/bootscripts/contrib/livecd/network    2005-03-16 23:18:06 UTC (rev 
4771)
@@ -29,8 +29,7 @@
                                interface=${file##*/ifconfig.}
 
                                # skip if $file is * (because nothing was found)
-                               if [ "${interface}" = "*" ]
-                               then
+                               if [ "${interface}" = "*" ]; then
                                        continue
                                fi
 
@@ -40,8 +39,7 @@
                                (
                                        . ${file}
                                        # If ONBOOT does not equal yes, process 
the next file
-                                       if [ "${ONBOOT}" != "yes" ]
-                                       then
+                                       if [ "${ONBOOT}" != "yes" ]; then
                                                continue
                                        fi
 
@@ -69,8 +67,7 @@
                        interface=${file##*/ifconfig.}
 
                        # skip if $file is * (because nothing was found)
-                       if [ "${interface}" = "*" ]
-                       then
+                       if [ "${interface}" = "*" ]; then
                                continue
                        fi
 
@@ -80,8 +77,7 @@
                        (
                                . ${file}
                                # If ONBOOT does not equal yes, process the 
next file
-                               if [ "${ONBOOT}" != "yes" ]
-                               then
+                               if [ "${ONBOOT}" != "yes" ]; then
                                        continue
                                fi
 

Modified: trunk/bootscripts/contrib/lsb/lib/init-functions
===================================================================
--- trunk/bootscripts/contrib/lsb/lib/init-functions    2005-03-16 22:48:49 UTC 
(rev 4770)
+++ trunk/bootscripts/contrib/lsb/lib/init-functions    2005-03-16 23:18:06 UTC 
(rev 4771)
@@ -50,10 +50,8 @@
                esac
        done
 
-       if [ -z "${forcestart}" ]
-       then
-               if [ -z "${pidfile}" ]
-               then
+       if [ -z "${forcestart}" ]; then
+               if [ -z "${pidfile}" ]; then
                        pidofproc "${1}" > /dev/null
                else
                        pidofproc -p "${pidfile}" "${1}" > /dev/null
@@ -120,18 +118,15 @@
                esac
        done
 
-       if [ "${#}" = "2" ]
-       then
+       if [ "${#}" = "2" ]; then
                killsig="${2}"
-       elif [ "${#}" != "1" ]
-       then
+       elif [ "${#}" != "1" ]; then
                shift 2
                log_failure_msg "Excess Arguments: $@"
                return 1
        fi
 
-       if [ -z "${pidfile}" ]
-       then
+       if [ -z "${pidfile}" ]; then
                pidlist=`pidofproc "${1}"`
        else
                pidlist=`pidofproc -p "${pidfile}" "${1}"`
@@ -140,8 +135,7 @@
        for pid in ${pidlist}
        do
                kill -${killsig:-TERM} ${pid} 2>/dev/null
-               if [ -z "${killsig}" ]
-               then
+               if [ -z "${killsig}" ]; then
                        # Wait up to 3 seconds, for ${pid} to terminate
                        local dtime=3
                        while [ "${dtime}" != "0" ]
@@ -155,14 +149,13 @@
                fi
        done
 
-       if [ -z "${killsig}" ]
-       then
+       if [ -z "${killsig}" ]; then
                pidofproc "${1}" 2> /dev/null
        
-               if [ "$?" != "0" ] # Program was terminated
-               then
-                       if [ -f "${pidfile}" ] # Pidfile Exists
-                       then
+               # Program was terminated
+               if [ "$?" != "0" ]; then
+                       # Pidfile Exists
+                       if [ -f "${pidfile}" ]; then
                                rm -f "${pidfile}"
                        fi
                        return 0
@@ -170,8 +163,7 @@
                        return 4 # Unknown Status
                fi
        else
-               if [ -z "${pidfile}" ]
-               then
+               if [ -z "${pidfile}" ]; then
                        pidofproc "${1}" 2> /dev/null
                else
                        pidofproc -p "${pidfile}" "${1}" 2> /dev/null
@@ -220,25 +212,21 @@
                esac
        done
 
-       if [ "${#}" != "1" ]
-       then
+       if [ "${#}" != "1" ]; then
                shift 1
                log_failure_msg "Excess Arguments: $@"
                return 1
        fi
 
-       if [ -n "${pidfile}" ]
-       then
-               if [ ! -r "${pidfile}" ]
-               then
+       if [ -n "${pidfile}" ]; then
+               if [ ! -r "${pidfile}" ]; then
                        return 3 # Program is not running
                fi
 
                lpids=`head -n 1 ${pidfile}`
                for pid in ${lpids}
                do
-                       if [ "${pid}" -ne "$$" -a "${pid}" -ne "${PPID}" ]
-                       then
+                       if [ "${pid}" -ne "$$" -a "${pid}" -ne "${PPID}" ]; then
                                kill -0 "${pid}" > /dev/null &&
                                pidlist="${pidlist} ${pid}"
                        fi
@@ -251,22 +239,19 @@
                pidof "${1}"
        fi
 
-       if [ "$?" != "0" ]
-       then
+       if [ "$?" != "0" ]; then
                return 3 # Program is not running
        fi
 }
 
 # Screen Dimentions
-if [ -z "${COLUMNS}" ]
-then
+if [ -z "${COLUMNS}" ]; then
   COLUMNS=$(stty size)
   COLUMNS=${COLUMNS##* }
 fi
 
 # When using remote connections, such as a serial port, stty size returns 0
-if [ "${COLUMNS}" = "0" ]
-then
+if [ "${COLUMNS}" = "0" ]; then
   COLUMNS=80
 fi
 

Modified: trunk/bootscripts/lfs/init.d/checkfs
===================================================================
--- trunk/bootscripts/lfs/init.d/checkfs        2005-03-16 22:48:49 UTC (rev 
4770)
+++ trunk/bootscripts/lfs/init.d/checkfs        2005-03-16 23:18:06 UTC (rev 
4771)
@@ -30,8 +30,7 @@
 
 case "${1}" in
        start)
-               if [ -f /fastboot ]
-               then
+               if [ -f /fastboot ]; then
                        boot_mesg -n "/fastboot found, will not perform" ${INFO}
                        boot_mesg " file system checks as requested."
                        echo_ok
@@ -42,8 +41,7 @@
                mount -n -o remount,ro / >/dev/null
                evaluate_retval
 
-               if [ ${?} != 0 ]
-               then
+               if [ ${?} != 0 ]; then
                        echo_failure
                        boot_mesg -n "FAILURE:\n\nCannot check root" ${FAILURE}
                        boot_mesg -n " filesystem because it could not be 
mounted"
@@ -56,8 +54,7 @@
                        /etc/rc.d/init.d/halt stop
                fi
 
-               if [ -f /forcefsck ]
-               then
+               if [ -f /forcefsck ]; then
                        boot_mesg -n "/forcefsck found, forcing file" ${INFO}
                        boot_mesg " system checks as requested."
                        echo_ok
@@ -72,13 +69,11 @@
                fsck ${options} -a -A -C -T 2>/dev/null
                error_value=${?}
 
-               if [ "${error_value}" = 0 ]
-               then
+               if [ "${error_value}" = 0 ]; then
                        echo_ok
                fi
 
-               if [ "${error_value}" = 1 ]
-               then
+               if [ "${error_value}" = 1 ]; then
                        echo_warning
                        boot_mesg -n "WARNING:\n\nFile system errors" ${WARNING}
                        boot_mesg -n " were found and have been corrected."
@@ -87,8 +82,7 @@
                        boot_mesg "" ${NORMAL}
                fi
 
-               if [ "${error_value}" = 2 -o "${error_value}" = 3 ]
-               then
+               if [ "${error_value}" = 2 -o "${error_value}" = 3 ]; then
                        echo_warning
                        boot_mesg -n "WARNING:\n\nFile system errors" ${WARNING}
                        boot_mesg -n " were found and have been been"
@@ -102,8 +96,7 @@
                        reboot -f
                fi
 
-               if [ "${error_value}" -gt 3 -a "${error_value}" -lt 16 ]
-               then
+               if [ "${error_value}" -gt 3 -a "${error_value}" -lt 16 ]; then
                        echo_failure
                        boot_mesg -n "FAILURE:\n\nFile system errors" ${FAILURE}
                        boot_mesg -n " were encountered that could not be"
@@ -120,8 +113,7 @@
                        /etc/rc.d/init.d/halt stop
                fi
 
-               if [ "${error_value}" -ge 16 ]
-               then
+               if [ "${error_value}" -ge 16 ]; then
                        echo_failure
                        boot_mesg -n "FAILURE:\n\nUnexpected Failure" ${FAILURE}
                        boot_mesg -n " running fsck.  Exited with error"

Modified: trunk/bootscripts/lfs/init.d/cleanfs
===================================================================
--- trunk/bootscripts/lfs/init.d/cleanfs        2005-03-16 22:48:49 UTC (rev 
4770)
+++ trunk/bootscripts/lfs/init.d/cleanfs        2005-03-16 23:18:06 UTC (rev 
4771)
@@ -28,8 +28,7 @@
                        esac
 
                        # Ignore existing files.
-                       if [ ! -e "${name}" ]
-                       then
+                       if [ ! -e "${name}" ]; then
                                # Create stuff based on its type.
                                case "${type}" in
                                        dir)
@@ -96,8 +95,7 @@
                (exit ${failed})
                evaluate_retval
 
-               if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null
-               then
+               if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null; 
then
                        boot_mesg "Creating files and directories..."
                        create_files
                        evaluate_retval

Modified: trunk/bootscripts/lfs/init.d/console
===================================================================
--- trunk/bootscripts/lfs/init.d/console        2005-03-16 22:48:49 UTC (rev 
4770)
+++ trunk/bootscripts/lfs/init.d/console        2005-03-16 23:18:06 UTC (rev 
4771)
@@ -17,29 +17,25 @@
 . ${rc_functions}
 
 # Native English speakers probably don't have /etc/sysconfig/console at all
-if [ -f /etc/sysconfig/console ]
-then
+if [ -f /etc/sysconfig/console ]; then
        . /etc/sysconfig/console
 fi
 
 case "${1}" in
        start)
-               if [ -n "${KEYMAP}" ]
-               then
+               if [ -n "${KEYMAP}" ]; then
                        boot_mesg "Loading keymap: ${KEYMAP}..."
                        loadkeys ${KEYMAP} &>/dev/null
                        evaluate_retval
                fi
 
-               if [ -n "${KEYMAP_CORRECTIONS}" ]
-               then
+               if [ -n "${KEYMAP_CORRECTIONS}" ]; then
                        boot_mesg "Loading keymap corrections: 
${KEYMAP_CORRECTIONS}..."
                        loadkeys ${KEYMAP_CORRECTIONS} &>/dev/null
                        evaluate_retval
                fi
 
-               if [ -n "${FONT}" ]
-               then
+               if [ -n "${FONT}" ]; then
                        boot_mesg "Setting screen font to ${FONT}..."
                        setfont $FONT &>/dev/null
                        evaluate_retval

Modified: trunk/bootscripts/lfs/init.d/functions
===================================================================
--- trunk/bootscripts/lfs/init.d/functions      2005-03-16 22:48:49 UTC (rev 
4770)
+++ trunk/bootscripts/lfs/init.d/functions      2005-03-16 23:18:06 UTC (rev 
4771)
@@ -26,15 +26,13 @@
 
 ## Screen Dimentions
 # Find current screen size
-if [ -z "${COLUMNS}" ]
-then
+if [ -z "${COLUMNS}" ]; then
        COLUMNS=$(stty size)
        COLUMNS=${COLUMNS##* }
 fi
 
 # When using remote connections, such as a serial port, stty size returns 0
-if [ "${COLUMNS}" = "0" ]
-then 
+if [ "${COLUMNS}" = "0" ]; then 
        COLUMNS=80
 fi
 
@@ -155,7 +153,6 @@
                ### that actually use two columns when printed 
                ### to the screen.
                BMSEPCT=`echo -e "${BMSEP}" | sed 's/././g'`
-                                               
                
                # keep adding the character count of each line
                # untill the count exceeds the value of CHARS_LEFT
@@ -203,8 +200,7 @@
 boot_mesg_flush()
 {
        # Do not log null messages
-       if [ -z "${BOOTMESG}" ]
-       then
+       if [ -z "${BOOTMESG}" ]; then
                return 0
        else
                boot_log "[EMAIL PROTECTED]"
@@ -275,15 +271,13 @@
 check_script_status()
 {
        # $i is inherited by the rc script
-       if [ ! -f ${i} ]
-       then
+       if [ ! -f ${i} ]; then
                boot_mesg "${i} is not a valid symlink." ${WARNING}
                echo_warning
                continue
        fi
 
-       if [ ! -x ${i} ]
-       then
+       if [ ! -x ${i} ]; then
                boot_mesg "${i} is not executable, skipping." ${WARNING}
                echo_warning
                continue
@@ -294,8 +288,7 @@
 {
        error_value="${?}"
 
-       if [ ${error_value} = 0 ]
-       then
+       if [ ${error_value} = 0 ]; then
                echo_ok
        else
                echo_failure
@@ -308,8 +301,7 @@
 
 print_status()
 {
-       if [ "${#}" = "0" ]
-       then
+       if [ "${#}" = "0" ]; then
                echo "Usage: ${0} {success|warning|failure}"
                return 1
        fi
@@ -357,16 +349,14 @@
 
 reloadproc()
 {
-       if [ "${#}" = "0" ]
-       then
+       if [ "${#}" = "0" ]; then
                echo "Usage: reloadproc [{program}]"
                exit 1
        fi
 
        getpids "${1}"
 
-       if [ -n "${pidlist}" ]
-       then
+       if [ -n "${pidlist}" ]; then
                failure="0"
                for pid in ${pidlist}
                do
@@ -392,18 +382,15 @@
 
        getpids "${1}"
 
-       if [ -n "${pidlist}" ]
-       then
+       if [ -n "${pidlist}" ]; then
                echo -e "${INFO}${base} is running with Process"\
                        "ID(s) ${pidlist}.${NORMAL}"
        else
-               if [ -n "${base}" -a -e "/var/run/${base}.pid" ]
-               then
+               if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then
                        echo -e "${WARNING}${1} is not running but"\
                                "/var/run/${base}.pid exists.${NORMAL}"
                else
-                       if [ -n "${PIDFILE}" -a -e "${PIDFILE}" ]
-                       then
+                       if [ -n "${PIDFILE}" -a -e "${PIDFILE}" ]; then
                                echo -e "${WARNING}${1} is not running"\
                                        "but ${PIDFILE} exists.${NORMAL}"
                        else
@@ -457,25 +444,21 @@
                esac
        done
 
-       if [ "${#}" != "1" ]
-       then
+       if [ "${#}" != "1" ]; then
                shift 1
                log_failure_msg "Usage: pidofproc [-p pidfile] pathname"
                return 2
        fi
 
-       if [ -n "${pidfile}" ]
-       then
-               if [ ! -r "${pidfile}" ]
-               then
+       if [ -n "${pidfile}" ]; then
+               if [ ! -r "${pidfile}" ]; then
                        return 3 # Program is not running
                fi
 
                lpids=`head -n 1 ${pidfile}`
                for pid in ${lpids}
                do
-                       if [ "${pid}" -ne "$$" -a "${pid}" -ne "${PPID}" ]
-                       then
+                       if [ "${pid}" -ne "$$" -a "${pid}" -ne "${PPID}" ]; then
                                kill -0 "${pid}" > /dev/null &&
                                pidlist="${pidlist} ${pid}"
                        fi
@@ -488,8 +471,7 @@
                pidof -o $$ -o $PPID -x "${1}"
        fi
 
-       if [ "$?" != "0" ]
-       then
+       if [ "$?" != "0" ]; then
                return 3 # Program is not running
        fi
 }
@@ -497,8 +479,7 @@
 # This will ensure compatibility with previous LFS Bootscripts
 getpids()
 {
-       if [ -z "${PIDFILE}" ]
-       then
+       if [ -z "${PIDFILE}" ]; then
                pidlist=`pidofproc -p "${PIDFILE}" [EMAIL PROTECTED]
        else
                pidlist=`pidofproc [EMAIL PROTECTED]
@@ -507,7 +488,7 @@
 }
 
 
#*******************************************************************************
-# Function - start_daemon [-f] [-n nicelevel] [-p pidfile] pathname [args]
+# Function - load_proc [-f] [-n nicelevel] [-p pidfile] pathname [args]
 #
 # Purpose: This runs the specified program as a daemon
 #
@@ -536,8 +517,7 @@
        local nicelevel="10"
 
 # This will ensure compatibility with previous LFS Bootscripts
-       if [ -n "${PIDFILE}" ]
-       then
+       if [ -n "${PIDFILE}" ]; then
                pidfile="${PIDFILE}"
        fi
 
@@ -566,16 +546,13 @@
                esac
        done
 
-       if [ "${#}" = "0" ]
-       then
+       if [ "${#}" = "0" ]; then
                log_failure_msg "Usage: loadproc [-f] [-n nicelevel] [-p 
pidfile] pathname [args]"
                return 2 #invalid or excess argument(s)
        fi
 
-       if [ -z "${forcestart}" ]
-       then
-               if [ -z "${pidfile}" ]
-               then
+       if [ -z "${forcestart}" ]; then
+               if [ -z "${pidfile}" ]; then
                        pidofproc "${1}" > /dev/null
                else
                        pidofproc -p "${pidfile}" "${1}" > /dev/null
@@ -631,8 +608,7 @@
        local pidlist=""
 
 # This will ensure compatibility with previous LFS Bootscripts
-       if [ -n "${PIDFILE}" ]
-       then
+       if [ -n "${PIDFILE}" ]; then
                pidfile="${PIDFILE}"
        fi
 
@@ -653,18 +629,15 @@
                esac
        done
 
-       if [ "${#}" = "2" ]
-       then
+       if [ "${#}" = "2" ]; then
                killsig="${2}"
-       elif [ "${#}" != "1" ]
-       then
+       elif [ "${#}" != "1" ]; then
                shift 2
                log_failure_msg "Usage: killproc  [-p pidfile] pathname 
[signal]"
                return 2
        fi
 
-       if [ -z "${pidfile}" ]
-       then
+       if [ -z "${pidfile}" ]; then
                pidlist=`pidofproc "${1}"`
        else
                pidlist=`pidofproc -p "${pidfile}" "${1}"`
@@ -673,8 +646,7 @@
        for pid in ${pidlist}
        do
                kill -${killsig:-TERM} ${pid} 2>/dev/null
-               if [ -z "${killsig}" ]
-               then
+               if [ -z "${killsig}" ]; then
                        # Wait up to 3 seconds, for ${pid} to terminate
                        local dtime=${KILLDELAY}
                        while [ "${dtime}" != "0" ]
@@ -688,14 +660,13 @@
                fi
        done
 
-       if [ -z "${killsig}" ]
-       then
+       if [ -z "${killsig}" ]; then
                pidofproc "${1}" 2> /dev/null
 
-               if [ "$?" != "0" ] # Program was terminated
-               then
-                       if [ -f "${pidfile}" ] # Pidfile Exists
-                       then
+               # Program was terminated
+               if [ "$?" != "0" ]; then
+                       # Pidfile Exists
+                       if [ -f "${pidfile}" ]; then
                                rm -f "${pidfile}"
                        fi
                        return 0
@@ -703,8 +674,7 @@
                        return 4 # Unknown Status
                fi
        else
-               if [ -z "${pidfile}" ]
-               then
+               if [ -z "${pidfile}" ]; then
                        pidofproc "${1}" 2> /dev/null
                else
                        pidofproc -p "${pidfile}" "${1}" 2> /dev/null

Modified: trunk/bootscripts/lfs/init.d/modules
===================================================================
--- trunk/bootscripts/lfs/init.d/modules        2005-03-16 22:48:49 UTC (rev 
4770)
+++ trunk/bootscripts/lfs/init.d/modules        2005-03-16 23:18:06 UTC (rev 
4771)
@@ -58,8 +58,7 @@
 
                                        # Print the module name if successful,
                                        # otherwise take note.
-                                       if [ ${?} -eq 0 ]
-                                       then
+                                       if [ ${?} -eq 0 ]; then
                                                boot_mesg -n " ${module}" 
${NORMAL}
                                        else
                                                failedmod="${failedmod} 
${module}"
@@ -73,8 +72,7 @@
 
                                # Print a failure message with a list of any
                                # modules that may have failed to load.
-                               if [ "${failedmod}" ]
-                               then
+                               if [ "${failedmod}" ]; then
                                        boot_mesg "Failed to load 
modules:${failedmod}" ${FAILURE}
                                        echo_failure
                                fi

Modified: trunk/bootscripts/lfs/init.d/mountkernfs
===================================================================
--- trunk/bootscripts/lfs/init.d/mountkernfs    2005-03-16 22:48:49 UTC (rev 
4770)
+++ trunk/bootscripts/lfs/init.d/mountkernfs    2005-03-16 23:18:06 UTC (rev 
4771)
@@ -19,14 +19,12 @@
        start)
                boot_mesg -n "Mounting kernel-based file systems:" ${INFO}
 
-               if ! mountpoint /proc &> /dev/null
-               then
+               if ! mountpoint /proc &> /dev/null; then
                        boot_mesg -n " /proc" ${NORMAL}
                        mount -n /proc || failed=1
                fi
 
-               if ! mountpoint /sys &> /dev/null
-               then
+               if ! mountpoint /sys &> /dev/null; then
                        boot_mesg -n " /sys" ${NORMAL}
                        mount -n /sys || failed=1
                fi

Modified: trunk/bootscripts/lfs/init.d/network
===================================================================
--- trunk/bootscripts/lfs/init.d/network        2005-03-16 22:48:49 UTC (rev 
4770)
+++ trunk/bootscripts/lfs/init.d/network        2005-03-16 23:18:06 UTC (rev 
4771)
@@ -26,8 +26,7 @@
                        interface=${file##*/ifconfig.}
 
                        # skip if $file is * (because nothing was found)
-                       if [ "${interface}" = "*" ]
-                       then
+                       if [ "${interface}" = "*" ]; then
                                continue
                        fi
 
@@ -37,8 +36,7 @@
                        (
                                . ${file}
                                # If ONBOOT does not equal yes, process the 
next file
-                               if [ "${ONBOOT}" != "yes" ]
-                               then
+                               if [ "${ONBOOT}" != "yes" ]; then
                                        continue
                                fi
 
@@ -62,8 +60,7 @@
                        interface=${file##*/ifconfig.}
 
                        # skip if $file is * (because nothing was found)
-                       if [ "${interface}" = "*" ]
-                       then
+                       if [ "${interface}" = "*" ]; then
                                continue
                        fi
 
@@ -73,8 +70,7 @@
                        (
                                . ${file}
                                # If ONBOOT does not equal yes, process the 
next file
-                               if [ "${ONBOOT}" != "yes" ]
-                               then
+                               if [ "${ONBOOT}" != "yes" ]; then
                                        continue
                                fi
 

Modified: trunk/bootscripts/lfs/init.d/rc
===================================================================
--- trunk/bootscripts/lfs/init.d/rc     2005-03-16 22:48:49 UTC (rev 4770)
+++ trunk/bootscripts/lfs/init.d/rc     2005-03-16 23:18:06 UTC (rev 4771)
@@ -23,8 +23,7 @@
 
 [ "${1}" != "" ] && runlevel=${1}
 
-if [ "${runlevel}" = "" ]
-then
+if [ "${runlevel}" = "" ]; then
        echo "Usage: ${0} <runlevel>" >&2
        exit 1
 fi
@@ -32,8 +31,7 @@
 previous=${PREVLEVEL}
 [ "${previous}" = "" ] && previous=N
 
-if [ ! -d ${rc_base}/rc${runlevel}.d ]
-then
+if [ ! -d ${rc_base}/rc${runlevel}.d ]; then
        boot_mesg "${rc_base}/rc${runlevel}.d does not exist." ${WARNING}
        boot_mesg_flush
        exit 1
@@ -41,8 +39,7 @@
 
 # Attempt to stop all service started by previous runlevel,
 # and killed in this runlevel
-if [ "${previous}" != "N" ]
-then
+if [ "${previous}" != "N" ]; then
        for i in $(ls -v ${rc_base}/rc${runlevel}.d/K* 2> /dev/null)
        do
                check_script_status
@@ -51,10 +48,8 @@
                prev_start=$rc_base/rc$previous.d/S[0-9][0-9]$suffix
                sysinit_start=$rc_base/rcsysinit.d/S[0-9][0-9]$suffix
 
-               if [ "${runlevel}" != "0" ] && [ "${runlevel}" != "6" ]
-               then
-                       if [ ! -f ${prev_start} ] && [ ! -f ${sysinit_start} ]
-                       then
+               if [ "${runlevel}" != "0" ] && [ "${runlevel}" != "6" ]; then
+                       if [ ! -f ${prev_start} ] && [ ! -f ${sysinit_start} ]; 
then
                                boot_log "${i} cant be started in runlevel 
${runlevel}, because it was not started in runlevel ${previous}"
                                boot_mesg -n "WARNING:\n\n${i} can't be" 
${WARNING}
                                boot_mesg -n " executed because it was not"
@@ -68,8 +63,7 @@
                ${i} stop
                error_value=${?}
 
-               if [ "${error_value}" != "0" ]
-               then
+               if [ "${error_value}" != "0" ]; then
                        print_error_msg
                fi
        done
@@ -78,8 +72,7 @@
 #Start all functions in this runlevel
 for i in $( ls -v ${rc_base}/rc${runlevel}.d/S* 2> /dev/null)
 do
-       if [ "${previous}" != "N" ]
-       then
+       if [ "${previous}" != "N" ]; then
                suffix=${i#$rc_base/rc$runlevel.d/S[0-9][0-9]}
                stop=$rc_base/rc$runlevel.d/K[0-9][0-9]$suffix
                prev_start=$rc_base/rc$previous.d/S[0-9][0-9]$suffix
@@ -99,8 +92,7 @@
        esac
        error_value=${?}
 
-       if [ "${error_value}" != "0" ]
-       then
+       if [ "${error_value}" != "0" ]; then
                print_error_msg
        fi
 done

Modified: trunk/bootscripts/lfs/init.d/sendsignals
===================================================================
--- trunk/bootscripts/lfs/init.d/sendsignals    2005-03-16 22:48:49 UTC (rev 
4770)
+++ trunk/bootscripts/lfs/init.d/sendsignals    2005-03-16 23:18:06 UTC (rev 
4771)
@@ -23,8 +23,7 @@
 
                sleep ${KILLDELAY}
 
-               if [ "${error_value}" = 0 ]
-               then
+               if [ "${error_value}" = 0 ]; then
                        echo_ok
                else
                        echo_failure
@@ -36,8 +35,7 @@
 
                sleep ${KILLDELAY}
 
-               if [ "${error_value}" = 0 ]
-               then
+               if [ "${error_value}" = 0 ]; then
                        echo_ok
                else
                        echo_failure

Modified: trunk/bootscripts/lfs/init.d/sysctl
===================================================================
--- trunk/bootscripts/lfs/init.d/sysctl 2005-03-16 22:48:49 UTC (rev 4770)
+++ trunk/bootscripts/lfs/init.d/sysctl 2005-03-16 23:18:06 UTC (rev 4771)
@@ -19,8 +19,7 @@
 
 case "${1}" in
        start)
-               if [ -f "/etc/sysctl.conf" ]
-               then
+               if [ -f "/etc/sysctl.conf" ]; then
                        boot_mesg "Setting kernel runtime parameters..."
                        sysctl -q -p
                        evaluate_retval

Modified: trunk/bootscripts/lfs/init.d/udev
===================================================================
--- trunk/bootscripts/lfs/init.d/udev   2005-03-16 22:48:49 UTC (rev 4770)
+++ trunk/bootscripts/lfs/init.d/udev   2005-03-16 23:18:06 UTC (rev 4771)
@@ -30,8 +30,7 @@
 case "${1}" in
        start)
                boot_mesg "Populating /dev with device nodes..."
-               if ! grep -q '[[:space:]]sysfs' /proc/mounts
-               then
+               if ! grep -q '[[:space:]]sysfs' /proc/mounts; then
                        boot_log " The SysFS filesystem could not be found.  
Unable to continue."
                        echo_failure
                        boot_mesg -n "FAILURE:\n\nUnable to create" ${FAILURE}
@@ -49,8 +48,7 @@
                # The reason we don't write to mtab is because we don't ever
                # want /dev to be unavailable (such as by `umount -a').
                mount -n -t tmpfs tmpfs /dev -o mode=755
-               if [ ${?} != 0 ]
-               then
+               if [ ${?} != 0 ]; then
                        boot_log "Unable to mount a tmpfs onto /dev."
                        echo_failure
                        boot_mesg -n "FAILURE:\n\nCannot mount a tmpfs" 
${FAILURE}

Modified: trunk/bootscripts/lfs/sysconfig/network-devices/ifdown
===================================================================
--- trunk/bootscripts/lfs/sysconfig/network-devices/ifdown      2005-03-16 
22:48:49 UTC (rev 4770)
+++ trunk/bootscripts/lfs/sysconfig/network-devices/ifdown      2005-03-16 
23:18:06 UTC (rev 4771)
@@ -19,14 +19,12 @@
 . ${rc_functions} 
 
 # Collect a list of configuration files for our interface
-if [ -n "${2}" ]
-then
+if [ -n "${2}" ]; then
        for file in [EMAIL PROTECTED] # All parameters except $1
        do
                FILES="${FILES} ${network_devices}/ifconfig.${1}/${file}"
        done
-elif [ -d "${network_devices}/ifconfig.${1}" ]
-then
+elif [ -d "${network_devices}/ifconfig.${1}" ]; then
        FILES=`echo ${network_devices}/ifconfig.${1}/*`
 else
        FILES="${network_devices}/ifconfig.${1}"
@@ -43,8 +41,7 @@
 # Process each configuration file
 for file in ${FILES}
 do
-       if [ ! -f "${file}" ]
-       then
+       if [ ! -f "${file}" ]; then
                boot_mesg "${file} is not a network configuration file or 
directory." ${WARNING}
                echo_warning
                continue
@@ -53,10 +50,8 @@
                . ${file}
 
                # This will run the service script, if SERVICE is set
-               if [ -n "${SERVICE}" -a -x 
"${network_devices}/services/${SERVICE}" ]
-               then
-                       if ip link show ${1} > /dev/null 2>&1
-                       then
+               if [ -n "${SERVICE}" -a -x 
"${network_devices}/services/${SERVICE}" ]; then
+                       if ip link show ${1} > /dev/null 2>&1; then
                                IFCONFIG=${file} 
${network_devices}/services/${SERVICE} ${1} down
                        else
                                boot_mesg "Interface ${1} doesn't exist." 
${WARNING}
@@ -73,13 +68,10 @@
 done
 
 
-if [ -z "${2}" ]
-then
+if [ -z "${2}" ]; then
        link_status=`ip link show $1 2> /dev/null`
-       if [ -n "${link_status}" ]
-       then
-               if echo "${link_status}" | grep -q UP
-               then
+       if [ -n "${link_status}" ]; then
+               if echo "${link_status}" | grep -q UP; then
                        boot_mesg "Bringing down the ${1} interface..."
                        ip link set ${1} down
                        evaluate_retval

Modified: trunk/bootscripts/lfs/sysconfig/network-devices/ifup
===================================================================
--- trunk/bootscripts/lfs/sysconfig/network-devices/ifup        2005-03-16 
22:48:49 UTC (rev 4770)
+++ trunk/bootscripts/lfs/sysconfig/network-devices/ifup        2005-03-16 
23:18:06 UTC (rev 4771)
@@ -19,14 +19,12 @@
 . ${rc_functions} 
 
 # Collect a list of configuration files for our interface
-if [ -n "${2}" ]
-then
+if [ -n "${2}" ]; then
        for file in [EMAIL PROTECTED] # All parameters except $1
        do
                FILES="${FILES} ${network_devices}/ifconfig.${1}/${file}"
        done
-elif [ -d "${network_devices}/ifconfig.${1}" ]
-then
+elif [ -d "${network_devices}/ifconfig.${1}" ]; then
        FILES=`echo ${network_devices}/ifconfig.${1}/*`
 else
        FILES="${network_devices}/ifconfig.${1}"
@@ -39,8 +37,7 @@
 # Process each configuration file
 for file in ${FILES}
 do
-       if [ ! -f "${file}" ]
-       then
+       if [ ! -f "${file}" ]; then
                boot_mesg "${file} is not a network configuration file." 
${WARNING}
                echo_warning
                continue
@@ -48,20 +45,15 @@
 
        (
                . ${file}
-               if [ -n "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" -o 
"${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]
-               then
+               if [ -n "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" -o 
"${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]; then
 
                        # Activate the interface, if not activated
-                       if ip link show ${1} > /dev/null 2>&1
-                       then
+                       if ip link show ${1} > /dev/null 2>&1; then
                                link_status=`ip link show ${1} 2> /dev/null`
-                               if [ -n "${link_status}" ]
-                               then
-                                       if ! echo "${link_status}" | grep -q UP
-                                       then
+                               if [ -n "${link_status}" ]; then
+                                       if ! echo "${link_status}" | grep -q 
UP; then
                                                ip link set ${1} up
-                                               if [ "$?" != "0" ]
-                                               then
+                                               if [ "$?" != "0" ]; then
                                                        boot_mesg "Unable to 
activate ${1}." ${FAILURE}
                                                        echo_failure
                                                fi
@@ -75,8 +67,7 @@
 
                fi
                # This will run the service script, if SERVICE is set
-               if [ -n "${SERVICE}" -a -x 
"${network_devices}/services/${SERVICE}" ]
-               then
+               if [ -n "${SERVICE}" -a -x 
"${network_devices}/services/${SERVICE}" ]; then
                        IFCONFIG=${file} ${network_devices}/services/${SERVICE} 
${1} up
                else
                        boot_mesg "Unable to process ${file}.  Either" 
${FAILURE}

Modified: trunk/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static
===================================================================
--- trunk/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static        
2005-03-16 22:48:49 UTC (rev 4770)
+++ trunk/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static        
2005-03-16 23:18:06 UTC (rev 4771)
@@ -17,40 +17,33 @@
 . ${rc_functions} 
 . ${IFCONFIG}
 
-if [ -z "${IP}" ]
-then
+if [ -z "${IP}" ]; then
        boot_mesg "IP variable missing from ${IFCONFIG}, cannot continue." 
${FAILURE}
        echo_failure
        exit 1
 fi
 
-if [ -z "${PREFIX}" -a -z "${PEER}" ]
-then
+if [ -z "${PREFIX}" -a -z "${PEER}" ]; then
        boot_mesg -n "PREFIX variable missing from ${IFCONFIG}," ${WARNING}
        boot_mesg " assuming 24."
        echo_warning
        PREFIX=24
        args="${args} ${IP}/${PREFIX}"
-elif [ -n "${PREFIX}" -a -n "${PEER}" ]
-then
+elif [ -n "${PREFIX}" -a -n "${PEER}" ]; then
        boot_mesg "PREFIX and PEER both specified in ${IFCONFIG}, cannot 
continue." ${FAILURE}
        echo_failure
        exit 1
-elif [ -n "${PREFIX}" ]
-then
+elif [ -n "${PREFIX}" ]; then
        args="${args} ${IP}/${PREFIX}"
-elif [ -n "${PEER}" ]
-then
+elif [ -n "${PEER}" ]; then
        args="${args} ${IP} peer ${PEER}"
 fi
 
-if [ -n "${BROADCAST}" ]
-then
+if [ -n "${BROADCAST}" ]; then
        args="${args} broadcast ${BROADCAST}"
 fi
 
-if [ -n "${SOURCE}" ]
-then
+if [ -n "${SOURCE}" ]; then
        args="${args} src ${SOURCE}"
 fi
 
@@ -60,10 +53,8 @@
                ip addr add ${args} dev ${1}
                evaluate_retval
        
-               if [ -n "${GATEWAY}" ]
-               then
-                       if ip route | grep -q default
-                       then
+               if [ -n "${GATEWAY}" ]; then
+                       if ip route | grep -q default; then
                                boot_mesg "Gateway already setup; skipping." 
${WARNING}
                                echo_warning
                        else
@@ -75,8 +66,7 @@
        ;;
        
        down)
-               if [ -n "${GATEWAY}" ]
-               then
+               if [ -n "${GATEWAY}" ]; then
                        boot_mesg "Removing default gateway..."
                        ip route del default
                        evaluate_retval

Modified: 
trunk/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static-route
===================================================================
--- trunk/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static-route  
2005-03-16 22:48:49 UTC (rev 4770)
+++ trunk/bootscripts/lfs/sysconfig/network-devices/services/ipv4-static-route  
2005-03-16 23:18:06 UTC (rev 4771)
@@ -45,17 +45,14 @@
        ;;
 esac
 
-if [ -n "${need_ip}" ]
-then
-       if [ -z "${IP}" ]
-       then
+if [ -n "${need_ip}" ]; then
+       if [ -z "${IP}" ]; then
                boot_mesg "IP variable missing from ${IFCONFIG}, cannot 
continue." ${FAILURE}
                echo_failure
                exit 1
        fi
 
-       if [ -z "${PREFIX}" ]
-       then
+       if [ -z "${PREFIX}" ]; then
                boot_mesg "PREFIX variable missing from ${IFCONFIG}, cannot 
continue." ${FAILURE}
                echo_failure
                exit 1
@@ -65,10 +62,8 @@
        desc="${desc}${IP}/${PREFIX}"
 fi
 
-if [ -n "${need_gateway}" ]
-then
-       if [ -z "${GATEWAY}" ]
-       then
+if [ -n "${need_gateway}" ]; then
+       if [ -z "${GATEWAY}" ]; then
                boot_mesg "GATEWAY variable missing from ${IFCONFIG}, cannot 
continue." ${FAILURE}
                echo_failure
                exit 1

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to