diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-12 09:37:24 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-12 09:37:24 -0700 |
commit | 91bb77e328c9cad994609aeeccb33971eca1486f (patch) | |
tree | 1422cf6742bdfd8c635171b2f7b7028721db361f /scripts | |
parent | 00c9408cc61cece9147c98f3f715e435b4a462b5 (diff) | |
download | vyatta-cfg-91bb77e328c9cad994609aeeccb33971eca1486f.tar.gz vyatta-cfg-91bb77e328c9cad994609aeeccb33971eca1486f.zip |
added additional warning message if the user tries to deactivate a node that has already been deactivated.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/vyatta-activate-config.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/vyatta-activate-config.pl b/scripts/vyatta-activate-config.pl index 20f704d..31165a4 100644 --- a/scripts/vyatta-activate-config.pl +++ b/scripts/vyatta-activate-config.pl @@ -70,7 +70,7 @@ if ($ARGV[0] eq 'activate') { `rm -f $full_path`; } else { - printf("This element is not deactivated.\n"); + printf("This element is not deactivated\n"); exit 1; } } @@ -79,7 +79,11 @@ elsif ($ARGV[0] eq 'deactivate') { #also needs to be enforced when committing my $active_dir = "$ENV{VYATTA_ACTIVE_CONFIGURATION_DIR}/$path"; my $local_dir = $full_path; - if (-e $active_dir) { + if (-e "$active_dir/.disable") { + printf("This node is already deactivated\n"); + exit 1; + } + elsif (-e $active_dir) { find( \&wanted, $active_dir ); } if (-e $local_dir) { |