mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 02:38:03 +00:00 
			
		
		
		
	Updates lf_wifi_rest_example:
- fixes conflicting -l option, now use --log_file or --log for log files - use -L for --load - option -l no longer exists - added options --help, -h to show help and exit
This commit is contained in:
		| @@ -95,7 +95,7 @@ my $usage = "$0  --port_name {name | number} | |||||||
| [--speedB         { transmit speed for endpoint B } | [--speedB         { transmit speed for endpoint B } | ||||||
| [--min_sleep      { minimum number (seconds) to run the connections } ] | [--min_sleep      { minimum number (seconds) to run the connections } ] | ||||||
| [--max_sleep      { maximum number (seconds) to run the connections} ] | [--max_sleep      { maximum number (seconds) to run the connections} ] | ||||||
| [--load           { db-name } ] | [--load|-L        { db-name } ] | ||||||
| [--card           { card-id } ] | [--card           { card-id } ] | ||||||
| [--quiet          { level } ] | [--quiet          { level } ] | ||||||
| [--set_ifstate    {up | down} ] | [--set_ifstate    {up | down} ] | ||||||
| @@ -113,7 +113,8 @@ my $usage = "$0  --port_name {name | number} | |||||||
| [--ap             {BSSID of AP, or 'DEFAULT' for any.} | [--ap             {BSSID of AP, or 'DEFAULT' for any.} | ||||||
| [--eap_identity   {value|[BLANK]}] | [--eap_identity   {value|[BLANK]}] | ||||||
| [--eap_passwd     {value|[BLANK]}] | [--eap_passwd     {value|[BLANK]}] | ||||||
| [--log_file       {value}] # disabled by default | [--log_file|--log {value}] # disabled by default | ||||||
|  | [--help|-h        # show help ] | ||||||
|  |  | ||||||
| Examples: | Examples: | ||||||
| ./lf_wifi_rest_example.pl --manager localhost --card 1 --port_name sta010 --station_count 5 --ssid Lede-apu2-AC \ | ./lf_wifi_rest_example.pl --manager localhost --card 1 --port_name sta010 --station_count 5 --ssid Lede-apu2-AC \ | ||||||
| @@ -122,9 +123,10 @@ Examples: | |||||||
|  |  | ||||||
| my $i = 0; | my $i = 0; | ||||||
| my $log_cli = 'unset'; | my $log_cli = 'unset'; | ||||||
|  | my $show_help =0; | ||||||
| GetOptions | GetOptions | ||||||
| ( | ( | ||||||
|  |  'help|h'            => \$show_help, | ||||||
|  'ap=s'              => \$ap, |  'ap=s'              => \$ap, | ||||||
|  'port_name|e=s'     => \$port_name, |  'port_name|e=s'     => \$port_name, | ||||||
|  'upstream=s'        => \$upstream, |  'upstream=s'        => \$upstream, | ||||||
| @@ -147,11 +149,16 @@ GetOptions | |||||||
|  'port_stats=s{1,}'  => \@port_stats, |  'port_stats=s{1,}'  => \@port_stats, | ||||||
|  'eap_identity|i=s'  => \$eap_identity, |  'eap_identity|i=s'  => \$eap_identity, | ||||||
|  'eap_passwd|p=s'    => \$eap_passwd, |  'eap_passwd|p=s'    => \$eap_passwd, | ||||||
|  'log_file|l=s'      => \$log_file, |  'log_file|log=s'      => \$log_file, | ||||||
|  'log_cli=s{0,1}'    => \$log_cli, |  'log_cli=s{0,1}'    => \$log_cli, | ||||||
|  'wifi_mode=i'       => \$wifi_mode, |  'wifi_mode=i'       => \$wifi_mode, | ||||||
|  ) || (print($usage) && exit(1)); |  ) || (print($usage) && exit(1)); | ||||||
|  |  | ||||||
|  | if ($show_help) { | ||||||
|  |    print $usage; | ||||||
|  |    exit 0; | ||||||
|  | } | ||||||
|  |  | ||||||
|  if ($::quiet eq "0") { |  if ($::quiet eq "0") { | ||||||
|    $::quiet = "no"; |    $::quiet = "no"; | ||||||
|  } |  } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jed Reynolds
					Jed Reynolds