[RFC PATCH 07/12] init-d-script: always return retval even if cleanup is implemented
Trek
trek00 at inbox.ru
Thu Jul 2 18:19:34 BST 2020
do_start, do_stop and do_restart should always return retval even,
if do_start_cleanup, do_stop_cleanup or do_restart_cleanup are
implemented.
---
debian/init-d-script | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/debian/init-d-script b/debian/init-d-script
index e79da220..756158b5 100755
--- a/debian/init-d-script
+++ b/debian/init-d-script
@@ -65,9 +65,8 @@ do_start()
esac
if is_call_implemented do_start_cleanup ; then
call do_start_cleanup
- else
- return ${retval}
fi
+ return $retval
}
#
@@ -112,9 +111,8 @@ do_stop()
esac
if is_call_implemented do_stop_cleanup ; then
call do_stop_cleanup
- else
- return ${retval}
fi
+ return $retval
}
do_restart() {
@@ -131,9 +129,8 @@ do_restart() {
esac
if is_call_implemented do_restart_cleanup ; then
call do_restart_cleanup
- else
- return ${retval}
fi
+ return $retval
}
do_force_reload() {
--
2.20.1
More information about the Debian-init-diversity
mailing list