Skip to content

Commit

Permalink
Reboot after firmware update
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed Dec 2, 2018
1 parent 693a864 commit 82a7f58
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions fixes.sh
Expand Up @@ -10,6 +10,9 @@
exit
fi

# By default, do not reboot after update
reboot=0

# Just in case apt is already doing stuff in the background, hang tight until it completes
echo "Please wait for apt tasks to complete..."
while fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock >/dev/null 2>&1; do sleep 1; done
Expand Down Expand Up @@ -253,6 +256,7 @@ check process 9590 with pidfile /run/9590.pid
installcheck=`/usr/bin/apt --installed -qq list dhcpcd5`
if [[ $installcheck != '' ]]; then
echo "Patched" > /var/log/nems/patches/20181201-wifi
reboot=1 # Force reboot after this update to activate the firmware
else
echo "Patch appears to have failed"
fi
Expand Down Expand Up @@ -512,8 +516,7 @@ if [ $(dpkg-query -W -f='${Status}' memtester 2>/dev/null | grep -c "ok installe
apt-get -y install memtester
fi






# If a reboot is required, do it now
if [[ $reboot == 1 ]]; then
/sbin/reboot
fi

0 comments on commit 82a7f58

Please sign in to comment.