Fix return closes

This commit is contained in:
Tanguy Herbron 2022-06-12 21:35:42 +02:00
parent 6d6751e732
commit 1317aabeb1

View File

@ -10,17 +10,17 @@ install_sudo() {
echo ">>> Installing sudo package..." >&2 echo ">>> Installing sudo package..." >&2
apt install sudo -qq apt install sudo -qq
return 0 echo 0
fi fi
echo ">>> No supported package manager detected, exciting..." >&2 echo ">>> No supported package manager detected, exciting..." >&2
return 1 echo 1
} }
check_privilege() { check_privilege() {
if ! [ $(id -u) = 0 ]; then if ! [ $(id -u) = 0 ]; then
echo ">>> Please run as root" >&2 echo ">>> Please run as root" >&2
return 1 echo 1
fi fi
} }
@ -29,10 +29,10 @@ check_sudo_installation() {
if ! [ $? = 0 ]; then if ! [ $? = 0 ]; then
echo ">>> Sudo package missing..." >&2 echo ">>> Sudo package missing..." >&2
return $(install_sudo) echo $(install_sudo)
fi fi
return 0 echo 0
} }
create_default_user() { create_default_user() {