aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/mdadm/Makefile
diff options
context:
space:
mode:
authorDaniel Dickinson <openwrt@daniel.thecshore.com>2015-10-15 06:23:26 -0400
committerJo-Philipp Wich <jo@mein.io>2016-05-18 22:17:28 +0200
commit3e08637e878c32a40cdcb84c6030fcdd0cb88196 (patch)
tree480ba0f2b6593c3cc5989d5e8d2639100713dc69 /package/utils/mdadm/Makefile
parent3015af96475ad135ecb55b7c1f794191e3d4a587 (diff)
downloadupstream-3e08637e878c32a40cdcb84c6030fcdd0cb88196.tar.gz
upstream-3e08637e878c32a40cdcb84c6030fcdd0cb88196.tar.bz2
upstream-3e08637e878c32a40cdcb84c6030fcdd0cb88196.zip
mdadm: Fix missing conffile and add initscript
Start arrays on boot, stop them on shutdown, and enable monitoring to syslog. Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Diffstat (limited to 'package/utils/mdadm/Makefile')
-rw-r--r--package/utils/mdadm/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/utils/mdadm/Makefile b/package/utils/mdadm/Makefile
index 69eec5b389..0d5848c218 100644
--- a/package/utils/mdadm/Makefile
+++ b/package/utils/mdadm/Makefile
@@ -33,6 +33,11 @@ define Package/mdadm/description
A tool for managing Linux Software RAID arrays.
endef
+define Package/mdadm/conffiles
+/etc/mdadm.conf
+/etc/config/mdadm
+endef
+
TARGET_CFLAGS += -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections
@@ -47,6 +52,10 @@ endef
define Package/mdadm/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mdadm $(1)/sbin
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/mdadm.init $(1)/etc/init.d/mdadm
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DATA) ./files/mdadm.config $(1)/etc/config/mdadm
endef
$(eval $(call BuildPackage,mdadm))