; ypbind.service ; 2016-09-17, alex@barton.de ; NIS domain must be stored in "/etc/defaultdomain", ; "YPBINDARGS" should be set in "/etc/default/nis". [Unit] Description=NIS Client Service Requires=rpcbind.service Wants=network-online.target After=rpcbind.service network-online.target ypserv.service ConditionPathExists=/etc/defaultdomain ConditionFileNotEmpty=/etc/defaultdomain [Service] Type=forking Environment=LANG=C EnvironmentFile=-/etc/default/nis ExecStartPre=/bin/ypdomainname -F /etc/defaultdomain ExecStart=/usr/sbin/ypbind $YPBINDARGS -broadcast # Wait for a NIS master to become available (hack taken from ArchLinux): ExecStartPost=/bin/sh -c "for i in 1 2 3 4 5 6 7 8 9 10; do ypwhich >/dev/null 2>&1 && break; sleep 1; done" # Final check if YP binding succeeded: ExecStartPost=/bin/sh -c "ypwhich >/dev/null" ExecReload=/bin/kill -HUP $MAINPID PIDFile=/var/run/ypbind.pid Restart=on-failure [Install] WantedBy=multi-user.target