[opensuse-autoinstall] Use Harddisk only if empty
Hello, I plan to install machines with 2 harddisks via autoyast. The second disk should be mounted into a specific directory. Can I configure autoyast in that way that it looks if: - the second disk is empty: Format it and mount it - if the second disk is NOT empty but has a specific disk label: mount it - if the second disk is NOT empty and the disklabel us unknown: Leave it as it is Can this be done with autoyast? Regards Daniel -- Daniel Spannbauer Systemadministration marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Late reply, but it can be done by rules with custom scripts: <rule> <custom1> <script> <![CDATA[ #!/bin/sh echo -n known_label ]]> </script> <match>blabla</match> <match_type>exact</match_type> </custom1> <result> <profile>profiles/some_profile.xml</profile> </result> </rule> In the script you can do whatever you like, i.e., look for the second harddisk, check if it's partitioned, check if it has a label. At the end output sth. according to your results. Say that you script has three possible outputs "empty/formatted/unknown_label". Then you need to repeat the above block three times, with different match-values and the profile you would like to have for each of the values. In these profiles you put the different profiles for formatting/partitioning, just mount the harddisk or leaving it alone. -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
participants (2)
-
Daniel Spannbauer
-
Frank Steiner