error() function is not available at this stage
This commit is contained in:
parent
2fd063fee4
commit
14c4b63e69
8
bkctld
8
bkctld
|
@ -14,7 +14,10 @@
|
|||
|
||||
set -u
|
||||
|
||||
[ "$(id -u)" -ne 0 ] && error "You need to be root to run ${0} !"
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "You need to be root to run ${0} !" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
basedir=$(dirname "$0")
|
||||
if [ "${basedir}" = "/usr/local/sbin" ] && [ -d "/usr/local/lib/bkctld" ]; then
|
||||
|
@ -24,7 +27,8 @@ elif [ "${basedir}" = "/usr/sbin" ] && [ -d "/usr/lib/bkctld" ]; then
|
|||
elif [ -d './lib' ]; then
|
||||
LIBDIR='lib'
|
||||
else
|
||||
error "Failed to find a suitable lib directory for bkctld."
|
||||
echo "Failed to find a suitable lib directory for bkctld." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck source=lib/includes
|
||||
|
|
Loading…
Reference in a new issue