X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=distrib%2Fgentoo%2Finitpre;h=4a66bf541de574d67a7d604888f8c3d690d64fd9;hb=1cf33b33576848a1da7f3d43792e56f1c702459d;hp=4d18d691669c1dc891b7bd1e59a546faa960533a;hpb=270eb3149abb037fcf5e88e53d8a8ec09ad5444b;p=util-vserver.git diff --git a/distrib/gentoo/initpre b/distrib/gentoo/initpre index 4d18d69..4a66bf5 100755 --- a/distrib/gentoo/initpre +++ b/distrib/gentoo/initpre @@ -27,21 +27,29 @@ 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 + # initstyle sanity initstyle=sysv