summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-08-11 23:14:53 +0200
committerAaron Griffin <aaron@archlinux.org>2007-08-11 23:14:53 +0200
commit8a47fa9512eb355e8f7cbe4b4e7d28373e706a6c (patch)
tree704564ae3794ae021b112d701bfa24f00577dddd /init
parent2b466a50d4e28f1d30df8eedfcd0bfcd565515d2 (diff)
downloadmkinitcpio-8a47fa9512eb355e8f7cbe4b4e7d28373e706a6c.tar.gz
mkinitcpio-8a47fa9512eb355e8f7cbe4b4e7d28373e706a6c.tar.xz
Coding style change, use -n and -z for variable tests
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@209 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'init')
-rw-r--r--init10
1 files changed, 5 insertions, 5 deletions
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