[Pkg-privacy-commits] [onioncat] 285/340: Make initscript POSIX and slightly neater.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:04:48 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository onioncat.
commit 688989ffde25fa2a649778ba1a632f4f978492a0
Author: intrigeri <intrigeri at boum.org>
Date: Mon Sep 5 11:32:25 2011 +0200
Make initscript POSIX and slightly neater.
---
debian/onioncat.default | 2 +-
debian/onioncat.init | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/debian/onioncat.default b/debian/onioncat.default
index 12bfaeb..97d75a3 100644
--- a/debian/onioncat.default
+++ b/debian/onioncat.default
@@ -1,7 +1,7 @@
# Defaults for onioncat initscript
# sourced by /etc/init.d/onioncat
-# This is a bash shell fragment
+# This is a POSIX shell fragment
# Uncomment to enable the initscript and start onioncat on system startup
#ENABLED=yes
diff --git a/debian/onioncat.init b/debian/onioncat.init
index 5644061..7849341 100644
--- a/debian/onioncat.init
+++ b/debian/onioncat.init
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
### BEGIN INIT INFO
# Provides: onioncat
@@ -40,11 +40,7 @@ if [ -f /etc/default/$NAMEL ] ; then
fi
is_true() {
- if [ "x$1" = "xtrue" -o "x$1" = "xyes" -o "x$1" = "x0" ] ; then
- return 0
- else
- return 1
- fi
+ [ "$1" = "true" ] || [ "$1" = "yes" ] || [ "$1" = "0" ]
}
check_piddir() {
@@ -52,7 +48,7 @@ check_piddir() {
mkdir -m 02700 "$PIDDIR"
chown onioncat:onioncat "$PIDDIR"
- if test ! -x $IDDIR; then
+ if ! [ -x $IDDIR ]; then
echo "Cannot access '$PIDDIR' directory, are you root?" >&2
exit 1
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git
More information about the Pkg-privacy-commits
mailing list