From: Peter Palfrader Date: Tue, 7 May 2013 08:57:01 +0000 (+0200) Subject: Make schroot scripts work on wheezy X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=874499f113b111c6747c075a4abfcd82e9a509fb;p=mirror%2Fdsa-puppet.git Make schroot scripts work on wheezy --- diff --git a/modules/porterbox/files/schroot-dsa/config b/modules/porterbox/files/schroot-dsa/config index 466703125..86be1a935 100644 --- a/modules/porterbox/files/schroot-dsa/config +++ b/modules/porterbox/files/schroot-dsa/config @@ -5,7 +5,14 @@ ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## -[ -e "/etc/schroot/default/config" ] && . "/etc/schroot/default/config" +if [ -e "$/etc/schroot/default/config" ]; then + . "$/etc/schroot/default/config" +else + FSTAB="/etc/schroot/default/fstab" + COPYFILES="/etc/schroot/default/copyfiles" + NSSDATABASES="/etc/schroot/default/nssdatabases" +fi + # added by weasel: if [ "$CHROOT_SESSION_PURGE" = "true" ]; then diff --git a/modules/porterbox/files/schroot-setup.d/99porterbox-extra-apt-options b/modules/porterbox/files/schroot-setup.d/99porterbox-extra-apt-options index 26947b79d..1753a7d94 100755 --- a/modules/porterbox/files/schroot-setup.d/99porterbox-extra-apt-options +++ b/modules/porterbox/files/schroot-setup.d/99porterbox-extra-apt-options @@ -12,10 +12,8 @@ set -e . "$SETUP_DATA_DIR/common-data" . "$SETUP_DATA_DIR/common-functions" -if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then +if [ -f "${CHROOT_SCRIPT_CONFIG:-}" ]; then . "$CHROOT_SCRIPT_CONFIG" -elif [ "$STATUS" = "ok" ]; then - fatal "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist" fi diff --git a/modules/porterbox/files/schroot-setup.d/99porterbox-extra-sources b/modules/porterbox/files/schroot-setup.d/99porterbox-extra-sources index 854296a8f..01fecbcab 100755 --- a/modules/porterbox/files/schroot-setup.d/99porterbox-extra-sources +++ b/modules/porterbox/files/schroot-setup.d/99porterbox-extra-sources @@ -12,10 +12,8 @@ set -e . "$SETUP_DATA_DIR/common-data" . "$SETUP_DATA_DIR/common-functions" -if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then +if [ -f "${CHROOT_SCRIPT_CONFIG:-}" ]; then . "$CHROOT_SCRIPT_CONFIG" -elif [ "$STATUS" = "ok" ]; then - fatal "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist" fi