From 874499f113b111c6747c075a4abfcd82e9a509fb Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 7 May 2013 10:57:01 +0200 Subject: [PATCH] Make schroot scripts work on wheezy --- modules/porterbox/files/schroot-dsa/config | 9 ++++++++- .../files/schroot-setup.d/99porterbox-extra-apt-options | 4 +--- .../files/schroot-setup.d/99porterbox-extra-sources | 4 +--- 3 files changed, 10 insertions(+), 7 deletions(-) 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 -- 2.20.1