]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Fix: weird initramfs bug
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 12 May 2020 15:28:27 +0000 (12:28 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 12 May 2020 15:28:27 +0000 (12:28 -0300)
files/etc/initramfs-tools/hooks/fix-fixme [new file with mode: 0755]
manifests/subsystem/initramfs.pp
manifests/subsystem/sysctl/panic.pp [moved from manifests/subsystem/sysctl/appliance.pp with 100% similarity]

diff --git a/files/etc/initramfs-tools/hooks/fix-fixme b/files/etc/initramfs-tools/hooks/fix-fixme
new file mode 100755 (executable)
index 0000000..fbdbd3c
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+PREREQ="cryptroot"
+prereqs()
+{
+       echo "$PREREQ"
+}
+
+case $1 in
+       prereqs)
+               prereqs
+               exit 0
+               ;;
+esac
+
+. /usr/share/initramfs-tools/hook-functions
+# Begin real processing below this line
+sed -i -e "s|/FIXME-initramfs-rootmnt||g" $DESTDIR/cryptroot/crypttab
index e3b52716ccf4bb59e4a4e552af424d737854ad08..9cf04e1c0b8572f46e82016497310e4bb356b5b4 100644 (file)
@@ -28,12 +28,24 @@ class nodo::subsystem::initramfs(
     mode    => '0644',
   }
 
+  # Weird fix
+  # This is a bug that might be submited upstream to debian or initramfs-tools
+  file { "/etc/initramfs-tools/hooks/fix-fixme":
+    owner   => "root",
+    group   => "root",
+    mode    => '0755',
+    ensure  => present,
+    source  => "puppet:///modules/nodo/etc/initramfs-tools/hooks/fix-fixme",
+  }
+
   # Update initramfs when needed
   exec { "update-initramfs":
     command     => "update-initramfs -v -t -u",
     subscribe   => [ File["/etc/initramfs-tools/modules"],
                      File["/etc/modprobe.d/blacklist.conf"],
-                     File["/etc/initramfs-tools/conf.d/keymap.conf"] ],
+                     File["/etc/initramfs-tools/conf.d/keymap.conf"],
+                     File["/etc/initramfs-tools/hooks/fix-fixme"],
+                   ],
     refreshonly => true,
   }
 }