Преглед изворни кода

Fix several minor issues with Debian sysvinit script

- add `set -e` to make failing commands bail the script
- remove trailing `exit 0` which is just extraneous anyhow
- adjust `status_of_proc` options to pass in `$DOCKER_DESC` so we get consistently styled messages like `Docker is running` or `Docker is not running` or `could not access PID file for Docker`

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Tianon Gravi пре 11 година
родитељ
комит
478fdaf933
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      contrib/init/sysvinit-debian/docker

+ 2 - 3
contrib/init/sysvinit-debian/docker

@@ -1,4 +1,5 @@
 #!/bin/sh
 #!/bin/sh
+set -e
 
 
 ### BEGIN INIT INFO
 ### BEGIN INIT INFO
 # Provides:           docker
 # Provides:           docker
@@ -130,7 +131,7 @@ case "$1" in
 		;;
 		;;
 
 
 	status)
 	status)
-		status_of_proc -p "$DOCKER_SSD_PIDFILE" "$DOCKER" docker
+		status_of_proc -p "$DOCKER_SSD_PIDFILE" "$DOCKER" "$DOCKER_DESC"
 		;;
 		;;
 
 
 	*)
 	*)
@@ -138,5 +139,3 @@ case "$1" in
 		exit 1
 		exit 1
 		;;
 		;;
 esac
 esac
-
-exit 0