From 1a62591fa4176e9068e89f52194c4bac29e529a0 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 3 May 2011 08:34:01 +0000 Subject: [PATCH 2/2] setup-disk: add raidmodules to /etc/modules if needed --- setup-disk.in | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/setup-disk.in b/setup-disk.in index ffbbc43..b27f76b 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -564,12 +564,20 @@ setup_var() { rmdir /.var /etc/init.d/syslog --quiet restart + setup_mdadm_conf } setup_mdadm_conf() { + local mods= mod= if [ -n "$USE_RAID" ]; then mdadm --detail --scan > /etc/mdadm.conf rc-update --quiet add mdadm-raid boot + mods=$(awk '/^raid/ {print $1}' /proc/modules) + for mod in $mods; do + if ! grep -q "^$mod" /etc/modules; then + echo $mod >> /etc/modules + fi + done fi } -- 1.7.4.5