On Thursday 12 August 2004 20:04, Lars Stavholm wrote:
Also, does anyone have the XML XInclude feature working on SuSE Pro 9.1? I've tried and I just can't get it to work for me.
Here is a stripped down file that worked for me. Also note: If you load this in the 'yast autoyast' module, then the file to be included actually will be included by YaST *upon opening* of the file. You probably will discover that. ----8<----8<---- <?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns" xmlns:xinclude="http://www.w3.org/2001/XInclude"> <configure> <scripts> <post-scripts config:type="list"> <xinclude:include href="http://10.0.0.2/pub/suse/profiles/inc.10.0.0/install-apt.sh.xml" /> </post-scripts> </scripts> </configure> </profile> ---->8---->8---- And here's install-apt.sh.xml: ----8<----8<---- <script> <filename>install-apt.sh</filename> <interpreter>shell</interpreter> <source> <![CDATA[ function get_file_list() { local url="${1%/}/" wget -qO- $url | egrep -i 'href="(apt|apt-libs|lua)-[0-9]' | sed 's|^.*[Hh][Rr][Ee][Ff]="([^"]+)".*$|'"$url"'1|' } r="$ROOT" && mkdir -p $r/etc/apt SuSE_VER=`grep '^VERSION' /etc/SuSE-release` SuSE_VER="${SuSE_VER##* = }" IP="${PROFILE_SERVER-10.0.0.1}" if ping -qc 1 $IP > /dev/null; then URL="http://$IP/pub/suse/apt/$SuSE_VER" files="`get_file_list $URL/`" echo rpm -Uhv $files echo wget -qO$r/etc/apt/sources.list.HTTP ${URL}/sources.list.HTTP fi ]]> </source> </script> ---->8---->8---- Cheers, Leen