mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
iscsi root initiator: allow specifying arbitrary iscsi commands too
This commit is contained in:
parent
829bbc708b
commit
a85dcd9ca3
1 changed files with 9 additions and 0 deletions
|
@ -64,6 +64,12 @@ in
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraIscsiCommands = mkOption {
|
||||||
|
description = "Extra iscsi commands to run in the initrd.";
|
||||||
|
default = "";
|
||||||
|
type = lines;
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
description = "Extra lines to append to /etc/iscsid.conf";
|
description = "Extra lines to append to /etc/iscsid.conf";
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -162,6 +168,9 @@ in
|
||||||
'' else ''
|
'' else ''
|
||||||
iscsiadm --mode node --targetname ${escapeShellArg cfg.target} --login
|
iscsiadm --mode node --targetname ${escapeShellArg cfg.target} --login
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
${cfg.extraIscsiCommands}
|
||||||
|
|
||||||
pkill -9 iscsid
|
pkill -9 iscsid
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue