diff options
-rwxr-xr-x | systemd/fedora-domainname | 9 | ||||
-rw-r--r-- | systemd/system/fedora-domainname.service | 11 |
2 files changed, 20 insertions, 0 deletions
diff --git a/systemd/fedora-domainname b/systemd/fedora-domainname new file mode 100755 index 00000000..17f8ea8c --- /dev/null +++ b/systemd/fedora-domainname @@ -0,0 +1,9 @@ +#!/usr/bin/bash +. /etc/sysconfig/network + +if [ -n "${NISDOMAIN}" -a -x /usr/bin/domainname ]; then + domainname ${NISDOMAIN} + exit $? +fi + +exit 0 diff --git a/systemd/system/fedora-domainname.service b/systemd/system/fedora-domainname.service new file mode 100644 index 00000000..e501a130 --- /dev/null +++ b/systemd/system/fedora-domainname.service @@ -0,0 +1,11 @@ +[Unit] +Description=Read and set NIS domainname from /etc/sysconfig/network +Before=ypbind.service yppasswdd.service ypserv.service ypxfrd.service + +[Service] +ExecStart=/lib/systemd/fedora-domainname +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=sysinit.target |