public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/setup] rawhide: profile: apply a timeout to `hostnamectl`
@ 2026-11-03 13:33 Ben Boeckel
  0 siblings, 0 replies; only message in thread
From: Ben Boeckel @ 2026-11-03 13:33 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/setup
            Branch : rawhide
            Commit : 5da28d20eab4728d788c70abb0d51551eb528627
            Author : Ben Boeckel <mathstuf@gmail.com>
            Date   : 2026-11-03T13:33:40+00:00
            Stats  : +1/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/setup/c/5da28d20eab4728d788c70abb0d51551eb528627?branch=rawhide

            Log:
            profile: apply a timeout to `hostnamectl`

On a machine where `systemd` has been updated, communication channels
sometimes fall over. While a reboot is necessary, opening new shells is
blocked on `hostnamectl` blocking on the down communication channel.
Apply a 3-second timeout to the D-Bus communication before falling back
to other mechanisms so that shells can be opened even on a degraded
system.

---
diff --git a/profile b/profile
index 8bcc0e8..019cf6c 100644
--- a/profile
+++ b/profile
@@ -45,7 +45,7 @@ else
     pathmunge /usr/sbin after
 fi
 
-HOSTNAME=$(/usr/bin/hostnamectl --transient 2>/dev/null) || \
+HOSTNAME=$(SYSTEMD_BUS_TIMEOUT=3 /usr/bin/hostnamectl --transient 2>/dev/null) || \
 HOSTNAME=$(/usr/bin/hostname 2>/dev/null) || \
 HOSTNAME=$(/usr/bin/uname -n)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-03 13:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 13:33 [rpms/setup] rawhide: profile: apply a timeout to `hostnamectl` Ben Boeckel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox