diskimage-builder/diskimage_builder/elements/dib-init-system/pre-install.d/04-dib-init-system
Andreas Florath 3636b40f74 Introduce manual setting of DIB_INIT_SYSTEM
The current implementation evauates the dib-init-system
script too early.  Also it looks that there is no simple
way of getting the info about the init system automatically:
another element can install (later on) a different
init system.  Therefore the only reliable way of setting
this is manual.

Change-Id: I6e9ffa1bdb3154f488f4fd335b197699b86aacd4
Signed-off-by: Andreas Florath <andreas@florath.net>
2019-11-21 12:38:15 +11:00

22 lines
418 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
FILE=/usr/local/bin/dib-init-system
# This is a dummy script that simply echos the output of
# ${DIB_INIT_SYSTEM}. This script used to try and guess the init
# system, but that doesn't work. This script is deprecated.
cat > ${FILE} <<EOF
#!/bin/bash
echo ${DIB_INIT_SYSTEM}
EOF
chown root:root ${FILE}
chmod 775 ${FILE}