semikolon added

error handling of get_harddisk changed
This commit is contained in:
lars 2005-10-21 10:07:01 +00:00
parent 782810135e
commit 6499f84ae2
2 changed files with 5 additions and 4 deletions

View File

@ -226,9 +226,10 @@ function find_harddisk()
done done
fi ) fi )
if [ -z "$dev" ] ; then if [ -z "$dev" ] ; then
echo "no valid harddisk for initialisation found!" >>"$LOG_FILE" log_msg "no valid harddisk for initialisation found!"
cat /proc/partitions >>"$LOG_FILE" cat /proc/partitions >>"$LOG_FILE"
return 1 # do not return with an error, to avoid a failing of the script ('break on error')
# the caller of this function should handle an empty return string
fi fi
echo -n "$dev" echo -n "$dev"
} }

View File

@ -116,7 +116,7 @@ function box_diff()
[ $# -eq 0 ] && echo "[`basename $0`] - no arguments supplied - maybe you want to use '--help'" && exit 1 [ $# -eq 0 ] && echo "[`basename $0`] - no arguments supplied - maybe you want to use '--help'" && exit 1
ACTION=--help ACTION=--help
[ $# -gt 1 ] && $ACTION=$1 [ $# -gt 1 ] && ACTION=$1
case "$1" in case "$1" in
diff ) diff )
@ -160,7 +160,7 @@ case "$1" in
echo -e "unknown action: $1" echo -e "unknown action: $1"
echo echo
$0 help $0 help
exit "1" exit 1
;; ;;
esac esac