Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64
Your IP : 3.21.105.222
Current Path : /etc/pm/sleep.d/ |
| Current File : //etc/pm/sleep.d/10_unattended-upgrades-hibernate |
#!/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
|