diff --git a/release/tools/azure.conf b/release/tools/azure.conf --- a/release/tools/azure.conf +++ b/release/tools/azure.conf @@ -52,7 +52,5 @@ mlx5en_load="YES" EOF - touch ${DESTDIR}/firstboot - return 0 } diff --git a/release/tools/basic-ci.conf b/release/tools/basic-ci.conf --- a/release/tools/basic-ci.conf +++ b/release/tools/basic-ci.conf @@ -30,7 +30,5 @@ UsePAM no EOF - touch_firstboot - return 0 } diff --git a/release/tools/basic-cloudinit.conf b/release/tools/basic-cloudinit.conf --- a/release/tools/basic-cloudinit.conf +++ b/release/tools/basic-cloudinit.conf @@ -34,7 +34,5 @@ UsePAM no EOF - touch ${DESTDIR}/firstboot - return 0 } diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -128,9 +128,6 @@ EOF chmod 755 ${DESTDIR}/etc/autofs/special_efs - # The first time the AMI boots, run "first boot" scripts. - touch ${DESTDIR}/firstboot - return 0 } diff --git a/release/tools/gce.conf b/release/tools/gce.conf --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -119,8 +119,6 @@ ## of the image prior to packaging for upload to GCE. #sed -E -i '' 's/^([^#].*[[:space:]])on/\1off/' ${DESTDIR}/etc/ttys - touch ${DESTDIR}/firstboot - return 0 } diff --git a/release/tools/openstack.conf b/release/tools/openstack.conf --- a/release/tools/openstack.conf +++ b/release/tools/openstack.conf @@ -47,6 +47,5 @@ echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/etc/sysctl.conf echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/etc/sysctl.conf - touch ${DESTDIR}/firstboot return 0 } diff --git a/release/tools/oracle.conf b/release/tools/oracle.conf --- a/release/tools/oracle.conf +++ b/release/tools/oracle.conf @@ -87,7 +87,5 @@ sed -i '' -E -e 's/^pool.*iburst/server 169.254.169.254 iburst/' \ ${DESTDIR}/etc/ntp.conf - touch ${DESTDIR}/firstboot - return 0 } diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -157,7 +157,6 @@ ${DESTDIR}/etc/rc.conf # Expand the filesystem to fill the disk. echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf - touch ${DESTDIR}/firstboot fi return 0 @@ -351,6 +350,11 @@ >> ${DESTDIR}/etc/fstab fi + # Add a marker file which indicates that this image has never + # been booted. Some services run only upon the first boot. + touch ${DESTDIR}/firstboot + metalog_add_data ./firstboot + echo "Building filesystem... Please wait." buildfs @@ -375,8 +379,3 @@ return 0 } - -touch_firstboot() { - touch ${DESTDIR}/firstboot - metalog_add_data ./firstboot -} diff --git a/tests/ci/tools/ci.conf b/tests/ci/tools/ci.conf --- a/tests/ci/tools/ci.conf +++ b/tests/ci/tools/ci.conf @@ -119,7 +119,6 @@ EOF mkdir -p ${DESTDIR}/usr/local/etc/rc.d cp -p ${scriptdir}/../../tests/ci/tools/freebsdci ${DESTDIR}/usr/local/etc/rc.d/ - touch ${DESTDIR}/firstboot return 0 }