diff options
Diffstat (limited to 'bootstrap.d/50-firstboot.sh')
-rw-r--r-- | bootstrap.d/50-firstboot.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstrap.d/50-firstboot.sh b/bootstrap.d/50-firstboot.sh new file mode 100644 index 0000000..b9f1d76 --- /dev/null +++ b/bootstrap.d/50-firstboot.sh @@ -0,0 +1,24 @@ +# +# First boot actions +# + +. ./functions.sh + +cat files/firstboot/10-begin.sh > $R/etc/rc.firstboot + +# Ensure openssh server host keys are regenerated on first boot +if [ "$ENABLE_SSHD" = true ] ; then + cat files/firstboot/21-generate-ssh-keys.sh >> $R/etc/rc.firstboot + rm -f $R/etc/ssh/ssh_host_* +fi + +if [ "$EXPANDROOT" = true ] ; then + cat files/firstboot/22-expandroot.sh >> $R/etc/rc.firstboot +fi + +cat files/firstboot/99-finish.sh >> $R/etc/rc.firstboot +chmod +x $R/etc/rc.firstboot + +sed -i '/exit 0/d' $R/etc/rc.local +echo /etc/rc.firstboot >> $R/etc/rc.local +echo exit 0 >> $R/etc/rc.local |