From 9c09b4b0775174f9c824e339ba787db007e896e5 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Thu, 13 Dec 2012 06:05:46 +0000 Subject: [PATCH] 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 --- xCAT-server/lib/xcat/plugins/ddns.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ddns.pm b/xCAT-server/lib/xcat/plugins/ddns.pm index f66fb767d..7083b86b6 100644 --- a/xCAT-server/lib/xcat/plugins/ddns.pm +++ b/xCAT-server/lib/xcat/plugins/ddns.pm @@ -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; } }