proper logic for using simple-file-writer
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
c6c1f1a264
commit
a8a20b9690
|
|
@ -2025,17 +2025,17 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (process.env.DEMOCRATIC_CSI_IS_CONTAINER == "true") {
|
if (process.env.DEMOCRATIC_CSI_IS_CONTAINER == "true") {
|
||||||
// TODO: syntax fails with sudo
|
|
||||||
command = execClient.buildCommand("sh", [
|
|
||||||
"-c",
|
|
||||||
`echo 1 > /sys/kernel/scst_tgt/devices/${kName}/resync_size`,
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
// use the built-in wrapper script that works with sudo
|
// use the built-in wrapper script that works with sudo
|
||||||
command = execClient.buildCommand("simple-file-writer", [
|
command = execClient.buildCommand("simple-file-writer", [
|
||||||
"1",
|
"1",
|
||||||
`/sys/kernel/scst_tgt/devices/${kName}/resync_size`,
|
`/sys/kernel/scst_tgt/devices/${kName}/resync_size`,
|
||||||
]);
|
]);
|
||||||
|
} else {
|
||||||
|
// TODO: syntax fails with sudo
|
||||||
|
command = execClient.buildCommand("sh", [
|
||||||
|
"-c",
|
||||||
|
`echo 1 > /sys/kernel/scst_tgt/devices/${kName}/resync_size`,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
reload = true;
|
reload = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue