From 9a94dbe2e688ac2bb5f6455584b503bdc0c37086 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 13 Aug 2008 18:09:23 +0000 Subject: [PATCH] Return value of the script depend on the return value of the last executed function. In some functions (for example: start) the return value of the last executable is being returned but not being checked anywhere. If this last operaion fails, the return value shouldn't be 0. Signed-off-by: Dotan Barak git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@487 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/etc/initd/initd | 6 +++++- iscsi-scst/etc/initd/initd.redhat | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/iscsi-scst/etc/initd/initd b/iscsi-scst/etc/initd/initd index b58a478af..3a3d39d95 100644 --- a/iscsi-scst/etc/initd/initd +++ b/iscsi-scst/etc/initd/initd @@ -70,10 +70,14 @@ case "$1" in stop) stop_server ;; + restart) + stop_server + start_server + ;; *) echo "Usage: {start|stop}" >&2 exit 1 ;; esac -exit 0 +exit $? diff --git a/iscsi-scst/etc/initd/initd.redhat b/iscsi-scst/etc/initd/initd.redhat index d441ebc42..ba052885c 100644 --- a/iscsi-scst/etc/initd/initd.redhat +++ b/iscsi-scst/etc/initd/initd.redhat @@ -126,4 +126,4 @@ case "$1" in exit 1 esac -exit 0 +exit $?