[sheepdog] [PATCH] Various init script fixups

Hitoshi Mitake mitake.hitoshi at gmail.com
Tue May 5 02:14:09 CEST 2015


At Mon, 4 May 2015 13:22:30 -0500,
Jason Noble wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Source init-functions on deb-based distros to provide killproc.
> 
> Use SHEEPDOGD variable in init script
> 
> SHEEPDOGD is defined but is not used when starting sheep. This change
> allows system default configs to override SHEEPDOGD if desired.
> 
> Use SHEEPDOG_PATH in init script
> 
> The debian defaults file has a comment that this environment variable
> is used by the init script to set the sheepdog storage dir, however
> the code in the init script does not support this claim. This change
> makes the needed changes that allow this to work.

Hi Jason, I'm glad to see you on the list!

The changes seem to be good. But format is not suitable for applying. Could you follow the below guideline?
https://github.com/sheepdog/sheepdog/wiki/Submit-a-patch

e.g. you need your Signed-off-by: line, and use git format-patch

Thanks,
Hitoshi

> - ---
>  script/sheepdog.in | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/script/sheepdog.in b/script/sheepdog.in
> index bb38eea..7975cb2 100755
> - --- a/script/sheepdog.in
> +++ b/script/sheepdog.in
> @@ -18,7 +18,8 @@ prog="sheep"
> 
>  # set secure PATH
>  PATH="/sbin:/bin:/usr/sbin:/usr/bin:@SBINDIR@"
> - -SHEEPDOGD=@SBINDIR@/sheep
> +SHEEPDOGD=@SBINDIR@/$prog
> +SHEEPDOG_PATH=@LOCALSTATEDIR@/lib/sheepdog
> 
>  success()
>  {
> @@ -51,6 +52,7 @@ fi
> 
>  # deb based distros
>  if [ -d @SYSCONFDIR@/default ]; then
> +	[ -s @LIBDIR@/lsb/init-functions ] && . @LIBDIR@/lsb/init-functions
>  	[ -f @SYSCONFDIR@/default/$prog ] && . @SYSCONFDIR@/default/$prog
>  	[ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/$prog"
>  fi
> @@ -84,7 +86,7 @@ start()
>  	if status $prog > /dev/null 2>&1; then
>  		success
>  	else
> - -		$prog -p 7000 @LOCALSTATEDIR@/lib/sheepdog > /dev/null 2>&1
> +		$SHEEPDOGD -p 7000 $SHEEPDOG_PATH > /dev/null 2>&1
> 
>  		# give it time to fail
>  		sleep 2
> - --
> 1.9.1
> 
> Jason Noble | Software Architect
> NIMBOXX, Inc.
> 10535 Boyer Blvd. #200
> Austin, TX 78758
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> 
> iQEcBAEBAgAGBQJVR7jmAAoJEOZ9DbcrzpDOpJEH/jms+Br5naTvLYxwe4bf6e5+
> Iy2nzRz+dTFYC0SzQZh/ObEOeLKRiIpJ/wHvtkrav0tf2QYzUDBlp/mT/sUAUM6F
> XMO6z9RciDzOUZVEHJiBGd+wlL/lK7cSwkEVT3xUrJXs0vSXu0gd0f52oh+aZuuh
> JLJPNjaOMMxzKb9pO+DcVo3B1n3SfZMJUTZ+J76+y8RH1dELkoAnzm7hS4N4U17b
> XC0qREF/4HxzVcQZwlNWjR2YSmdRaWdnn75l6z7IezTP3//hXiOmsQByiXiCtfMl
> X/gbDcuIhPni5LhR6myB+nKNDb4+U1gnmaZ4pN89swxGXzwFS8ceA9dtPpmNisg=
> =zbhG
> -----END PGP SIGNATURE-----
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list