mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	firemod: more cleanup
This commit is contained in:
		@@ -228,8 +228,12 @@ if (defined $log_cli) {
 | 
				
			|||||||
if ($::do_cmd ne "NA") {
 | 
					if ($::do_cmd ne "NA") {
 | 
				
			||||||
  $::action = "do_cmd";
 | 
					  $::action = "do_cmd";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
our @valid_actions = split(/,/, "show_endp,set_endp,start_endp,stop_endp,delete_endp,create_endp,create_arm,"
 | 
					our @valid_actions = qw(
 | 
				
			||||||
       ."show_port,do_cmd,list_ports,list_endp,create_cx,list_cx,show_cx,delete_cx,delete_cxe" );
 | 
					   create_arm create_cx create_endp
 | 
				
			||||||
 | 
					   delete_cx delete_cxe delete_endp do_cmd
 | 
				
			||||||
 | 
					   list_cx list_endp list_ports
 | 
				
			||||||
 | 
					   set_endp show_cx show_endp show_port start_endp stop_endp
 | 
				
			||||||
 | 
					   );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (($::action eq "") && ((defined $::endp_vals) && ("$::endp_vals" ne ""))) {
 | 
					if (($::action eq "") && ((defined $::endp_vals) && ("$::endp_vals" ne ""))) {
 | 
				
			||||||
  $::action = "show_endp";
 | 
					  $::action = "show_endp";
 | 
				
			||||||
@@ -238,7 +242,11 @@ if (($::action eq "") && ((defined $::endp_vals) && ("$::endp_vals" ne ""))) {
 | 
				
			|||||||
if (! (grep {$_ eq $::action} @::valid_actions )) {
 | 
					if (! (grep {$_ eq $::action} @::valid_actions )) {
 | 
				
			||||||
  die("Invalid action: $::action\n$::usage\n");
 | 
					  die("Invalid action: $::action\n$::usage\n");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
our @actions_needing_endp = split(/,/, "set_endp,start_endp,stop_endp,delete_endp,create_endp,create_arm");
 | 
					our @actions_needing_endp = qw(
 | 
				
			||||||
 | 
					   create_arm create_endp
 | 
				
			||||||
 | 
					   delete_endp
 | 
				
			||||||
 | 
					   set_endp start_endp stop_endp
 | 
				
			||||||
 | 
					   );
 | 
				
			||||||
if (grep {$_ eq $::action} @actions_needing_endp) {
 | 
					if (grep {$_ eq $::action} @actions_needing_endp) {
 | 
				
			||||||
  if (length($::endp_name) == 0) {
 | 
					  if (length($::endp_name) == 0) {
 | 
				
			||||||
    print "ERROR:  Must specify endp_name.\n";
 | 
					    print "ERROR:  Must specify endp_name.\n";
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user