Changeset 38


Ignore:
Timestamp:
Feb 13, 2008, 2:55:29 PM (16 years ago)
Author:
g7moreau
Message:
  • Put default argument on the command line.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r37 r38  
    832832
    833833sub cmd_search_mac_on_switch {
    834    my $switch_name = shift;
    835    my $mac_address = shift;
     834   my $switch_name = shift || '';
     835   my $mac_address = shift || '';
     836   
     837   if ($switch_name eq '' or $mac_address eq '') {
     838      print "Usage: klask search-mac-on-switch SWITCH_NAME MAC_ADDRESS\n";
     839      exit 1;
     840      }
    836841   
    837842   my $research = "1.3.6.1.2.1.17.4.3.1.2".arp_hex_to_dec($mac_address);
Note: See TracChangeset for help on using the changeset viewer.