|
From: <ar...@sy...> - 2008-02-28 14:48:05
|
Author: arighi
Date: 2008-02-28 08:47:49 -0600 (Thu, 28 Feb 2008)
New Revision: 4414
Modified:
trunk/sbin/si_clusterconfig
Log:
- fix: do not try to stat() /var/lib/systemimager/scripts/hosts if it doesn't
exist
The first time si_clusterconfig is executed /var/lib/systemimager/scripts/hosts
doesn't exist and it should be just copied from /etc/hosts.
This also removes the warning:
Use of uninitialized value in concatenation (.) ...
Modified: trunk/sbin/si_clusterconfig
===================================================================
--- trunk/sbin/si_clusterconfig 2008-02-26 10:57:17 UTC (rev 4413)
+++ trunk/sbin/si_clusterconfig 2008-02-28 14:47:49 UTC (rev 4414)
@@ -216,7 +216,8 @@
# XXX: not really dependent on cluster.xml, but it's better to synchronize
# /etc/hosts with the hosts known by SystemImager sometimes... -AR-
$output_file = $script_dir . '/hosts';
- if (($update) || ((stat('/etc/hosts'))[9] != (stat($output_file))[9])) {
+ if (($update) || !(-e $output_file) ||
+ ((stat('/etc/hosts'))[9] != (stat($output_file))[9])) {
print "Synchronizing /etc/hosts to $output_file ... ";
if (!sync_etc_hosts($output_file)) {
print "[ OK ]\n";
|