From 5bf66ba8d479bbe613da1b9557b8aad2c448b536 Mon Sep 17 00:00:00 2001 From: Sebastien Estienne Date: Fri, 3 Feb 2006 22:04:13 +0000 Subject: [PATCH] * add support for /etc/localtime in avahi's chroot for debian git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1128 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- initscript/debian/Makefile.am | 10 ++++++++-- initscript/debian/avahi-daemon.in | 7 +++++++ initscript/debian/avahi-dnsconfd.in | 7 +++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/initscript/debian/Makefile.am b/initscript/debian/Makefile.am index 4165ad3..7991ea6 100644 --- a/initscript/debian/Makefile.am +++ b/initscript/debian/Makefile.am @@ -32,9 +32,15 @@ CLEANFILES = \ avahi-dnsconfd avahi-daemon: avahi-daemon.in - sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + sed \ + -e 's,@sbindir\@,$(sbindir),g' \ + -e 's,@sysconfdir\@,$(sysconfdir),g' \ + $< > $@ chmod +x $@ avahi-dnsconfd: avahi-dnsconfd.in - sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + sed \ + -e 's,@sbindir\@,$(sbindir),g' \ + -e 's,@sysconfdir\@,$(sysconfdir),g' \ + $< > $@ chmod +x $@ diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in index ddaeba4..feecc84 100755 --- a/initscript/debian/avahi-daemon.in +++ b/initscript/debian/avahi-daemon.in @@ -91,6 +91,13 @@ test -x $DAEMON || exit 0 # Function that starts the daemon/service. # d_start() { + if [ -s /etc/localtime ]; then + if [ ! -d /etc/avahi/etc ]; then + mkdir -p @sysconfdir@/avahi/etc >/dev/null 2>&1 + fi + cp -fp /etc/localtime @sysconfdir@/avahi/etc >/dev/null 2>&1 + fi; + $DAEMON -D } diff --git a/initscript/debian/avahi-dnsconfd.in b/initscript/debian/avahi-dnsconfd.in index 0720a9e..649d72f 100755 --- a/initscript/debian/avahi-dnsconfd.in +++ b/initscript/debian/avahi-dnsconfd.in @@ -91,6 +91,13 @@ test -x $DAEMON || exit 0 # Function that starts the daemon/service. # d_start() { + if [ -s /etc/localtime ]; then + if [ ! -d /etc/avahi/etc ]; then + mkdir -p @sysconfdir@/avahi/etc >/dev/null 2>&1 + fi + cp -fp /etc/localtime @sysconfdir@/avahi/etc >/dev/null 2>&1 + fi; + $DAEMON -D } -- 2.39.5