projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use modern cryptography for NTP keys
[mirror/dsa-puppet.git]
/
modules
/
schroot
/
files
/
setup-all-dchroots
diff --git
a/modules/schroot/files/setup-all-dchroots
b/modules/schroot/files/setup-all-dchroots
index
2f5d710
..
c6efbb1
100755
(executable)
--- a/
modules/schroot/files/setup-all-dchroots
+++ b/
modules/schroot/files/setup-all-dchroots
@@
-28,9
+28,6
@@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
-DPKGARCH=$(dpkg --print-architecture)
-UNAMEARCH=$(uname -m)
-
get_suites() {
case "$1" in
amd64|i386|armel|armhf)
get_suites() {
case "$1" in
amd64|i386|armel|armhf)
@@
-49,13
+46,13
@@
do_one() {
case "$MODE" in
buildd)
mkdir -p /srv/buildd/unpack
case "$MODE" in
buildd)
mkdir -p /srv/buildd/unpack
- if ! $SILENT setup-dchroot $
extraargs
-f -a "$a" -D -d '/srv/buildd/unpack' -K "$s"
+ if ! $SILENT setup-dchroot $
EXTRAARGS
-f -a "$a" -D -d '/srv/buildd/unpack' -K "$s"
then
return 1
fi
;;
porterbox)
then
return 1
fi
;;
porterbox)
- if ! $SILENT setup-dchroot $
extraargs
-f -a "$a" "$s"
+ if ! $SILENT setup-dchroot $
EXTRAARGS
-f -a "$a" "$s"
then
return 1
fi
then
return 1
fi
@@
-73,22
+70,39
@@
cat << EOF
usage: $0 [<options>] [buildd]
OPTIONS:
usage: $0 [<options>] [buildd]
OPTIONS:
+ -a <ARCH> limit to ARCH
-c write config only
-h this help
-c write config only
-h this help
+ -s <SUITE> limit to SUITE
EOF
}
EOF
}
-extraargs=""
-while getopts "cu" OPTION
+##########
+# "main"
+##########
+
+
+# parse options
+##########
+EXTRAARGS=""
+limitarch=""
+limitsuite=""
+while getopts "cha:s:" OPTION
do
case $OPTION in
do
case $OPTION in
+ a)
+ limitarch="$OPTARG"
+ ;;
c)
c)
-
extraargs="$extraargs
-c"
+
EXTRAARGS="$EXTRAARGS
-c"
;;
h)
usage
exit 0
;;
;;
h)
usage
exit 0
;;
+ s)
+ limitsuite="$OPTARG"
+ ;;
*)
usage >&2
exit 1
*)
usage >&2
exit 1
@@
-97,6
+111,8
@@
do
done
shift $(($OPTIND - 1))
done
shift $(($OPTIND - 1))
+# parse arguments
+##########
if [ "$#" -gt 1 ]; then
usage >&2
exit 1
if [ "$#" -gt 1 ]; then
usage >&2
exit 1
@@
-115,13
+131,17
@@
else
MODE=porterbox
fi
MODE=porterbox
fi
+# figure out whether to be verbose or not
+##########
if [ -t 0 ] ; then
SILENT=""
else
SILENT="chronic"
fi
if [ -t 0 ] ; then
SILENT=""
else
SILENT="chronic"
fi
-
+# get list of archs based on dpkg architecture
+##########
+DPKGARCH=$(dpkg --print-architecture)
archs="$DPKGARCH"
case "$DPKGARCH" in
amd64)
archs="$DPKGARCH"
case "$DPKGARCH" in
amd64)
@@
-152,7
+172,9
@@
esac
err=0
for a in $archs; do
err=0
for a in $archs; do
+ [ "$limitarch" != "" ] && [ "$limitarch" != "$a" ] && continue
for s in `get_suites "$a"`; do
for s in `get_suites "$a"`; do
+ [ "$limitsuite" != "" ] && [ "$limitsuite" != "$s" ] && continue
if ! do_one "$a" "$s"; then
err=1
echo >&2
if ! do_one "$a" "$s"; then
err=1
echo >&2