2021-08-22 23:39:30 +05:30
|
|
|
#!/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}" \
|
2021-08-22 23:39:30 +05:30
|
|
|
"${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
|