1113674Smtm#!/bin/sh 2113674Smtm# 3113674Smtm# Copyright (c) 1993 - 2003 The FreeBSD Project. All rights reserved. 4113674Smtm# 5113674Smtm# Redistribution and use in source and binary forms, with or without 6113674Smtm# modification, are permitted provided that the following conditions 7113674Smtm# are met: 8113674Smtm# 1. Redistributions of source code must retain the above copyright 9113674Smtm# notice, this list of conditions and the following disclaimer. 10113674Smtm# 2. Redistributions in binary form must reproduce the above copyright 11113674Smtm# notice, this list of conditions and the following disclaimer in the 12113674Smtm# documentation and/or other materials provided with the distribution. 13113674Smtm# 14113674Smtm# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 15113674Smtm# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16113674Smtm# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17113674Smtm# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 18113674Smtm# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19113674Smtm# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20113674Smtm# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21113674Smtm# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22113674Smtm# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23113674Smtm# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24113674Smtm# SUCH DAMAGE. 25113674Smtm# 26113674Smtm# $FreeBSD$ 27113674Smtm# 28113674Smtm 29113674Smtm# PROVIDE: nisdomain 30113674Smtm# REQUIRE: SERVERS rpcbind 31193197Sdougb# BEFORE: ypset ypbind ypserv ypxfrd 32113674Smtm 33113674Smtm. /etc/rc.subr 34113674Smtm 35113674Smtmname="nisdomain" 36113674Smtmstart_cmd="nisdomain_start" 37113674Smtmstop_cmd=":" 38113674Smtm 39113674Smtmnisdomain_start() 40113674Smtm{ 41113674Smtm # Set the domainname if we're using NIS 42113674Smtm # 43113674Smtm case ${nisdomainname} in 44113674Smtm [Nn][Oo]|'') 45113674Smtm ;; 46113674Smtm *) 47113674Smtm domainname ${nisdomainname} 48113674Smtm echo "Setting NIS domain: `/bin/domainname`." 49113674Smtm ;; 50113674Smtm esac 51113674Smtm} 52113674Smtm 53113674Smtmload_rc_config $name 54113674Smtmrun_rc_command "$1" 55