aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts/contrib/lsb-v3/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'bootscripts/contrib/lsb-v3/init.d')
-rw-r--r--bootscripts/contrib/lsb-v3/init.d/checkfs8
-rw-r--r--bootscripts/contrib/lsb-v3/init.d/lfs-functions4
-rw-r--r--bootscripts/contrib/lsb-v3/init.d/localnet8
-rw-r--r--bootscripts/contrib/lsb-v3/init.d/rc2
-rw-r--r--bootscripts/contrib/lsb-v3/init.d/sendsignals8
-rw-r--r--bootscripts/contrib/lsb-v3/init.d/udev2
6 files changed, 16 insertions, 16 deletions
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."