Hello,
Moving the conversation here, as it's probably more appropriate than
in general help.
---------- Forwarded message ----------
From: Razvan Cosma
Date: Wed, Feb 8, 2012 at 11:12 AM
Subject: network configuration in post scripts?
To: opensuse@opensuse.org
Hello everyone,
In version 11 (both opensuse and sles) I was configuring various
system parameters in the <chroot-scripts> section, which had the
filesystem mounted and network (dhcp) up. In 12 though, my changes
(ifcfg, hostname, routes, udev) are overwritten by the last autoyast
step after reboot. I've also tried post-scripts and init-scripts, same
problem. A working setup in 11 is:
<networking><interfaces
config:type="list"><interface><bootproto>dhcp4</bootproto><device>eth0</device><startmode>auto</startmode></interface></interfaces></networking>
this ensures network is up on the first interface, the post script is
supposed to configure the others
<packages config:type="list"><package>dialog</package><package>wget</package>
<chroot-scripts config:type="list"><script><chrooted
config:type="boolean">true</chrooted><source><![CDATA[
sysid=$(dialog --no-cancel --stdout --backtitle "Post-install
configuration" --inputbox "Enter system id:" 8 30 localhost)
read iname mac ip gw hname <<<$(IFS=" "; wget -q -O - "http://server?$sysid")
echo $hname > /etc/HOSTNAME
sed -i -e "s/\($mac.*NAME=\"\).*/\1$iname\"/"
/etc/udev/rules.d/70-persistent-net.rules
echo -e "BOOTPROTO='static'\nSTARTMODE='onboot'\nIPADDR='$ip'\n" >
/etc/sysconfig/network/ifcfg-$iname
#other various system settings
]]></source></script></chroot-scripts>
This ensured that udev always assigns a specific IP to the correct
interface, data is in some SQL. The files are zeroed in 12, though,
any hints on what has changed?
Thank you,
Razvan
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org