Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!ucsd!ucbvax!AVELON.LERC.NASA.GOV!fsfacca From: fsfacca@AVELON.LERC.NASA.GOV (Tony Facca) Newsgroups: comp.sys.sgi Subject: Re: Name server problems Message-ID: <9009071400.AA18091@avelon.lerc.nasa.gov> Date: 7 Sep 90 14:00:25 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 101 Your problem is fixed in the 3.3 release of the software where you can tell the system to lookup names in the host table either before or after it attempts to use the nameserver to resolve. In the meantime, here is a short script which you can run as root to temporarily enable/disable the name resolver on your machine. Be careful that no one else is on when you run it because it brings the inetd (network services) down and then back up. Hope this helps. ------------------------- cut here for best results -------------------------- #! /bin/csh -f # nameserver turn the nameserver on or off and do all the other # network stuff that is required to support the change. # # Original Author: Tony Facca # Original Date: July 1989 # # Modified by Scott Presnell Thu Mar 1 08:41:59 PST 1990 # # 128.156.1.43 falcon.lerc.nasa.gov # 128.156.1.33 eagle.lerc.nasa.gov set primary = "128.156.1.43" # Internet address primary NS set secondary = "128.156.1.33" # secondary nameserver set domain = "lerc.nasa.gov" # domain name set CONFIG=/etc/config if (! -o /bin/su) then echo "You must be superuser to run this script" exit(-1) endif switch ($1) case "on": echo "on" > $CONFIG/named /bin/rm -f /usr/etc/resolv.conf echo "$0 : enabled -- restarting the network" /etc/init.d/network stop /etc/init.d/network start /etc/init.d/network.local start breaksw case "remote": if (-e /usr/etc/resolv.conf) then echo "Nameserver already in remote mode." exit() else echo "domain $domain" > /usr/etc/resolv.conf echo "nameserver $primary" >> /usr/etc/resolv.conf echo "nameserver $secondary" >> /usr/etc/resolv.conf echo "$0 : remote operation enabled -- restarting the network" echo "off" > $CONFIG/named /etc/init.d/network stop /etc/init.d/network start /etc/init.d/network.local start endif breaksw case "off": echo "$0 : disabled -- restarting the network" echo "off" > $CONFIG/named /bin/rm -f /usr/etc/resolv.conf /etc/init.d/network stop /etc/init.d/network start /etc/init.d/network.local start breaksw case "status": if ( `cat $CONFIG/named` == "on" ) then echo "$0 : named should be operating,\c" if ( ! { (kill -0 `cat /usr/etc/named.pid` > /dev/null) } ) then echo " but it isn't. Better check this out." else echo " and it is." endif else if ( -e /usr/etc/resolv.conf ) then echo "$0 : in remote operation mode." else if ( ! { (kill -0 `cat /usr/etc/named.pid` > /dev/null) } ) then echo "$0 : a named process is running, but named is not specified in the system configuration." else echo "$0 : all host name service through the /etc/hosts file." endif breaksw default: echo "Usage: $0 status|on|remote|off" breaksw endsw exit() ------------------------------------------------------------------------------ -- ----------------------------------------------------------------------------- Tony Facca | fsfacca@avelon.lerc.nasa.gov | phone: 216-433-8318 ----------------------------------------------------------------------------- You are at Witt's end. Passages lead off in *all* directions.