chown for the dns db file on ubuntu

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14639 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2012-12-13 06:05:46 +00:00
parent 906688785c
commit 9c09b4b077

View File

@ -715,7 +715,12 @@ sub update_zones {
}
flock($zonehdl,LOCK_UN);
close($zonehdl);
chown(scalar(getpwnam('named')),scalar(getgrnam('named')),$dbdir."/db.$zonefilename");
if ( $distro =~ /ubuntu.*/ ){
chown(scalar(getpwnam('root')),scalar(getgrnam('bind')),$dbdir."/db.$zonefilename");
}
else{
chown(scalar(getpwnam('named')),scalar(getgrnam('named')),$dbdir."/db.$zonefilename");
}
$ctx->{restartneeded}=1;
}
}