# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/sbin/snappd/scripts/IPDoneSetTokenRing.pl 1.5 # # 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 # @(#)95 1.5 src/bos/usr/sbin/snappd/scripts/IPDoneSetTokenRing.pl, snapp, bos720 5/31/02 07:50:15 #------------------------------------------------------------------------------ #--------Done Token Ring Configuration page for Snapp Program --------------- #------------------------------------------------------------------------------ #-------- This page shows the current Network Information --------------- #-------- after the mktcpip command has ben run so that the-------------- #-------- user can see what the current network setting are-------------- #------------------------------------------------------------------------------ #-------- Links to Pages: SRPasswd.pl, SetPageSpace.pl, IPMain.pl ------- #------------------------------------------------------------------------------ $ENV{'PATH'} = '/bin:/usr/bin:/usr/sbin'; if(`/usr/bin/ls /var/snapp | /usr/bin/grep snapp.markers`) { `/usr/bin/rm /var/snapp/snapp.markers`; } if(`/usr/bin/ls /var/snapp | /usr/bin/grep snapp.message`) { `/usr/bin/rm /var/snapp/snapp.message`; } #----------------- Interface -------------------------------------- $en = "tr0"; open(ENFILE, "/var/snapp/snapp.eni"); $en = ; close(ENFILE); @strInterfaceInfo = split(":",`/usr/sbin/mktcpip -S $en 2>&1 | grep -v "#"`); $strOSLevel = `/usr/bin/oslevel`; $strOSLevel =~ m/(\d)/g; if( $1 eq 3 || $1 eq 4 ) { $strRingSpeed = @strInterfaceInfo[7]; } elsif( @strInterfaceInfo > 9) { $strRingSpeed = @strInterfaceInfo[9]; } else { $strRingSpeed = "Unknown Value"; } $strHostname = @strInterfaceInfo[0]; $strIPAddress = @strInterfaceInfo[1]; $strNetmask = @strInterfaceInfo[2]; $strNameServer = @strInterfaceInfo[4]; $strDomain = @strInterfaceInfo[5]; $strGateway = @strInterfaceInfo[6]; open(OUTFILE,">/var/snapp/snapp.fres.tmp"); print OUTFILE < Current Network Information: 60 12 5 30 12 12 12 12 12 12 12 90 12 70 30 12 12 12 12 12 12 12 30 65 130 EOXML close(OUTFILE); system("/usr/bin/cp /var/snapp/snapp.fres.tmp /var/snapp/snapp.fres");