diff options
Diffstat (limited to 'bootscripts')
-rw-r--r-- | bootscripts/contrib/lsb-v3/ChangeLog | 1 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/checkfs | 8 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/lfs-functions | 4 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/localnet | 8 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/rc | 2 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/sendsignals | 8 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/init.d/udev | 2 | ||||
-rw-r--r-- | bootscripts/contrib/lsb-v3/lsb/init-functions | 10 |
8 files changed, 22 insertions, 21 deletions
diff --git a/bootscripts/contrib/lsb-v3/ChangeLog b/bootscripts/contrib/lsb-v3/ChangeLog index 946e72d34..8a5da4e6d 100644 --- a/bootscripts/contrib/lsb-v3/ChangeLog +++ b/bootscripts/contrib/lsb-v3/ChangeLog @@ -1,6 +1,7 @@ ChangeLog 20100627 - [dj] * Sync to LFS-Bootscripts-20100627 (killall in new sysvinit). + * Standardized syntax for urinary comparisons in tests. 20100529 - [matthew] * Only copy /lib/udev/devices/null, as Udev >= 155 copies diff --git a/bootscripts/contrib/lsb-v3/init.d/checkfs b/bootscripts/contrib/lsb-v3/init.d/checkfs index a8a1b6c60..4718a49a3 100644 --- a/bootscripts/contrib/lsb-v3/init.d/checkfs +++ b/bootscripts/contrib/lsb-v3/init.d/checkfs @@ -25,7 +25,7 @@ case "${1}" in fi mount -n -o remount,ro / >/dev/null - if [ ${?} != 0 ] + if [ ${?} -ne 0 ] then log_failure_msg "Mounting root file system in read-only mode" echo -e "${FAILURE}FAILURE:\n" @@ -53,17 +53,17 @@ case "${1}" in fsck ${options} -a -A -C -T error_value=${?} - if [ "${error_value}" = 0 ] + if [ "${error_value}" -eq 0 ] then log_success_msg "Checking file systems..." - elif [ "${error_value}" = 1 ] + elif [ "${error_value}" -eq 1 ] then log_warning_msg "Checking file systems..." echo -e "${WARNING}WARNING:\n" echo -e "${WARNING}File system errors were found and have been" echo -e "${WARNING}corrected. You may want to double-check that" echo -e "${WARNING}everything was fixed properly.${NORMAL}" - elif [ "${error_value}" = 2 -o "${error_value}" = 3 ]; then + elif [ "${error_value}" -eq 2 -o "${error_value}" -eq 3 ]; then log_warning_msg "Checking file systems..." echo -e "${WARNING}WARNING:\n" echo -e "${WARNING}File system errors were found and have been been" diff --git a/bootscripts/contrib/lsb-v3/init.d/lfs-functions b/bootscripts/contrib/lsb-v3/init.d/lfs-functions index afcd05de8..b0fef4c29 100644 --- a/bootscripts/contrib/lsb-v3/init.d/lfs-functions +++ b/bootscripts/contrib/lsb-v3/init.d/lfs-functions @@ -77,7 +77,7 @@ statusproc() pidlist=`pidofproc "${BIN_FILE}"` STATUS=$? echo "Checking ${MESSAGE} status:" - if [ "${STATUS}" = "0" ]; then + if [ "${STATUS}" -eq "0" ]; then log_success_msg "Running with PID(s) ${pidlist}" else log_warning_msg "Not running!" @@ -202,7 +202,7 @@ evaluate_retval() # Print messages for the generic force-reload, reload, restart, # and try-restart targets - if [ "${error_value}" = "0" ] + if [ "${error_value}" -eq "0" ] then log_success_msg "${message}${MESSAGE} " return "${error_value}" diff --git a/bootscripts/contrib/lsb-v3/init.d/localnet b/bootscripts/contrib/lsb-v3/init.d/localnet index 7e520bbe4..c63c4baa6 100644 --- a/bootscripts/contrib/lsb-v3/init.d/localnet +++ b/bootscripts/contrib/lsb-v3/init.d/localnet @@ -22,7 +22,7 @@ case "${1}" in start) ip addr add 127.0.0.1/8 label lo dev lo ip link set lo up - if [ "${?}" = "0" ] + if [ "${?}" -eq "0" ] then log_success_msg "Bringing up the loopback interface..." else @@ -30,7 +30,7 @@ case "${1}" in fi hostname "${HOSTNAME}" - if [ "${?}" = "0" ] + if [ "${?}" -eq "0" ] then log_success_msg "Setting hostname to ${HOSTNAME}..." else @@ -41,7 +41,7 @@ case "${1}" in stop) ip link set lo down - if [ "${?}" = "0" ] + if [ "${?}" -eq "0" ] then log_success_msg "Bringing down the loopback interface..." else @@ -60,7 +60,7 @@ case "${1}" in retval=$(( "${retval}" + "${?}" )) hostname "${HOSTNAME}" retval=$(( "${retval}" + "${?}" )) - if [ "${retval}" = "0" ] + if [ "${retval}" -eq "0" ] then log_success_msg "Restarting local network..." else diff --git a/bootscripts/contrib/lsb-v3/init.d/rc b/bootscripts/contrib/lsb-v3/init.d/rc index 23fb97fe2..24e26ee07 100644 --- a/bootscripts/contrib/lsb-v3/init.d/rc +++ b/bootscripts/contrib/lsb-v3/init.d/rc @@ -119,7 +119,7 @@ if [ "${prevlevel}" != "N" ]; then ${link} stop error_value=${?} - if [ "${error_value}" != "0" ]; then + if [ "${error_value}" -ne "0" ]; then print_error_msg fi done diff --git a/bootscripts/contrib/lsb-v3/init.d/sendsignals b/bootscripts/contrib/lsb-v3/init.d/sendsignals index 95b26ceb9..db2df47eb 100644 --- a/bootscripts/contrib/lsb-v3/init.d/sendsignals +++ b/bootscripts/contrib/lsb-v3/init.d/sendsignals @@ -22,8 +22,8 @@ case "${1}" in killall5 -15 error_value=${?} # Account for successful return value of 2 - if [ ${error_value} = 2 ] - error_value="0" + if [ ${error_value} -eq 2 ] + error_value=0 fi sleep 3 @@ -34,8 +34,8 @@ case "${1}" in killall5 -9 error_value=${?} # Account for successful return value of 2 - if [ ${error_value} = 2 ] - error_value="0" + if [ ${error_value} -eq 2 ] + error_value=0 fi sleep 3 diff --git a/bootscripts/contrib/lsb-v3/init.d/udev b/bootscripts/contrib/lsb-v3/init.d/udev index c019ab879..ec8a72cd7 100644 --- a/bootscripts/contrib/lsb-v3/init.d/udev +++ b/bootscripts/contrib/lsb-v3/init.d/udev @@ -40,7 +40,7 @@ case "${1}" in if ! mountpoint /dev > /dev/null; then mount -n -t tmpfs tmpfs /dev -o mode=755 fi - if [ ${?} != 0 ]; then + if [ ${?} -ne 0 ]; then echo_failure boot_mesg -n "FAILURE:\n\nCannot mount a tmpfs" ${FAILURE} boot_mesg -n " onto /dev, this system will be halted." diff --git a/bootscripts/contrib/lsb-v3/lsb/init-functions b/bootscripts/contrib/lsb-v3/lsb/init-functions index b37eeb32f..d422a5b82 100644 --- a/bootscripts/contrib/lsb-v3/lsb/init-functions +++ b/bootscripts/contrib/lsb-v3/lsb/init-functions @@ -201,7 +201,7 @@ killproc() # Check for a valid signal check_signal "${signal}" - if [ "${?}" != "0" ] + if [ "${?}" -ne "0" ] then return 2 fi @@ -278,7 +278,7 @@ killproc() kill "${signal}" "${pid}" 2> /dev/null # Wait up to ${delay}/10 seconds to for "${pid}" to # terminate in 10ths of a second - while [ "${delay}" != "0" ] + while [ "${delay}" -ne "0" ] do kill -0 "${pid}" 2> /dev/null || piddead="1" if [ "${piddead}" = "1" ] @@ -413,7 +413,7 @@ local exitstatus="0" for pid in ${pidlist} do kill -0 ${pid} 2> /dev/null - if [ "${?}" = "0" ]; then + if [ "${?}" -eq "0" ]; then lpids="${pids}${pid} " else exitstatus="1" @@ -534,7 +534,7 @@ check_signal() valsig="${valsig} -11 -13 -14 -15" echo "${valsig}" | grep -- " ${1} " > /dev/null - if [ "${?}" = "0" ] + if [ "${?}" -eq "0" ] then return 0 else @@ -566,7 +566,7 @@ check_sig_type() valsig="-ALRM -INT -KILL -TERM -PWR -STOP -ABRT -QUIT -2 -3 -6 -9 -14 -15" echo "${valsig}" | grep -- " ${1} " > /dev/null - if [ "${?}" = "0" ] + if [ "${?}" -eq "0" ] then return 0 else |