diff options
Diffstat (limited to 'home/scripts/system_name.sh')
-rwxr-xr-x | home/scripts/system_name.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/home/scripts/system_name.sh b/home/scripts/system_name.sh index 92b714a..2625293 100755 --- a/home/scripts/system_name.sh +++ b/home/scripts/system_name.sh @@ -1,11 +1,11 @@ #!/bin/sh -platform="$(platform.sh)" +PLATFORM="${PLATFORM:-`platform.sh`}" MACHINE="$HOST" -if [ "$platform" = "osx" ]; then +if [ "$PLATFORM" = "osx" ]; then MACHINE="$(scutil --get ComputerName)" -elif [ "$platform" = "linux" ]; then +elif [ "$PLATFORM" = "linux" ]; then MACHINE="$(cat /proc/sys/kernel/hostname)" fi |