Add domainname to the network script

This commit is contained in:
Roy Marples 2009-10-16 12:04:20 +01:00
parent 9f4a7afd83
commit d27655c908
2 changed files with 12 additions and 0 deletions

View File

@ -26,3 +26,5 @@
# If you require DHCP, you should install dhcpcd and it to the boot or
# default runlevel.
# NIS users can set the domain name here
#domainname="foobar"

View File

@ -173,6 +173,16 @@ runargs()
start()
{
local cr=0 r= int= intv= cmd= args= upcmd=
if [ -z "$domainname" && -s /etc/defaultdomain ]; then
domainname=$(cat /etc/defaultdomain)
fi
if [ -n "$domainname" ]; then
ebegin "Setting NIS domainname: $domainname"
domainname "$domainname"
eend $?
fi
einfo "Starting network"
routeflush
if [ "$RC_UNAME" = "Linux" ]; then