From 91bb77e328c9cad994609aeeccb33971eca1486f Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Wed, 12 May 2010 09:37:24 -0700 Subject: added additional warning message if the user tries to deactivate a node that has already been deactivated. --- scripts/vyatta-activate-config.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts') 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) { -- cgit v1.2.3