Skip to content

Commit

Permalink
chore: add mender-client-data-dir.service file
Browse files Browse the repository at this point in the history
Both the mender-authd.service and mender-udpated.service files require a
mender-client-data-dir.service file. However, this isn't provided by the
mender package. This file currently resides in the meta-mender directory
under the name mender-data-dir.service.

  - Move the mender-data-dir.service file into the mender project.
  - Rename mender-data-dir.service to mender-client-data-dir.service.
  - Remove mender-client.service from "Before" and "WantedBy" as
    mender-client is now mender-authd and mender-updated respectively.

Changelog: None
Ticket: None

Signed-off-by: Adam Duskett <[email protected]>
  • Loading branch information
aduskett committed Nov 15, 2024
1 parent 5bbe2d3 commit 3e1435a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ set(MODULES_ARTIFACT_GENERATORS
set(SYSTEMD_UNITS
mender-updated.service
mender-authd.service
mender-client-data-dir.service
)

install(PROGRAMS ${INVENTORYSCRIPTS}
Expand Down
14 changes: 14 additions & 0 deletions support/mender-client-data-dir.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Mender persistent data dir
After=data.mount
Before=mender-authd.service mender-updated.service
ConditionPathExists=!/data/mender

[Service]
Type=oneshot
User=root
Group=root
ExecStart=/bin/mkdir -p -m 0700 /data/mender

[Install]
WantedBy=mender-authd.service mender-updated.service

0 comments on commit 3e1435a

Please sign in to comment.