projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: Don't use obsolete names in ovs-vsctl tests of external-ids.
[openvswitch]
/
debian
/
openvswitch-controller.init
diff --git
a/debian/openvswitch-controller.init
b/debian/openvswitch-controller.init
index ee9c44d5de2c75ab6a2901c09ba2a3cfd2e9ddd8..c5f8eb8fb5f854e98dbe64088c0c159a2bc76287 100755
(executable)
--- a/
debian/openvswitch-controller.init
+++ b/
debian/openvswitch-controller.init
@@
-57,7
+57,7
@@
LOGFILE=$LOGDIR/$NAME.log # Server logfile
# Include defaults if available
default=/etc/default/openvswitch-controller
if [ -f $default ] ; then
# Include defaults if available
default=/etc/default/openvswitch-controller
if [ -f $default ] ; then
-
. $default
+ . $default
fi
# Check that the user exists (if we set a user)
fi
# Check that the user exists (if we set a user)
@@
-142,7
+142,7
@@
start_server() {
$SSL_OPTS
errcode=$?
fi
$SSL_OPTS
errcode=$?
fi
- return $errcode
+
return $errcode
}
stop_server() {
}
stop_server() {
@@
-158,7
+158,7
@@
stop_server() {
errcode=$?
fi
errcode=$?
fi
- return $errcode
+
return $errcode
}
reload_server() {
}
reload_server() {
@@
-171,27
+171,27
@@
reload_server() {
force_stop() {
# Force the process to die killing it manually
force_stop() {
# Force the process to die killing it manually
-
[ ! -e "$PIDFILE" ] && return
-
if running ; then
-
kill -15 $pid
- # Is it really dead?
-
sleep "$DIETIME"s
-
if running ; then
-
kill -9 $pid
-
sleep "$DIETIME"s
-
if running ; then
-
echo "Cannot kill $NAME (pid=$pid)!"
-
exit 1
-
fi
-
fi
-
fi
-
rm -f $PIDFILE
+ [ ! -e "$PIDFILE" ] && return
+ if running ; then
+ kill -15 $pid
+
# Is it really dead?
+ sleep "$DIETIME"s
+ if running ; then
+ kill -9 $pid
+ sleep "$DIETIME"s
+ if running ; then
+ echo "Cannot kill $NAME (pid=$pid)!"
+ exit 1
+ fi
+ fi
+ fi
+ rm -f $PIDFILE
}
case "$1" in
start)
}
case "$1" in
start)
- log_daemon_msg "Starting $DESC " "$NAME"
+
log_daemon_msg "Starting $DESC " "$NAME"
# Check if it's running first
if running ; then
log_progress_msg "apparently already running"
# Check if it's running first
if running ; then
log_progress_msg "apparently already running"
@@
-209,7
+209,7
@@
case "$1" in
# a false positive (use 'status' for that)
log_end_msg 1
fi
# a false positive (use 'status' for that)
log_end_msg 1
fi
- ;;
+
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
if running ; then
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
if running ; then
@@
-232,7
+232,7
@@
case "$1" in
force_stop
log_end_msg $?
fi
force_stop
log_end_msg $?
fi
- ;;
+
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
stop_server
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
stop_server
@@
-241,7
+241,7
@@
case "$1" in
start_server
running
log_end_msg $?
start_server
running
log_end_msg $?
- ;;
+
;;
status)
log_daemon_msg "Checking status of $DESC" "$NAME"
status)
log_daemon_msg "Checking status of $DESC" "$NAME"
@@
-260,10
+260,10
@@
case "$1" in
log_warning_msg "cannot re-read the config file (use restart)."
;;
*)
log_warning_msg "cannot re-read the config file (use restart)."
;;
*)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
- exit 1
- ;;
+
N=/etc/init.d/$NAME
+
echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
+
exit 1
+
;;
esac
exit 0
esac
exit 0