Howdy, I am trying to build a rules based deployment that will ultimately be on a custom DVD My intent is that the autoyast configuration be in /cf/... on the deployment media. I want to use a simple rules file in '/cf/rules/rules.xml' to parse the kernel command line to determine other files to pull in. The first rule is an unconditional match on product (could be anything) to fake the equivalent of "#include <FOO.xml>" (i'm not sure if i can, or it's advisable to use a "<class>" here instead?) The other two are custom rules that parse the kernel command line looking for a site designation and a node-type designation to include those specific profile files. I am initially testing this on a USB Key i built using 'mksusebootdisk'. My understanding is that if i placed this rules file on the USB key's VFAT filesystem as '/cf/rules/rules.xml' and boot with: linux autoyast=usb:///cf/ ZORKsite=site1 ZORKnode=ingest That the autoyast system should detect that "/cf" is a directory, it should then look for /cf/rules/rules.xml, it should find it, load and process it and should then include my "base" profile and the two files that match the site and node type. (i.e. it shouldn't require anything other than /cf/rules/rules.xml and the files i ultimately include, which would be in /cf/) I am, however, getting an error that the profile couldn't be loaded. I want to verify that i am using the proper autoyast pathing syntax above and that i understand the loading and parsing process as stated in the previous paragraph. I.E. is what i'm trying to do a correct and/or advisable way to use a rules file to parse the command line as the primary means of pulling the rest of the configurations into play? Secondarily, i wanted to test this stuff out using a virtual machine, but the virtual machine manager wants to be TOO helpful. Apparently, it will accept an "AutoYast" statement that can ONLY be a single profile file. (autoinst.xml), not a directory, therefore no rules can be run. What i tried, instead, was to create an ext2 disk image containing my autoyast setup, and put "autoyast=device:xvdc/cf" into the kernel line. Only the VM creation wizard sees the "autoyast" directive, pulls it from the kernel line, and then tries to handle it itself in the same way, and fails. Is there a method of doing what i want using the standard SLES10 XEN virtual machine management functions so i can test this setup without having to venture down to the machine room with USB key in hand to find that something's still wrong? My rules.xml file is included below: Thanks, --stephen P.S. If i put 'autoyast=usb:///cf/rules/rules.xml' autoyast DOES find the file, but it doesn't work. Initially i noticed a failure, because i was using "PATH=/sbin:/usr/sbin:$(getconf PATH)" and surprisingly 'getconf' isn't on the boot media install environment :-( Also, does the install "shell" support POSIX 'printf' instead of 'echo -n'? ------------------------------------------------------------------------------------------------- <?xml version="1.0"?> <!DOCTYPE autoinstall> <autoinstall xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <!-- This rules file will generate a targetted profile stack for ZORK systems installation based upon cmdline parameters of the form: Example boot command lines: linux autoyast=cd:/cf ZORKsite=zork1 ZORKnode=in2 --> <rules config:type="list"> <!-- Setup the BASE ZORK system parameters --> <!-- This rule basically amounts to "#include ZORK_base.xml" --> <rule> <product> <match>*</match> <match_type>exact</match_type> </product> <result> <profile>ZORK_base.xml</profile> <continue config:type="boolean">true</continue> </result> </rule> <!-- === RULE:custom1: Determine the ZORK Site we're at === --> <rule> <custom1> <script> <![CDATA[ #!/bin/sh # Determine which SITE we are being installed at PATH="/bin:/sbin:/usr/bin:/usr/sbin" # Get a Kernel Command Line option. return value (after =) # or the command line option if it takes no arguments getkernopt() { sed -e 's/^.*\('$1'=\?[^[:space:]]*\).*$/\1/;s/^[^=]*=//' /proc/cmdline } zorksite="$(getkernopt ZORKsite)" if [ -z "${zorksite}" ]; then echo "ERROR_SITE_NOT_SPECIFIED (kernel command line=[$(cat /proc/cmdline)])" 1>&2 else echo -n "${zorksite}" fi ]]> </script> <match>*</match> <match_type>exact</match_type> </custom1> <result> <profile>ZORKsite-@custom1@.xml</profile> <continue config:type="boolean">true</continue> </result> </rule> <!-- === RULE:custom2: Determine the ZORK NODE we're installing === --> <rule> <custom2> <script> <![CDATA[ #!/bin/sh # Determine which NODE we are being installing as PATH="/bin:/sbin:/usr/bin:/usr/sbin" # Get a Kernel Command Line option. return value (after =) # or the command line option if it takes no arguments getkernopt() { sed -e 's/^.*\('$1'=\?[^[:space:]]*\).*$/\1/;s/^[^=]*=//' /proc/cmdline } PATH=/bin:/sbin:/usr/bin:/usr/sbin zorknode="$(getkernopt ZORKnode)" if [ -z "${zorknode}" ]; then echo "ERROR_NODE_NOT_SPECIFIED (kernel command line=[$(cat /proc/cmdline)])" 1>&2 else echo -n "${zorknode}" fi ]]> </script> <match>*</match> <match_type>exact</match_type> </custom2> <result> <profile>ZORKnode-@custom2@.xml</profile> <continue config:type="boolean">true</continue> </result> </rule> </rules> </autoinstall> ------------------------------------------------------------------------------------------------- -- Stephen Dowdy - Systems Administrator - NCAR/RAL 303.497.2869 - sdowdy@ucar.edu - http://www.ral.ucar.edu/~sdowdy/ -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org