bundles/apt: add /etc/kernel/postinst.d/unattended-upgrades to ensure a reboot on kernel updates
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
d4b110087f
commit
767db8efdd
4 changed files with 22 additions and 0 deletions
15
bundles/apt/files/kernel-postinst.d
Normal file
15
bundles/apt/files/kernel-postinst.d
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# /etc/kernel/postinst.d/unattended-upgrades
|
||||||
|
|
||||||
|
case "$DPKG_MAINTSCRIPT_PACKAGE::$DPKG_MAINTSCRIPT_NAME" in
|
||||||
|
linux-image-extra*::postrm)
|
||||||
|
exit 0;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -d /var/run ]; then
|
||||||
|
touch /var/run/reboot-required
|
||||||
|
if ! grep -q "^$DPKG_MAINTSCRIPT_PACKAGE$" /var/run/reboot-required.pkgs 2> /dev/null ; then
|
||||||
|
echo "$DPKG_MAINTSCRIPT_PACKAGE" >> /var/run/reboot-required.pkgs
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -49,6 +49,9 @@ files = {
|
||||||
'action:apt_update',
|
'action:apt_update',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'/etc/kernel/postinst.d/unattended-upgrades': {
|
||||||
|
'source': 'kernel-postinst.d',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
directories = {
|
directories = {
|
||||||
|
|
1
bundles/c3voc-addons/files/kernel-postinst.d
Symbolic link
1
bundles/c3voc-addons/files/kernel-postinst.d
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../apt/files/kernel-postinst.d
|
|
@ -52,6 +52,9 @@ directories = {
|
||||||
}
|
}
|
||||||
|
|
||||||
files = {
|
files = {
|
||||||
|
'/etc/kernel/postinst.d/unattended-upgrades': {
|
||||||
|
'source': 'kernel-postinst.d',
|
||||||
|
},
|
||||||
'/usr/local/share/icinga/plugins/check_unattended_upgrades': {
|
'/usr/local/share/icinga/plugins/check_unattended_upgrades': {
|
||||||
'mode': '0755',
|
'mode': '0755',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue