summaryrefslogtreecommitdiffstats
path: root/debootstrap
diff options
context:
space:
mode:
authorJoey Hess <joeyh@debian.org>2007-10-21 03:13:15 (GMT)
committerJoey Hess <joeyh@debian.org>2007-10-21 03:13:15 (GMT)
commit8d0cc497123b9b5969935573bd70c8d30a125f0c (patch)
treead2d61132b2de0f094c8d4de7f87970274ee6844 /debootstrap
parent5500f6d29c0d8dc3b3d9ae4dd0dcd74209bc5459 (diff)
downloaddebootstrap-8d0cc497123b9b5969935573bd70c8d30a125f0c.zip
debootstrap-8d0cc497123b9b5969935573bd70c8d30a125f0c.tar.gz
debootstrap-8d0cc497123b9b5969935573bd70c8d30a125f0c.tar.bz2
* Skip the noexec/nodev test when running --print-debs or other operations
that do not involve building systems. r49840
Diffstat (limited to 'debootstrap')
-rwxr-xr-xdebootstrap11
1 files changed, 4 insertions, 7 deletions
diff --git a/debootstrap b/debootstrap
index aa02dca..90a643b 100755
--- a/debootstrap
+++ b/debootstrap
@@ -307,6 +307,10 @@ if am_doing_phase first_stage second_stage; then
if [ -x /usr/bin/id ] && [ `id -u` -ne 0 ]; then
error 1 NEEDROOT "debootstrap can only run as root"
fi
+ # Ensure that we can create working devices and executables on the target.
+ if ! check_sane_mount "$TARGET"; then
+ error 1 NOEXEC "Cannot install into target '$TARGET' mounted with noexec or nodev"
+ fi
fi
if [ ! -e "$SCRIPT" ]; then
@@ -351,13 +355,6 @@ fi
###########################################################################
-# Ensure that we can create working devices and executables on the target.
-if ! check_sane_mount "$TARGET"; then
- error 1 NOEXEC "Cannot install into target '$TARGET' mounted with noexec or nodev"
-fi
-
-###########################################################################
-
if [ "$UNPACK_TARBALL" ]; then
if [ "${UNPACK_TARBALL#/}" = "$UNPACK_TARBALL" ]; then
error 1 TARPATH "Tarball must be given a complete path"