summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-10-23 12:13:48 -0700
committerStig Thormodsrud <stig@vyatta.com>2010-10-23 12:13:48 -0700
commitbee2df599f882d415e6dcd8582ac960bffa1aad0 (patch)
treef327edfa20fe6c05e32a06b0cfdaf23df4675ffe
parentee7667fe1e77e896ab0d4b862ae1ec7f53f8bf33 (diff)
downloadvyatta-cfg-system-bee2df599f882d415e6dcd8582ac960bffa1aad0.tar.gz
vyatta-cfg-system-bee2df599f882d415e6dcd8582ac960bffa1aad0.zip
Fix commit-uri bug.
- remove links from commit hook directory on boot-up. - remove 'file' scheme for now.
-rwxr-xr-xscripts/config-mgmt/vyatta-config-mgmt.pl3
-rwxr-xr-xscripts/rl-system.init3
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/config-mgmt/vyatta-config-mgmt.pl b/scripts/config-mgmt/vyatta-config-mgmt.pl
index cf8bcf52..8f434eb4 100755
--- a/scripts/config-mgmt/vyatta-config-mgmt.pl
+++ b/scripts/config-mgmt/vyatta-config-mgmt.pl
@@ -59,7 +59,7 @@ if ($action eq 'add-uri') {
my $config = new Vyatta::Config;
$config->setLevel('system config-mgmt');
my @uris = $config->returnValues('commit-uri');
- if (scalar(@uris) > 1 and ! -e $link_name) {
+ if (scalar(@uris) >= 1 and ! -e $link_name) {
print "add link\n" if $debug;
$rc = system("ln -s $commit_uri_script $link_name");
exit $rc;
@@ -93,7 +93,6 @@ if ($action eq 'valid-uri') {
if ($scheme eq 'tftp') {
} elsif ($scheme eq 'ftp') {
} elsif ($scheme eq 'scp') {
- } elsif ($scheme eq 'file') {
} else {
print "Unsupported URI scheme\n";
exit 1;
diff --git a/scripts/rl-system.init b/scripts/rl-system.init
index 28d40423..3e07e11e 100755
--- a/scripts/rl-system.init
+++ b/scripts/rl-system.init
@@ -212,6 +212,9 @@ start () {
fi
done
+ # Remove links from the commit hook directory
+ rm -f /etc/commit/*
+
# Remove serial console settings
# sed -i -e '/^T/d' /etc/inittab