265b31e6b5
Adds a post-install function that enables installed initscripts, as that is not done by default in gentoo. Change-Id: I04e8d506ddcbefa8a983dd31ad16df5e13cb26e7 Closes-Bug: 1539276
29 lines
528 B
Bash
Executable File
29 lines
528 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if [[ -f /sbin/initctl ]]; then
|
|
echo "upstart"
|
|
elif [[ -f /etc/gentoo-release ]]; then
|
|
if [[ "${GENTOO_PROFILE}" =~ systemd ]]; then
|
|
echo "systemd"
|
|
else
|
|
echo "openrc"
|
|
fi
|
|
elif [[ -f /usr/bin/systemctl ]]; then
|
|
echo "systemd"
|
|
elif [[ -f /sbin/init ]]; then
|
|
if [[ -f /bin/systemd ]]; then
|
|
echo "systemd"
|
|
else
|
|
echo "sysv"
|
|
fi
|
|
else
|
|
echo "Unknown init system"
|
|
exit 1
|
|
fi
|