diff options
Diffstat (limited to 'scripts/vyatta-save-config.pl')
-rwxr-xr-x | scripts/vyatta-save-config.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/vyatta-save-config.pl b/scripts/vyatta-save-config.pl index e8220c0..9a95906 100755 --- a/scripts/vyatta-save-config.pl +++ b/scripts/vyatta-save-config.pl @@ -22,6 +22,7 @@ use strict; use lib "/opt/vyatta/share/perl5"; use Vyatta::ConfigOutput; +use File::Sync qw(fsync); my $etcdir = "/opt/vyatta/etc"; my $bootpath = $etcdir . "/config"; @@ -91,10 +92,11 @@ select $save; set_show_all(1); outputActiveConfig(); print $version_str; -close $save; - select STDOUT; +fsync $save; +close $save; + if ($mode eq 'url') { my $rc = system("curl -# -T $url_tmp_file $save_file"); system("rm -f $url_tmp_file"); |