* add support for /etc/localtime in avahi's chroot for debian
authorSebastien Estienne <sebastien.estienne@gmail.com>
Fri, 3 Feb 2006 22:04:13 +0000 (22:04 +0000)
committerSebastien Estienne <sebastien.estienne@gmail.com>
Fri, 3 Feb 2006 22:04:13 +0000 (22:04 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1128 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

initscript/debian/Makefile.am
initscript/debian/avahi-daemon.in
initscript/debian/avahi-dnsconfd.in

index 4165ad3..7991ea6 100644 (file)
@@ -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 $@
index ddaeba4..feecc84 100755 (executable)
@@ -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
 }
 
index 0720a9e..649d72f 100755 (executable)
@@ -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
 }