[RFC PATCH 10/12] init-d-script: fix force-reload if do_reload is an alias
Trek
trek00 at inbox.ru
Thu Jul 2 18:19:41 BST 2020
Aliases comes in place only after they are defined, that is after
sourcing the script, even inside functions. Moreover the call
function can't handle aliases.
---
debian/init-d-script | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/debian/init-d-script b/debian/init-d-script
index 785f4451..fbd1c633 100755
--- a/debian/init-d-script
+++ b/debian/init-d-script
@@ -127,14 +127,6 @@ do_restart() {
return $retval
}
-do_force_reload() {
- if is_call_implemented do_reload ; then
- call do_reload
- else
- call do_restart
- fi
-}
-
# Enable this using
# alias do_reload=do_reload_sigusr1
do_reload_sigusr1() {
@@ -224,7 +216,11 @@ case "$1" in
fi
;;
force-reload)
- call do_force_reload
+ if is_call_implemented do_reload ; then
+ do_reload
+ else
+ call do_restart
+ fi
;;
restart)
call do_restart
--
2.20.1
More information about the Debian-init-diversity
mailing list