[arch-projects] [initscripts] [PATCH 08/12] activate_vgs, fsck_reboot: fix initial return statements for consistecy
Kurt J. Bosch
kjb-temp-2009 at alpenjodel.de
Sat Jun 25 06:16:00 EDT 2011
* return 0 if skipped as always
* get rid of if-construct using '&&'
---
functions | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/functions b/functions
index 6b7c8fc..564ea4c 100644
--- a/functions
+++ b/functions
@@ -334,7 +334,7 @@ udevd_modprobe() {
}
activate_vgs() {
- [[ $USELVM = [yY][eE][sS] && -x $(type -P lvm) && -d /sys/block ]] || return
+ [[ $USELVM = [yY][eE][sS] && -x $(type -P lvm) && -d /sys/block ]] || return 0
stat_busy "Activating LVM2 groups"
# Kernel 2.6.x, LVM2 groups
/sbin/modprobe -q dm-mod 2>/dev/null
@@ -398,9 +398,8 @@ fsck_all() {
fsck_reboot() {
# $1 = exit code returned by fsck
# Ignore conditions 'FS errors corrected' and 'Cancelled by the user'
- if (( ($1 | 33) == 33 )); then
- return 0
- elif (( $1 & 2 )); then
+ (( ($1 | 33) == 33 )) && return 0
+ if (( $1 & 2 )); then
echo
echo "********************** REBOOT REQUIRED *********************"
echo "* *"
--
1.7.1
More information about the arch-projects
mailing list