Files
warewulf/overlays/system/default/init
2020-11-03 14:11:26 -08:00

41 lines
947 B
Bash
Executable File

#!/bin/sh
#
# This is one of those types of files that you shouldn't edit unless you really
# know what you are doing and even then you should make a backup.
#
# Edit at your own risk! DANGER DANGER.
clear
echo "Warewulf v4 is now booting"
# Considering what to do if we are operating on a read only root
if false; then
mkdir -p /mnt/.lowerdir
mkdir -p /mnt/.overlaytmp
mount -t tmpfs -o size=10M none /mnt/.overlaytmp
mkdir -p /mnt/.overlaytmp/upperdir
mkdir -p /mnt/.overlaytmp/workdir
mkdir -p /mnt/.newroot
mount -t overlay -o lowerdir=/mnt/.lowerdir,upperdir=/mnt/.overlaytmp/upperdir,workdir=/mnt/.overlaytmp/workdir none /mnt/.newroot
cd /mnt/.newroot
pivot_root . /mnt
fi
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs devtmpfs /dev
/sbin/ip link set dev lo up
nohup /warewulf/bin/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
echo "Calling /sbin/init..."
echo
sleep 2
exec /sbin/init