diff --git a/README.md b/README.md index 56c703b8e..0223121cf 100644 --- a/README.md +++ b/README.md @@ -364,13 +364,6 @@ Each element can use the following files to define or affect dependencies: file and A and C are included when building an image, then B is not used. -### First-boot files ### - -* first-boot.d: **DEPRECATED** Runs inside the image before - rc.local. Scripts from here are good for doing per-instance - configuration based on cloud metadata. **This will be removed in a - future release of diskimage-builder. The os-refresh-config element in - tripleo-image-elements is recommended as a replacement.** ### Ramdisk Elements ### @@ -435,23 +428,12 @@ possible approach to this would be to label elements as either a "driver", 10-user - common Nova user accts 50-my-pack - install packages from my PPA 60-nova - install nova and some dependencies - first-boot.d/ - 60-nova - do some post-install config for nova - In the general case, configuration should probably be handled either by the - meta-data service (eg, during first-boot.d) or via normal CM tools + meta-data service (eg, o-r-c) or via normal CM tools (eg, salt). That being said, it may occasionally be desirable to create a set of elements which express a distinct configuration of the same software - components. For example, if one were to bake a region-specific SSL cert into - the images deployed in each region, one might express it like this: - - elements/ - config-az1/ - first-boot.d/ - 20-ssl - add the az1 certificate - config-az2/ - first-boot.d/ - 20-ssl - add the az2 certificate + components. In this way, depending on the hardware and in which availability zone it is to be deployed, an image would be composed of: @@ -486,8 +468,7 @@ comma-delimited string. Some examples: * break=before-block-device-size will break before the block device size hooks are called. -* break=after-first-boot,before-pre-install will break after the first-boot - hooks and before the pre-install hooks. +* break=before-pre-install will break before the pre-install hooks. * break=after-error will break after an error during a in target hookpoint. diff --git a/bin/disk-image-create b/bin/disk-image-create index 7ea65c4dc..946c24093 100755 --- a/bin/disk-image-create +++ b/bin/disk-image-create @@ -160,7 +160,6 @@ do_extra_package_install # Call install scripts to pull in the software users want. run_d_in_target install run_d_in_target post-install -prepare_first_boot # ensure we do not have a lost+found directory in the root folder # that could cause copy to fail (it will be created again later # when creating the file system, if it needs such directory) diff --git a/elements/base/dib-first-boot b/elements/base/dib-first-boot deleted file mode 100755 index 7d9e2f98d..000000000 --- a/elements/base/dib-first-boot +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eu -set -o pipefail -set -o xtrace - -touch /var/log/first-boot.d.log -chmod 0600 /var/log/first-boot.d.log - -/usr/local/bin/dib-run-parts /etc/first-boot.d >> /var/log/first-boot.d.log 2>&1 -rm -fr /etc/first-boot.d -# delete itself -rm $0 diff --git a/elements/base/finalise.d/01-install-dib-first-boot b/elements/base/finalise.d/01-install-dib-first-boot deleted file mode 100755 index 37bac7371..000000000 --- a/elements/base/finalise.d/01-install-dib-first-boot +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -eu -set -o pipefail - -if [ -d /etc/first-boot.d ]; then - install -m 0755 -o root -g root $(dirname $0)/../dib-first-boot /usr/sbin/ -fi diff --git a/elements/redhat-common/finalise.d/99-redhat-setup-first-boot b/elements/redhat-common/finalise.d/99-redhat-setup-first-boot deleted file mode 100755 index d8db35a5e..000000000 --- a/elements/redhat-common/finalise.d/99-redhat-setup-first-boot +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -set -eu -set -o pipefail - -if [ -d /etc/first-boot.d ]; then - rc_local=/etc/rc.d/rc.local - - FILE_EXISTED= - if [ -f $rc_local ]; then - FILE_EXISTED=1 - mv $rc_local $rc_local.REAL - fi - - dd of=$rc_local <> $rc_local -else - echo "rm \$0" >> $rc_local -fi - -echo "exit 0" >> $rc_local - -chmod 755 $rc_local - -# Enable the service -systemctl enable rc-local.service -fi diff --git a/elements/ubuntu/finalise.d/99-ubuntu-setup-first-boot b/elements/ubuntu/finalise.d/99-ubuntu-setup-first-boot deleted file mode 100755 index 40a7f8c43..000000000 --- a/elements/ubuntu/finalise.d/99-ubuntu-setup-first-boot +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -set -eu -set -o pipefail - -if [ -d /etc/first-boot.d ]; then - rc_local=/etc/rc.local - - mv $rc_local $rc_local.REAL - - dd of=$rc_local <