sudo detection doesnt work
This commit is contained in:
parent
911ed44e39
commit
68ba5323de
|
@ -67,18 +67,10 @@ _check_date() {
|
||||||
|
|
||||||
update-system() {
|
update-system() {
|
||||||
|
|
||||||
# Ask for sudo right now
|
echo "\033[32;1m=== Starting system update, please enter your password ===\033[0m"
|
||||||
sudoresult=$(sudo -n -l true 2>&1)
|
sudo true
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
if [ $? -eq 0 ]; then
|
echo "Could not get sudo..."
|
||||||
echo "\033[32;1m=== Starting system update, please enter your password ===\033[0m"
|
|
||||||
sudo true
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Could not get sudo..."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "\033[33;1m=== You are not a sudoer, skipping system update... ===\033[0m"
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue