Initial commit (clatd v1.0)

This commit is contained in:
Tore Anderson
2014-03-11 00:59:34 +01:00
commit 0b520f5442
7 changed files with 1205 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/sh
#
# clatd dispatcher script for NetworkManager
#
# Install it to: /etc/NetworkManager/dispatcher.d/50-clatd
#
# Written by Tore Anderson <tore@fud.no>
#
# We simply restart clatd in all situations, as no matter if an interface
# goes up or down, it may mean that the PLAT devices changes, it may mean
# native IPv4 appearing or disappearing, or it may mean that DNS64 became
# available or unavailable...it's far easier to simply restart always and
# start from scratch than to figure out if a restart is truly necessary
# systemd-based distros
if test -x /usr/bin/systemctl; then
/usr/bin/systemctl restart clatd.service
fi
# upstart-based distros
if test -x /sbin/initctl; then
/sbin/initctl restart clatd
fi

21
scripts/clatd.systemd Normal file
View File

@@ -0,0 +1,21 @@
#
# clatd service file for systemd
#
# Install it to: /etc/systemd/system/clatd.service
# Enable it with: systemctl enable clatd.service
# Start it with: systemctl start clatd.service
#
# Written by Tore Anderson <tore@fud.no>
#
[Unit]
Description=464XLAT CLAT daemon
Documentation=man:clatd(8)
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/sbin/clatd
[Install]
WantedBy=multi-user.target

16
scripts/clatd.upstart Normal file
View File

@@ -0,0 +1,16 @@
#
# clatd service file for upstart
#
# Install it to: /etc/init/clatd.conf
# Start it with: initctl start clatd
#
# Written by Tore Anderson <tore@fud.no>
#
description "464XLAT CLAT daemon"
author "Tore Anderson <tore@fud.no>"
start on net-device-up
stop on runlevel [!2345]
exec /usr/sbin/clatd