From 55670e6669524932ba3bdbaf9ae2f21daefe78c2 2020-04-12 17:55:26 From: drtyhlpr Date: 2020-04-12 17:55:26 Subject: [PATCH] Merge pull request #220 from VonOx/custom-firstboot Fix #207 Update 50-firstboot.sh to handle custom firstboot scripts - thanks to VonOx for the fix! --- diff --git a/bootstrap.d/50-firstboot.sh b/bootstrap.d/50-firstboot.sh index dedec4a..0239524 100644 --- a/bootstrap.d/50-firstboot.sh +++ b/bootstrap.d/50-firstboot.sh @@ -41,6 +41,13 @@ if [ "$ENABLE_IFNAMES" = true ] ; then cat files/firstboot/42-config-ifnames.sh >> "${ETC_DIR}/rc.firstboot" fi +# Execute custom firstboot scripts +if [ -d "custom.d/firstboot" ] ; then + for SCRIPT in custom.d/firstboot/*.sh; do + . "$SCRIPT" + done +fi + # Finalize rc.firstboot script cat files/firstboot/99-finish.sh >> "${ETC_DIR}/rc.firstboot" chmod +x "${ETC_DIR}/rc.firstboot"