From: Sebastien Estienne Date: Fri, 3 Feb 2006 22:04:13 +0000 (+0000) Subject: * add support for /etc/localtime in avahi's chroot for debian X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=5bf66ba8d479bbe613da1b9557b8aad2c448b536;p=catta * 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 --- 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 }