From af44f363ef483cf17ba04fe1b0fd8c980fc06e85 Mon Sep 17 00:00:00 2001
From: Michael Prokop <mprokop@sipwise.com>
Date: Wed, 9 Nov 2016 13:06:21 +0100
Subject: [PATCH] TT#5444 hostname.sh init script no longer exists with
 stretch, adjust

/etc/init.d/hostname.sh no longer exists in Debian stretch
and newer.

/etc/hostname always exists in our usecase since we create
it straight before setting the hostname, so do exactly
what the initscript usually did for us.

Change-Id: Ibf59c1494dab7978ae40a61cf9eb15c2e54836f6
---
 deployment.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/deployment.sh b/deployment.sh
index 71bd82f..9c4bef3 100755
--- a/deployment.sh
+++ b/deployment.sh
@@ -2243,7 +2243,7 @@ EOF
 
   echo "Setting hostname to $TARGET_HOSTNAME"
   echo "$TARGET_HOSTNAME" > ${TARGET}/etc/hostname
-  grml-chroot $TARGET /etc/init.d/hostname.sh
+  grml-chroot $TARGET hostname -F /etc/hostname
 
   chroot $TARGET apt-get -y install resolvconf libnss-myhostname