summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2012-06-24 21:26:49 +0100
committerRoger Leigh <rleigh@debian.org>2012-06-24 21:26:49 +0100
commitd640e1928a8e52573db57f1ab2a0692fe7f36416 (patch)
treeb21d194f95626416ebe432a5ff62f6b16d2d82fd /etc
parentdd98123cbfe28b81c3fe85186adebb1a8c23050c (diff)
downloadschroot-d640e1928a8e52573db57f1ab2a0692fe7f36416.tar.gz
sbuild-chroot: Correct script-config serialisation
Diffstat (limited to 'etc')
-rwxr-xr-xetc/setup.d/10mount7
-rwxr-xr-xetc/setup.d/20copyfiles7
-rwxr-xr-xetc/setup.d/20nssdatabases7
-rw-r--r--etc/setup.d/common-config25
4 files changed, 20 insertions, 26 deletions
diff --git a/etc/setup.d/10mount b/etc/setup.d/10mount
index 5a1c4de4..bcb623dd 100755
--- a/etc/setup.d/10mount
+++ b/etc/setup.d/10mount
@@ -214,12 +214,6 @@ fi
# Mount filesystems from fstab for all chroot types
if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then
- # For backward compatibility
- if [ -z "$SETUP_FSTAB" ]; then
- SETUP_FSTAB="$FSTAB"
- else
- SETUP_FSTAB="${SCHROOT_SYSCONF_DIR}/${SETUP_FSTAB}"
- fi
if [ -n "$SETUP_FSTAB" ]; then
if [ -f "$SETUP_FSTAB" ]; then
@@ -229,4 +223,5 @@ if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then
fatal "setup_fstab file '$SETUP_FSTAB' does not exist"
fi
fi
+
fi
diff --git a/etc/setup.d/20copyfiles b/etc/setup.d/20copyfiles
index 7d8f3cbb..bbeb2482 100755
--- a/etc/setup.d/20copyfiles
+++ b/etc/setup.d/20copyfiles
@@ -77,13 +77,6 @@ copy_file()
if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then
- # For backward compatibility
- if [ -z "$SETUP_COPYFILES" ]; then
- SETUP_COPYFILES="$COPYFILES"
- else
- SETUP_COPYFILES="${SCHROOT_SYSCONF_DIR}/${SETUP_COPYFILES}"
- fi
-
if [ -n "$SETUP_COPYFILES" ]; then
if [ -f "$SETUP_COPYFILES" ]; then
while read file; do
diff --git a/etc/setup.d/20nssdatabases b/etc/setup.d/20nssdatabases
index 23fe2e28..dbc04e17 100755
--- a/etc/setup.d/20nssdatabases
+++ b/etc/setup.d/20nssdatabases
@@ -34,13 +34,6 @@ dup_nss()
if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then
- # For backward compatibility
- if [ -z "$SETUP_NSSDATABASES" ]; then
- SETUP_NSSDATABASES="$NSSDATABASES"
- else
- SETUP_NSSDATABASES="${SCHROOT_SYSCONF_DIR}/${SETUP_NSSDATABASES}"
- fi
-
if [ -n "$SETUP_NSSDATABASES" ]; then
if [ -f "$SETUP_NSSDATABASES" ]; then
while read db; do
diff --git a/etc/setup.d/common-config b/etc/setup.d/common-config
index 5c10119e..e5567473 100644
--- a/etc/setup.d/common-config
+++ b/etc/setup.d/common-config
@@ -18,25 +18,38 @@
# Common configuration for use in schroot setup scripts
+# Source setup.config if set
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
+# Source script-config if set.
+if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
+ . "$CHROOT_SCRIPT_CONFIG"
fi
+# Set absolute paths
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
+
+# For backward compatibility with old script-config files. This
+# overrides the new profile userdata settings. It will be removed in
+# 1.7.x
+if [ -n "$FSTAB" ]; then
+ SETUP_FSTAB="$FSTAB"
+fi
+if [ -n "$COPYFILES" ]; then
+ SETUP_COPYFILES="$COPYFILES"
+fi
+if [ -n "$NSSDATABASES" ]; then
+ SETUP_NSSDATABASES="$NSSDATABASES"
+fi