86be1a93577bb37355dea3866a50cef2d7e73064
[mirror/dsa-puppet.git] / modules / porterbox / files / schroot-dsa / config
1 # Settings for "dsa" profile.
2
3 ##
4 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
5 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
6 ##
7
8 if [ -e "$/etc/schroot/default/config" ]; then
9         . "$/etc/schroot/default/config"
10 else
11         FSTAB="/etc/schroot/default/fstab"
12         COPYFILES="/etc/schroot/default/copyfiles"
13         NSSDATABASES="/etc/schroot/default/nssdatabases"
14 fi
15
16
17 # added by weasel:
18 if [ "$CHROOT_SESSION_PURGE" = "true" ]; then
19     case $CHROOT_DESCRIPTION in
20         "["*-*_*-dchroot"]"*)
21             chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#\[}"; chroot_type="${chroot_type%%]*}"
22             suitevariant_arch_tuple="${chroot_type%%-dchroot-*}"
23             suitevariant=${suitevariant_arch_tuple%_*}
24             SUITE_BASE=${suitevariant%-*}
25             SUITE_VARIANT=${suitevariant##*-}
26         ;;
27         "["*_*-dchroot"]"*)
28             chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#\[}"; chroot_type="${chroot_type%%]*}"
29             SUITE_BASE="${chroot_type%%_*}"
30         ;;
31         *)
32             if [ "$STAGE" = "setup-start" ]; then
33                echo >&2 "Unable to parse chroot description for what kind of chroot you want."
34                exit 1
35             fi
36         ;;
37     esac
38 fi
39
40 CHROOT_FILE_UNPACK_DIR=/srv/chroot/schroot-unpack
41
42 if [ -e /etc/schroot/dsa/default-mirror ]; then
43     MIRROR=$(cat /etc/schroot/dsa/default-mirror )
44 fi
45 MIRROR=${MIRROR:-cdn.debian.net}
46
47 if [ "$(basename "$0")" = "00check" ] &&
48    [ "$CHROOT_TYPE" = "file" ] &&
49    [ "$STAGE" = "setup-start" ]; then
50         echo "Untarring chroot environment.  This might take a minute or two."
51 fi