debian: Fix exit status of openvswitch-switch init script "status" command.
authorBen Pfaff <blp@nicira.com>
Wed, 29 Feb 2012 00:31:45 +0000 (16:31 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 29 Feb 2012 01:10:08 +0000 (17:10 -0800)
The init script ends with an explicit "exit 0" so nonzero exit codes from
"ovs-ctl status" were being lost.

Bug #9714.
Reported-by: Paul Ingram <paul@nicira.com>
CC: Sujatha Shetty <sshetty@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
debian/openvswitch-switch.init

index 6f08c3fab9f9fdfe3603a5c2cb988b83ea895ba4..cb9670cbb887b83ed8e820fc8ca74824d78483ed 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 2011 Nicira Networks, Inc.
+# Copyright (C) 2011, 2012 Nicira Networks, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -86,6 +86,7 @@ case $1 in
         ;;
     status)
         ovs_ctl status
+        exit $?
         ;;
     force-reload-kmod)
         start force-reload-kmod