From f4db6e908efa8b3c79cc6a5f937a148c4d886341 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 15 Apr 2019 18:48:49 +0200 Subject: [PATCH] [hostname] add alpine support --- cdist/conf/type/__hostname/gencode-remote | 4 ++-- cdist/conf/type/__hostname/manifest | 2 +- docs/changelog | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cdist/conf/type/__hostname/gencode-remote b/cdist/conf/type/__hostname/gencode-remote index 33947f7f..8b5797dd 100755 --- a/cdist/conf/type/__hostname/gencode-remote +++ b/cdist/conf/type/__hostname/gencode-remote @@ -35,7 +35,7 @@ has_hostnamectl=$(cat "$__object/explorer/has_hostnamectl") # If everything is ok -> exit # case "$os" in - archlinux|debian|suse|ubuntu|devuan|coreos) + archlinux|debian|suse|ubuntu|devuan|coreos|alpine) if [ "$name_config" = "$name_should" ] && [ "$name_running" = "$name_should" ]; then exit 0 fi @@ -58,7 +58,7 @@ echo changed >> "$__messages_out" # Use the good old way to set the hostname even on machines running systemd. case "$os" in - archlinux|debian|ubuntu|devuan|centos|coreos) + archlinux|debian|ubuntu|devuan|centos|coreos|alpine) printf "printf '%%s\\\\n' '$name_should' > /etc/hostname\\n" echo "hostname -F /etc/hostname" ;; diff --git a/cdist/conf/type/__hostname/manifest b/cdist/conf/type/__hostname/manifest index c03b2eac..8f1adf12 100755 --- a/cdist/conf/type/__hostname/manifest +++ b/cdist/conf/type/__hostname/manifest @@ -41,7 +41,7 @@ not_supported() { } case "$os" in - archlinux|debian|suse|ubuntu|devuan|coreos) + archlinux|debian|suse|ubuntu|devuan|coreos|alpine) # handled in gencode-remote : ;; diff --git a/docs/changelog b/docs/changelog index 2df98118..55800f25 100644 --- a/docs/changelog +++ b/docs/changelog @@ -5,6 +5,7 @@ next: * Type __package: Add __package_apk support (Nico Schottelius) * Type __start_on_boot: Add alpine support (Nico Schottelius) * Type __timezone: Add alpine support (Nico Schottelius) + * Type __hostname: Add alpine support (Nico Schottelius) * Type __start_on_boot: gentoo: check all runlevels in explorer (Nico Schottelius) * New type: __package_apk (Nico Schottelius)