summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared H.Hudson <jhhudso@gentoo.org>2003-09-22 10:38:29 +0000
committerJared H.Hudson <jhhudso@gentoo.org>2003-09-22 10:38:29 +0000
commit5c9b166cabba63b2cc86626c325cc09d0a317819 (patch)
tree2aa37064f1f43fbfb7d16ccf52f7bda78c089c65
parentadded a new version of darcs (diff)
downloadhistorical-5c9b166cabba63b2cc86626c325cc09d0a317819.tar.gz
historical-5c9b166cabba63b2cc86626c325cc09d0a317819.tar.bz2
historical-5c9b166cabba63b2cc86626c325cc09d0a317819.zip
Fixed symbolic links in setup files so it will work from within a chroot
-rw-r--r--net-dns/djbdns/files/dnscache-setup8
-rw-r--r--net-dns/djbdns/files/tinydns-setup9
2 files changed, 13 insertions, 4 deletions
diff --git a/net-dns/djbdns/files/dnscache-setup b/net-dns/djbdns/files/dnscache-setup
index b00e5261c61b..eaf409a7678d 100644
--- a/net-dns/djbdns/files/dnscache-setup
+++ b/net-dns/djbdns/files/dnscache-setup
@@ -217,8 +217,12 @@ setup() {
# check in /mnt/.init.d to find svscan link in running...
# if not running execute /etc/init.d/svscan start
-
- ln -sf ${mypath}/${mycachedir} /service/${mycachedir}
+ # Don't make symbolic links to / !
+ # use ../ instead as it gives trouble in chrooted environments
+ # By Kalin KOZHUHAROV <kalin@ThinRope.net>
+ local fixedroot_path=`echo ${mypath} | sed -e 's#^/#../#'`
+ cd /service
+ ln -sf ${fixedroot_path}/${mycachedir} .
echo
echo
diff --git a/net-dns/djbdns/files/tinydns-setup b/net-dns/djbdns/files/tinydns-setup
index f12bfaaf39b7..271c0c17276f 100644
--- a/net-dns/djbdns/files/tinydns-setup
+++ b/net-dns/djbdns/files/tinydns-setup
@@ -124,8 +124,13 @@ setup() {
echo '(press control-C to abort)'
read
- ln -sf ${mypath}/tinydns /service/
- ln -sf ${mypath}/axfrdns /service/
+ # Don't make symbolic links to / !
+ # use ../ instead as it gives trouble in chrooted environments
+ # By Kalin KOZHUHAROV <kalin@ThinRope.net>
+ local fixedroot_path=`echo ${mypath} | sed -e 's#^/#../#'`
+ cd /service
+ ln -sf ${fixedroot_path}/tinydns .
+ ln -sf ${fixedroot_path}/axfrdns .
echo
echo