Don't crash on unbound variables

This commit is contained in:
bluepython508
2024-09-24 22:25:30 +01:00
parent 25c260c4a5
commit 90325d305e

View File

@@ -38,7 +38,7 @@
file="$FRAJTANO_DIR/cookie" file="$FRAJTANO_DIR/cookie"
(umask 077; [ -f "$file" ] || ${pkgs.coreutils}/bin/head -c 128 /dev/urandom | ${pkgs.coreutils}/bin/base64 -w0 > "$file") (umask 077; [ -f "$file" ] || ${pkgs.coreutils}/bin/head -c 128 /dev/urandom | ${pkgs.coreutils}/bin/base64 -w0 > "$file")
export RELEASE_COOKIE=$(${pkgs.coreutils}/bin/cat "$file") export RELEASE_COOKIE=$(${pkgs.coreutils}/bin/cat "$file")
[ -n $RELEASE_NODE ] || export RELEASE_NODE="frajtano-$(${pkgs.coreutils}/bin/whoami)@$(${pkgs.coreutils}/bin/cat /etc/hostname)" [ -n ''${RELEASE_NODE:-} ] || export RELEASE_NODE="frajtano-$(${pkgs.coreutils}/bin/whoami)@$(${pkgs.coreutils}/bin/cat /etc/hostname)"
run() { run() {
exec ${lib.getExe pkg} "$@" exec ${lib.getExe pkg} "$@"
} }