This file is indexed.

/usr/lib/util-vserver/vserver-build is in util-vserver 0.30.216-pre3120-1.4+b1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#! /bin/bash
# $Id$

# Copyright (C) 2003,2004,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.

: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
    echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
    exit 1
}
. "$UTIL_VSERVER_VARS"
. "$_LIB_FUNCTIONS"
. "$_LIB_VSERVER_SETUP_FUNCTIONS"
. "$_LIB_VSERVER_BUILD_FUNCTIONS"

### Some local functions

function showHelp()
{
    echo \
$"Usage: $(basename $0) -m <method> -n <name> [--force] [--keep] [--rootdir <dir>]
    --pkgbase <dir> <config options>* [--] <method arguments>*

Options:
    --force     ...  remove/rename already existing vservers with the same
                     name
    --i-know-its-there
                ...  allow to finish build even if it exists
    --keep      ...  do not delete generated files and directories when
                     build of vserver failed.
    -m <method> ...  use method <method>; see below for possible values
    --rootdir <dir>
                ...  [default: $__DEFAULT_VSERVERDIR]
    --pkgbase <dir>
                ...  [default: $__DEFAULT_VSERVERPKGDIR]
      
cfg-options are: $SETUP_HELPMSG

Possible methods are:
    apt-rpm     ... -- -d <distribution>
                ...  installs the base-packages of the given distribution with
		     help of 'vapt-get'
    yum         ... -- -d <distribution> [-- <packages>*]
                ...  installs the base-packages of the given distribution with
		     help of 'vyum'
    urpmi       ... -- -d <distribution> -m <mirror>
    rpm         ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
                ...  installs lists of rpm-packages
    skeleton    ... -- [<cmd> <args>*]
                ...  installs a minimal skeleton filesystem, creates the
		     configuration file and calls an optional command then
    debootstrap ... -- -d <distribution> [-m <mirror>] [-s <script> ] [-- <debootstrap-options>*]
                ...  bootstraps the vserver with Debian's 'debootstrap' package
    template    ... -- (-t <tarball>)+ [-d <distribution>]
                ...  installs a guest using tarball(s)
    fai         ... -- [ -f <fai_vserver> ] [-n <nfsroot>] [-d <fai_dir> ] [ -a ]
                     bootstraps the vserver with Debian Fully Automatic Installation
                     -f means use the nfsroot and profile in the vserver <fai_vserver>
                     -n <nfsroot> specifies the 'NFS' root explicitly
                     -d <fai_dir> specifies the location of the FAI profile
                     the -f option implies -n and -d are relative to the <fai_vserver>
    rsync       ... -- [-d <distribution>] --source <source> [-- <rsync options>*]
                ...  installs a guest by rsyncing from <source> to the guest root
    clone       ... -- [-d <distribution>] --source <source> [--exclude-from <exclude-list>]
                ...  clones a guest by linking unified files and copying the rest

Please report bugs to $PACKAGE_BUGREPORT"
    exit 0
}

function showVersion()
{
    echo \
$"vserver-build $PACKAGE_VERSION -- initializes a vserver
This program is part of $PACKAGE_STRING

Copyright (C) 2003,2004,2005 Enrico Scholz
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty."
    exit 0
}

### main starts here

set -e

declare -a default_opts=()
test -n "$NO_DEFAULT_OPTS" || getFileArray default_opts "$__CONFDIR/.defaults/apps/build/options" || :

tmp=$(getopt -o +m:n: --long keep,force,i-know-its-there,debug,help,version,rootdir:,pkgbase:,$SETUP_OPTIONS -n "$(basename $0)" -- \
	"${default_opts[@]}" "$@") || exit 1
eval set -- "$tmp"

VSERVER_NAME=
OPTION_FORCE=
OPTION_DEBUG=0
OPTION_KEEP=
OPTION_SEMIFORCE=

while true; do
    case "$1" in
	(--help)    showHelp $0 ;;
	(--version) showVersion ;;
	(--force)   OPTION_FORCE=1;;
	(--keep)    OPTION_KEEP=1;;
	(--debug)   let ++OPTION_DEBUG;  set -x;;
	(--rootdir) ROOTDIR=$2;      shift;;
	(--pkgbase) PKGCFGBASE=$2;   shift;;
	(--i-know-its-there)
		    OPTION_SEMIFORCE=1;;
	(-m)	    method=$2;       shift;;
	(-n)	    VSERVER_NAME=$2; shift;;
	(--)	    shift; break;;
	(*)
	    { setup_setOption2 "$1" "$2" && shift; } || \
	      panic $"vserver-build: internal error."
	    ;;
    esac
    shift
done

test -n "$VSERVER_NAME" ||
    panic $"Name of vserver not specified"

setup_setDefaults "$VSERVER_NAME"

case x"$method" in
    (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi)
		. $__PKGDATADIR/vserver-build.$method
		;;
    (x)		panic $"No build-method specified";;
    (*)		panic $"Unknown build-method '$method'";;
esac