From 62708066a08f643152b13bd7383d4bd3a8eb1b1b Mon Sep 17 00:00:00 2001 From: Amrith Kumar Date: Sun, 10 Jul 2016 13:23:12 -0400 Subject: rename a file for fedora guests fedora guests don't use upstart. renaming the file because the current name (20-guest-upstart) while identical to the name for the ubuntu file is confusing and misleading. Change-Id: I9818235e0d367c8213ccd1f60c4b26be11dd3735 --- .../fedora-guest/extra-data.d/20-guest-systemd | 21 +++++++++++++++++++++ .../fedora-guest/extra-data.d/20-guest-upstart | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) create mode 100755 scripts/files/elements/fedora-guest/extra-data.d/20-guest-systemd delete mode 100755 scripts/files/elements/fedora-guest/extra-data.d/20-guest-upstart diff --git a/scripts/files/elements/fedora-guest/extra-data.d/20-guest-systemd b/scripts/files/elements/fedora-guest/extra-data.d/20-guest-systemd new file mode 100755 index 0000000..a6ea6e1 --- /dev/null +++ b/scripts/files/elements/fedora-guest/extra-data.d/20-guest-systemd @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e +set -o xtrace + +# CONTEXT: HOST prior to IMAGE BUILD as SCRIPT USER +# PURPOSE: stages the bootstrap file and upstart conf file while replacing variables so that guest image is properly +# configured + +source $_LIB/die + +[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set" + +[ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image" +[ -n "${HOST_SCP_USERNAME}" ] || die "HOST_SCP_USERNAME needs to be set to the user for the host instance" +[ -n "${NETWORK_GATEWAY}" ] || die "NETWORK_GATEWAY needs to be set to the user for the host instance" +[ -n "${ESCAPED_PATH_TROVE}" ] || die "ESCAPED_PATH_TROVE needs to be set to the path to the trove directory on the redstack host" +[ -n "${REDSTACK_SCRIPTS}" ] || die "REDSTACK_SCRIPTS needs to be set to the trove-integration scripts dir" +[ -n "${ESCAPED_GUEST_LOGDIR}" ] || die "ESCAPED_GUEST_LOGDIR must be set to the escaped guest log dir" + +sed "s/GUEST_USERNAME/${GUEST_USERNAME}/g;s/GUEST_LOGDIR/${ESCAPED_GUEST_LOGDIR}/g;s/HOST_SCP_USERNAME/${HOST_SCP_USERNAME}/g;s/NETWORK_GATEWAY/${NETWORK_GATEWAY}/g;s/PATH_TROVE/${ESCAPED_PATH_TROVE}/g" ${REDSTACK_SCRIPTS}/files/trove-guest.systemd.conf > ${TMP_HOOKS_PATH}/trove-guest.service diff --git a/scripts/files/elements/fedora-guest/extra-data.d/20-guest-upstart b/scripts/files/elements/fedora-guest/extra-data.d/20-guest-upstart deleted file mode 100755 index a6ea6e1..0000000 --- a/scripts/files/elements/fedora-guest/extra-data.d/20-guest-upstart +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -e -set -o xtrace - -# CONTEXT: HOST prior to IMAGE BUILD as SCRIPT USER -# PURPOSE: stages the bootstrap file and upstart conf file while replacing variables so that guest image is properly -# configured - -source $_LIB/die - -[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set" - -[ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image" -[ -n "${HOST_SCP_USERNAME}" ] || die "HOST_SCP_USERNAME needs to be set to the user for the host instance" -[ -n "${NETWORK_GATEWAY}" ] || die "NETWORK_GATEWAY needs to be set to the user for the host instance" -[ -n "${ESCAPED_PATH_TROVE}" ] || die "ESCAPED_PATH_TROVE needs to be set to the path to the trove directory on the redstack host" -[ -n "${REDSTACK_SCRIPTS}" ] || die "REDSTACK_SCRIPTS needs to be set to the trove-integration scripts dir" -[ -n "${ESCAPED_GUEST_LOGDIR}" ] || die "ESCAPED_GUEST_LOGDIR must be set to the escaped guest log dir" - -sed "s/GUEST_USERNAME/${GUEST_USERNAME}/g;s/GUEST_LOGDIR/${ESCAPED_GUEST_LOGDIR}/g;s/HOST_SCP_USERNAME/${HOST_SCP_USERNAME}/g;s/NETWORK_GATEWAY/${NETWORK_GATEWAY}/g;s/PATH_TROVE/${ESCAPED_PATH_TROVE}/g" ${REDSTACK_SCRIPTS}/files/trove-guest.systemd.conf > ${TMP_HOOKS_PATH}/trove-guest.service -- cgit v1.2.1