From f18bdd1fade8b2caea80bdeb4d0c099f421a3d18 Mon Sep 17 00:00:00 2001
From: Dennis Camera <dennis.camera@ssrq-sds-fds.ch>
Date: Sat, 16 Nov 2019 23:31:58 +0100
Subject: [PATCH] [__hostname] Comment out support for ancient ArchLinux
 versions

---
 cdist/conf/type/__hostname/manifest | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/cdist/conf/type/__hostname/manifest b/cdist/conf/type/__hostname/manifest
index f2f65155..7e36cb53 100755
--- a/cdist/conf/type/__hostname/manifest
+++ b/cdist/conf/type/__hostname/manifest
@@ -68,14 +68,17 @@ in
         then
             set_hostname_systemd "$name_should"
         else
+            echo 'Ancient ArchLinux variants without hostnamectl are not supported.' >&2
+            exit 1
             # Only for ancient ArchLinux, write to /etc/rc.conf on pre-systemd
             # versions.  There are some versions which use /etc/hostname but not
-			# systemd. It is unclear which ones these are.
-            __key_value '/etc/rc.conf:HOSTNAME' \
-                --file /etc/rc.conf \
-                --delimiter '=' --exact_delimiter \
-                --key 'HOSTNAME' \
-                --value "\"$name_should\""
+            # systemd. It is unclear which ones these are.
+
+            # __key_value '/etc/rc.conf:HOSTNAME' \
+            #     --file /etc/rc.conf \
+            #     --delimiter '=' --exact_delimiter \
+            #     --key 'HOSTNAME' \
+            #     --value "\"$name_should\""
         fi
         ;;
     centos|fedora|redhat|scientific)