It doesn't relate to "/usr/share/unattended-upgrades/unattended-upgrade- shutdown" file at all. When you "fix" it - it just fails because of the invalid python syntax. And shutdown just works.
The real problem is systemd dependencies. Here is the log of the shutdown process: Unattended upgrades should be started before filesystem unmount, but it starts after unmount: [ OK ] Unmounted /home. [ OK ] Stopped File System Check on /dev/mapper/VG-home. [ OK ] Unmounted /var. [ OK ] Stopped File System Check on /dev/mapper/VG-var. [ OK ] Unmounted /boot. [ OK ] Stopped File System Check on /dev/mapper/VG-boot. [ OK ] Removed slice system-systemd\x2dfsck.slice. [ OK ] Stopped Login to default iSCSI targets. Stopping iSCSI initiator daemon (iscsid)... [ OK ] Stopped iSCSI initiator daemon (iscsid). [ OK ] Stopped target Network is Online. [ OK ] Stopped target Network. [ OK ] Stopped Initial cloud-init job (metadata service crawler). Stopping Raise network interfaces... [ OK ] Stopped Raise network interfaces. [ OK ] Stopped target Local File Systems. Unmounting /run/user/1000... Starting Unattended Upgrades Shutdown... [ OK ] Stopped Apply Kernel Variables. [ OK ] Stopped target Network (Pre). [ OK ] Stopped Initial cloud-init job (pre-networking). [ OK ] Stopped Load Kernel Modules. [ OK ] Unmounted /run/user/1000. [ OK ] Reached target Unmount All Filesystems. [ OK ] Stopped target Local File Systems (Pre). [ OK ] Stopped Create Static Device Nodes in /dev. Stopping Monitoring of LVM2 mirrors... dmeventd or progress polling... [ OK ] Stopped Remount Root and Kernel File Systems. [ OK ] Stopped Monitoring of LVM2 mirrors,...ng dmeventd or progress polling. Stopping LVM2 metadata daemon... [ OK ] Stopped LVM2 metadata daemon. And it is reproducible with LVM only. Have to spend some time on investigation. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1661611 Title: apt/unattended-upgrades stalls shutdown To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1661611/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs