projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ship a schroot-list-sessions
[mirror/dsa-puppet.git]
/
modules
/
porterbox
/
files
/
setup-dchroot
diff --git
a/modules/porterbox/files/setup-dchroot
b/modules/porterbox/files/setup-dchroot
index
862e99f
..
73cc373
100755
(executable)
--- a/
modules/porterbox/files/setup-dchroot
+++ b/
modules/porterbox/files/setup-dchroot
@@
-40,6
+40,7
@@
OPTIONS:
-m MIRROR http mirror to use [$mirror]
-b basedir place where to build the chroot/tarball [$basedir]
-f overwrite stuff.
-m MIRROR http mirror to use [$mirror]
-b basedir place where to build the chroot/tarball [$basedir]
-f overwrite stuff.
+ -c write config only.
-h this help.
EOF
}
-h this help.
EOF
}
@@
-69,7
+70,7
@@
genschrootconf() {
cat << EOF
[${suite}_${arch}-dchroot]
cat << EOF
[${suite}_${arch}-dchroot]
-description=Debian $suite chroot for $arch
+description=
[${suite}_${arch}-dchroot]
Debian $suite chroot for $arch
type=file
file=$target
groups=Debian,guest
type=file
file=$target
groups=Debian,guest
@@
-113,12
+114,13
@@
if [ -e /etc/schroot/dsa/default-mirror ]; then
mirror=$(cat /etc/schroot/dsa/default-mirror )
fi
mirror="${mirror:-http://cdn.debian.net/debian}"
mirror=$(cat /etc/schroot/dsa/default-mirror )
fi
mirror="${mirror:-http://cdn.debian.net/debian}"
+configonly=""
force=""
basedir="/srv/chroot"
declare -a cleanup
trap do_cleanup EXIT
force=""
basedir="/srv/chroot"
declare -a cleanup
trap do_cleanup EXIT
-while getopts "a:b:fhm:" OPTION
+while getopts "a:b:
c
fhm:" OPTION
do
case $OPTION in
a)
do
case $OPTION in
a)
@@
-127,6
+129,9
@@
do
b)
basedir="$OPTARG"
;;
b)
basedir="$OPTARG"
;;
+ c)
+ configonly="1"
+ ;;
f)
force="1"
;;
f)
force="1"
;;
@@
-166,6
+171,8
@@
schrootconfig="/etc/schroot/chroot.d/${tuple}-dchroot"
#
genschrootconf "$suite" "$arch" "$target" | tee "$schrootconfig"
#
genschrootconf "$suite" "$arch" "$target" | tee "$schrootconfig"
+if [ -n "$configonly" ]; then exit 0; fi
+
rootdir=$(mktemp -d "$basedir/create-$suite-XXXXXX")
cleanup+=("rm -r $rootdir")
cleanup+=("umount $rootdir/sys")
rootdir=$(mktemp -d "$basedir/create-$suite-XXXXXX")
cleanup+=("rm -r $rootdir")
cleanup+=("umount $rootdir/sys")