persistent rc.local per kube

This commit is contained in:
Solène Rapenne 2023-06-10 10:41:14 +02:00
parent 2891e32e75
commit 7a877ba8ab

View File

@ -42,10 +42,20 @@ then
echo "fsck and mounting the disk on /home"
fsck_ffs -y /dev/rsd1c
mount -o rw,nodev,noatime,nosuid /dev/sd1c /home
install -d -o root /home/openkubsd/
if ! test -f /home/openkubsd/rc.local
then
printf '#!/bin/sh\n\n# use this file to add Kube specific boot commands\n' > /home/openkubsd/rc.local
chmod +x /home/openkubsd/rc.local
fi
/home/openkubsd/rc.local
fi
/etc/rc.d/sshd -f start
NESTED
chmod +x /etc/rc.local
# stop the template
halt
EOF
cat $FILE | ssh -o StrictHostKeyChecking=no root@openbsd-template.kube "cat >/$FILE"