diff -Nur util-vserver-0.30.216-pre2833.orig/distrib/Makefile.am util-vserver-0.30.216-pre2833/distrib/Makefile.am
--- util-vserver-0.30.216-pre2833.orig/distrib/Makefile.am	2009-04-11 06:24:16.000000000 +1000
+++ util-vserver-0.30.216-pre2833/distrib/Makefile.am	2009-06-08 20:49:25.000000000 +1000
@@ -21,7 +21,9 @@
 confdistribdir =	$(confdir)/.distributions
 confdefaultsdir =	$(confdir)/.defaults
 
-defaults_DATA =		misc/debootstrap.mirror \
+defaults_DATA =		misc/arch.mirror \
+			misc/arch.packages \
+			misc/debootstrap.mirror \
 			misc/debootstrap.uri \
 			misc/fstab \
 			misc/mtab \
@@ -39,7 +41,9 @@
 			   gentoo/initpre \
 			   debian/initpost \
 			   alpine/initpre \
-			   alpine/initpost
+			   alpine/initpost \
+			   arch/initpre \
+			   arch/initpost
 
 nobase_distrib_DATA	=  defaults/devs \
 			   defaults/apt.conf \
@@ -84,7 +88,8 @@
 			   breezy/debootstrap.script dapper/debootstrap.script \
 			   edgy/debootstrap.script   feisty/debootstrap.script \
 			   gutsy/debootstrap.script  hoary/debootstrap.script \
-			   warty/debootstrap.script
+			   warty/debootstrap.script \
+			   arch/rc arch/rc.shutdown arch/rc.sysinit arch/vserver.functions.d
 
 nobase_confdistrib_DATA	=  rh9/apt/sources.list \
 			   fc1/apt/sources.list \
