diff --git a/base_rpm.one/etc/one-context.d/15-hostname b/base_rpm.one/etc/one-context.d/15-hostname index df77aa0..37eeace 100755 --- a/base_rpm.one/etc/one-context.d/15-hostname +++ b/base_rpm.one/etc/one-context.d/15-hostname @@ -9,7 +9,8 @@ function set_hostname() { sed -i '/^HOSTNAME=.*$/d' $CONFIG_FILE echo "HOSTNAME=$NAME" >> $CONFIG_FILE - + [[ $(awk -F= '/^VERSION_ID/ {gsub("\"","");print $2}' /etc/os-release) -ge 7 ]] && echo $NAME > /etc/hostname + hostname $NAME }