--- a/usr/lib/byobu/hostname +++ b/usr/lib/byobu/hostname @@ -20,12 +20,16 @@ # along with this program. If not, see . __hostname_detail() { - hostname -f + hostname -f 2>/dev/null } __hostname() { local h= - h=$(hostname -s 2>/dev/null || hostname) + if eval $BYOBU_TEST hostname >/dev/null 2>&1; then + h=$(hostname -s 2>/dev/null || hostname) + elif [ -r /proc/sys/kernel/hostname ]; then + read h < /proc/sys/kernel/hostname + fi if metadata_available; then local cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/hostname" # Background a retrieval of our public hostname