Fix return closes
This commit is contained in:
parent
6d6751e732
commit
1317aabeb1
@ -10,17 +10,17 @@ install_sudo() {
|
||||
|
||||
echo ">>> Installing sudo package..." >&2
|
||||
apt install sudo -qq
|
||||
return 0
|
||||
echo 0
|
||||
fi
|
||||
|
||||
echo ">>> No supported package manager detected, exciting..." >&2
|
||||
return 1
|
||||
echo 1
|
||||
}
|
||||
|
||||
check_privilege() {
|
||||
if ! [ $(id -u) = 0 ]; then
|
||||
echo ">>> Please run as root" >&2
|
||||
return 1
|
||||
echo 1
|
||||
fi
|
||||
}
|
||||
|
||||
@ -29,10 +29,10 @@ check_sudo_installation() {
|
||||
|
||||
if ! [ $? = 0 ]; then
|
||||
echo ">>> Sudo package missing..." >&2
|
||||
return $(install_sudo)
|
||||
echo $(install_sudo)
|
||||
fi
|
||||
|
||||
return 0
|
||||
echo 0
|
||||
}
|
||||
|
||||
create_default_user() {
|
||||
|
Loading…
Reference in New Issue
Block a user