summaryrefslogtreecommitdiffstats
path: root/debian/systemd-sysv.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:49:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:49:53 +0000
commit87aefc960557c2fb6fdf9ea4c1ac0e7983f68f68 (patch)
tree263fc56d7d40512aaa09193905008a3f4e3b0018 /debian/systemd-sysv.postinst
parentAdding upstream version 255.4. (diff)
downloadsystemd-87aefc960557c2fb6fdf9ea4c1ac0e7983f68f68.tar.xz
systemd-87aefc960557c2fb6fdf9ea4c1ac0e7983f68f68.zip
Adding debian version 255.4-1.debian/255.4-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/systemd-sysv.postinst')
-rw-r--r--debian/systemd-sysv.postinst27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/systemd-sysv.postinst b/debian/systemd-sysv.postinst
new file mode 100644
index 0000000..aad1c49
--- /dev/null
+++ b/debian/systemd-sysv.postinst
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if [ "$1" = "configure" ]; then
+ for n in halt poweroff shutdown; do
+ fn=$(dpkg-divert --truename "/usr/sbin/$n")
+ if ! test -h "$fn"; then
+ if test "$fn" = "/usr/sbin/$n"; then
+ echo "/usr/sbin/$n vanished in /usr-merge upgrade. Restoring."
+ else
+ echo "/usr/sbin/$n (diverted to $fn) vanished in /usr-merge upgrade. Restoring."
+ fi
+ ln -sf ../bin/systemctl "$fn"
+ fi
+ done
+fi
+# end-remove-after
+
+# update grub on first install, so that the alternative init system boot
+# entries get updated
+if [ "$1" = configure ] && [ -z "$2" ] && [ -e /boot/grub/grub.cfg ] && command -v update-grub >/dev/null; then
+ update-grub || true
+fi
+
+#DEBHELPER#