# Copyright © 2012  Roger Leigh <rleigh@debian.org>
#
# schroot is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# schroot is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see
# <http://www.gnu.org/licenses/>.
#
#####################################################################

# Common configuration for use in schroot setup scripts

if [ -n "${SETUP_CONFIG}" ]; then
    SETUP_CONFIG="${SYSCONF_DIR}/${SETUP_CONFIG}"
    if [ -f "$SETUP_CONFIG" ]; then
	. "$SETUP_CONFIG"
    fi
else
    if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
	. "$CHROOT_SCRIPT_CONFIG"
    fi
fi

if [ -n "${SETUP_FSTAB}" ]; then
    SETUP_FSTAB="${SYSCONF_DIR}/${SETUP_FSTAB}"
fi

if [ -n "${SETUP_COPYFILES}" ]; then
    SETUP_COPYFILES="${SYSCONF_DIR}/${SETUP_COPYFILES}"
fi

if [ -n "${SETUP_NSSDATABASES}" ]; then
    SETUP_NSSDATABASES="${SYSCONF_DIR}/${SETUP_NSSDATABASES}"
fi
