mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +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;
|
||||
};
|
||||
|
||||
extraIscsiCommands = mkOption {
|
||||
description = "Extra iscsi commands to run in the initrd.";
|
||||
default = "";
|
||||
type = lines;
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
description = "Extra lines to append to /etc/iscsid.conf";
|
||||
default = null;
|
||||
|
@ -162,6 +168,9 @@ in
|
|||
'' else ''
|
||||
iscsiadm --mode node --targetname ${escapeShellArg cfg.target} --login
|
||||
''}
|
||||
|
||||
${cfg.extraIscsiCommands}
|
||||
|
||||
pkill -9 iscsid
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue