From 87e7f7b869867923d9ea54cdfcd928e24746c21d Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Fri, 20 Dec 2019 17:51:55 -0600 Subject: [PATCH] allow building of Gentoo images for non-systemd profiles Change-Id: I61e3ba391eaaf9b300f88b082c03116388401ba3 --- .../elements/gentoo/environment.d/00-gentoo-envars.bash | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash b/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash index f2641552..f25b9333 100644 --- a/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash +++ b/diskimage_builder/elements/gentoo/environment.d/00-gentoo-envars.bash @@ -22,4 +22,8 @@ for (( i=0; i<${#GENTOO_EMERGE_ENV[@]}; i++ )); do eval export "${GENTOO_EMERGE_ENV[i]}" done -export DIB_INIT_SYSTEM=systemd +if [[ "${GENTOO_PROFILE}" == *"systemd"* ]]; then + export DIB_INIT_SYSTEM=${DIB_INIT_SYSTEM:-'systemd'} +else + export DIB_INIT_SYSTEM=${DIB_INIT_SYSTEM:-'openrc'} +fi