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.
  • Loading branch information
donald committed Jul 1, 2023
1 parent e6e6aa7 commit eb25a2a
Show file tree
Hide file tree
Showing 4 changed files with 19 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
3 changes: 2 additions & 1 deletion mxmount/mxmount.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Unit]
After=mxraid.startup.service
DefaultDependencies=no
ConditionPathExists=/etc/mxmounts
Before=local-fs.target

[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=udev-settled.target
Wants=udev-settled.target
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 eb25a2a

Please sign in to comment.