diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-01 17:07:21 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-01 17:07:21 -0700 |
commit | 83a14e262d5f0651d31140c9387ffdaa2299dc83 (patch) | |
tree | 5ff6ce312bf1e61205c505a9d920c2b52f24b529 | |
parent | 470ee0a439887fd108e1c4b459704a176e1e85ac (diff) | |
download | vyatta-cfg-83a14e262d5f0651d31140c9387ffdaa2299dc83.tar.gz vyatta-cfg-83a14e262d5f0651d31140c9387ffdaa2299dc83.zip |
use correct path for config backend binaries
-rwxr-xr-x | scripts/vyatta-load-config.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl index 02df8a7..a0b53d5 100755 --- a/scripts/vyatta-load-config.pl +++ b/scripts/vyatta-load-config.pl @@ -7,6 +7,7 @@ use lib "/opt/vyatta/share/perl5/"; use VyattaConfigLoad; my $etcdir = $ENV{vyatta_sysconfdir}; +my $sbindir = $ENV{vyatta_sbindir}; my $bootpath = ''; if (-r "$etcdir/bootfile_path") { $bootpath = `cat $etcdir/bootfile_path`; @@ -38,27 +39,27 @@ my @set_list = @{$cfg_diff{'set'}}; foreach (@delete_list) { my ($cmd_ref, $rank) = @{$_}; - my @cmd = ( 'my_delete', @{$cmd_ref} ); + my @cmd = ( "$sbindir/my_delete", @{$cmd_ref} ); my $cmd_str = join ' ', @cmd; system("$cmd_str"); if ($? >> 8) { - $cmd_str =~ s/^my_//; + $cmd_str =~ s/^$sbindir\/my_//; print "\"$cmd_str\" failed\n"; } } foreach (@set_list) { my ($cmd_ref, $rank) = @{$_}; - my @cmd = ( 'my_set', @{$cmd_ref} ); + my @cmd = ( "$sbindir/my_set", @{$cmd_ref} ); my $cmd_str = join ' ', @cmd; system("$cmd_str"); if ($? >> 8) { - $cmd_str =~ s/^my_//; + $cmd_str =~ s/^$sbindir\/my_//; print "\"$cmd_str\" failed\n"; } } -system("my_commit"); +system("$sbindir/my_commit"); if ($? >> 8) { print "Load failed (commit failed)\n"; exit 1; |