Don't enable read-write on RAID 0, thanks to Caspar Smit

This commit is contained in:
Jamie Cameron
2010-02-23 15:13:12 -08:00
parent 0de3847833
commit 7d9a4bf583

View File

@@ -365,8 +365,10 @@ else {
local $out = &backquote_logged("$cmd 2>&1 </dev/null");
# After creating a RAID set mode to read/write.
local $cmd = "mdadm --readwrite $_[0]->{'value'}";
local $out = &backquote_logged("$cmd 2>&1 </dev/null");
if ($lvl ne '0') {
local $cmd = "mdadm --readwrite $_[0]->{'value'}";
local $out = &backquote_logged("$cmd 2>&1 </dev/null");
}
return $? ? &text('emdadmcreate', "<pre>$out</pre>") : undef;
}