Additionally, when I modified my reboot script to reboot when linux-headers were half-installed I ran into the following:
bdmurray@clean-xenial-amd64:~$ sudo apt-get dist-upgrade
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
I thought that is what we are trying to avoid. Here's the script:
bdmurray@clean-xenial-amd64:~$ cat u-u-reboot.sh
#!/bin/sh
loop=1
count=0
today=$(date +%Y-%m-%d)
while [ $loop -gt 0 ]
do
count=$(expr $count + 1)
echo "loop...$count"
time=$(date +%H:%M)
if [ $(grep -r -e "$today $time.*status half-installed linux-headers.*" /var/log/dpkg.log | wc -l) -ge 1 ]; then
aplay /usr/share/sounds/alsa/Front_Right.wav
sudo reboot
fi
sleep 1
done
Additionally, when I modified my reboot script to reboot when linux-headers were half-installed I ran into the following:
bdmurray@ clean-xenial- amd64:~ $ sudo apt-get dist-upgrade
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
I thought that is what we are trying to avoid. Here's the script:
bdmurray@ clean-xenial- amd64:~ $ cat u-u-reboot.sh sounds/ alsa/Front_ Right.wav
#!/bin/sh
loop=1
count=0
today=$(date +%Y-%m-%d)
while [ $loop -gt 0 ]
do
count=$(expr $count + 1)
echo "loop...$count"
time=$(date +%H:%M)
if [ $(grep -r -e "$today $time.*status half-installed linux-headers.*" /var/log/dpkg.log | wc -l) -ge 1 ]; then
aplay /usr/share/
sudo reboot
fi
sleep 1
done