4 # Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 # Copyright (C) 2008 Daniel Hokka Zakrisson
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; version 2 of the License.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
21 test -e "$UTIL_VSERVER_VARS" || {
22 echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
25 . "$UTIL_VSERVER_VARS"
31 $"Usage: $1 <operation> [--] [<program> <args>*]
33 <operation> can be one of:
34 --new|-n ... create new namespace and execute <program> there;
35 <program> is mandatory in this case
36 --enter|-e <xid> ... enter the namespace of context <xid> and execute
37 <program> there; <program> is mandatory in this
39 --set|-s ... make current namespace the namespace of the
41 --cleanup|-c ... remove all mounts from the namespace of the
44 Please report bugs to $PACKAGE_BUGREPORT"
48 function showVersion()
51 $"vnamespace $PACKAGE_VERSION -- manages filesystem-namespace
52 This program is part of $PACKAGE_STRING
54 Copyright (C) 2004 Enrico Scholz
55 This program is free software; you may redistribute it under the terms of
56 the GNU General Public License. This program has absolutely no warranty."
60 exec $_VSPACE --mount --fs "$@"