aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-user-mode-linux
diff options
context:
space:
mode:
Diffstat (limited to 'pbuilder-user-mode-linux')
-rwxr-xr-xpbuilder-user-mode-linux13
1 files changed, 10 insertions, 3 deletions
diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux
index e2d3d9f..c96eed7 100755
--- a/pbuilder-user-mode-linux
+++ b/pbuilder-user-mode-linux
@@ -101,9 +101,11 @@ chroot ${UML_CHROOT_MOUNTPOINT} /tmp/chrootshell
#some variables need to be set from outside values, possibly
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
export TMPDIR=/tmp
-EXTRAOPT=
+unset EXTRAOPT
+declare -a EXTRAOPT
if [ -n "${UML_DISTRIBUTION}" ]; then
- EXTRAOPT="--distribution ${UML_DISTRIBUTION}"
+ EXTRAOPT[0]="--distribution"
+ EXTRAOPT[1]="${UML_DISTRIBUTION}"
fi
if [ -z "${UML_BUILDRESULT}" ]; then
BUILDRESULT=
@@ -113,7 +115,7 @@ else
mkdir -p ${UML_CHROOT_BUILDRESULTMOUNTDIR} || true
mount -t hostfs none "${UML_CHROOT_BUILDRESULTMOUNTDIR}" -o "${UML_BUILDRESULT}"
fi
-pbuilder "$1" ${UML_EXTRAOPT} \${EXTRAOPT} --buildresult "\${BUILDRESULT}" --buildplace "${UML_CHROOT_MOUNTPOINT}" --internal-build-uml ${BUILDING_DSC_FILE}
+pbuilder "$1" ${UML_EXTRAOPT} \${EXTRAOPT[@]} --buildresult "\${BUILDRESULT}" --buildplace "${UML_CHROOT_MOUNTPOINT}" --internal-build-uml ${BUILDING_DSC_FILE}
echo \$? > /proc/exitcode
EOF
@@ -242,6 +244,11 @@ case "${OPERATION}" in
operate_uml execute
;;
create)
+ if [ ! -d ~/.pbuilder-user-mode-linux ]; then
+ mkdir ~/.pbuilder-user-mode-linux
+ fi
+ cd ~/.pbuilder-user-mode-linux
+ sed "s/dist=.*/dist=${UML_DISTRIBUTION}/" /etc/rootstrap/rootstrap.conf|lv > rootstrap.conf
rootstrap -s 1000 ${PBUILDER_UML_IMAGE}
operate_uml update
;;