Skip to content

Commit

Permalink
mxraid, mxmount: Start before basic.target
Browse files Browse the repository at this point in the history
There is a race when other services want to use local amd paths. All
services order behind basic.target per default, so move mxraid and
mxmount before it.

Also make mxraid.startup.service and mxraid.shutdown.service into one
but temporarily keep mxraid.shutdown.service for running systems.

Use systemd-udev-settle.service instead of our udev-settled.target,
which can be removed in a later commit.
  • Loading branch information
donald committed Jul 4, 2023
1 parent 2fec073 commit f0197af
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ install_exec pkgadmin/pkgadmin "$DESTDIR$usr_sbindir/p
install_cron pkgadmin/crond-pkgadmin-update "$DESTDIR$crond_dir/pkgadmin-update"
install_exec mxraid/mxraid "$DESTDIR$usr_sbindir/mxraid"
install_exec mxraid/mxraid_assemble "$DESTDIR$usr_sbindir/mxraid_assemble"
install_data mxraid/mxraid.startup.service "$DESTDIR$systemdunitdir/mxraid.startup.service"
install_data mxraid/mxraid.service "$DESTDIR$systemdunitdir/mxraid.service"
install_data mxraid/mxraid.shutdown.service "$DESTDIR$systemdunitdir/mxraid.shutdown.service"
install_exec mxraid/mdcheck.safe "$DESTDIR$usr_bindir/mdcheck.safe"
install_cron mxraid/crond-mdcheck "$DESTDIR$crond_dir/mdcheck"
Expand Down
5 changes: 4 additions & 1 deletion mxmount/mxmount.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[Unit]
After=mxraid.startup.service
DefaultDependencies=no
ConditionPathExists=/etc/mxmounts
Before=local-fs.target
After=systemd-udev-settle.service
Wants=systemd-udev-settle.service

[Service]
Type=oneshot
Expand Down
16 changes: 16 additions & 0 deletions mxraid/mxraid.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
DefaultDependencies=no
After=systemd-udev-settle.service
Wants=systemd-udev-settle.service
Before=mxmount.service
Conflicts=shutdown.target
Before=shutdown.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/mxraid start
ExecStop=/usr/sbin/mxraid stop

[Install]
WantedBy=local-fs.target
7 changes: 0 additions & 7 deletions mxraid/mxraid.startup.service

This file was deleted.

0 comments on commit f0197af

Please sign in to comment.