aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/tools/sysinfo.sh
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-04-17 11:45:00 +0800
committerJesús <heckyel@hyperbola.info>2022-04-17 11:45:00 +0800
commitd872eca384bd7af02b22d0951ded91b83f97cd2c (patch)
tree5ef23628aa7fc8d3d6443fb96a222f78c6a674b3 /hyperterm/tools/sysinfo.sh
parent421c805210b0dcfd3f49521f4ac4f43db80be106 (diff)
downloadhyperterm-d872eca384bd7af02b22d0951ded91b83f97cd2c.tar.lz
hyperterm-d872eca384bd7af02b22d0951ded91b83f97cd2c.tar.xz
hyperterm-d872eca384bd7af02b22d0951ded91b83f97cd2c.zip
fix hostname: Unknown host
Diffstat (limited to 'hyperterm/tools/sysinfo.sh')
-rw-r--r--hyperterm/tools/sysinfo.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/hyperterm/tools/sysinfo.sh b/hyperterm/tools/sysinfo.sh
index e2db9ec..6d89bcd 100644
--- a/hyperterm/tools/sysinfo.sh
+++ b/hyperterm/tools/sysinfo.sh
@@ -5,7 +5,7 @@ function ii() {
__network "$1" > /dev/null 2>&1 # import network
case ${LANG/_*/} in
es)
- printf '%s\e[1;36m%s\e[m\n' "Has iniciado sesión en " "$(hostname -f)"
+ printf '%s\e[1;36m%s\e[m\n' "Has iniciado sesión en " "$(hostname -f 2> /dev/null || hostname)"
printf '\n\e[1;32m%s\e[m\n%s\n' "Información adicional:" "$(uname -a)"
printf '\n\e[1;32m%s\e[m\n%s\n' "Usuarios Conectados:" "$(who -u)"
printf '\n\e[1;32m%s\e[m\n%s\n' "Fecha actual:" "$(date)"
@@ -17,7 +17,7 @@ function ii() {
printf '%s\n' "${MY_ISP:-"No conectado"}"
;;
*)
- printf '%s\e[1;36m%s\e[m\n' "You are logged on " "$(hostname -f)"
+ printf '%s\e[1;36m%s\e[m\n' "You are logged on " "$(hostname -f 2> /dev/null || hostname)"
printf '\n\e[1;32m%s\e[m\n%s\n' "Additionnal information:" "$(uname -a)"
printf '\n\e[1;32m%s\e[m\n%s\n' "Users logged:" "$(who -u)"
printf '\n\e[1;32m%s\e[m\n%s\n' "Current date:" "$(date)"