mirror of
https://github.com/democratic-csi/democratic-csi.git
synced 2026-10-06 10:41:21 +02:00
proper logic for using simple-file-writer
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
@@ -2025,17 +2025,17 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
|
||||
*/
|
||||
|
||||
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
|
||||
command = execClient.buildCommand("simple-file-writer", [
|
||||
"1",
|
||||
`/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;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user