From fe488020e4a9e844bf26ca37eac6a2f48473e2b5 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 29 Mar 2018 21:32:25 +0200 Subject: [PATCH] Import existing named.service unit file into repository named.service is used on wtf only to start the bind named. The ConditionPathExists=/node/startup-hostname/wtf is a workaround, because we are running on an early systemd version which doesn't yet support ConditionHost. --- install.sh | 1 + misc_systemd_units/named.service | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 misc_systemd_units/named.service diff --git a/install.sh b/install.sh index 03444dff..f0fefa94 100755 --- a/install.sh +++ b/install.sh @@ -109,5 +109,6 @@ install_exec kvm_monitor/kvm_monitor.pl "$DESTDIR$udev_helperdi install_data kvm_monitor/51-raritan-kvm.rules "$DESTDIR$udev_rulesdir/51-raritan-kvm.rules" install_data misc_systemd_units/udev-settled.target "$DESTDIR$systemdunitdir/udev-settled.target" install_exec mxmirror/mxmirror "$DESTDIR$usr_sbindir/mxmirror" +install_data misc_systemd_units/named.service "$DESTDIR$systemdunitdir/named.service" exit diff --git a/misc_systemd_units/named.service b/misc_systemd_units/named.service new file mode 100644 index 00000000..e4fee5a9 --- /dev/null +++ b/misc_systemd_units/named.service @@ -0,0 +1,16 @@ +[Unit] +After=network.service gateway.service mxmount.service automount.service + +Wants=startup-hostname.service +After=startup-hostname.service +ConditionPathExists=/node/startup-hostname/wtf + +[Service] +Type=forking +ExecStartPre=-/sbin/ip addr add 141.14.16.1/20 dev net03 +ExecStart=/package/dns/2014-12-03/sbin/named -4 -c /package/dns/2014-12-03/etc/named.conf +ExecStopPost=-/sbin/ip addr del 141.14.16.1/20 dev net03 + +[Install] +WantedBy=network.target +