Add optional kernel hook scripts for no defragmenting
authorJoachim Wiedorn <ad_debian@joonet.de>
Fri, 17 Oct 2014 19:54:00 +0000 (21:54 +0200)
committerJoachim Wiedorn <ad_debian@joonet.de>
Fri, 17 Oct 2014 19:54:00 +0000 (21:54 +0200)
debian/changelog
debian/floppy/Makefile
debian/hooks/Makefile [new file with mode: 0644]
debian/lilo.dirs
debian/lilo.install
debian/rules

index b3cc8861e738cd9f4afac77c9413c9cc08745b2b..9d807ed713f8e21d071a078d197fb76ccd93c79e 100644 (file)
@@ -14,11 +14,14 @@ lilo (1:24.1-1) UNRELEASED; urgency=medium
     - Fix hook scripts: kernel hook failed if RAID is degraded.
         Closes: #459713, #728622
     - More documentation about -R option. Closes: #720129
-    - Optional: Set no-defragment bit on XFS filesystems. See: #566035
+    - Optional: Set no-defragment bit on XFS filesystems.
     - Update some patches, remove all other patches.
 
   * Use better link to upstream packages in debian/watch.
   * Bump Standards Version to 3.9.6 (no changes).
+  * Add hook scripts for saving kernel in /boot on XFS filesystems.
+      These scripts can be found in dir. /usr/lib/lilo/ for optional
+      installation. See: #566035
 
  -- Joachim Wiedorn <ad_debian@joonet.de>  Fri, 17 Oct 2014 13:57:19 +0200
 
index 55478d2bbfeeca4a78a3a1da66d4b9c6f6541fd8..3dba51b9bc799b0de6c8ace81fd0616bb7e2b980 100644 (file)
@@ -1,7 +1,17 @@
+# -*- makefile -*-
+#
+# Copyright 2010-2014 Joachim Wiedorn
+#
+# Licensed under the terms of the GPL-2 or any later version.
+# On Debian systems, the complete text of the GNU General Public License
+# version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
 # Make a test floppy
 # this floppy will boot a machine and display the output of some diagnostic
 # programs to give you information on configuring LILO
 
+
 floppy: disk.com bootsect.b
+       @echo Copy image onto boot floppy
        cat bootsect.b disk.com | dd of=/dev/fd0 bs=512
        
diff --git a/debian/hooks/Makefile b/debian/hooks/Makefile
new file mode 100644 (file)
index 0000000..ace0a1f
--- /dev/null
@@ -0,0 +1,31 @@
+# -*- makefile -*-
+#
+# Copyright 2010-2014 Joachim Wiedorn
+#
+# Licensed under the terms of the GPL-2 or any later version.
+# On Debian systems, the complete text of the GNU General Public License
+# version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+
+BASE     := /etc
+POSTINST := kernel/postinst.d
+PREINST  := kernel/preinst.d
+PRERM    := kernel/prerm.d
+
+all:
+
+install:
+       @echo Install kernel hook scripts
+       mkdir -p $(BASE)/$(POSTINST)
+       mkdir -p $(BASE)/$(PREINST)
+       mkdir -p $(BASE)/$(PRERM)
+       install -m 0755 $(POSTINST)/chattr-lilo  $(BASE)/$(POSTINST)
+       install -m 0755 $(PREINST)/chattr-lilo  $(BASE)/$(PREINST)
+       install -m 0755 $(PRERM)/chattr-lilo  $(BASE)/$(PRERM)
+
+uninstall:
+       @echo Uninstall kernel hook scripts
+       rm $(BASE)/$(POSTINST)/chattr-lilo
+       rm $(BASE)/$(PREINST)/chattr-lilo
+       rm $(BASE)/$(PRERM)/chattr-lilo
+
index 557e92c4b046938da7a4aadc0668fef0456b0314..5d061c10e0a50d7772ee339853e8c94d9ac18cb2 100644 (file)
@@ -1,7 +1,10 @@
 sbin
 usr/sbin
-usr/lib/lilo
+usr/lib/lilo/floppy
 usr/share/pixmaps
 usr/share/lilo
 etc/initramfs
 etc/kernel
+usr/lib/lilo/hooks/kernel/postinst.d
+usr/lib/lilo/hooks/kernel/preinst.d
+usr/lib/lilo/hooks/kernel/prerm.d
index 27f0639513a652d3b6bb024b8ecda152bf05e782..fbbeb9182d34fcc992647d594ab236e0a428d885 100644 (file)
@@ -9,6 +9,10 @@ boot/*.bmp                          usr/share/lilo/
 boot/*.dat                          usr/share/lilo/
 debian/update-lilo                  usr/sbin/
 debian/lilo-term.xpm                usr/share/pixmaps/
-debian/floppy/Makefile              usr/lib/lilo/
-src/bootsect.b                      usr/lib/lilo/
-src/disk.com                        usr/lib/lilo/
+debian/floppy/Makefile              usr/lib/lilo/floppy/
+src/bootsect.b                      usr/lib/lilo/floppy/
+src/disk.com                        usr/lib/lilo/floppy/
+hooks/kernel/postinst.d/chattr-lilo usr/lib/lilo/hooks/kernel/postinst.d/
+hooks/kernel/preinst.d/chattr-lilo  usr/lib/lilo/hooks/kernel/preinst.d/
+hooks/kernel/prerm.d/chattr-lilo    usr/lib/lilo/hooks/kernel/prerm.d/
+debian/hooks/Makefile               usr/lib/lilo/hooks/
index 92f0dc5a627c658b9f09a86439ab1bebb4387505..1dc48df2bb379cfc3e24ef9e05b583b1c96f7e21 100755 (executable)
@@ -16,6 +16,11 @@ override_dh_auto_build:
        uudecode -o /dev/stdout debian/doc/tech.html.uu 2>/dev/null | tar -x -z -C debian
        uudecode -o /dev/stdout debian/doc/user.html.uu 2>/dev/null | tar -x -z -C debian
 
+override_dh_install:
+       dh_install
+       @echo "Set execute flag to chattr-lilo hook scripts"
+       chmod 0755 debian/lilo/usr/lib/lilo/hooks/kernel/*/chattr-lilo
+
 override_dh_auto_clean:
        rm -rf debian/html
        dh_auto_clean