From 58b0eb8532f238cc7ba21f423d3a60960424c081 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Thu, 6 Feb 2014 13:19:19 +0100 Subject: [PATCH] MT#5887 fix a17d3c9ef4f2693fb05db603f2594278b3f8ffad --- bin/config_debug.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/config_debug.pl b/bin/config_debug.pl index f88a5117..41c10aca 100755 --- a/bin/config_debug.pl +++ b/bin/config_debug.pl @@ -67,7 +67,7 @@ $domain = 'spce.test' unless defined($domain); if (lc($action) eq "off") { - move($file.".orig", $file); + move("$file.orig", $file) or die "Can't restore the orig config"; tie @array, 'Tie::File', '/etc/hosts' or die ('Can set test domain on /etc/hosts'); for (@array) { @@ -112,8 +112,8 @@ else } untie @array; } + open(my $fh, '>', "$file") or die "Could not open $file for writing"; + print $fh $yaml->write_string() or die "Could not write YAML to $file"; } -open(my $fh, '>', "$file") or die "Could not open $file for writing"; -print $fh $yaml->write_string() or die "Could not write YAML to $file"; #EOF