#!/bin/bash . /usr/lib/util-vserver/util-vserver-vars . /usr/lib/util-vserver/functions . /usr/lib/util-vserver/vserver.functions tmp=$(getopt -o +q --long debug,help,version,quiet,--nonamespace -n "$0" -- "$@") || exit 1 eval set -- "$tmp" NONAMESPACE= KEEP_ARGS= while true; do case "$1" in ----nonamespace) NONAMESPACE=1 ;; --debug) KEEP_ARGS=--debug set -x ;; --) shift break ;; esac shift done _setVserverDir "$1" test -n "$NONAMESPACE" || exec vnamespace -e "$VSERVER_DIR" -- vnamespace -n -- "$0" $KEEP_ARGS ----nonamespace "$@" pkgInit "$1" rpm # Okay, we're in a new namespace. Let's set up the bind mounts for passwd/group. mount -n --bind "$VSERVER_DIR"/vdir/etc/passwd /etc/passwd mount -n --bind "$VSERVER_DIR"/vdir/etc/group /etc/group # Now we'll pray there's nothing like LDAP configured... cd "$VSERVER_DIR"/vdir shift shift ncontext --migrate --nid "$VSERVER_DIR" -- \ vcontext --migrate --xid "$VSERVER_DIR" -- \ strace -fF -o ~/rpm.strace.$$ rpm --root "$VSERVER_DIR"/vdir "$@"