I have had the same problem with this and other things when using a post install script and autoyast. You will find some info here: http://www.tcm.phy.cam.ac.uk/~mr349/suse/autoyast.html which I will complete once we have rolled out Suse 9.1 to our workstations. I minimised the post-install script and did this: #!/bin/sh # This script is called by /etc/rc.d/first_boot.sh which in turn # is called by /etc/rc.d/rc5.d/S99first_boot.sh. This is because # putting some of this stuff into the autoyast post-install script # such as the networking stuff, does not work as it is lost after # the install completes(?!?!) #Seems to be a good idea to sleep a bit to allow boot processes to complete before # hacking system sleep 120 # Remove soft link from /etc/rc.d/rc3.d straight away so that we do not # risk the system getting into a reboot loop rm /etc/rc.d/rc5.d/S99first_boot # and script rm /etc/rc.d/first_boot.sh cp /etc/resolv.conf /root/ # Sort out resolv.conf cat > /etc/resolv.conf <<EOF nameserver XXXX nameserver XXXX search XXXX XXXX XXXX EOF CONFMOUNT="/install/suse9.1" CONFHOST="XXXX:/install/suse9.1" UPDATEPATH="/install/suse9.1/update" INSTALLPATH="/install/suse9.1/Suse/suse/" # set hostname # hostname > /etc/HOSTNAME # host lookup and take hostname from that IP=`/sbin/ifconfig eth0 | grep inet | sed -e 's/^[^:]*://' -e 's/ .*$//'` host $IP | sed -e 's/.*pointer //' | sed -e 's/\.$//' > /root/hostname host $IP | sed -e 's/.*pointer //' | sed -e 's/\.$//' > /etc/HOSTNAME # make temporary mountpoints cd /root if [ ! -d $CONFMOUNT ]; then mkdir -p $CONFMOUNT fi etc. Mike Rose TCM & Biological Physics Computer Officer University of Cambridge http://www.bio.phy.cam.ac.uk/ http://www.tcm.phy.cam.ac.uk/ On Thu, 5 Aug 2004, m.frerichs wrote:
Hallo,
I 'm trying to install the file /etc/resolv.conf on a linux 9.1 client with autoinstallation.
My xml-file looks like this: 1) <configure> <networking> <dns> <dhcp_hostname config:type="boolean">true</dhcp_hostname> <domain>zam.kfa-juelich.de</domain> <hostname>zam724</hostname> <nameservers config:type="list"> <nameserver>134.94.80.2</nameserver> <nameserver>134.94.80.3</nameserver> <nameserver>134.94.100.7</nameserver> </nameservers> <searchlist config:type="list"> <search>zam.kfa-juelich.de</search> <search>kfa-juelich.de</search> <search>fz-juelich.de</search> </searchlist> </dns> <scripts> <post-scripts config:type="list"> <script> <filename>post.sh</filename> <interpreter>shell</interpreter> <source> ....
During executing post.sh-script I listed /etc/resolv.conf. It is installed with searchline and nameserver , but without line " domain zam.kfa-juelich.de"
2) to prevent several daemons from changing resolv.conf I inserted:
<sysconfig config:type="list"> <sysconfig_entry> <sysconfig_key>XNTPD_INITIAL_NTPDATE</sysconfig_key> <sysconfig_path>xntp</sysconfig_path> <sysconfig_value>134.94.80.2</sysconfig_value> </sysconfig_entry> <sysconfig_entry> <sysconfig_key>MODIFY_RESOLV_CONF_DYNAMICALLY</sysconfig_key> <sysconfig_path>/etc/sysconfig/network/config</sysconfig_path> <sysconfig_value>no</sysconfig_value> </sysconfig_entry> </sysconfig>
.... --> /etc/sysconfig/network/config is installed with line MODIFY_RESOLV_CONF_DYNAMICALLY="no"
a) /etc/resolv.conf is linked to a file mounted readonly by nfs in post.sh which is valid to all our clients , without 2) --> link is overwritten, resolv.conf is changed by dhcpd , pay attention to length 0 of /etc/resolv.conf.saved.by.dhcpcd
zam724:~ # ls -l /etc/reso* -rw-r--r-- 1 root root 1321 Aug 5 12:42 /etc/resolv.conf -rw-r--r-- 1 root root 125 Aug 5 12:20 /etc/resolv.conf.install -rw-r--r-- 1 root root 0 Aug 5 12:42 /etc/resolv.conf.saved.by.dhcpcd
b) /etc/resolv.conf is installed as a link to a file mounted ro by nfs in post.sh and with 2) :MODIFY_RESOLV_CONF_DYNAMICALLY="no"
--> When system boots for the first time, there are the following errormessages on screen and /etc/resolv.conf becomes an empty file!!!!!
grep resolv /var/log/*
boot.msg:Cleaning up using /sbin/modify_resolvconf: boot.msg:touch: cannot touch `/etc/resolv.conf': No such file or directory boot.msg:Deleted the following stale backups: removed `/etc/resolv.conf.saved.by.yast2' boot.msg:sed: can't read /etc/resolv.conf: No such file or directory boot.msg:cat: /etc/resolv.conf: No such file or directory
messages:Aug 4 11:24:15 linux modify_resolvconf: Service yast2 modified /etc/resolv.conf. See info block in this file messages:Aug 4 11:25:59 linux modify_resolvconf: Service yast2 tried to modify resolver configuration, but it messages:Aug 4 11:25:59 linux modify_resolvconf: was not modified due to MODIFY_RESOLV\NAMED_CONF_DYNAMICALLY=no messages:Aug 4 11:44:50 linux modify_resolvconf: Service dhcpcd tried to modify resolver configuration, but it messages:Aug 4 11:44:50 linux modify_resolvconf: was not modified due to MODIFY_RESOLV\NAMED_CONF_DYNAMICALLY=no
Thanks for your answers and improvements
+----------------------------------------------------------------------+ | Marianne Frerichs | | Zentralinstitut fuer Angewandte Mathematik | | Forschungszentrum Juelich GmbH | | D-52425 Juelich | | Phone: +49 02461 61-6432 | | Email: M.Frerichsfz-juelich.de Fax: +49 02461 61-6656 | +----------------------------------------------------------------------+
-- To unsubscribe, e-mail: suse-autoinstall-unsubscribe@suse.com For additional commands, e-mail: suse-autoinstall-help@suse.com