ff4039db4b
tinc (1.1~pre11-1) experimental; urgency=medium * New upstream release. * Update NEWS.Debian to reflect that tincctl has been renamed to tinc. Closes: #729889 * Warn about incompatibility with previous 1.1preX releases, and that new Ed25519 keys should be generated. * Add native systemd service files. * Automatically convert networks listed in nets.boot to systemd service instances on upgrade. * Don't restart tinc on upgrade for now.
28 lines
566 B
Bash
28 lines
566 B
Bash
#!/bin/sh
|
|
|
|
NETSFILE="/etc/tinc/nets.boot"
|
|
SYSTEM="/lib/systemd/system"
|
|
WANTS="/etc/systemd/system/multi-user.target.wants"
|
|
|
|
set -e
|
|
|
|
case "$1" in
|
|
upgrade)
|
|
if dpkg --compare-versions "$2" '<' "1.1~pre11-1"; then
|
|
if [ -f "$NETSFILE" ]; then
|
|
echo -n "Creating systemd service instances from nets.boot:"
|
|
mkdir -p "$WANTS"
|
|
egrep '^[ ]*[a-zA-Z0-9_-]+' $NETSFILE | while read net args; do
|
|
echo -n " $net"
|
|
ln -s "$SYSTEM/tinc@.service" "$WANTS/tinc@$net.service" 2>/dev/null || true
|
|
done
|
|
echo "."
|
|
fi
|
|
fi
|
|
;;
|
|
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|