aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2013-07-11 14:31:05 +0200
committerLukas Nykryn <lnykryn@redhat.com>2013-07-11 15:13:05 +0200
commit321e52101a20e9e8a56ecb296f8031d5c49c4d52 (patch)
tree6ee81d40695c697a6749a20a093a21d0962c9747
parentcd46bb84ea77fbd4c9a97f782efad3af9c3bda08 (diff)
downloadinitscripts-321e52101a20e9e8a56ecb296f8031d5c49c4d52.tar
initscripts-321e52101a20e9e8a56ecb296f8031d5c49c4d52.tar.gz
initscripts-321e52101a20e9e8a56ecb296f8031d5c49c4d52.tar.bz2
initscripts-321e52101a20e9e8a56ecb296f8031d5c49c4d52.tar.xz
initscripts-321e52101a20e9e8a56ecb296f8031d5c49c4d52.zip
add possibility to set domainname through /etc/sysconfig/network
-rwxr-xr-xsystemd/fedora-domainname9
-rw-r--r--systemd/system/fedora-domainname.service11
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