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