[opensuse-autoinstall] Does autoyast run the rules process before ask?
Hi, I have searched everywhere and I can't find this documented clearly. When the rules processing is done by autoyast, I can supply a custom1 class based upon a shell script. I have an ask section in the autoyast profile that queires the user for the type of install to be done. Based upon that value that I store to a file on the temporary ramdisk (/mnt), I want to have the rule get the right class to merge. But the docs don't really say whether the rule is executed before or after the ask. If ask does run afterwards, how can I get a user supplied value that can be queried by the rule/calls based scripts? And the docs say thathe rules/class script can check for things like host IP and such. But how can the IP exist of the autoinstall hasn't run yet? Unless I am reading the docs incorrectly and the autoyast profile runs, then the rules are evaluated? So I could have my ask get the user's asnwer, put it in the file on the ramdisk and have rules/class sectin query the file? Thanks for any help. Stacey -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Sorry, I forgot to mention that I am on SLES 10 SP2. And the reason I need to do this is for a turnkey product we are releasing to our customers. We have different configs that take different partition setups, so I need to be able to say, when user picks an entry config, to use the entry partioning class to merge into the profile. When SA is picked, use SA partioining.xml, etc ... This will be off-site so it has to be fairly automated within the choices of pre-configured choices we offer. Regards, -----Original Message----- From: Stacey Murphy [mailto:Stacey.Murphy@ericsson.com] Sent: August-03-09 4:04 AM To: opensuse-autoinstall@opensuse.org Subject: [opensuse-autoinstall] Does autoyast run the rules process before ask? Hi, I have searched everywhere and I can't find this documented clearly. When the rules processing is done by autoyast, I can supply a custom1 class based upon a shell script. I have an ask section in the autoyast profile that queires the user for the type of install to be done. Based upon that value that I store to a file on the temporary ramdisk (/mnt), I want to have the rule get the right class to merge. But the docs don't really say whether the rule is executed before or after the ask. If ask does run afterwards, how can I get a user supplied value that can be queried by the rule/calls based scripts? And the docs say thathe rules/class script can check for things like host IP and such. But how can the IP exist of the autoinstall hasn't run yet? Unless I am reading the docs incorrectly and the autoyast profile runs, then the rules are evaluated? So I could have my ask get the user's asnwer, put it in the file on the ramdisk and have rules/class sectin query the file? Thanks for any help. Stacey -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
on Monday 03 August 2009 Stacey Murphy wrote:
When the rules processing is done by autoyast, I can supply a custom1 class based upon a shell script. I have an ask section in the autoyast profile that queires the user for the type of install to be done. Based upon that value that I store to a file on the temporary ramdisk (/mnt), I want to have the rule get the right class to merge. But the docs don't really say whether the rule is executed before or after the ask.
before. <ask> can have no influence on the rules. Martin Vogt asked for a feature implementation to change exactly that.
If ask does run afterwards, how can I get a user supplied value that can be queried by the rule/calls based scripts?
not possible. You can only replace the complete profile: http://www.suse.de/~ug/Examples/index.html read "the <ask> feature" part, which explains how to choose between complete profiles.
And the docs say thathe rules/class script can check for things like host IP and such. But how can the IP exist of the autoinstall hasn't run yet?
you are right. It makes only sense if you do an installtion via network or have raised the network at least (via linuxrc)
Unless I am reading the docs incorrectly and the autoyast profile runs, then the rules are evaluated? So I could have my ask get the user's asnwer, put it in the file on the ramdisk and have rules/class sectin query the file?
no, that's not possible currently but I'll think about it. -- ciao, Uwe Gansert Uwe Gansert SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug listening to: "Trauma" by Joachim Witt -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
HI Uwe, Thanks for the quick answers. In that case, since I know what the 3 choices are, could I modiy the linuxrc lilo/grub menu that first pops up offering the autoyast choice? Since what we are doing is offering an modified ISO image of the SUSE 10 SP2 stuff with a custome linuxrc file. This file has my choice of autoyast files for different nodes. If I have menu choices with a variable added on the initd line, say config=entry or config=SA, then could the rules file query the passed-in command line once the ram disk boots? I vaguely remember seeing something about /proc/comman_line being available once you have booted? So the script in rules could shell out and get this valu as a custom1, then I proceed with mixed rules/classes handling? Does this sound feasable? And would you know the steps needed? Thanks, Stacey -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
on Monday 03 August 2009 Stacey Murphy wrote:
In that case, since I know what the 3 choices are, could I modiy the linuxrc lilo/grub menu that first pops up offering the autoyast choice?
yes, just modify the boot/i386/loader/isolinux.cfg file and add your parameters there.
Since what we are doing is offering an modified ISO image of the SUSE 10 SP2 stuff with a custome linuxrc file. This file has my choice of autoyast files for different nodes. If I have menu choices with a variable added on the initd line, say config=entry or config=SA, then could the rules file query the passed-in command line once the ram disk boots?
yes, no problem. You'll find your parameters in /etc/install.inf and in /proc/cmdline
I vaguely remember seeing something about /proc/comman_line being available once you have booted? So the script in rules could shell out and get this valu as a custom1, then I proceed with mixed rules/classes handling?
Does this sound feasable? And would you know the steps needed?
all you need to do is changing the isolinux.cfg file and write a rule to parse/grep in /etc/install.inf or /proc/cmdline. Then you can create a new DVD. It's as easy as it sounds :) -- ciao, Uwe Gansert Uwe Gansert SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Uwe wrote
all you need to do is changing the isolinux.cfg file and write a rule to parse/grep in /etc/install.inf or /proc/cmdline. Then you can create a new DVD. It's as easy as it sounds :)
Thanks, Uwe. While waiting, I did more googling and then tried this out. It works for known, static params. But I still would be interested to see that feature implemented for dynamic values <smile>. Stacey -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
on Tuesday 04 August 2009 Stacey Murphy wrote:
But I still would be interested to see that feature implemented for dynamic values <smile>.
yeah, me too ;) It's on my TODO to look at it -- ciao, Uwe Gansert Uwe Gansert SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (2)
-
Stacey Murphy
-
Uwe Gansert