Fix bug
This commit is contained in:
parent
22c1a395af
commit
7fc0bddb76
|
@ -68,11 +68,9 @@ _check_date() {
|
||||||
update-system() {
|
update-system() {
|
||||||
|
|
||||||
# Ask for sudo right now
|
# Ask for sudo right now
|
||||||
sudoresult=$(sudo -nv 2>&1)
|
sudoresult=$(sudo -n -l true 2>&1)
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
# Nothing to do
|
|
||||||
elif echo $sudoresult | grep -q '^sudo:'; 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
|
||||||
|
|
Loading…
Reference in New Issue