aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-27 15:29:39 +0200
committerKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-28 15:39:42 +0200
commit1f53c07a82b4b873c33884ddcbdebed2b7ee9558 (patch)
treec4cf122f96486ebed08d0d5d4c496a01cc9d8533 /rc.sysinit
parent714ebaa6661be59e8d68c08bbdf09bbfb64ff210 (diff)
downloadinitscripts-1f53c07a82b4b873c33884ddcbdebed2b7ee9558.tar.xz
Refactor to get rid of simple if-constucts
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit18
1 files changed, 4 insertions, 14 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 27e603b..06b287c 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -68,11 +68,7 @@ if [[ $HWCLOCK_PARAMS ]]; then
# is used. If HARDWARECLOCK is not set in rc.conf, the value in
# /var/lib/hwclock/adjfile is used (in this case /var can not be a separate
# partition).
- if TZ=$TIMEZONE hwclock $HWCLOCK_PARAMS; then
- stat_done
- else
- stat_fail
- fi
+ TZ=$TIMEZONE hwclock $HWCLOCK_PARAMS && stat_done || stat_fail
fi
# Start/trigger UDev, load MODULES and settle UDev
@@ -175,15 +171,9 @@ if [[ -f /etc/crypttab && $CS ]] && grep -q ^[^#] /etc/crypttab; then
return $failed
}
crypto_unlocked=0
- if read_crypttab do_unlock; then
- stat_done
- else
- stat_fail
- fi
- if (( crypto_unlocked == 1 )); then
- # Maybe someone has LVM on an encrypted block device
- activate_vgs
- fi
+ read_crypttab do_unlock && stat_done || stat_fail
+ # Maybe someone has LVM on an encrypted block device
+ (( crypto_unlocked == 1 )) && activate_vgs
fi
if [[ -x $(type -P fsck) ]]; then