Import Debian changes 1.1~pre15-1
tinc (1.1~pre15-1) experimental; urgency=medium
* New upstream release.
* Bump Standards-Version.
* Bump debian/compat.
* Don't use while loops checking PID files anymore, the tinc CLI will
wait properly for the daemon to start or stop. Closes: #772379, #832784
* Clean up scripts as suggested by Dominik George. Closes: #832781
* Test for /etc/default/tinc before trying to source it. Closes: #777262
This commit is contained in:
commit
46616ac501
94 changed files with 1727 additions and 1084 deletions
38
debian/tinc.if-pre-up
vendored
38
debian/tinc.if-pre-up
vendored
|
|
@ -2,11 +2,13 @@
|
|||
|
||||
set -e
|
||||
|
||||
[ -z "$IF_TINC_NET" ] && exit 0
|
||||
test -n "$IF_TINC_NET" || exit 0
|
||||
|
||||
# Read options from /etc/default
|
||||
|
||||
. /etc/default/tinc
|
||||
if test -e /etc/default/tinc; then
|
||||
. /etc/default/tinc
|
||||
fi
|
||||
|
||||
# Set process limits
|
||||
|
||||
|
|
@ -25,28 +27,20 @@ test -n "$LIMITS" && setlimits $LIMITS
|
|||
|
||||
# Read options from /etc/network/interfaces
|
||||
|
||||
[ -n "$IF_TINC_CONFIG" ] && EXTRA="$EXTRA -c $IF_TINC_CONFIG"
|
||||
[ -n "$IF_TINC_DEBUG" ] && EXTRA="$EXTRA -d$IF_TINC_DEBUG"
|
||||
[ -n "$IF_TINC_MLOCK" ] && EXTRA="$EXTRA --mlock"
|
||||
[ -n "$IF_TINC_LOGFILE" ] && EXTRA="$EXTRA --logfile=$IF_TINC_LOGFILE"
|
||||
[ -n "$IF_TINC_CHROOT" ] && EXTRA="$EXTRA --chroot"
|
||||
[ -n "$IF_TINC_USER" ] && EXTRA="$EXTRA --user=$IF_TINC_USER"
|
||||
test -z "$IF_TINC_CONFIG" || EXTRA="$EXTRA -c $IF_TINC_CONFIG"
|
||||
test -z "$IF_TINC_DEBUG" || EXTRA="$EXTRA -d$IF_TINC_DEBUG"
|
||||
test -z "$IF_TINC_MLOCK" || EXTRA="$EXTRA --mlock"
|
||||
test -z "$IF_TINC_LOGFILE" || EXTRA="$EXTRA --logfile=$IF_TINC_LOGFILE"
|
||||
test -z "$IF_TINC_PIDFILE" || EXTRA="$EXTRA --pidfile=$IF_TINC_PIDFILE" || IF_TINC_PIDFILE=/var/run/tinc.$IF_TINC_NET.pid
|
||||
test -z "$IF_TINC_CHROOT" || EXTRA="$EXTRA --chroot"
|
||||
test -z "$IF_TINC_USER" || EXTRA="$EXTRA --user=$IF_TINC_USER"
|
||||
|
||||
# Start tinc daemon
|
||||
|
||||
/usr/sbin/tincd -n "$IF_TINC_NET" -o "Interface=$IFACE" $EXTRA
|
||||
|
||||
# Wait for it to come up properly
|
||||
|
||||
sleep 0.1
|
||||
i=0;
|
||||
while [ ! -f "/var/run/tinc.$IF_TINC_NET.pid" ] ; do
|
||||
if [ $i = '30' ] ; then
|
||||
echo 'Failed to start tinc daemon!'
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.1
|
||||
i=$(($i+1))
|
||||
done
|
||||
if test -z "$IF_TINC_PIDFILE"; then
|
||||
/usr/sbin/tinc -n "$IF_TINC_NET" start -o "Interface=$IFACE" $EXTRA
|
||||
else
|
||||
/usr/sbin/tinc -n "$IF_TINC_NET" --pidfile="$IF_TINC_PIDFILE" start -o "Interface=$IFACE" $EXTRA
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue