From 8a47fa9512eb355e8f7cbe4b4e7d28373e706a6c Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sat, 11 Aug 2007 21:14:53 +0000 Subject: Coding style change, use -n and -z for variable tests Signed-off-by: Aaron Griffin git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@209 880c04e9-e011-0410-abf7-b926e227c9cd --- init | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'init') diff --git a/init b/init index 0cc2ece..3511286 100644 --- a/init +++ b/init @@ -43,19 +43,19 @@ for cmd in $CMDLINE; do esac done -if [ "x${disablehooks}" != "x" ]; then +if [ -n "${disablehooks}" ]; then for d in $(replace "${disablehooks}" ','); do export "hook_${d}=disabled" done fi -if [ "x${disablemodules}" != "x" ]; then +if [ -n "${disablemodules}" ]; then for d in $(replace "${disablemodules}" ','); do export "mod_${d}=disabled" done fi -if [ "x${earlymodules}" != "x" ]; then +if [ -n "${earlymodules}" ]; then for m in $(replace "${earlymodules}" ','); do /sbin/modprobe -q $m > /dev/null 2>&1 done @@ -109,7 +109,7 @@ if [ ! -b "${root}" ]; then eval $(/bin/parseblock "${root}") if [ "${BLOCKNAME}" = "unknown" ]; then echo "ERROR: Failed to parse block device name for '${root}'" - elif [ "x${BLOCKDEVICE}" = "x" ]; then + elif [ -z "${BLOCKDEVICE}" ]; then echo "ERROR: Failed to parse block device ids for '${root}'" else export root="${BLOCKNAME}" @@ -136,7 +136,7 @@ fi #Special handling if udev is running udevpid=$(/bin/minips -C udevd -o pid=) -if [ "x${udevpid}" != "x" ]; then +if [ -n "${udevpid}" ]; then /bin/kill -9 $udevpid /bin/sleep 0.01 fi -- cgit v1.2.3-24-g4f1b