Re: Use Harddisk only if empty
Frank Steiner <[email protected]> Tue, 23 Oct 2018 12:22:49 +0200
| Newsgroups | gmane.linux.suse.autoinstall |
|---|---|
| Message-ID | <[email protected]> |
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: [email protected]
To contact the owner, e-mail: [email protected]