aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/run-firecracker-vm
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/run-firecracker-vm')
-rw-r--r--pkgs/run-firecracker-vm/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/run-firecracker-vm/default.nix b/pkgs/run-firecracker-vm/default.nix
index 223654a..f77520e 100644
--- a/pkgs/run-firecracker-vm/default.nix
+++ b/pkgs/run-firecracker-vm/default.nix
@@ -320,8 +320,8 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ ''
# when the guest exits, or with --store, to FILE, which keeps it across
# boots (created if it doesn't exist, of --store-size, default 16G; the
# file is sparse, so that's only an upper limit).
- # The guest's egress goes by the user's whitelist LIST (default:
- # default), see modules/host and fc-egress. --name names the VM, for
+ # The guest's egress goes by the user's whitelist LIST (default: the
+ # VM's name, or without one, default), see modules/host and fc-egress. --name names the VM, for
# fc-egress and as the guest's host name; only one running VM of the
# user's can have a given name.
set -efu
@@ -333,7 +333,7 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ ''
args=
rw_store=
rw_store_size=16G
- egress=default
+ egress=
name=
nixpkgs=${lib.escapeShellArg (toString pkgs.path)}
while test $# -gt 0; do
@@ -349,6 +349,7 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ ''
*) usage >&2; exit 1
esac
done
+ egress=''${egress:-''${name:-default}}
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT