diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-08-11 23:14:53 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-08-11 23:14:53 +0200 |
commit | 8a47fa9512eb355e8f7cbe4b4e7d28373e706a6c (patch) | |
tree | 704564ae3794ae021b112d701bfa24f00577dddd /hooks | |
parent | 2b466a50d4e28f1d30df8eedfcd0bfcd565515d2 (diff) | |
download | mkinitcpio-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 'hooks')
-rw-r--r-- | hooks/filesystems | 6 | ||||
-rw-r--r-- | hooks/resume | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/hooks/filesystems b/hooks/filesystems index ba29443..306277b 100644 --- a/hooks/filesystems +++ b/hooks/filesystems @@ -2,13 +2,13 @@ run_hook () { msg -n ":: Loading root filesystem module..." - if [ "x${rootfstype}" != "x" ]; then + if [ -n "${rootfstype}" ]; then FSTYPE="${rootfstype}" else if [ ! -e "${root}" ]; then msg "\nAttempting to create root device '${root}'" - if [ "x${rootdelay}" != "x" ]; then + if [ -n "${rootdelay}" ]; then msg -n "Waiting for devices to settle..." /bin/sleep "${rootdelay}" msg "done." @@ -19,7 +19,7 @@ run_hook () if [ "${BLOCKNAME}" = "unknown" ]; then FSTYPE="unknown" echo "ERROR: Failed to parse block device name for '${root}'" - elif [ "x${BLOCKDEVICE}" = "x" ]; then + elif [ -z "${BLOCKDEVICE}" ]; then FSTYPE="unknown" echo "ERROR: Failed to parse block device ids for '${root}'" else diff --git a/hooks/resume b/hooks/resume index 4af85ea..f410051 100644 --- a/hooks/resume +++ b/hooks/resume @@ -16,7 +16,7 @@ run_hook () else suspend2root="/proc/suspend2" fi - if [ -d "${suspend2root}" -a "x${resume2}" != "x" ]; then + if [ -d "${suspend2root}" -a -n "${resume2}" ]; then echo ${resume2} > ${suspend2root}/resume2 echo > ${suspend2root}/do_resume fi |