sudo detection doesnt work
This commit is contained in:
parent
911ed44e39
commit
68ba5323de
|
@ -67,18 +67,10 @@ _check_date() {
|
|||
|
||||
update-system() {
|
||||
|
||||
# Ask for sudo right now
|
||||
sudoresult=$(sudo -n -l true 2>&1)
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
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"
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue