So, I now actually separated the networking part from the base-profile and managed to install NetworkManager as a regular package. My autoinst.xml on the installing system contains: -------- <networking> <dns> <dhcp_hostname config:type="boolean">true</dhcp_hostname> <domain>lnt</domain> <hostname>opensuse11-4-template</hostname> <resolv_conf_policy>auto</resolv_conf_policy> <write_hostname config:type="boolean">true</write_hostname> </dns> <interfaces config:type="list"> <interface> <bootproto>dhcp4</bootproto> <device>eth0</device> <startmode>onboot</startmode> <usercontrol>no</usercontrol> </interface> </interfaces> <ipv6 config:type="boolean">true</ipv6> <managed config:type="boolean">true</managed> <routing> <ip_forward config:type="boolean">false</ip_forward> </routing> </networking> <software> <packages config:type="list"> <package>NetworkManager</package> </packages> </software> -------- Still, I am getting the error: "No network running" at the "Configuring system according to auto-install settings", "Configuring lan..." part in stage2. The "y2log" says: -------- [YCP] Service.ycp:292 Error while running initscript /etc/init.d/network restart : $["exit":2, "stderr":" No configuration found for wlan0 \n Nevertheless the interface will be shut down.\n..failed\n", "stdout":"Shutting down network interfaces:\n eth0 device: Realtek Semiconductor Co., Ltd. RTL8111/8168B\n..done wlan0 device: Intel Corporation PRO/Wireless 5100 AGN \n..doneShutting down service network . . . . . . . . ...done\nStarting the NetworkManager..done\n"] [YCP] network/runtime.ycp:28 Running SuSEconfig ... [YCP] NetworkService.ycp:141 Network is not running ... [YCP] Lan.ycp:567 waiting for network ... 15 [YCP] NetworkService.ycp:141 Network is not running ... [YCP] Lan.ycp:567 waiting for network ... 14 ... ... it's counting down ... ... [YCP] Lan.ycp:567 waiting for network ... 1 [ui] YPushButton.cc(setFunctionKey):204 Guessing button role YOKButton for YPushButton "OK" at 0x16dedd8 from function key F10 -------- You can see from the output above that network was running using "ifup" method before. It is then shut down and supposed to be restarted with NetworkManager. When I switch to a terminal at that point and run "rcnetwork start" it fails and actually outputs: -------- "Starting the NetworkManager...done failed" (on a new line) -------- If I first run "rcdbus start", then I can successfully run "rcnetwork start". Is there any known problem with autoyast and NetworkManager (when installing over the network) for OpenSuSE 11.4? Any help is highly appreciated! Best regards, Joschi Brauchle On 11/30/2011 10:43 AM, Hans-Joachim Ehlers wrote:
1) Build the XML beforehand. Use different xml files like base.xml , network.xml and so which will be merged together to build the final xml.
Drawback: You need some additional xslt scripts to merge correctly. Could be supplied on request.
2) Change the final XML with a pre-script ( Final XML must be named /tmp/profile/modified.xml , this file will be reread by autoyast after the pre-scripts has run. )
Example: ( Setting the IP of the Installation server in the final XML file. )
<scripts> <pre-scripts config:type="list"> <script> <filename>cfg_pre</filename> <interpreter>shell</interpreter> <source><![CDATA[ echo "INFO: Running $(basename $0 )" ## Can be used to do lasted modification to the final xml file # Just copy /tmp/profile/autoinst.xml to /tmp/profile/modified.xml and modify it # yast will read the final modified xml
v_dummy=$(echo -e \\0100) # Give us the @ echo -e "INFO:\tReplacing ${v_dummy}INSTSERVER${v_dummy} in /tmp/profile/modified.xml ." v_instServer=$( cat /etc/install.inf | awk ' ( $1 ~ "^Server:" ) { print $2} ' ) v_dummy=${v_dummy}INSTSERVER${v_dummy} sed "s/${v_dummy}/${v_instServer}/g" /tmp/profile/autoinst.xml> /tmp/profile/modified.xml
....
Hth Hajo
-----Original Message----- From: Joschi Brauchle [mailto:joschi.brauchle@tum.de] Sent: Wednesday, November 30, 2011 10:16 AM To: opensuse-autoinstall@opensuse.org Subject: [opensuse-autoinstall] How to remove entry from XML file with merging?
Hello everyone,
I have the following problem: We have an autoyast base-profile.xml for all our Linux machines, which includes --------- <software> <remove-packages config:type="list"> <package>NetworkManager</package> </remove-packages> </software> --------- because all those machines use the traditional ifup method.
Now, I want to integrate a mobile workstation, which should use NetworkManager to manage LAN/WLAN/VPN connections. Thus, I would somehow have to remove the above entry by merging with another XML. Otherwise I cannot install NetworkManager as a regular<package>.
I guess that is not possible? I can only add/change entries by merging with another XMl, but not remove thing... correct?
(Of course I could remove that line from the base-profile.xml, but so far I'm looking for a better solution)
Is it possible to work on the final installation XML file (after merging is done) with a pre-script? How would I get the path to that file? So far, it looks like it is burried somewhere in /tmp/Yast-XXXXXX-YYYYY/ during installation...
Thanks for your help! Regards, Joschi Brauchle
-- Dipl.-Ing. Joschi Brauchle, M.Sc. Institute for Communications Engineering (LNT) Technische Universitaet Muenchen (TUM) 80290 Munich, Germany Tel (work): +49 89 289-23474 Fax (work): +49 89 289-23490 E-mail: joschi.brauchle@tum.de Web: http://www.lnt.ei.tum.de/