Commit 1a62591f authored by Natanael Copa's avatar Natanael Copa

setup-disk: add raidmodules to /etc/modules if needed

parent c23761a2
......@@ -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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment