d6jg wrote: 
> Hi Greg
> The very situation I feared has occurred.
> I shipped a Pi with pCp to a mate in USA before Xmas. He has an unusual
> router and I was worried what would happen if I fixed the IP and sure
> enough he has the routers address in resolv.conf but the router does not
> act as a DNS relay. Obviously the fix is to edit resolv.conf but so far
> it hasn't survived a reboot. 
> I edited the file and then did
> pcp bu
> Am I missing a step somewhere?

Hi d6jg,

I think you need to:

1. Edit /opt/eth0.sh to prevent resolv.conf getting overwritten. Comment
out "echo nameserver 192.168.1.1 > /etc/resolv.conf"



Code:
--------------------
    #!/bin/sh
  # Generated by piCorePlayer
  
  echo "[ INFO ] Running $0..."
  NWOK=1
  until [ -d /sys/class/net/eth0 ]
  do
        if [ $((CNT++)) -gt 20 ]; then
                echo -n "${RED} No Ethernet Adapter Found! ${NORMAL}"
                NWOK=0
                break
        else
                echo-n "."
                sleep 0.5
        fi
  done
  if [ $NWOK -eq 1 ]; then
        ifconfig eth0 192.168.1.123 netmask 255.255.255.0 broadcast 
192.168.1.255 up    route add default gw 192.168.1.1
        echo nameserver 192.168.1.1 > /etc/resolv.conf
        /etc/init.d/settime.sh &
  fi
  
--------------------


2. Edit /opt/.filetool.sh to backup /etc/resolv.conf. Add
"etc/resolv.conf"


Code:
--------------------
     cat /opt/.filetool.lst
  opt
  home
  etc/passwd
  etc/shadow
  etc/group
  etc/gshadow
  etc/motd
  etc/modprobe.conf
  etc/asound.conf
  etc/sysconfig/wifi-wpadrv
  usr/local/etc/pointercal
  usr/local/etc/ssh/ssh_host_dsa_key
  usr/local/etc/ssh/ssh_host_dsa_key.pub
  usr/local/etc/ssh/ssh_host_ecdsa_key
  usr/local/etc/ssh/ssh_host_ecdsa_key.pub
  usr/local/etc/ssh/ssh_host_ed25519_key
  usr/local/etc/ssh/ssh_host_ed25519_key.pub
  usr/local/etc/ssh/ssh_host_rsa_key
  usr/local/etc/ssh/ssh_host_rsa_key.pub
  usr/local/etc/init.d/httpd
  usr/local/sbin/config.cfg
  usr/local/sbin/piversion.cfg
  usr/local/sbin/setup
  usr/local/sbin/pcp
  usr/local/sbin/pcp-load
  usr/local/etc/pcp/cards
  var/lib/alsa/asound.state
  var/spool/cron/crontabs
  
--------------------


3. Edit /etc/resolv.conf

4. $ pcp bu

The boot process is "roughly" shown [Main Page] > [Diagnostics] >
[Boot].

BTW: I recommend setting static IP via your DHCP server (usually
router). Map MAC address to IP address.

regards
Greg


------------------------------------------------------------------------
Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403
View this thread: http://forums.slimdevices.com/showthread.php?t=106755

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to