summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Franzmann2022-05-23 19:31:21 +0200
committerFlorian Franzmann2022-05-23 19:31:21 +0200
commitfcbeaeee5ad8c439be32fb12212947fd1c961197 (patch)
tree750aafcbbf96468d399815eb3b26f5fb9acaece3
parent2d519732de78b2a21ff7d00d16a5fc6160e7b456 (diff)
disk/mdadm: add files missing from previous commit
-rw-r--r--disk/mdadm/HISTORY3
-rwxr-xr-xdisk/mdadm/INSTALL4
-rw-r--r--disk/mdadm/systemd/mdadm.service25
3 files changed, 31 insertions, 1 deletions
diff --git a/disk/mdadm/HISTORY b/disk/mdadm/HISTORY
index bd566f80a5..4fcfd28bc8 100644
--- a/disk/mdadm/HISTORY
+++ b/disk/mdadm/HISTORY
@@ -1,3 +1,6 @@
+2022-05-23 Florian Franzmann <bwlf@bandrate.org>
+ * INSTALL, systemd: add missing file from previous change
+
2022-05-20 Florian Franzmann <bwlf@bandrate.org>
* DEPENDS, INSTALL: optionally install systemd services
diff --git a/disk/mdadm/INSTALL b/disk/mdadm/INSTALL
index f0f41df977..d15bf0f96d 100755
--- a/disk/mdadm/INSTALL
+++ b/disk/mdadm/INSTALL
@@ -1,7 +1,9 @@
default_install &&
if is_depends_enabled $SPELL systemd; then
- make DESTDIR="$INSTALL_ROOT" install-systemd
+ make DESTDIR="$INSTALL_ROOT" install-systemd &&
+ install -m644 -o root -g root "$SPELL_DIRECTORY"/systemd/mdadm.service \
+ "$INSTALL_ROOT"/lib/systemd/system/
fi &&
install -m 755 mdadm.static "${INSTALL_ROOT}/sbin/mdadm.static"
diff --git a/disk/mdadm/systemd/mdadm.service b/disk/mdadm/systemd/mdadm.service
new file mode 100644
index 0000000000..b4c5f7be64
--- /dev/null
+++ b/disk/mdadm/systemd/mdadm.service
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Assemble Software-RAID Devices
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=local-fs.target shutdown.target
+OnFailure=emergency.target
+OnFailureJobMode=replace-irreversibly
+
+[Install]
+WantedBy=local-fs.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/sbin/mdadm.static --assemble --scan
+TimeoutSec=0