ansible.xymon/templates/etc/kernel/postinst.d/statoverride.j2

19 lines
554 B
Django/Jinja
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
{# Use | comment to manage multilines #}
# {{ ansible_managed | comment }}
# Ansible template : {{ template_path }}
#
# Allow to fix the warning :
# "Kernel image /boot/vmlinuz… unreadable. Can't check kernel version!"
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725
# See comment #34 - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725/comments/34
set -e
version="$1"
if [ -z "$version" ]; then
exit 0
fi
exec dpkg-statoverride --force-statoverride-add --update --add root root 0644 "/boot/vmlinuz-${version}"