Apply-device-config script

Hi, I’m trying apply-device-config script on mender’s development version and in the documentation (How to make an apply-device-config script | Mender documentation) it says “See this article on Mender Hub” on installation section but it refs mender’s hub.

Any idea of how can I install it?


Wow, that’s early adoption, that documentation is being written as we speak! :grinning_face_with_smiling_eyes:

More info will be available soon, but if you want to try, you need to use the master branch of meta-mender or mender-convert, depending on which one you use.

  • For meta-mender:
    • Add IMAGE_INSTALL_append = " mender-configure". This installs the Update Module that Mender needs.
    • You can also add mender-configure-scripts if you want to try the timezone script instead of making your own.
  • For mender-convert:
    • Make a config file, set MENDER_ADDON_CONFIGURE_INSTALL=y and include it with -c when building the image.

This is very bleeding edge, so don’t expect this process to be perfectly smooth yet. It will be part of Mender 2.7 however, which is right around the corner.

I have finally install the module following this steps:

  1. wget
  2. cd mender-configure-module && sudo make install
  3. Create /usr/lib/mender-configure/apply-device-config.d directory if it’s not created.
  4. Add your scripts on the previous directory.

I tried to use the timezone script and it worked successfully!

user@device:/var/lib/mender-configure$ sudo cat device-config.json
“timezone”: “Japan”
}user@device:/var/lib/mender-configure$ date
jue mar 25 17:01:48 JST 2021

1 Like

That’s great! I’m happy you succeeded with it!