sudo detection doesnt work
This commit is contained in:
parent
911ed44e39
commit
68ba5323de
|
@ -67,20 +67,12 @@ _check_date() {
|
||||||
|
|
||||||
update-system() {
|
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"
|
echo "\033[32;1m=== Starting system update, please enter your password ===\033[0m"
|
||||||
sudo true
|
sudo true
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Could not get sudo..."
|
echo "Could not get sudo..."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "\033[33;1m=== You are not a sudoer, skipping system update... ===\033[0m"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "\033[32;1m=== Updating system ===\033[0m"
|
echo "\033[32;1m=== Updating system ===\033[0m"
|
||||||
start_system_update=`date +%s`
|
start_system_update=`date +%s`
|
||||||
|
|
Loading…
Reference in New Issue