RE: [opensuse-autoinstall] RE: implement minimum hardware checking
Sorry not but i think you are able to use the ask function of autoyast. http://doc.opensuse.org/projects/autoyast/configuration.html#CreateProfile.A... See basically create a minimum install profile menationed in http://users.suse.com/~ug/AutoYaST_FAQ.html section: 1.4 What is smallest autoyast profile that makes sense? and combine that with the ask profile. Now you should have your minimum profile with a box that tells the user that the install faild because of ... and he can do nothing or reboot .... BTW: Why not using the rules.xml and a script within to tell the user that the installation failed ? hth Hajo -----Original Message----- From: Taluskie, Vincent [mailto:Vincent.Taluskie@emc.com] Sent: Thursday, January 17, 2013 8:16 PM To: Hans-Joachim Ehlers Subject: Re: [opensuse-autoinstall] RE: implement minimum hardware checking Thanks for your response, I will continue with the rules approach. The main profile I have now focuses on a successful install of my application. I need the simplest profile for failure that doesn't try to install any software - just abort with an error message. Is there an example of a simple failure profile you've seen? Vince On Jan 17, 2013, at 11:58 AM, Hans-Joachim Ehlers wrote:
-- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Hans & AutoInstallers, I had some success but also significant frustration handling this need. I've tried a standard rules.xml matching greater/lower standard elements like memsize and disksize but the boolean 'and' operation seems to only check two out of three requirements and the y2log entries led me to think it might be a bug (tho I am required to use this version of SUSE). I switched gears and now I've got a rules.xml file with a custom rule to check hardware configuration. I can run the script within the <source> tag without error on systems and see the expected results. I cannot seem to get it to function correctly within the AutoInstallation environment of SUSE 11 SP1. I continually get 'cannot convert value to type 'string'. I've included the rules.xml and a screen shot from my vmware installation shell at what looks to be the right part of the y2log file. It looks like since it can't convert my script into a string that it passes a nil name to the profile and then the install aborts with: "Is a directoryDocument is empty Start tag expected '<' not found. I'm using CDATA so escaping should not be an issue….I've separately debugged the pass.xml and fail.xml profiles and they are not even getting called at this point. Below I've included the rules.xml and y2log - I would appreciate advice from Autoinstallers on this error and how to get it working. Thanks & Cheers, Vince <autoinstall xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.su se.com/1.0/configns<http://se.com/1.0/configns>"> <rules config:type="list"> <rule> <custom1> <script> <debug config:type="boolean">true</debug> <source><![CDATA[#!/bin/bash mem=`cat /proc/meminfo | grep MemTotal | awk '{print $2}' ` diska=`cat /proc/partitions | grep sda$ | awk {'print $3'} ` diskb=`cat /proc/partitions | grep sdb$ | awk {'print $3'} ` # if pass if [ $mem -gt 8000000 ] && [ $diska -gt 39999999 ] && [ $diskb -gt 69999999 ] then echo -n '0' else #if fail echo -n '1' fi ]]></source> </script> <match>0</match> <match_type>exact</match_type> </custom1> <result> <profile>pass.xml</profile> <continue config:type="boolean">false</continue> </result> </rule> <rule> <custom1> <script> <debug config:type="boolean">true</debug> <source><![CDATA[#!/bin/bash mem=`cat /proc/meminfo | grep MemTotal | awk '{print $2}' ` diska=`cat /proc/partitions | grep sda$ | awk {'print $3'} ` diskb=`cat /proc/partitions | grep sdb$ | awk {'print $3'} ` # if pass if [ $mem -gt 8000000 ] && [ $diska -gt 39999999 ] && [ $diskb -gt 69999999 ] then echo -n '0' else #if fail echo -n '1' fi ]]></source> </script> <match>1</match> <match_type>exact</match_type> </custom1> <result> <profile>fail.xml</profile> <continue config:type="boolean">false</continue> </result> </rule> </rules> </autoinstall> [cid:F2D58A76-5B8F-4E31-B914-251C9C1ABD5B@corp.emc.com] On Jan 17, 2013, at 12:37 PM, Hans-Joachim Ehlers wrote: Sorry not but i think you are able to use the ask function of autoyast. http://doc.opensuse.org/projects/autoyast/configuration.html#CreateProfile.A... See basically create a minimum install profile menationed in http://users.suse.com/~ug/AutoYaST_FAQ.html section: 1.4 What is smallest autoyast profile that makes sense? and combine that with the ask profile. Now you should have your minimum profile with a box that tells the user that the install faild because of ... and he can do nothing or reboot .... BTW: Why not using the rules.xml and a script within to tell the user that the installation failed ? hth Hajo -----Original Message----- From: Taluskie, Vincent [mailto:Vincent.Taluskie@emc.com] Sent: Thursday, January 17, 2013 8:16 PM To: Hans-Joachim Ehlers Subject: Re: [opensuse-autoinstall] RE: implement minimum hardware checking Thanks for your response, I will continue with the rules approach. The main profile I have now focuses on a successful install of my application. I need the simplest profile for failure that doesn't try to install any software - just abort with an error message. Is there an example of a simple failure profile you've seen? Vince On Jan 17, 2013, at 11:58 AM, Hans-Joachim Ehlers wrote: -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
participants (2)
-
Hans-Joachim Ehlers
-
Taluskie, Vincent