summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-08-15 18:25:03 (GMT)
committerJoey Hess <joey@kitenet.net>2011-08-15 18:25:03 (GMT)
commit82ab93491c86fa45abc7f4a4b0d18827807244be (patch)
tree48bcb0f14095967d093d1156670a16108d03e553 /functions
parent03a8b28cc539bd4cec79cea594e36f6149f2f350 (diff)
downloaddebootstrap-82ab93491c86fa45abc7f4a4b0d18827807244be.zip
debootstrap-82ab93491c86fa45abc7f4a4b0d18827807244be.tar.gz
debootstrap-82ab93491c86fa45abc7f4a4b0d18827807244be.tar.bz2
Guess host OS based on uname for non-Debian systems. Closes: #637363
Deboostrap only cares if the host OS is Linux, Hurd, or kFreeBSD. The actual architecture used on the host doesn't matter, as long as the target arch can run in the chroot. This does not address running debootstrap on a FreeBSD system in order to build a kFreeBSD chroot. That seems to have already been not working, since debootstrap checked for kfreebsd, and not freebsd.
Diffstat (limited to 'functions')
-rw-r--r--functions16
1 files changed, 8 insertions, 8 deletions
diff --git a/functions b/functions
index 98c7652..67f0c65 100644
--- a/functions
+++ b/functions
@@ -938,14 +938,14 @@ clear_mtab () {
}
setup_proc () {
- case "$HOST_ARCH" in
- kfreebsd-*)
+ case "$HOST_OS" in
+ kfreebsd*)
umount_on_exit /dev
umount_on_exit /proc
umount "$TARGET/proc" 2>/dev/null || true
in_target mount -t linprocfs proc /proc
;;
- hurd-*)
+ hurd*)
;;
*)
umount_on_exit /dev/pts
@@ -977,10 +977,10 @@ setup_devices () {
return 0
fi
- case "$HOST_ARCH" in
- kfreebsd-*)
+ case "$HOST_OS" in
+ kfreebsd*)
in_target mount -t devfs devfs /dev ;;
- hurd-*)
+ hurd*)
setup_devices_hurd ;;
*)
if [ -e "$DEVICES_TARGZ" ]; then
@@ -1198,8 +1198,8 @@ get_next_predep () {
check_sane_mount () {
mkdir -p "$1"
- case "$HOST_ARCH" in
- kfreebsd-*|hurd-*)
+ case "$HOST_OS" in
+ kfreebsd*|hurd*)
;;
*)
mknod "$1/test-dev-null" c 1 3 || return 1