use _root_check

This commit is contained in:
Tobias Powalowski 2023-10-12 08:44:48 +02:00
parent 489a699e45
commit 6f1c4c6a40

View file

@ -129,13 +129,9 @@ preload_builtin_modules() {
if [[ -z "$1" ]]; then
usage
cleanup 0
fi
### check for root
if ! [[ ${UID} -eq 0 ]]; then
echo "ERROR: Please run as root user!"
exit 1
exit 0
fi
_root_check
_opt_short='c:d:g:hk:'
parseopts "$_opt_short" -- "$@" || exit 1