Use portable hostname - macos doesn't have /etc/hostname

This commit is contained in:
bluepython508
2024-09-26 12:23:27 +01:00
parent b0643a760e
commit 6944ff05e0
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@
file="$FRAJTANO_DIR/cookie"
(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")
[ -z $RELEASE_NODE ] && export RELEASE_NODE="frajtano-$(${pkgs.coreutils}/bin/whoami)@$(${pkgs.coreutils}/bin/cat /etc/hostname)"
[ -z $RELEASE_NODE ] && export RELEASE_NODE="frajtano-$(${pkgs.coreutils}/bin/whoami)@$(${pkgs.toybox}/bin/hostname -s)"
run() {
exec ${lib.getExe pkg} "$@"
}