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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1690980

Title:
  unattended-upgrades does not block shutdown of system, as it is
  designed to

To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/1690980/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to