Open subzero79 opened 5 years ago
@subzero79 Sure, $this->getData() since they are in the same class.
Just in case someone steps into the same error
Unable to remove encrypted device: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; dd if=/dev/urandom of='/dev/vdh' bs=512 count='' 2>&1' with exit code '1': dd: invalid number: ‘’
Error #0:
OMV\Exception: Unable to remove encrypted device: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; dd if=/dev/urandom of='/dev/vdh' bs=512 count='' 2>&1' with exit code '1': dd: invalid number: ‘’ in /usr/share/openmediavault/engined/rpc/luks.inc:440
Stack trace:
#0 [internal function]: OMVRpcServiceLuksMgmt->deleteContainer(Array, Array)
#1 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#2 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('deleteContainer', Array, Array)
#3 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('LuksMgmt', 'deleteContainer', Array, Array, 1)
#4 {main}
Again same as issue #26 luks2 dumps the output differently from luks1, this fails to parse the header offset. This makes dd fails as there is no count value argument
LUKS1
LUKS2
For now just depending on the luks version will set header to 4KB for v1, and 16MB for luks2
This should go on remove method of luks container instance, feels like duplicate code since version is already gathered at getData(),
@ryecoaaron is there a way of calling the getData() function inside remove() ?