... Is there a clean, standard, supported way to prevent post‑restore scripts from overwriting user‑supplied config files? ...By "post‑restore scripts" , are you referring to scripts located in /usr/local/tce.installed/ ?
#!/bin/sh
# put other system startup commands here
/bin/date >> /mnt/sda1/reoot.log
/sbin/syslogd -b 3
/sbin/ifconfig eth0 192.168.1.145 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.1.1
echo nameserver 192.168.1.151 > /etc/resolv.conf
/usr/sbin/ntpd -p pool.ntp.org
/usr/sbin/crond -b
/usr/local/etc/init.d/openssh start
echo nameserver 192.168.1.151 > /etc/resolv.conf
cat /etc/dnsmasq.anames > /etc/hosts
/usr/local/sbin/dnsmasq[code][ 36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[ 36.176536] pcm512x 1-004d: Failed to get supplies: -517
[ 36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]
[ 36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[ 36.176536] pcm512x 1-004d: Failed to get supplies: -517
[ 36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517... the bootsync file that is called before the bootlocal file, ...Near the end of /etc/init.d/tc-config , the system restores the files you
tc@E310:~$ cat /opt/eth0.sh
#!/bin/sh
pkill udhcpc
ifconfig eth0 192.168.1.35 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
echo nameserver 68.237.161.12 >> /etc/resolv.conf
tc@E310:~$... So the first echo nameserver 192.168.1.151 > /etc/resolv.conf sets it upThese 3 commands are the only thing run between the echo commands:
long enough for ntp to resolve the hosts it needs to start. Sometime beteween
the first one and the second one, it gets plowed. ...
/usr/sbin/ntpd -p pool.ntp.org
/usr/sbin/crond -b
/usr/local/etc/init.d/openssh startRestart each one manually to figure out who the troublemaker is.pkill udhcpc
And add the kernel commmand line argument:nodhcp
See: