]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Merge pull request #15 from modelrockettier/update-initramfs
authorkoverstreet <kent.overstreet@gmail.com>
Mon, 14 Jan 2019 03:09:43 +0000 (22:09 -0500)
committerGitHub <noreply@github.com>
Mon, 14 Jan 2019 03:09:43 +0000 (22:09 -0500)
 Update initramfs after .deb install or uninstall

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

index bf17558103ee7433c0fa16430627c59ffb8410cb..cffb8dc1494a8cd7ca2e20fe442b5e46b2889df4 100644 (file)
@@ -122,7 +122,7 @@ int cmd_format(int argc, char *argv[])
        struct bch_opts fs_opts = bch2_parse_opts(fs_opt_strs);
 
        while ((opt = getopt_long(argc, argv,
-                                 "-L:U:fqh",
+                                 "-L:U:g:fqh",
                                  format_opts,
                                  NULL)) != -1)
                switch (opt) {
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
+