Subject: [alpine-devel] Suggestion on improvment

From: "Mika Havela" <[email-masked]>
Date: Thu, 28 Oct 2010 12:05:54 +0000

Running setup-hostname basically only updates /etc/hostname 
But the system itself doesn't get updated unless you reboot the box.
Only thing I can imagine would be a problem is that lbu would create duplicate overlays on lbu_media but otoh that problem gets back to yo
I can see I sent a patch about this before, but I can't se it either got applied or commented.             
Anybody care to have a look at it - or reject it (please email your thoughts to alpine-devel mailing list).
Thanks!                                                                                                                                   
<<mhavela>> 

From 236fd95f1bdb9e9e695caf55493df75e02785ad3 Mon Sep 17 00:00:00 2001
From: Mika Havela <[email-masked]>
Date: Thu, 28 Oct 2010 09:25:58 +0000
Subject: [PATCH] Set hostname in the running environment

---
 setup-hostname.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/setup-hostname.in b/setup-hostname.in
index f97f487..f7facaf 100755
--- a/setup-hostname.in
+++ b/setup-hostname.in
@@ -35,4 +35,4 @@ done
 
 mkdir -p "$ROOT/etc"
 echo "$HOST" > "$ROOT/etc/hostname"
-
+hostname -F "$ROOT/etc/hostname"
-- 
1.7.3.2

---

From: Natanael Copa <[email-masked]>
Date: Fri, 29 Oct 2010 14:33:19 +0200

> But the system itself doesn't get updated unless you reboot the box.

or run /etc/init.d/hostname restart, like setup-alpine does.

> Only thing I can imagine would be a problem is that lbu would create
> duplicate overlays on lbu_media but otoh that problem gets back to yo

setup-alpine does /etc/init.d/hostname restart to avoid the issue you
mention above. When I initiall wrote the setup-* scripts I had in mind
that you could run them against another root. Lets say you unpack an
apkovl or create a new apkvol, then you might wan set hostname for that
apkovl but not for the running system.

> <<mhavela>> 

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---