Skip to content
Snippets Groups Projects
Commit 1b04fbc4 authored by Jakub Jirutka's avatar Jakub Jirutka :flag_ua:
Browse files

main/openrc: don't overwrite empty supervise_daemon_args

parent ac67181c
No related branches found
No related tags found
1 merge request!41101main/openrc: don't overwrite empty supervise_daemon_args
Pipeline #144053 skipped
Patch-Source: https://github.com/OpenRC/openrc/pull/558
--
From a2f1d65f1646e5f539e986f22964cf078ba58fce Mon Sep 17 00:00:00 2001
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Sun, 6 Nov 2022 02:14:26 +0100
Subject: [PATCH] supervise-daemon: don't overwrite empty supervise_daemon_args
If supervise_daemon_args is not set *or empty*, it defaults to
`start_stop_daemon_args`. This is bad because supervise-daemon doesn't
accept the same options as `start-stop-daemon`. So if we set e.g.
`start_stop_daemon_args="--wait 50"`, but not `supervise_daemon_args`,
and the user adds `supervisor=supervise-daemon` to the corresponding
/etc/conf.d/<service> file, the service will fail to start due to
unrecognized option "wait".
It would be best to remove this fallback, but that might break some
existing scripts that depend on it. So this commit just changes it to
use `start_stop_daemon_args` as the default for `supervise_daemon_args`
only if `supervise_daemon_args` is not set at all, but not if it's
empty.
This at least simplifies workarounds; we can just add
`supervise_daemon_args="$supervise_daemon_args"` to init scripts.
---
sh/supervise-daemon.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sh/supervise-daemon.sh b/sh/supervise-daemon.sh
index 8d2d6faff..8eb98a17a 100644
--- a/sh/supervise-daemon.sh
+++ b/sh/supervise-daemon.sh
@@ -41,7 +41,7 @@ supervise_start()
${no_new_privs:+--no_new_privs} \
${command_user+--user} $command_user \
${umask+--umask} $umask \
- ${supervise_daemon_args:-${start_stop_daemon_args}} \
+ ${supervise_daemon_args-${start_stop_daemon_args}} \
$command \
-- $command_args $command_args_foreground
rc=$?
......@@ -2,7 +2,7 @@
pkgname=openrc
pkgver=0.45.2
_ver=${pkgver/_git*/}
pkgrel=4
pkgrel=5
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="https://github.com/OpenRC/openrc"
arch="all"
......@@ -27,6 +27,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve
0006-Add-support-for-starting-services-in-a-specified-VRF.patch
0007-Clean-up-staticroute-config-remove-irrelevant-parts-.patch
0008-bootmisc-switch-wipe_tmp-setting-to-no-by-default.patch
0009-dont-overwrite-empty-supervise_daemon_args.patch
$pkgname-grep-3.8.patch::https://github.com/OpenRC/openrc/commit/9380347f042f7d294317f4420b648422817eb75a.patch
remount-root.patch
......@@ -154,6 +155,7 @@ ca2958772240f6e5037e39db1ee62a81091a2efa654da967f68e03a721868c6c0a41d32a2bddf55c
8bf00b82d7fc0eb1b529ec735009f91d277141ba7e5c04e23d10bbcf36eb453f0b31d48aec45e50b5be4c14f611acc4454933f3cefdf8beab07d851328223464 0006-Add-support-for-starting-services-in-a-specified-VRF.patch
431ac28808e684bea5511386bf5f06efe7f509f1dbe7e15ae6309563d813deae8f3edd872a0943ef8088e3cf778d7bc5ebd15a893dc4a08f4022b7a56bbafc63 0007-Clean-up-staticroute-config-remove-irrelevant-parts-.patch
475f4ea63b9b5d7eb9c623e96b6cc3d3072abcb7194d0045b84e0688836c8514fccfc68b0eae0b4bee60878cdea8042c3ce7e48406ee7a2f0e4a3e128a153468 0008-bootmisc-switch-wipe_tmp-setting-to-no-by-default.patch
7bdd5e97186fd9c9d17d3d9a19e16f8432e0abc27b067d2191c8038d3c32c5502ee0b5b6d539bc3550400cba63b6bccfcca05a7a3b95e352ea692b6a1be8000e 0009-dont-overwrite-empty-supervise_daemon_args.patch
0a19a00af670e38742cea8e7f59a8ef329cc2fe7f57582ce8dcd0bfb90f7b5116cc0e64a6138f56c1c20c35354f835d1638bd14d6d2ebef2e5b4332a12ec8021 openrc-grep-3.8.patch
5e60f2ea652349d716646ccf05b13a510e5797daafc5e491dd35cc3850c543a7e7499a70956f91f30702c524989386d6e08735d7ad9b7bda5ff0c2c249d52cf8 remount-root.patch
12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment