From 9375a86c1fe0f2936a7ff20f46aa98a4d5f1ffb3 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 22 Jun 2012 22:41:33 +0200 Subject: [PATCH] grml-hostname: restart avahi-daemon service if present and running Quoting http://bts.grml.org/grml/issue1182: | When booting a machine with the hostname parameter avahi | exports the grml hostname even though another hostname was specified. Testing: issue1182 Thanks: Ulrich Dangel for the bugreport --- usr_sbin/grml-hostname | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr_sbin/grml-hostname b/usr_sbin/grml-hostname index e97c353..b529d17 100755 --- a/usr_sbin/grml-hostname +++ b/usr_sbin/grml-hostname @@ -57,6 +57,10 @@ Configuration of myhostname in /etc/postfix/main.cf has been adjusted as well. D fi fi + if [ -x /etc/init.d/avahi-daemon ] && pgrep avahi-daemon >/dev/null ; then + /etc/init.d/avahi-daemon restart + fi + /etc/init.d/hostname.sh if [ -z "$NONINTERACTIVE" ] ; then -- 2.1.4