PKG_NAME:=mdadm
PKG_VERSION:=4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
define Package/mdadm/description
A tool for managing Linux Software RAID arrays.
- RAID 0, 1 and 10 support included.
- If you need RAID 4,5 or 6 functionality please
+ RAID 0, 1 and 10 support included.
+ If you need RAID 4,5 or 6 functionality please
install kmod-md-raid456 .
endef
define Package/mdadm/conffiles
-/etc/mdadm.conf
/etc/config/mdadm
endef
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS -DCONFFILE="/var/etc/mdadm.conf" -DMAP_DIR="/var/run/mdadm" -DMDMON_DIR="/var/run/mdadm" -DFAILED_SLOTS_DIR="/var/run/mdadm/failed-slots"
TARGET_LDFLAGS += -Wl,--gc-sections
define Build/Compile
local cfg="$1"
local email devices
- if [ -x /sbin/sendmail ]; then
- append_option email "$cfg" email "MAILADDR"
-
+ if [ -x /usr/sbin/sendmail ]; then
+ config_get email "$cfg" email
+ [ -n "$email" ] && printf "MAILADDR %s\n" "$email" >> $CONF
fi
- append_option devices "$cfg" devices DEVICE " "
-
- printf "%s\n%s\n" "$email" "$devices" >> $CONF
+ config_list_foreach "$cfg" devices append_list_item devices " "
+ [ -n "$devices" ] && printf "DEVICE %s\n" "$devices" >> $CONF
}
mdadm_array() {