# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/sbin/snappd/scripts/DHCPInterface.pl 1.4 # # Licensed Materials - Property of IBM # # COPYRIGHT International Business Machines Corp. 2000,2002 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # #!/usr/bin/perl -T # @(#)84 1.4 src/bos/usr/sbin/snappd/scripts/DHCPInterface.pl, snapp, bos720 5/31/02 07:49:36 #----------------------------------------------------------- #-------- Name DHCPInterface.pl #----------------------------------------------------------- #-------- This page is the entry point for the configuration #-------- of DHCP on different Interfaces. #----------------------------------------------------------- #-------- Links to Pages: DHCPSEthernet.pl, #-------- DHCP3EEthernet.pl, #-------- DHCPTokenRing.pl #----------------------------------------------------------- $ENV{'PATH'} = '/bin:/usr/bin:/usr/sbin'; #gets the Number of Available Standard Ethernet Interfaces $strSEthernet = `/usr/sbin/lsdev -Cc if | /usr/bin/grep en | /usr/bin/grep Ethernet`; @nums = split(/\n/, $strSEthernet); $SELength = @nums; #gets the Number of Available IEEE Ethernet Interfaces $strSEthernet = `/usr/sbin/lsdev -Cc if | /usr/bin/grep et | /usr/bin/grep IEEE | /usr/bin/grep Ethernet`; @nums = split(/\n/, $strSEthernet); $EEELength = @nums; #gets the Number of Available Token Ring Interfaces $strSEthernet = `/usr/sbin/lsdev -Cc if | /usr/bin/grep tr | /usr/bin/grep Token`; @nums = split(/\n/, $strSEthernet); $TRLength = @nums; open(OUTFILE,">/var/snapp/snapp.fres.tmp"); print OUTFILE < DHCP Interface Type 100 15 20 5 150 30 70 10 20 90 10 85 20 115 10 20 115 10 20 115 EOXML close(OUTFILE); system("/usr/bin/cp /var/snapp/snapp.fres.tmp /var/snapp/snapp.fres");