omv-<commands> and helper functions

  • Hi!

    I'm trying to create plugin. (And yes I've read the outdated guide)

    I have a few simple questions.

    What does "omv-mkconf" do and how is it different from "omv-confdbadm create"?
    Why would "omv-mkconf" appear in a postrm i.e. for…


    I'd like to know if there is any documentation about the different cli commands with the "omv-" prefix. It seems quite a lot of guides are outdated.

    If there isn't any, I'd like to make one (because it'll help me in the future) but I would need help.


    I've also noticed that these commands have very unhelpful help messages. Perhaps a creation of man pages would help the community? (Again I could take part)


    If there is any place I can start gathering info, a redirection is very much appreciated!


    Many thanks

  • tinnick

    Hat das Label OMV 5.x hinzugefügt.
  • Turns out, omv-mkconf runs what ever script you have in /usr/share/openmediavault/mkconf.

    So, omv-mkconf ssh will run /usr/share/openmediavault/mkconf/ssh which runs all the scripts using run-parts in /usr/share/openmediavault/mkconf/ssh.d/*.


    These scripts will read from ${OMV_CONFIG_FILE} which is /etc/openmediavault/config.xml, and apply the defined settings to each appropriate config file scattered among the filesystem (for example, ssh configurations are written to /etc/ssh/sshd_config). The reading from the config.xml file is done by using a handy tool called XMLStarlet . (Though I am not farmiliar with it...)


    omv-confdbadm create on the other hand will create the basic structure of the said config.xml from an interface described in JSON format.

    These interfaces exists in /usr/share/openmediavault/datamodels directory, which will be read by the PHP side of OMV where RPC's and modules will use for parameter validations before writing to config.xml.


    As of now, I am not sure how config.xml is being read on the PHP side.


    I hope this helps if anyone comes across similar roadblocks.

  • tinnick

    Hat das Label von OMV 5.x auf OMV 4.x geändert.
  • tinnick

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!