This repository has been archived on 2024-07-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
etckeeper/pm/sleep.d/10_unattended-upgrades-hibernate
T
Gitea df33399e6f committing changes in /etc after apt run
Package changes:
+gir1.2-glib-2.0 1.66.1-1+b1 amd64
+libgirepository-1.0-1 1.66.1-1+b1 amd64
+python3-dbus 1.2.16-5 amd64
+python3-distro-info 1.0 all
+python3-gi 3.38.0-2 amd64
+unattended-upgrades 2.8 all
2022-07-08 12:04:07 +02:00

34 lines
672 B
Bash
Executable File

#!/bin/sh
# Action script ensure that unattended-upgrades is finished
# before a hibernate
#
# Copyright: Copyright (c) 2009 Michael Vogt
# License: GPL-2
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
SHUTDOWN_HELPER=/usr/share/unattended-upgrades/unattended-upgrade-shutdown
if [ -x /usr/bin/python3 ]; then
PYTHON=python3
else
PYTHON=python
fi
if [ ! -x /usr/share/unattended-upgrades/unattended-upgrade-shutdown ]; then
exit 0
fi
case "${1}" in
hibernate)
if [ -e $SHUTDOWN_HELPER ]; then
$PYTHON $SHUTDOWN_HELPER --stop-only
fi
;;
resume|thaw)
# nothing
;;
esac