Setting RAID status as inactive after deactivation.

This commit is contained in:
Caio Carvalho 2018-08-24 12:03:24 -03:00
parent d676c8c504
commit aaffe54161
1 changed files with 7 additions and 1 deletions

View File

@ -49,9 +49,15 @@ bool DeactivateVolumeGroupJob::run(Report& parent)
partition->setMounted(false);
}
}
else if (device().type() == Device::Type::SoftwareRAID_Device)
else if (device().type() == Device::Type::SoftwareRAID_Device) {
rval = SoftwareRAID::stopSoftwareRAID(*report, device().deviceNode());
if (rval) {
SoftwareRAID *raid = static_cast< SoftwareRAID* >(&device());
raid->setStatus(SoftwareRAID::Status::Inactive);
}
}
jobFinished(*report, rval);
return rval;