From: Silvio Rhatto Date: Tue, 12 May 2020 15:28:27 +0000 (-0300) Subject: Fix: weird initramfs bug X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=8b030ec9db165007af0254978c96f742dccc2235;p=puppet-nodo.git Fix: weird initramfs bug --- diff --git a/files/etc/initramfs-tools/hooks/fix-fixme b/files/etc/initramfs-tools/hooks/fix-fixme new file mode 100755 index 0000000..fbdbd3c --- /dev/null +++ b/files/etc/initramfs-tools/hooks/fix-fixme @@ -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 diff --git a/manifests/subsystem/initramfs.pp b/manifests/subsystem/initramfs.pp index e3b5271..9cf04e1 100644 --- a/manifests/subsystem/initramfs.pp +++ b/manifests/subsystem/initramfs.pp @@ -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, } } diff --git a/manifests/subsystem/sysctl/appliance.pp b/manifests/subsystem/sysctl/panic.pp similarity index 100% rename from manifests/subsystem/sysctl/appliance.pp rename to manifests/subsystem/sysctl/panic.pp