[Bio] / FigKernelPackages / FIG.py Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Thu Feb 12 16:00:31 2004 UTC revision 1.2, Thu Feb 12 16:04:21 2004 UTC
# Line 13  Line 13 
13      #      #
14    
15      hostname = socket.getfqdn()      hostname = socket.getfqdn()
     hostname = "yips"  
16      #      #
17      # First check that hostname is a fqdn, and that we can bind to it.      # First check that hostname is a fqdn, and that we can bind to it.
18      #      #
# Line 131  Line 130 
130      for l in fh:      for l in fh:
131          cols = l.strip().split()          cols = l.strip().split()
132    
133          if cols[0] == "default" or cols[0] == "0.0.0.0":          if len(cols) > 0 and (cols[0] == "default" or cols[0] == "0.0.0.0"):
134              interface_name = cols[-1]              interface_name = cols[-1]
135              break              break
136    
137      fh.close()      fh.close()
138    
139      print "Default route on ", interface_name      # print "Default route on ", interface_name
140    
141      #      #
142      # Find ifconfig.      # Find ifconfig.
# Line 157  Line 156 
156          print >> sys.stderr, "Ifconfig not found"          print >> sys.stderr, "Ifconfig not found"
157          return "localhost"          return "localhost"
158    
159      print >> sys.stderr, "found ifconfig ", ifconfig      # print >> sys.stderr, "found ifconfig ", ifconfig
160    
161      try:      try:
162          fh = os.popen(ifconfig+ " " + interface_name, "r")          fh = os.popen(ifconfig+ " " + interface_name, "r")

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3