summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2008-03-11 10:19:36 +0000
committerBenedikt Boehm <hollow@gentoo.org>2008-03-11 10:19:36 +0000
commit961589eb4e72dfd47db38b2ec3a7ad95b5e30955 (patch)
treecf667440d1156f1534cbcabbff7fdedaed041259 /sys-cluster
parentVersion bump (diff)
downloadgentoo-2-961589eb4e72dfd47db38b2ec3a7ad95b5e30955.tar.gz
gentoo-2-961589eb4e72dfd47db38b2ec3a7ad95b5e30955.tar.bz2
gentoo-2-961589eb4e72dfd47db38b2ec3a7ad95b5e30955.zip
add support for openrc; cleanup old cruft
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/util-vserver/ChangeLog15
-rwxr-xr-xsys-cluster/util-vserver/files/init.d/vprocunhide20
-rwxr-xr-xsys-cluster/util-vserver/files/init.d/vservers.default15
-rw-r--r--sys-cluster/util-vserver/files/util-vserver-0.30.212-initpost.patch70
-rw-r--r--sys-cluster/util-vserver/files/util-vserver-0.30.212-vsomething-fix.patch55
-rw-r--r--sys-cluster/util-vserver/files/util-vserver-0.30.212-wrapper.patch46
-rw-r--r--sys-cluster/util-vserver/files/util-vserver-0.30.214-openrc.patch126
-rw-r--r--sys-cluster/util-vserver/util-vserver-0.30.214-r1.ebuild (renamed from sys-cluster/util-vserver/util-vserver-0.30.212-r2.ebuild)50
8 files changed, 164 insertions, 233 deletions
diff --git a/sys-cluster/util-vserver/ChangeLog b/sys-cluster/util-vserver/ChangeLog
index fa04f7913f23..a72588664e86 100644
--- a/sys-cluster/util-vserver/ChangeLog
+++ b/sys-cluster/util-vserver/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for sys-cluster/util-vserver
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/util-vserver/ChangeLog,v 1.86 2007/11/18 10:23:54 hollow Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/util-vserver/ChangeLog,v 1.87 2008/03/11 10:19:34 hollow Exp $
+
+*util-vserver-0.30.214-r1 (11 Mar 2008)
+
+ 11 Mar 2008; Benedikt Böhm <hollow@gentoo.org>
+ -files/util-vserver-0.30.212-initpost.patch,
+ -files/util-vserver-0.30.212-vsomething-fix.patch,
+ -files/util-vserver-0.30.212-wrapper.patch,
+ +files/util-vserver-0.30.214-openrc.patch, -files/init.d/vprocunhide,
+ -files/init.d/vservers.default, -util-vserver-0.30.212-r2.ebuild,
+ +util-vserver-0.30.214-r1.ebuild:
+ add support for openrc; cleanup old cruft
18 Nov 2007; Benedikt Böhm <hollow@gentoo.org>
files/util-vserver-0.30.214-baselayout2_path.patch:
diff --git a/sys-cluster/util-vserver/files/init.d/vprocunhide b/sys-cluster/util-vserver/files/init.d/vprocunhide
deleted file mode 100755
index d7199cab9892..000000000000
--- a/sys-cluster/util-vserver/files/init.d/vprocunhide
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-start() {
- : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
- if [[ ! -e ${UTIL_VSERVER_VARS} ]]; then
- eerror "Cannot find util-vserver installation"
- eerror "(the file '$UTIL_VSERVER_VARS' would be expected)"
- return 1
- fi
-
- source ${UTIL_VSERVER_VARS}
-
- ebegin "Fixing /proc entries visibility"
- ${_VPROCUNHIDE}
- eend $?
-}
-
-# vim:ts=4:filetype=gentoo-init-d
diff --git a/sys-cluster/util-vserver/files/init.d/vservers.default b/sys-cluster/util-vserver/files/init.d/vservers.default
deleted file mode 100755
index 76f9ca3edc19..000000000000
--- a/sys-cluster/util-vserver/files/init.d/vservers.default
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-start() {
- MARK=${SVCNAME#vservers.} /usr/lib/util-vserver/vserver-wrapper start
-}
-
-stop() {
- MARK=${SVCNAME#vservers.} /usr/lib/util-vserver/vserver-wrapper stop
-}
-
-
-
-# vim:ts=4:filetype=gentoo-init-d
diff --git a/sys-cluster/util-vserver/files/util-vserver-0.30.212-initpost.patch b/sys-cluster/util-vserver/files/util-vserver-0.30.212-initpost.patch
deleted file mode 100644
index 27178416d3a8..000000000000
--- a/sys-cluster/util-vserver/files/util-vserver-0.30.212-initpost.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Index: util-vserver-0.30.212/distrib/gentoo/initpost
-===================================================================
---- util-vserver-0.30.212.orig/distrib/gentoo/initpost
-+++ util-vserver-0.30.212/distrib/gentoo/initpost
-@@ -17,7 +17,8 @@
-
- ## Called as: initpost <cfgdir> <path of util-vserver-vars>
-
--vdir="$1"/vdir
-+cfgdir="$1"
-+vdir="$cfgdir"/vdir
- . "$2"
-
- # portage stuff
-@@ -29,7 +30,7 @@ popd &>/dev/null
-
- # gentoo initstyle magic
- initstyle=sysv
--test -e "$1"/apps/init/style && initstyle=$(<"$1"/apps/init/style)
-+test -e "$cfgdir"/apps/init/style && initstyle=$(<"$cfgdir"/apps/init/style)
-
- if test "$initstyle" == "gentoo"; then
- pushd "$vdir" &>/dev/null
-@@ -53,6 +54,31 @@ if test "$initstyle" == "gentoo"; then
- fi
-
-
-+# unneeded runlevel scripts
-+pushd "$vdir" &>/dev/null
-+echo ">>> Fixing default runlevel scripts ... "
-+$_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || :
-+$_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || :
-+popd &>/dev/null
-+
-+
-+# setting hostname
-+pushd "$vdir" &>/dev/null
-+
-+if test -r "$cfgdir"/uts/nodename && $_CHROOT_SH testfile /etc/conf.d/hostname; then
-+ echo ">>> Setting hostname ... "
-+ hostnametmp=$($_MKTEMP hostname.XXXXXX)
-+
-+ $_CHROOT_SH cat /etc/conf.d/hostname | \
-+ $_SED "s:HOSTNAME=\"\(.*\)\":HOSTNAME=\"$(< "$cfgdir"/uts/nodename)\":" > $hostnametmp
-+ $_CHROOT_SH truncate /etc/conf.d/hostname < $hostnametmp
-+
-+ $_RM -f $hostnametmp
-+fi
-+
-+popd &>/dev/null
-+
-+
- # check for baselayout >= 1.13
- pushd "$vdir" &>/dev/null
- basever=$($_CHROOT_SH cat /etc/gentoo-release | $_AWK '{print $5}')
-@@ -88,14 +114,6 @@ fi
- popd &>/dev/null
-
-
--# unneeded runlevel scripts
--pushd "$vdir" &>/dev/null
--echo ">>> Fixing default runlevel scripts ... "
--$_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || :
--$_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || :
--popd &>/dev/null
--
--
- # fix fstab for checkfs/localmount
- pushd "$vdir" &>/dev/null
- echo ">>> Fixing fstab ... "
diff --git a/sys-cluster/util-vserver/files/util-vserver-0.30.212-vsomething-fix.patch b/sys-cluster/util-vserver/files/util-vserver-0.30.212-vsomething-fix.patch
deleted file mode 100644
index ead3fff73ecf..000000000000
--- a/sys-cluster/util-vserver/files/util-vserver-0.30.212-vsomething-fix.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Index: util-vserver-0.30.212/scripts/vupdateworld
-===================================================================
---- util-vserver-0.30.212/scripts/vupdateworld (revision 2452)
-+++ util-vserver-0.30.212/scripts/vupdateworld (revision 2486)
-@@ -65,4 +65,14 @@
- done
-
-+declare -a vserver_names
-+
-+while [ $# -gt 0 ]; do
-+ case "$1" in
-+ (--) shift; break;;
-+ (*) vserver_names=( "${vserver_names[@]}" "$1" );;
-+ esac
-+ shift
-+done
-+
- VSOMETHING_TITLE=vemerge
- VSOMETHING_PKGMGMT=1
-@@ -71,3 +81,3 @@
-
- test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- )
--exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" --update --deep --newuse "$@"
-+exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "${vserver_names[@]}" -- world --update --deep --newuse "$@"
-Index: util-vserver-0.30.212/scripts/vdispatch-conf
-===================================================================
---- util-vserver-0.30.212/scripts/vdispatch-conf (revision 2363)
-+++ util-vserver-0.30.212/scripts/vdispatch-conf (revision 2486)
-@@ -70,3 +70,3 @@
- export VSOMETHING_TITLE VSOMETHING_PKGMGMT
-
--exec $_VSOMETHING "${send_through[@]}" dispatch-conf "${vsomething_opts[@]}"
-+exec $_VSOMETHING "${send_through[@]}" dispatch-conf "${vsomething_opts[@]}" "$@"
-Index: util-vserver-0.30.212/scripts/vesync
-===================================================================
---- util-vserver-0.30.212/scripts/vesync (revision 2363)
-+++ util-vserver-0.30.212/scripts/vesync (revision 2486)
-@@ -76,15 +76,13 @@
- export VSOMETHING_TITLE VSOMETHING_PKGMGMT
-
--test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- )
--
- ret=0
-
- test $overlay_only -eq 0 && \
-- $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" --metadata
-+ $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "$@" -- --metadata
-
- ret=$?
-
- test -n "$overlay" -a -n "$overlay_host" && \
-- $_VSOMETHING "${send_through[@]}" rsync "${vsomething_opts[@]}" \
-+ $_VSOMETHING "${send_through[@]}" rsync "${vsomething_opts[@]}" "$@" -- \
- -rtW --progress --delete --delete-after "${overlay_host}/" "${overlay}/"
-
diff --git a/sys-cluster/util-vserver/files/util-vserver-0.30.212-wrapper.patch b/sys-cluster/util-vserver/files/util-vserver-0.30.212-wrapper.patch
deleted file mode 100644
index b712c7c6c668..000000000000
--- a/sys-cluster/util-vserver/files/util-vserver-0.30.212-wrapper.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Index: /home/bene/work/vserver/util-vserver/scripts/vserver-wrapper
-===================================================================
---- scripts/vserver-wrapper (revision 2423)
-+++ scripts/vserver-wrapper (working copy)
-@@ -29,7 +29,7 @@
-
- if test -e /etc/init.d/functions; then
- . /etc/init.d/functions
-- _beginResult() { echo -n "$@"; }
-+ _beginResult() { echo -n "$@ ..."; }
- lockfile=/var/lock/subsys/$LOCKFILE
- elif test -e /etc/gentoo-release; then
- . /sbin/functions.sh
-@@ -39,7 +39,7 @@
- failure() { eend "$@"; }
- lockfile=/var/lock/vservers/$LOCKFILE
- else
-- _beginResult() { echo -n "$@"; }
-+ _beginResult() { echo -n "$@ ..."; }
- success() { echo .; }
- passed() { echo .; }
- failure() { echo ERROR; }
-@@ -54,13 +54,12 @@
- (2) passed; rc=0;;
- (*) failure;;
- esac
-- echo
- return $rc
- }
-
- function start()
- {
-- _beginResult $"Starting vservers of type '$MARK'..."
-+ _beginResult $"Starting vservers of type '$MARK'"
- $_START_VSERVERS -m "$MARK" -j "$NUMPARALLEL" --all --start
- _tellResult $?
- local rc=$?
-@@ -70,7 +69,7 @@
-
- function stop()
- {
-- _beginResult $"Stopping vservers of type '$MARK'..."
-+ _beginResult $"Stopping vservers of type '$MARK'"
- $_START_VSERVERS -m "$MARK" -j "$NUMPARALLEL" --all --stop
- _tellResult $?
- local rc=$?
diff --git a/sys-cluster/util-vserver/files/util-vserver-0.30.214-openrc.patch b/sys-cluster/util-vserver/files/util-vserver-0.30.214-openrc.patch
new file mode 100644
index 000000000000..247f36537b42
--- /dev/null
+++ b/sys-cluster/util-vserver/files/util-vserver-0.30.214-openrc.patch
@@ -0,0 +1,126 @@
+diff -NurpP util-vserver-0.30.214.orig/distrib/gentoo/initpost util-vserver-0.30.214/distrib/gentoo/initpost
+--- util-vserver-0.30.214.orig/distrib/gentoo/initpost 2007-09-02 22:06:42.000000000 +0200
++++ util-vserver-0.30.214/distrib/gentoo/initpost 2008-03-11 10:39:53.955478789 +0100
+@@ -51,6 +51,11 @@ $_CHROOT_SH mkdir /usr/portage 2>/dev/nu
+ $_CHROOT_SH mkdir /usr/portage/distfiles 2>/dev/null || :
+
+
++# check if we have openrc
++have_openrc=0
++$_CHROOT_SH testfile /lib/rc/bin/is_older_than && have_openrc=1
++
++
+ # gentoo initstyle magic
+ initstyle=sysv
+ test -e "$cfgdir"/apps/init/style && initstyle=$(<"$cfgdir"/apps/init/style)
+@@ -59,8 +64,8 @@ if test "$initstyle" == "gentoo"; then
+ echo ">>> Installing special init-style magic ... "
+
+ $_CAT "$__DISTRIBDIR"/gentoo/init-vserver.sh | \
+- $_CHROOT_SH truncate /lib/rcscripts/sh/init-vserver.sh
+- $_CHROOT_SH chmod 0755 /lib/rcscripts/sh/init-vserver.sh
++ $_CHROOT_SH truncate /lib/rc/sh/init-vserver.sh
++ $_CHROOT_SH chmod 0755 /lib/rc/sh/init-vserver.sh
+
+ $_CAT "$__DISTRIBDIR"/gentoo/reboot.sh | \
+ $_CHROOT_SH truncate /etc/init.d/reboot.sh
+@@ -78,23 +83,29 @@ if test "$initstyle" == "gentoo"; then
+ echo "!!! Consult the Gentoo Handbook on how to chroot and install"
+ echo "!!! packages into the guest environment."
+ echo "!!!"
++else
++ # fix gettys in inittab
++ if $_CHROOT_SH testfile /etc/inittab; then
++ echo ">>> Fixing inittab ... "
++ chrootsed /etc/inittab \
++ -e 's/\(^[^#].*getty.*$\)/#\1/'
++ fi
+ fi
+
+-
+ # unneeded runlevel scripts
+-echo ">>> Fixing default runlevel scripts ... "
+-$_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || :
+-$_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || :
+-
++if test $have_openrc -ne 1; then
++ echo ">>> Fixing default runlevel scripts ... "
++ $_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || :
++ $_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || :
++fi
+
+ # setting hostname
+ if test -r "$cfgdir"/uts/nodename && $_CHROOT_SH testfile /etc/conf.d/hostname; then
+ echo ">>> Setting hostname ... "
+ chrootsed /etc/conf.d/hostname \
+- -e "s:HOSTNAME=\"\(.*\)\":HOSTNAME=\"$(< "$cfgdir"/uts/nodename)\":"
++ -e "s:\(HOSTNAME\)=\"\(.*\)\":\1=\"$(< "$cfgdir"/uts/nodename)\":i"
+ fi
+
+-
+ # fix syslog-ng.conf
+ if $_CHROOT_SH testfile /etc/syslog-ng/syslog-ng.conf; then
+ echo ">>> Fixing syslog-ng.conf ... "
+@@ -103,27 +114,21 @@ if $_CHROOT_SH testfile /etc/syslog-ng/s
+ -e 's:\(.*console_all.*\):#\1:g'
+ fi
+
+-
+-# fix gettys in inittab
+-if $_CHROOT_SH testfile /etc/inittab; then
+- echo ">>> Fixing inittab ... "
+- chrootsed /etc/inittab \
+- -e 's/\(^[^#].*getty.*$\)/#\1/'
+-fi
+-
+-
+ # fix fstab for checkfs/localmount in baselayout-2
+ # (does not affect any previous versions)
+-echo ">>> Fixing fstab ... "
+-echo "/dev/hdv1 / ufs defaults 0 0" | $_CHROOT_SH truncate /etc/fstab
+-
++if test $have_openrc -ne 1; then
++ echo ">>> Fixing fstab ... "
++ echo "/dev/hdv1 / ufs defaults 0 0" | $_CHROOT_SH truncate /etc/fstab
++fi
+
+ # always satisfy net dependency in baselayout-2
+ # (does not affect any previous versions)
+-echo ">>> Providing dummy net dependency ... "
+-$_CAT "$__DISTRIBDIR"/gentoo/net.vserver | \
+-$_CHROOT_SH truncate /etc/init.d/net.vserver
+-$_CHROOT_SH chmod 0755 /etc/init.d/net.vserver
+-$_CHROOT_SH link /etc/init.d/net.vserver /etc/runlevels/boot/net.vserver
++if test $have_openrc -ne 1; then
++ echo ">>> Providing dummy net dependency ... "
++ $_CAT "$__DISTRIBDIR"/gentoo/net.vserver | \
++ $_CHROOT_SH truncate /etc/init.d/net.vserver
++ $_CHROOT_SH chmod 0755 /etc/init.d/net.vserver
++ $_CHROOT_SH link /etc/init.d/net.vserver /etc/runlevels/boot/net.vserver
++fi
+
+ popd &>/dev/null
+diff -NurpP util-vserver-0.30.214.orig/scripts/vserver.functions util-vserver-0.30.214/scripts/vserver.functions
+--- util-vserver-0.30.214.orig/scripts/vserver.functions 2007-09-02 22:06:41.000000000 +0200
++++ util-vserver-0.30.214/scripts/vserver.functions 2008-03-11 10:31:41.758515991 +0100
+@@ -314,9 +314,18 @@ function _generateInitOptions
+
+ (xgentoo)
+ test -n "$RUNLEVEL_START" || RUNLEVEL_START="default"
++ RC_PATH=/usr/sbin:/usr/bin:/sbin:/bin
+
+- INITCMD_START=( env TERM=$TERM /lib/rcscripts/sh/init-vserver.sh "$RUNLEVEL_START" )
+- INITCMD_STOP=( env -i TERM=$TERM RUNLEVEL=0 /sbin/rc shutdown )
++ if test -x "$vdir/vdir/lib/rcscripts/sh/init-vserver.sh"; then
++ RC_WRAP=/lib/rcscripts/sh/init-vserver.sh
++ elif test -x "$vdir/vdir/lib/rc/sh/init-vserver.sh"; then
++ RC_WRAP=/lib/rc/sh/init-vserver.sh
++ else
++ panic "init-vserver.sh not found; aborting"
++ fi
++
++ INITCMD_START=( env TERM=$TERM $RC_WRAP "$RUNLEVEL_START" )
++ INITCMD_STOP=( env -i PATH=$RC_PATH TERM=$TERM RUNLEVEL=0 /sbin/rc shutdown )
+ INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp )
+ ;;
+
diff --git a/sys-cluster/util-vserver/util-vserver-0.30.212-r2.ebuild b/sys-cluster/util-vserver/util-vserver-0.30.214-r1.ebuild
index 48a354fd46a1..d50ba865b6bf 100644
--- a/sys-cluster/util-vserver/util-vserver-0.30.212-r2.ebuild
+++ b/sys-cluster/util-vserver/util-vserver-0.30.214-r1.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/util-vserver/util-vserver-0.30.212-r2.ebuild,v 1.2 2007/05/03 19:39:00 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/util-vserver/util-vserver-0.30.214-r1.ebuild,v 1.1 2008/03/11 10:19:34 hollow Exp $
-inherit eutils bash-completion
+WANT_AUTOMAKE="1.9"
+
+inherit autotools eutils bash-completion
DESCRIPTION="Linux-VServer admin utilities"
HOMEPAGE="http://www.nongnu.org/util-vserver/"
@@ -10,17 +12,20 @@ SRC_URI="http://ftp.linux-vserver.org/pub/utils/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha amd64 ~ppc ~sparc x86"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
IUSE=""
-RDEPEND="dev-libs/beecrypt
+DEPEND=">=dev-libs/dietlibc-0.30-r2
+ dev-libs/beecrypt
net-firewall/iptables
net-misc/vconfig
sys-apps/iproute2"
-DEPEND="${RDEPEND}
- >=dev-libs/dietlibc-0.30-r2"
+RDEPEND="sys-apps/iproute2
+ net-misc/vconfig
+ net-firewall/iptables
+ dev-libs/beecrypt"
pkg_setup() {
if [[ -z "${VDIRBASE}" ]]; then
@@ -39,16 +44,13 @@ pkg_setup() {
src_unpack() {
unpack ${A}
cd "${S}"
-
- epatch "${FILESDIR}"/${P}-wrapper.patch
- epatch "${FILESDIR}"/${P}-initpost.patch
- epatch "${FILESDIR}"/${P}-vsomething-fix.patch
+ epatch "${FILESDIR}"/${P}-openrc.patch
}
src_compile() {
econf --with-vrootdir=${VDIRBASE} \
- --localstatedir=/var \
- --with-initrddir=/etc/init.d || die "econf failed!"
+ --with-initscripts=gentoo \
+ --localstatedir=/var || die "econf failed!"
emake || die "emake failed!"
}
@@ -56,11 +58,6 @@ src_install() {
make DESTDIR="${D}" install install-distribution \
|| die "make install failed!"
- # create the /sbin/vshelper symlink so we don't have to mess around with
- # (a) echoing stuff to /etc/sysctl.conf
- # (b) changing the default vshelper in the kernel sources.
- dosym /usr/lib/util-vserver/vshelper /sbin/vshelper
-
# keep dirs
keepdir /var/run/vservers
keepdir /var/run/vservers.rev
@@ -68,17 +65,11 @@ src_install() {
keepdir /var/lock/vservers
keepdir /var/cache/vservers
keepdir "${VDIRBASE}"
+ keepdir "${VDIRBASE}"/.pkg
# remove legacy config file
rm -f "${D}"/etc/vservers.conf
- # remove the non-gentoo init-scripts:
- rm -f "${D}"/etc/init.d/*
-
- # and install gentoo'ized ones:
- doinitd "${FILESDIR}"/init.d/vservers.default
- doinitd "${FILESDIR}"/init.d/vprocunhide
-
# bash-completion
dobashcompletion "${FILESDIR}"/bash_completion util-vserver
@@ -86,6 +77,15 @@ src_install() {
}
pkg_postinst() {
+ # Create VDIRBASE in postinst, so it is (a) not unmerged and (b) also
+ # present when merging.
+
+ [ ! -d "${VDIRBASE}" ] && mkdir -p "${VDIRBASE}" &> /dev/null
+ setattr --barrier "${VDIRBASE}" &> /dev/null
+
+ rm /etc/vservers/.defaults/vdirbase
+ ln -sf "${VDIRBASE}" /etc/vservers/.defaults/vdirbase
+
elog
elog "You have to run the vprocunhide command after every reboot"
elog "in order to setup /proc permissions correctly for vserver"