POSIX fixes for #1464
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
795c44e650
commit
f3a1b43360
@@ -28,10 +28,10 @@ echo
|
||||
|
||||
chmod 755 /warewulf/wwinit
|
||||
|
||||
if [ -z "${WWROOT}" -o "${WWROOT}" == "initramfs" ]; then
|
||||
if [ -z "${WWROOT}" -o "${WWROOT}" = "initramfs" ]; then
|
||||
echo "Retaining initramfs and invoking /warewulf/wwinit..."
|
||||
exec /warewulf/wwinit
|
||||
elif [ "${WWROOT}" == "ramfs" -o "${WWROOT}" == "tmpfs" ]; then
|
||||
elif [ "${WWROOT}" = "ramfs" -o "${WWROOT}" = "tmpfs" ]; then
|
||||
echo "Setting up new ${WWROOT} rootfs..."
|
||||
mkdir /newroot
|
||||
mount wwroot /newroot -t ${WWROOT} -o mpol=interleave # mpol ignored for ramfs
|
||||
|
||||
18
overlays/wwinit/rootfs/warewulf/wwinit
Normal file → Executable file
18
overlays/wwinit/rootfs/warewulf/wwinit
Normal file → Executable file
@@ -4,14 +4,22 @@ echo "Hello from WWINIT"
|
||||
|
||||
. /warewulf/config
|
||||
|
||||
for i in /warewulf/init.d/*; do
|
||||
NAME=`basename $i`
|
||||
echo "Launching: $NAME"
|
||||
sh "$i"
|
||||
done
|
||||
myPATH=/warewulf/init.d
|
||||
while read -r NAME; do
|
||||
# if [ -x $myPATH/$NAME ]
|
||||
# then
|
||||
echo "Launching: $NAME"
|
||||
sh "$myPATH/$NAME"
|
||||
|
||||
# fi
|
||||
done <<EOF
|
||||
# `ls $myPATH/*.sh`
|
||||
`ls $myPATH/`
|
||||
EOF
|
||||
|
||||
echo "Calling $WWINIT..."
|
||||
echo
|
||||
|
||||
sleep 2
|
||||
exec $WWINIT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user