Add domainname to the network script
This commit is contained in:
parent
9f4a7afd83
commit
d27655c908
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user