Use uname -n instead of hostname(1)
The NAS is a minimal Arch install with no inetutils, so hostname(1) does not exist and install died on its first line of real work. uname -n is POSIX and always present. The same assumption was in dots, pkg-snapshot, pkg-restore and zshenv's fallback.
This commit is contained in:
1 parent
8ddbbe240d
commit
a96aa4b820
5 files changed
+7
-5
No files matched your search
+1
-1
@@ -6,7 +6,7 @@
|
||||
# point: a login banner that always fires is a banner you stop reading.
|
||||
set -uo pipefail
|
||||
REPO="${DOTFILES:-$HOME/.dotfiles}"
|
||||
HOST="${DOTFILES_HOST:-$(hostname | tr '[:upper:]' '[:lower:]')}"
|
||||
HOST="${DOTFILES_HOST:-$(uname -n | tr '[:upper:]' '[:lower:]')}"
|
||||
NAG=0; [[ "${1:-}" == "--nag" ]] && NAG=1
|
||||
cd "$REPO" 2>/dev/null || exit 0
|
||||
|
||||
|
||||
Reference in new issue
Block a user