openrc/scripts/meson_script_links.sh

20 lines
429 B
Bash
Raw Normal View History

#!/bin/sh
set -e
set -u
rc_libexecdir="$1"
sbindir="$2"
binaries=" halt poweroff rc-sstat reboot shutdown"
for f in $binaries; do
if [ -x "${DESTDIR}${rc_libexecdir}/bin/${f}" ]; then
2021-09-09 03:33:04 +05:30
ln -snf "${rc_libexecdir}/bin/${f}" \
"${DESTDIR}${sbindir}/${f}"
fi
done
2021-09-08 22:29:25 +05:30
# sysvinit is active when halt exits
if [ -x "${DESTDIR}${rc_libexecdir}/bin/halt" ]; then
2021-09-09 03:33:04 +05:30
ln -snf "${sbindir}/openrc-init" \
2021-09-08 22:29:25 +05:30
"${DESTDIR}${sbindir}/init"
fi