We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94f752c commit 656472cCopy full SHA for 656472c
1 file changed
src/etc/one-context.d/net-15-hostname
@@ -10,7 +10,7 @@ fi
10
function set_hostname() {
11
local hostname=$1
12
13
- if [ -d /run/systemd/system/ ]; then
+ if [ -d /run/systemd/system/ ] && hostnamectl status >/dev/null 2>/dev/null; then
14
hostnamectl set-hostname --static "${hostname}"
15
else
16
if [ -f /etc/sysconfig/network ]; then
0 commit comments