plymouth/kernel: cleanup not needed parts for shutdown
authorHarald Hoyer <harald@redhat.com>
Mon, 23 Jan 2012 09:41:41 +0000 (10:41 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 23 Jan 2012 09:41:41 +0000 (10:41 +0100)
remove plymouth and kernel parts from /run/initramfs, which are not
needed at shutdown.

https://bugzilla.redhat.com/show_bug.cgi?id=751189

modules.d/50plymouth/module-setup.sh
modules.d/50plymouth/plymouth-cleanup.sh [new file with mode: 0755]
modules.d/90kernel-modules/kernel-cleanup.sh [new file with mode: 0755]
modules.d/90kernel-modules/module-setup.sh

index b78c718..5c9eaee 100755 (executable)
@@ -46,6 +46,7 @@ install() {
 
     inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
     inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
+    inst_hook pre-pivot 10 "$moddir"/plymouth-cleanup.sh
     inst_hook emergency 50 "$moddir"/plymouth-emergency.sh
     inst readlink
 }
diff --git a/modules.d/50plymouth/plymouth-cleanup.sh b/modules.d/50plymouth/plymouth-cleanup.sh
new file mode 100755 (executable)
index 0000000..d6d11e6
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+rm -fr /usr/share/plymouth /usr/lib/plymouth /usr/lib64/plymouth
diff --git a/modules.d/90kernel-modules/kernel-cleanup.sh b/modules.d/90kernel-modules/kernel-cleanup.sh
new file mode 100755 (executable)
index 0000000..d17714d
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+rm -fr /lib/modules
\ No newline at end of file
index 46d8591..88f0e2d 100755 (executable)
@@ -75,6 +75,7 @@ install() {
         inst_simple "$i"
     done
     inst_hook cmdline 01 "$moddir/parse-kernel.sh"
+    inst_hook pre-pivot 20 "$moddir/kernel-cleanup.sh"
     inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
 
     for _f in modules.builtin.bin modules.builtin; do