From 3e6a15a97881f82bc615eea5075902b038cca4dc Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Fri, 17 Oct 2008 16:19:46 -0700 Subject: Bugfix: 3655 Unload unused RAID modules. --- etc/init.d/vyatta-ofr | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'etc') 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 $? -- cgit v1.2.3