diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-05-03 08:34:01 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-05-03 08:34:01 +0000 |
commit | 1a62591fa4176e9068e89f52194c4bac29e529a0 (patch) | |
tree | 71639fc6c94a2f92dd6820af426c8e910253f369 | |
parent | c23761a2c183f30c22a1811ba2e13b4c933f744f (diff) | |
download | alpine-conf-1a62591fa4176e9068e89f52194c4bac29e529a0.zip |
setup-disk: add raidmodules to /etc/modules if needed
-rw-r--r-- | 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 } |