diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2008-10-17 16:19:46 -0700 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2008-10-17 16:19:46 -0700 |
commit | 3e6a15a97881f82bc615eea5075902b038cca4dc (patch) | |
tree | 8cd5eed464e31514375fc396970768d45d95fee1 | |
parent | 41d4dc6644f73b9f3f75103fab03eeb38189265b (diff) | |
download | vyatta-cfg-3e6a15a97881f82bc615eea5075902b038cca4dc.tar.gz vyatta-cfg-3e6a15a97881f82bc615eea5075902b038cca4dc.zip |
Bugfix: 3655
Unload unused RAID modules.
-rwxr-xr-x | etc/init.d/vyatta-ofr | 14 |
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 $? |