diff -Nur util-vserver-0.30.216-pre2833.orig/distrib/arch/initpost util-vserver-0.30.216-pre2833/distrib/arch/initpost
--- util-vserver-0.30.216-pre2833.orig/distrib/arch/initpost	1970-01-01 10:00:00.000000000 +1000
+++ util-vserver-0.30.216-pre2833/distrib/arch/initpost	2009-06-08 20:49:25.000000000 +1000
@@ -0,0 +1,80 @@
+#!/bin/bash
+
+# Copyright (C) 2009 Jonathan Liu <net147@gmail.com>
+#
+# 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>
+
+cfgdir="$1"
+vdir="$cfgdir"/vdir
+. "$2"
+
+# go to vdir for chroot-sh
+pushd "$vdir" &>/dev/null
+
+# helper for sed in chroot
+chrootsed() {
+    local file="$1"
+    shift
+
+    sedtmp=$($_MKTEMP chrootsed.XXXXXX)
+
+    $_CHROOT_SH cat "$file" | $_SED "$@" > $sedtmp
+    $_CHROOT_SH truncate "$file" < $sedtmp
+
+    $_RM -f $sedtmp
+}
+
+echo ">>> Fixing /etc/syslog-ng.conf..."
+chrootsed /etc/syslog-ng.conf \
+    -e '/file("\/proc\/kmsg");/d'
+
+echo ">>> Fixing /etc/rc.conf..."
+chrootsed /etc/rc.conf \
+    -e 's#^DAEMONS=.*$#DAEMONS=(syslog-ng crond)#'
+
+if test -r "$cfgdir"/uts/nodename; then
+    echo ">>> Setting hostname..."
+    chrootsed /etc/rc.conf \
+        -e "s#\(^HOSTNAME\)=.*#\1=\"$(<"$cfgdir"/uts/nodename)\"#"
+fi
+
+echo ">>> Installing init scripts..."
+$_CHROOT_SH mkdir /opt &>/dev/null || :
+$_CHROOT_SH mkdir /opt/vserver-init >/dev/null
+
+$_CAT "$__DISTRIBDIR"/arch/rc | \
+$_CHROOT_SH truncate   /opt/vserver-init/rc
+$_CHROOT_SH chmod 0755 /opt/vserver-init/rc
+
+$_CAT "$__DISTRIBDIR"/arch/rc.sysinit | \
+$_CHROOT_SH truncate   /opt/vserver-init/rc.sysinit
+$_CHROOT_SH chmod 0755 /opt/vserver-init/rc.sysinit
+
+$_CAT "$__DISTRIBDIR"/arch/rc.shutdown | \
+$_CHROOT_SH truncate   /opt/vserver-init/rc.shutdown
+$_CHROOT_SH chmod 0755 /opt/vserver-init/rc.shutdown
+
+$_CAT "$__DISTRIBDIR"/arch/vserver.functions.d | \
+$_CHROOT_SH truncate   /etc/rc.d/functions.d/vserver
+$_CHROOT_SH chmod 0644 /etc/rc.d/functions.d/vserver
+
+echo /opt/vserver-init/rc > "$cfgdir"/apps/init/cmd.start
+echo /opt/vserver-init/rc > "$cfgdir"/apps/init/cmd.stop
+
+# restore original directory
+popd &>/dev/null
+
+# vim:set ts=4 sw=4 et:
diff -Nur util-vserver-0.30.216-pre2833.orig/distrib/arch/initpre util-vserver-0.30.216-pre2833/distrib/arch/initpre
--- util-vserver-0.30.216-pre2833.orig/distrib/arch/initpre	1970-01-01 10:00:00.000000000 +1000
+++ util-vserver-0.30.216-pre2833/distrib/arch/initpre	2009-06-08 20:49:25.000000000 +1000
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Copyright (C) 2009 Jonathan Liu <net147@gmail.com>
+#
+# 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: initpre <cfgdir> <path of util-vserver-vars>
+
+cfgdir="$1"
+vdir="$cfgdir"/vdir
+. "$2"
+
+# initstyle sanity
+initstyle=sysv
+test -e "$cfgdir"/apps/init/style && initstyle=$(<"$cfgdir"/apps/init/style)
+
+echo ">>> Checking init-style... $initstyle."
+
+if test "$initstyle" != "sysv"; then
+	echo "!!! The init-style you specified is not supported for Arch Linux."
+	echo "!!! Please use: sysv."
+fi
+
+# go to vdir for chroot-sh
+pushd "$vdir" &>/dev/null
+
+# create new pacman database
+echo ">>> Creating new pacman database..."
+$_CHROOT_SH mkdir /var &>/dev/null || :
+$_CHROOT_SH mkdir /var/lib &>/dev/null || :
+$_CHROOT_SH mkdir /var/lib/pacman &>/dev/null || :
+
+# set permissions
+echo ">>> Setting permissions..."
+$_CHROOT_SH chmod 0555 /proc
+
+# restore original directory
+popd &>/dev/null
+
+echo ">>> Installing packages..."
+
+# vim:set ts=4 sw=4 et:
diff -Nur util-vserver-0.30.216-pre2833.orig/distrib/arch/rc util-vserver-0.30.216-pre2833/distrib/arch/rc
--- util-vserver-0.30.216-pre2833.orig/distrib/arch/rc	1970-01-01 10:00:00.000000000 +1000
+++ util-vserver-0.30.216-pre2833/distrib/arch/rc	2009-06-08 20:49:25.000000000 +1000
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# Copyright (C) 2009 Jonathan Liu <net147@gmail.com>
+#
+# 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.
+
+case $RUNLEVEL in
+    2|3|4|5)
+        /opt/vserver-init/rc.sysinit
+        /etc/rc.single
+        /etc/rc.multi
+        ;;
+    6)
+        /opt/vserver-init/rc.shutdown
+        ;;
+    *)
+        ;;
+esac
+
+exit 0
+
+# vim:set ts=4 sw=4 et:
diff -Nur util-vserver-0.30.216-pre2833.orig/distrib/arch/rc.shutdown util-vserver-0.30.216-pre2833/distrib/arch/rc.shutdown
--- util-vserver-0.30.216-pre2833.orig/distrib/arch/rc.shutdown	1970-01-01 10:00:00.000000000 +1000
+++ util-vserver-0.30.216-pre2833/distrib/arch/rc.shutdown	2009-06-08 20:49:25.000000000 +1000
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+# /etc/rc.shutdown
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+# avoid staircase effect
+/bin/stty onlcr
+
+echo " "
+printhl "Initiating Shutdown..."
+echo " "
+
+# avoid NIS hanging syslog-ng on shutdown by unsetting the domainname
+if [ -x /bin/domainname ]; then
+	/bin/domainname ""
+fi
+
+if [ -x /etc/rc.local.shutdown ]; then
+	/etc/rc.local.shutdown
+fi
+
+if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
+	# Shutdown daemons
+	let i=${#DAEMONS[@]}
+	while [ $i -ge 0 ]; do
+		if [ "${DAEMONS[$i]:0:1}" != '!' ]; then
+			ck_daemon ${DAEMONS[$i]#@} || stop_daemon ${DAEMONS[$i]#@}
+		fi
+		let i=i-1
+	done
+	# find any leftover daemons and shut them down in reverse order
+	if [ -d /var/run/daemons ]; then
+		for daemon in $(/bin/ls -1t /var/run/daemons); do
+			stop_daemon $daemon
+		done
+	fi
+fi
+
+# Terminate all processes
+stat_busy "Sending SIGTERM To Processes"
+/sbin/killall5 -15 &> /dev/null
+/bin/sleep 5
+stat_done
+
+stat_busy "Sending SIGKILL To Processes"
+/sbin/killall5 -9 &> /dev/null
+/bin/sleep 1
+stat_done
+
+# Write to wtmp file
+/sbin/halt -w
+
+exit 0
+
+# End of file
+# vim: set ts=2 sw=2 noet:
diff -Nur util-vserver-0.30.216-pre2833.orig/distrib/arch/rc.sysinit util-vserver-0.30.216-pre2833/distrib/arch/rc.sysinit
--- util-vserver-0.30.216-pre2833.orig/distrib/arch/rc.sysinit	1970-01-01 10:00:00.000000000 +1000
+++ util-vserver-0.30.216-pre2833/distrib/arch/rc.sysinit	2009-06-08 20:49:25.000000000 +1000
@@ -0,0 +1,88 @@
+#!/bin/bash
+#
+# /etc/rc.sysinit
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+echo " "
+printhl "Arch Linux\n"
+printhl "${C_H2}http://www.archlinux.org"
+printhl "Copyright 2002-2007 Judd Vinet"
+printhl "Copyright 2007-2009 Aaron Griffin"
+printhl "Distributed under the GNU General Public License (GPL)"
+printsep
+
+# start up our mini logger until syslog takes over
+/sbin/minilogd
+
+# Static /dev, our last resort
+status "Using static /dev filesystem" true
+
+# bring up the loopback interface
+if [ -d /sys/class/net/lo ]; then
+	stat_busy "Bringing up loopback interface"
+	/sbin/ifconfig lo 127.0.0.1 up
+	if [ $? -ne 0 ]; then
+		stat_fail
+	else
+		stat_done
+	fi
+fi
+
+stat_busy "Removing Leftover Files"
+/bin/rm -f /etc/nologin &>/dev/null
+/bin/rm -f /etc/shutdownpid &>/dev/null
+/bin/rm -f /var/lock/* &>/dev/null
+/bin/rm -rf /tmp/* /tmp/.* &>/dev/null
+/bin/rm -f /forcefsck &>/dev/null
+(cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
+: > /var/run/utmp
+/bin/chmod 0664 /var/run/utmp
+# Keep {x,k,g}dm happy with xorg
+/bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix
+/bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix
+stat_done
+
+#status "Updating Shared Library Links" /sbin/ldconfig
+
+if [ "$HOSTNAME" != "" ]; then
+	status "Setting Hostname: $HOSTNAME" /bin/hostname $HOSTNAME
+fi
+
+# Set the NIS domain name, if necessary
+[ -f /etc/conf.d/nisdomainname ] && . /etc/conf.d/nisdomainname
+if [ "$NISDOMAINNAME" != "" ]; then
+	status "Setting NIS Domain Name: $NISDOMAINNAME" /bin/nisdomainname $NISDOMAINNAME
+fi
+
+# Flush old locale settings
+: >/etc/profile.d/locale.sh
+/bin/chmod 755 /etc/profile.d/locale.sh
+# Set user defined locale
+[ -z "$LOCALE" ] && LOCALE="en_US"
+stat_busy "Setting Locale: $LOCALE"
+echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh
+stat_done
+
+# Adding persistent network/cdrom generated rules
+if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
+	stat_busy "Adding persistent cdrom udev rules"
+	/bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
+	stat_done
+fi
+if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
+	stat_busy "Adding persistent network udev rules"
+	/bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
+	stat_done
+fi
+
+# Save our dmesg output from this boot
+if [ -f /var/log/dmesg.log ]; then
+	/bin/rm /var/log/dmesg.log
+fi
+/bin/dmesg > /var/log/dmesg.log
+
+# End of file
+# vim: set ts=2 noet:
diff -Nur util-vserver-0.30.216-pre2833.orig/distrib/arch/vserver.functions.d util-vserver-0.30.216-pre2833/distrib/arch/vserver.functions.d
--- util-vserver-0.30.216-pre2833.orig/distrib/arch/vserver.functions.d	1970-01-01 10:00:00.000000000 +1000
+++ util-vserver-0.30.216-pre2833/distrib/arch/vserver.functions.d	2009-06-08 20:49:25.000000000 +1000
@@ -0,0 +1,15 @@
+USECOLOR="yes"
+
+C_MAIN="\033[1;37;40m"      # main text
+C_OTHER="\033[1;34;40m"     # prefix & brackets
+C_SEPARATOR="\033[1;30;40m" # separator
+
+C_BUSY="\033[0;36;40m"      # busy
+C_FAIL="\033[1;31;40m"      # failed
+C_DONE="\033[1;37;40m"      # completed
+C_BKGD="\033[1;35;40m"      # backgrounded
+
+C_H1="\033[1;37;40m"        # highlight text 1
+C_H2="\033[1;36;40m"        # highlight text 2
+
+C_CLEAR="\033[1;0m"
diff -Nur util-vserver-0.30.216-pre2833.orig/distrib/misc/arch.mirror util-vserver-0.30.216-pre2833/distrib/misc/arch.mirror
--- util-vserver-0.30.216-pre2833.orig/distrib/misc/arch.mirror	1970-01-01 10:00:00.000000000 +1000
+++ util-vserver-0.30.216-pre2833/distrib/misc/arch.mirror	2009-06-08 20:49:25.000000000 +1000
@@ -0,0 +1 @@
+ftp://mirrors.easynews.com/linux/archlinux
diff -Nur util-vserver-0.30.216-pre2833.orig/distrib/misc/arch.packages util-vserver-0.30.216-pre2833/distrib/misc/arch.packages
--- util-vserver-0.30.216-pre2833.orig/distrib/misc/arch.packages	1970-01-01 10:00:00.000000000 +1000
+++ util-vserver-0.30.216-pre2833/distrib/misc/arch.packages	2009-06-08 20:49:25.000000000 +1000
@@ -0,0 +1,97 @@
+acl
+attr
+bash
+binutils
+bzip2
+coreutils
+cpio
+cracklib
+cryptsetup
+dash
+db
+dbus-core
+dcron
+device-mapper
+dhcpcd
+dialog
+diffutils
+dmapi
+e2fsprogs
+file
+filesystem
+findutils
+gawk
+gcc-libs
+gdbm
+gen-init-cpio
+gettext
+glibc
+grep
+groff
+gzip
+hdparm
+initscripts
+iputils
+jfsutils
+kbd
+kernel-headers
+klibc
+klibc-extras
+klibc-kbd
+klibc-module-init-tools
+klibc-udev
+less
+libarchive
+libdownload
+libgcrypt
+libgpg-error
+libpcap
+libusb
+licenses
+logrotate
+lvm2
+lzo2
+mailx
+man-db
+man-pages
+mdadm
+mkinitcpio
+mlocate
+module-init-tools
+nano
+ncurses
+net-tools
+pacman
+pacman-mirrorlist
+pam
+pciutils
+pcmciautils
+pcre
+perl
+popt
+ppp
+procinfo
+procps
+psmisc
+readline
+reiserfsprogs
+rp-pppoe
+sdparm
+sed
+shadow
+sysfsutils
+syslog-ng
+sysvinit
+tar
+tcp_wrappers
+texinfo
+tzdata
+udev
+usbutils
+util-linux-ng
+vi
+wget
+which
+wpa_supplicant
+xfsprogs
+zlib
diff -Nur util-vserver-0.30.216-pre2833.orig/scripts/Makefile-files util-vserver-0.30.216-pre2833/scripts/Makefile-files
--- util-vserver-0.30.216-pre2833.orig/scripts/Makefile-files	2009-04-11 06:24:15.000000000 +1000
+++ util-vserver-0.30.216-pre2833/scripts/Makefile-files	2009-06-08 20:49:25.000000000 +1000
@@ -40,6 +40,7 @@
 
 scripts_pkglib_src_DTA =	scripts/functions \
 				scripts/vserver-build.apt-rpm \
+				scripts/vserver-build.arch \
 				scripts/vserver-build.skeleton \
 				scripts/vserver-build.debootstrap \
 				scripts/vserver-build.fai \
diff -Nur util-vserver-0.30.216-pre2833.orig/scripts/vserver-build util-vserver-0.30.216-pre2833/scripts/vserver-build
--- util-vserver-0.30.216-pre2833.orig/scripts/vserver-build	2009-04-11 06:24:15.000000000 +1000
+++ util-vserver-0.30.216-pre2833/scripts/vserver-build	2009-06-08 20:48:58.000000000 +1000
@@ -76,6 +76,13 @@
                 ...  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
+    arch        ... -- [-a architecture] [-c <cache-dir>] [-m <mirror>]
+                ...  bootstraps an Arch Linux vserver using Arch Linux's pacman
+                     package manager
+                     -a architecture: i686 or x86_64 (default: same as host)
+                     -c cache-dir: package cache directory
+                     -m mirror to download packages from:
+                        e.g. ftp://mirrors.easynews.com/linux/archlinux
 
 Please report bugs to $PACKAGE_BUGREPORT"
     exit 0
@@ -136,7 +143,7 @@
 
 case x"$method" in
     (xlegacy)	exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
-    (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone)
+    (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xarch)
 		. $__PKGLIBDIR/vserver-build.$method
 		;;
     (x)		panic $"No build-method specified";;
diff -Nur util-vserver-0.30.216-pre2833.orig/scripts/vserver-build.arch util-vserver-0.30.216-pre2833/scripts/vserver-build.arch
--- util-vserver-0.30.216-pre2833.orig/scripts/vserver-build.arch	1970-01-01 10:00:00.000000000 +1000
+++ util-vserver-0.30.216-pre2833/scripts/vserver-build.arch	2009-06-08 20:49:25.000000000 +1000
@@ -0,0 +1,109 @@
+# $Id$
+
+# Copyright (C) 2009 Jonathan Liu <net147@gmail.com>
+#
+# 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.
+
+function findPacman()
+{
+    test ! -x "$PACMAN" || return 0
+
+    PACMAN=$(which pacman 2>/dev/null) ||
+    PACMAN=$(which pacman.static 2>/dev/null) || {
+        echo "Could not find 'pacman' or 'pacman.static' installed." >&2
+        exit 1
+    }
+}
+
+function findMirror
+{
+    test -n "$MIRROR" || {
+        local file
+        findFile file "$__PKGLIBDEFAULTDIR"/arch.mirror ""
+        test -z "$file" || read MIRROR <"$file"
+    }
+    test -n "$MIRROR" || MIRROR="ftp://mirrors.easynews.com/linux/archlinux"
+}
+
+function configurePacman
+{
+    PACMAN_CONFIG=$($_MKTEMP pacman.conf.XXXXXX)
+    trap "rm -f \"$PACMAN_CONFIG\"" EXIT
+
+    echo "[core]" > "$PACMAN_CONFIG"
+    echo "Server = $MIRROR/core/os/$ARCH" >> "$PACMAN_CONFIG"
+}
+
+function findPackages()
+{
+    test -n "$PACKAGES" || {
+        local file
+        findFile file "$__PKGLIBDEFAULTDIR"/arch.packages ""
+        test -z "$file" || PACKAGES=$(<"$file")
+    }
+    test -n "$PACKAGES" || PACKAGES="base"
+}
+
+tmp=$(getopt -o '+a:c:m:' --long debug -n "$0" -- "$@") || exit 1
+eval set -- "$tmp"
+ARCH="$(uname -m)"
+DISTRIBUTION="arch"
+MIRROR=
+PACMAN_CACHE=
+PACMAN_CONFIG=
+PACKAGES=
+
+while true; do
+    case "$1" in
+    -a)     ARCH=$2; shift;;
+    -c)     PACMAN_CACHE=$2; shift;;
+    -m)     MIRROR=$2; shift;;
+    --debug)    set -x;;
+    --)     shift; break ;;
+    *)      echo "vserver-build.arch: internal error: unrecognized option '$1'" >&2
+            exit 1
+            ;;
+    esac
+    shift
+done
+
+base.init
+base.initFilesystem "$OPTION_FORCE"
+
+setup_writeOption "$VSERVER_NAME"
+setup_writeInitialFstab
+
+test x"$ARCH" = xi686 -o x"$ARCH" = xx86_64 || {
+    echo "Unsupported architecture: $ARCH. Only i686 and x86_64 are supported."
+    exit 1
+}
+
+findPacman
+findMirror
+configurePacman
+findPackages
+
+test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE"  "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
+
+if test -z "$PACMAN_CACHE"; then
+    "$PACMAN" -Sy --noconfirm --config "$PACMAN_CONFIG" --root "$VDIR" $PACKAGES --cachedir "$PACMAN_CACHE"
+else
+    "$PACMAN" -Sy --noconfirm --config "$PACMAN_CONFIG" --root "$VDIR" $PACKAGES
+fi
+
+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
+
+base.setSuccess
+
+# vim:set ts=4 sw=4 et:
