]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Update initramfs after .deb install or uninstall
authorTim Schlueter <schlueter.tim@linux.com>
Sun, 13 Jan 2019 22:23:55 +0000 (14:23 -0800)
committerTim Schlueter <schlueter.tim@linux.com>
Mon, 14 Jan 2019 02:53:37 +0000 (18:53 -0800)
Also removed the unnecessary debian/bcachefs-tools.dirs file

debian/bcachefs-tools.dirs [deleted file]
debian/bcachefs-tools.postinst [new file with mode: 0644]
debian/bcachefs-tools.postrm [new file with mode: 0644]

diff --git a/debian/bcachefs-tools.dirs b/debian/bcachefs-tools.dirs
deleted file mode 100644 (file)
index ea98e98..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-sbin/
-usr/share/man/man8/
diff --git a/debian/bcachefs-tools.postinst b/debian/bcachefs-tools.postinst
new file mode 100644 (file)
index 0000000..483b961
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+       if which update-initramfs >/dev/null; then
+           update-initramfs -u
+       fi
+    ;;
+esac
+
diff --git a/debian/bcachefs-tools.postrm b/debian/bcachefs-tools.postrm
new file mode 100644 (file)
index 0000000..6b6fe8a
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    remove)
+       if which update-initramfs >/dev/null; then
+           update-initramfs -u
+       fi
+    ;;
+esac
+