Skip to content

Commit

Permalink
mxraid: 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 behing 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 Jun 30, 2023
1 parent 8367eee commit 2fbec8d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 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
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 2fbec8d

Please sign in to comment.