mirror of
https://github.com/schoebel/mars
synced 2024-12-11 01:09:19 +00:00
29 lines
837 B
Bash
29 lines
837 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
#DEBHELPER#
|
|
|
|
case "$1" in
|
|
install)
|
|
;;
|
|
|
|
configure|reconfigure)
|
|
# Restart procps to reload sysctl.d files
|
|
invoke-rc.d procps restart
|
|
# Get the version of the current loaded module:
|
|
old_version="$(cat /sys/module/mars/version 2>/dev/null)" || exit 0
|
|
# Get the version of the latest available module:
|
|
new_version="$(modinfo -F version mars 2>/dev/null)" || exit 0
|
|
# See if the new one is actually newer:
|
|
dpkg --compare-versions "$old_version" lt "$new_version" || exit 0
|
|
# Trigger an update notification that recommends a reboot:
|
|
touch /run/reboot-required || true
|
|
grep -Fqsx mars-dkms /run/reboot-required.pkgs || \
|
|
echo mars-dkms >> /run/reboot-required.pkgs || true
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
exit 0
|