Autoyast removes comments in autoinst.xml?
Hello, I set a comment with "<!-- comment -->" in my autoinst.xml to replace it with a pre script with thome xml snipplets. But when I check the file at installation time at /tmp/profile/, the comment is deleted, all other comments also. Can I prevent autoyast from doing that? 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
Am 5/12/21 um 11:14 AM schrieb Daniel Spannbauer:
Hello,
I set a comment with "<!-- comment -->" in my autoinst.xml to replace it with a pre script with thome xml snipplets.
But when I check the file at installation time at /tmp/profile/, the comment is deleted, all other comments also.
Can I prevent autoyast from doing that?
Ok, it deletes not only the comments, it beautifies the whole xml, so xml tags set in a row like "</partitions></driver>" are splited. Can I set any marker in a xml file, which is not destroyed by 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
El miércoles, 12 de mayo de 2021 10:41:26 (WEST) Daniel Spannbauer escribió: [..]
Ok, it deletes not only the comments, it beautifies the whole xml, so xml tags set in a row like "</partitions></driver>" are splited.
Can I set any marker in a xml file, which is not destroyed by autoyast?
Hi Daniel, You are right, the AutoYaST preprocessing is rather complex and, at the end, it "regenerates" the profile in text form. This regenerated profile does not have comments, has additional annotations (t= attributes), and so on. There is no way to change such a behavior, but I hope we can find a different way of implementing what you need. It would be nice to know more details about what you are trying to achieve. For instance, you can put a placeholder like this: <password>%USERPASSWORD%</password> which is valid XML, is not a comment and can be easily replaced. But I guess your use-case could be more complex. BTW, which (open)SUSE version are you using? Regards, Imo -- Imobach González Sosa YaST Team at SUSE LLC https://imobachgs.github.io/
Am 5/12/21 um 12:51 PM schrieb Imobach Gonzalez Sosa:
El miércoles, 12 de mayo de 2021 10:41:26 (WEST) Daniel Spannbauer escribió:
[..]
Ok, it deletes not only the comments, it beautifies the whole xml, so xml tags set in a row like "</partitions></driver>" are splited.
Can I set any marker in a xml file, which is not destroyed by autoyast? Hi Daniel,
You are right, the AutoYaST preprocessing is rather complex and, at the end, it "regenerates" the profile in text form. This regenerated profile does not have comments, has additional annotations (t= attributes), and so on.
There is no way to change such a behavior, but I hope we can find a different way of implementing what you need. It would be nice to know more details about what you are trying to achieve.
For instance, you can put a placeholder like this:
<password>%USERPASSWORD%</password>
which is valid XML, is not a comment and can be easily replaced. But I guess your use-case could be more complex.
BTW, which (open)SUSE version are you using?
Hello, we use the same custom installation media on several hardware, so I adopt the profile with xml snipplets according to the hardware, mainly the partitioning. If there are 2 harddisks found, I add a snipplet for the second disk. Now, we changed the partitioning. If there is a second disk, we configure a lvm with the last partition of the first disk and the second disk. So I have to change the last partition on the first disk, the second disk and create a lvm over them. We use Leap 15.2 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
El miércoles, 12 de mayo de 2021 12:40:36 (WEST) Daniel Spannbauer escribió:
Hello,
Hello Daniel,
we use the same custom installation media on several hardware, so I adopt the profile with xml snipplets according to the hardware, mainly the partitioning.
If there are 2 harddisks found, I add a snipplet for the second disk.
Now, we changed the partitioning. If there is a second disk, we configure a lvm with the last partition of the first disk and the second disk. So I have to change the last partition on the first disk, the second disk and create a lvm over them.
We use Leap 15.2
Well, I guess that instead of a comment, you can replace a section like this: <drive><device>/dev/sda</device></drive> Or rewrite the whole <partitioning> section. Or even rewrite just the closing "</drive>" tag with "</drive><drive>...". I mean, you do not really need a comment at all, although I understand it might be easier. Thanks! Regards, Imo -- Imobach González Sosa YaST Team at SUSE LLC https://imobachgs.github.io/
Am 5/13/21 um 7:40 AM schrieb Imobach Gonzalez Sosa:
Well, I guess that instead of a comment, you can replace a section like this:
<drive><device>/dev/sda</device></drive>
Or rewrite the whole <partitioning> section. Or even rewrite just the closing "</drive>" tag with "</drive><drive>...". I mean, you do not really need a comment at all, although I understand it might be easier.
Thanks!
Regards, Imo
Hi Imo, I got it. I splitted my xml snipplet in several parts and glued it into the xml. Works for now. But now there is another question :) SO, I will write an additional mail. 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
participants (2)
-
Daniel Spannbauer
-
Imobach Gonzalez Sosa