e4868d9ad6
DIB_INIT_SYSTEM is exported by the dib-init-system element and contains the output of the dib-init-system script so there is no need to re-initialize it during various phases. Change-Id: I09d6d10742689efe3d8eb9d64b539d6599b46227
16 lines
414 B
Bash
Executable File
16 lines
414 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
SCRIPTDIR=$(dirname $0)
|
|
|
|
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
|
install -m 0644 -o root -g root ${SCRIPTDIR}/ttySx.conf /etc/init/ttySx.conf
|
|
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/serial-console-udev.rules /etc/udev/rules.d/99-serial-console.rules
|
|
fi
|