add gentoo distribution target; force sane /dev by default for template build method
[util-vserver.git] / distrib / gentoo / initpost
diff --git a/distrib/gentoo/initpost b/distrib/gentoo/initpost
new file mode 100755 (executable)
index 0000000..66e0f20
--- /dev/null
@@ -0,0 +1,28 @@
+#! /bin/bash
+
+# Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+#  
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#  
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#  
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+## Called as: initpost <cfgdir> <path of util-vserver-vars>
+
+. "$2"
+
+$_MKDIR -p "$1"/vdir/usr/portage
+
+$_CAT <<EOF >> "$1"/fstab
+# shared portage tree
+/usr/portage           /usr/portage           none bind,ro 0 0
+/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0
+EOF