aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2022-06-10 10:28:45 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2022-06-10 10:28:57 -0500
commit107b23819d6d6fa9ed05502599b2679606f2712f (patch)
treece05bc92e75bd78498b943e94f8f6da926c59544
parentd2b31440708bd0cb70e5317e05b8ae80e4866269 (diff)
restore the init symlink for sysvinit mode
This symlink got lost in the transition to meson. X-Gentoo-Bug: 850754 X-Gentoo-Bug-URL: https://bugs.gentoo.org/850754
-rw-r--r--meson.build4
-rwxr-xr-xtools/meson_final.sh9
2 files changed, 10 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 2e9713b4..326352ba 100644
--- a/meson.build
+++ b/meson.build
@@ -226,4 +226,6 @@ meson.add_install_script('tools/meson_runlevels.sh',
get_option('sysvinit') ? 'yes' : 'no')
meson.add_install_script('tools/meson_final.sh',
rc_libexecdir,
- os)
+ sbindir,
+ os,
+ get_option('sysvinit') ? 'yes' : 'no')
diff --git a/tools/meson_final.sh b/tools/meson_final.sh
index 92380ede..a8c99927 100755
--- a/tools/meson_final.sh
+++ b/tools/meson_final.sh
@@ -4,10 +4,15 @@ set -e
set -u
rc_libexecdir="$1"
-os="$2"
+sbindir="$2"
+os="$3"
+sysvinit="$4"
-if [ ${os} != Linux ]; then
+if [ "${os}" != Linux ]; then
install -d "${DESTDIR}/${rc_libexecdir}"/init.d
fi
install -d "${DESTDIR}/${rc_libexecdir}"/tmp
install -m 644 "${MESON_BUILD_ROOT}/src/shared/version" "${DESTDIR}/${rc_libexecdir}"
+if [ "${os}" = Linux ] && [ "${sysvinit}" = yes ]; then
+ ln -s openrc-init "${DESTDIR}/${sbindir}"/init
+fi