From 9432dbb5c81b2d0917332112f6dad42f5f15a9f6 Mon Sep 17 00:00:00 2001 From: bybai Date: Wed, 4 Jan 2017 02:18:32 -0500 Subject: [PATCH 1/3] fix 2206 add comments in /etc/named.conf indicating that it is generated by xCAT --- xCAT-server/lib/xcat/plugins/ddns.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT-server/lib/xcat/plugins/ddns.pm b/xCAT-server/lib/xcat/plugins/ddns.pm index 6f8ef970e..31b5b6e0f 100755 --- a/xCAT-server/lib/xcat/plugins/ddns.pm +++ b/xCAT-server/lib/xcat/plugins/ddns.pm @@ -1370,6 +1370,7 @@ sub update_namedconf { flock($newnameconf, LOCK_EX); seek($newnameconf, 0, 0); truncate($newnameconf, 0); + print $newnameconf "\#This file is generated by xCAT.\n"; for my $l (@newnamed) { print $newnameconf $l; } flock($newnameconf, LOCK_UN); close($newnameconf); From fcc08f1e134ca0407ad6381b39090a1fa1a69763 Mon Sep 17 00:00:00 2001 From: bybai Date: Wed, 4 Jan 2017 21:11:34 -0500 Subject: [PATCH 2/3] polish it --- xCAT-server/lib/xcat/plugins/ddns.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ddns.pm b/xCAT-server/lib/xcat/plugins/ddns.pm index 31b5b6e0f..d3d1d0be5 100755 --- a/xCAT-server/lib/xcat/plugins/ddns.pm +++ b/xCAT-server/lib/xcat/plugins/ddns.pm @@ -1370,7 +1370,7 @@ sub update_namedconf { flock($newnameconf, LOCK_EX); seek($newnameconf, 0, 0); truncate($newnameconf, 0); - print $newnameconf "\#This file is generated by xCAT.\n"; + print $newnameconf "\#If there is no this file, it is generated by any \"makedns\" command in xCAT. Only \"makedns [-n|--new] [noderange]\" can re-create it.\n"; for my $l (@newnamed) { print $newnameconf $l; } flock($newnameconf, LOCK_UN); close($newnameconf); From 25de1b01294cd4bb6b3d3c682e054acdf776352b Mon Sep 17 00:00:00 2001 From: bybai Date: Thu, 5 Jan 2017 21:16:10 -0500 Subject: [PATCH 3/3] polish it --- xCAT-server/lib/xcat/plugins/ddns.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ddns.pm b/xCAT-server/lib/xcat/plugins/ddns.pm index d3d1d0be5..2155674fc 100755 --- a/xCAT-server/lib/xcat/plugins/ddns.pm +++ b/xCAT-server/lib/xcat/plugins/ddns.pm @@ -1370,7 +1370,7 @@ sub update_namedconf { flock($newnameconf, LOCK_EX); seek($newnameconf, 0, 0); truncate($newnameconf, 0); - print $newnameconf "\#If there is no this file, it is generated by any \"makedns\" command in xCAT. Only \"makedns [-n|--new] [noderange]\" can re-create it.\n"; + print $newnameconf "\#generated by xCAT: /opt/xcat/sbin/makedns -n \n"; for my $l (@newnamed) { print $newnameconf $l; } flock($newnameconf, LOCK_UN); close($newnameconf);