You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
623 B

--- a/usr/lib/byobu/hostname
+++ b/usr/lib/byobu/hostname
@@ -20,12 +20,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
__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