semikolon added
error handling of get_harddisk changed
This commit is contained in:
parent
782810135e
commit
6499f84ae2
2 changed files with 5 additions and 4 deletions
|
@ -226,9 +226,10 @@ function find_harddisk()
|
|||
done
|
||||
fi )
|
||||
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"
|
||||
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
|
||||
echo -n "$dev"
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ function box_diff()
|
|||
[ $# -eq 0 ] && echo "[`basename $0`] - no arguments supplied - maybe you want to use '--help'" && exit 1
|
||||
|
||||
ACTION=--help
|
||||
[ $# -gt 1 ] && $ACTION=$1
|
||||
[ $# -gt 1 ] && ACTION=$1
|
||||
|
||||
case "$1" in
|
||||
diff )
|
||||
|
@ -160,7 +160,7 @@ case "$1" in
|
|||
echo -e "unknown action: $1"
|
||||
echo
|
||||
$0 help
|
||||
exit "1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue