From 20109cee7386aeeee9273b914a868bbd5c314f49 Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Sun, 20 Dec 2020 01:17:37 -0800 Subject: [PATCH] Convert ramfs to tmpfs and jump through the required hoops... --- overlays/system/default/init.ww | 75 +++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 22 deletions(-) diff --git a/overlays/system/default/init.ww b/overlays/system/default/init.ww index 5832228b..5b568c41 100755 --- a/overlays/system/default/init.ww +++ b/overlays/system/default/init.ww @@ -4,10 +4,62 @@ # know what you are doing and even then you should make a backup. # # Edit at your own risk! DANGER DANGER. +mkdir /newroot +mount wwroot /newroot -t tmpfs + +cat </newroot/wwinit +#!/bin/sh + +mount -t proc none /proc +mount -t sysfs none /sys +mount -t devtmpfs devtmpfs /dev + +# This will eventually be optional +if true; then + if [ -f "/etc/pam.d/system-auth" ]; then + sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/system-auth + fi + + if [ -f "/etc/pam.d/password-auth" ]; then + sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/password-auth + fi + + if [ -f "/etc/pam.d/common-account" ]; then + sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/common-account + fi +fi + +/sbin/ip link set dev lo up + +nohup /warewulf/bin/wwclient >/var/log/wwclient.log 2>&1 /var/log/wwclient.log 2>&1 /var/log/ipmi.log 2>&1