From: Peter Palfrader Date: Wed, 8 May 2013 09:14:41 +0000 (+0200) Subject: Allow a different naming scheme X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=3b94861e12ffc0a39e7e6436e42e4a9c30a6e82f;p=mirror%2Fdsa-puppet.git Allow a different naming scheme --- diff --git a/modules/porterbox/files/setup-dchroot b/modules/porterbox/files/setup-dchroot index db098d198..db27d5a15 100755 --- a/modules/porterbox/files/setup-dchroot +++ b/modules/porterbox/files/setup-dchroot @@ -42,6 +42,7 @@ OPTIONS: -c write config only -f overwrite config and target tarball -k KEYRING use an alternate keyring [$keyring] + -s use sbuild compatible naming scheme -h this help EOF } @@ -69,9 +70,16 @@ genschrootconf() { local suite="${suite}-${extra}" fi + if [ -n "$sbuildnames" ]; then + local name="${suite}-${arch}-sbuild" + else + local name="${suite}_${arch}-dchroot" + fi + + cat << EOF -[${suite}_${arch}-dchroot] -description=[${suite}_${arch}-dchroot] Debian $suite chroot for $arch +[${name}] +description=[${name}] Debian $suite chroot for $arch type=file file=$target groups=Debian,guest @@ -123,10 +131,11 @@ configonly="" force="" basedir="/srv/chroot" keyring=/usr/share/keyrings/debian-archive-keyring.gpg +sbuildnames="" declare -a cleanup trap do_cleanup EXIT -while getopts "a:b:cfhk:m:" OPTION +while getopts "a:b:cfhk:m:s" OPTION do case $OPTION in a) @@ -151,6 +160,9 @@ do m) mirror="$OPTARG" ;; + s) + sbuildnames="1" + ;; *) usage >&2 exit 1