Home_greyopenFATE - openSUSE feature tracking > #305313
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

creating nonexistent directories with Autoyast

Feature state



from Bug #429491

It should be possible to create directories just like files with its
permissions and ownership. Today it is impossible (using just "files") to put
for example /root/.ssh/authorized_keys.

To anticipate possible comments, the "file_script" is not IMHO the right way to
deal with the problem since it is invoked after writing the file to a
filesystem. Yet it may be considered a workaround as of today.


  • Add these lines to XML file:
    <profile xmlns="http://www.suse.com/1.0/yast2ns " xmlns:config="http://www.suse.com/1.0/configns">
    <files config:type="list">
    <file_pat>/tmp/bla </file_path>
    <file_permissions>644 </file_permissions>
  • then run: yast2 ayast_setup setup filename=[path to xml file]
  • now you can check if file was created
  • ! <file_pat>/tmp/bla </file_path> is a file <file_pat>/tmp/bla/ </file_path> is a directory, give attention to the trailing /


icons/user_comment.png F. L. wrote: (9 years ago)

up for Engineering's comment. Is workaround adequate ?

icons/user_comment.png M. R. wrote: (9 years ago)

The workaround is effective but technically not adequate. We should support creating directories like we do it for files. The request is off the mailinglist and makes sense.

icons/user_comment.png S. V. wrote: (9 years ago)

Isn't it better to have support for untarring root.tar.gz to the filesystem like kiwi does?

icons/user_comment.png U. G. wrote: (9 years ago)

the idea of untaring a tgz is actually not that bad but in this case I'd prefer to keep it simple. A tgz needs to be stored in base64 format inside of the XML and it's not obvious what's in it by looking at the XML file. Changing something in that is a bit complex too, compared to simply use a text editor and change the XML file.
People who need to add so many files/dirs that it's too much for the "files" section can do that with a tgz+scripts combination already. For smaller changes (which is enough for many customers from my experience) the clearly represented "files" section is better I think because you can see immediately what happens just by looking at the XML file.

Last change: 9 years ago
Loading tags...
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint