summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2008-10-17 16:19:46 -0700
committerBob Gilligan <gilligan@vyatta.com>2008-10-17 16:19:46 -0700
commit3e6a15a97881f82bc615eea5075902b038cca4dc (patch)
tree8cd5eed464e31514375fc396970768d45d95fee1
parent41d4dc6644f73b9f3f75103fab03eeb38189265b (diff)
downloadvyatta-cfg-3e6a15a97881f82bc615eea5075902b038cca4dc.tar.gz
vyatta-cfg-3e6a15a97881f82bc615eea5075902b038cca4dc.zip
Bugfix: 3655
Unload unused RAID modules.
-rwxr-xr-xetc/init.d/vyatta-ofr14
1 files changed, 14 insertions, 0 deletions
diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr
index 87b3cf9..75a03b4 100755
--- a/etc/init.d/vyatta-ofr
+++ b/etc/init.d/vyatta-ofr
@@ -119,6 +119,19 @@ load_bootfile ()
fi
}
+
+# Unload the RAID modules that we are not using. It is safe to try to
+# unload all of the RAID modules. The kernel will refuse to unload any
+# that we are actually using.
+#
+cleanup_raid()
+{
+ MD_MODULES='linear multipath raid0 raid1 raid456 raid5 raid6 raid10'
+ rmmod $MD_MODULES > /tmp/vyatta_raid_cleanup_log 2>&1
+}
+
+
+
start ()
{
log_action_begin_msg "Mounting Vyatta Config"
@@ -133,6 +146,7 @@ start ()
${vyatta_sbindir}/${s}.init start || (log_end_msg $? && return)
done
load_bootfile
+ cleanup_raid
chmod g-w,o-w /
log_end_msg $?