From: Benedikt Boehm Date: Fri, 27 Apr 2007 08:40:23 +0000 (+0000) Subject: fix distdir handling if prefix is not X-Git-Tag: release-0.30.214~71 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d47a8227c960d17c2729a11ec227332c84d975c;p=util-vserver.git fix distdir handling if prefix is not git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2534 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/distrib/gentoo/initpre b/distrib/gentoo/initpre index 374c134..0cd9b24 100755 --- a/distrib/gentoo/initpre +++ b/distrib/gentoo/initpre @@ -27,21 +27,28 @@ hash portageq &>/dev/null if test $? -eq 0; then _PORTDIR=$(portageq portdir) + _DISTDIR=$(portageq distdir) else _PORTDIR=/usr/portage + _DISTDIR=/usr/portage/distfiles fi if test -d $_PORTDIR; then ( echo echo "# shared portage tree" - echo "${_PORTDIR} /usr/portage none bind,ro 0 0" - echo "${_PORTDIR}/distfiles /usr/portage/distfiles none bind,rw 0 0" + echo "${_PORTDIR} /usr/portage none bind,ro 0 0" ) >> "$1"/fstab else echo "!!! Cannot find a portage tree! You should definitely use a" echo "!!! shared portage tree if you have multiple Gentoo guests!" fi +if test -d $_DISTDIR; then + echo "${_DISTDIR} /usr/portage/distfiles none bind,rw 0 0" >> "$1"/fstab +else + echo "!!! Cannot find distfiles directory! You should definitely use a" + echo "!!! shared distfiles directory if you have multiple Gentoo guests!" +fi # prevent dmesg errors/warnings echo ">>> Enabling dummy /proc/kmsg"