From a0785d5497a1971834764e11662d915647d7da14 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 15 Aug 2011 14:34:24 -0400 Subject: Fix support for running debootstrap on a FreeBSD host to create a kFreeBSD chroot or jail. This worked in squeeze, as documented here: http://blog.vx.sk/archives/22-Updated-Tutorial-Debian-GNUkFreeBSD-in-a-FreeBSD-jail.html But recent changes to differentiate between the host and target ARCH/OS broke it. All that's needed to get it back is to detect FreeBSD's uname output. Untested. --- debian/changelog | 2 ++ debootstrap | 3 +++ functions | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 22b1927..222e27f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ debootstrap (1.0.36) UNRELEASED; urgency=low * Guess host OS based on uname for non-Debian systems. Closes: #637363 + * Fix support for running debootstrap on a FreeBSD host to create a kFreeBSD + chroot or jail. -- Joey Hess Mon, 15 Aug 2011 14:14:29 -0400 diff --git a/debootstrap b/debootstrap index 809c1c0..42f7133 100755 --- a/debootstrap +++ b/debootstrap @@ -413,6 +413,9 @@ if [ -z "$HOST_OS" ]; then GNU) HOST_OS=hurd ;; + FreeBSD*) + HOST_OS=freebsd + ;; esac fi diff --git a/functions b/functions index 67f0c65..d33939e 100644 --- a/functions +++ b/functions @@ -939,7 +939,7 @@ clear_mtab () { setup_proc () { case "$HOST_OS" in - kfreebsd*) + *freebsd*) umount_on_exit /dev umount_on_exit /proc umount "$TARGET/proc" 2>/dev/null || true @@ -978,7 +978,7 @@ setup_devices () { fi case "$HOST_OS" in - kfreebsd*) + *freebsd*) in_target mount -t devfs devfs /dev ;; hurd*) setup_devices_hurd ;; @@ -1199,7 +1199,7 @@ check_sane_mount () { mkdir -p "$1" case "$HOST_OS" in - kfreebsd*|hurd*) + *freebsd*|hurd*) ;; *) mknod "$1/test-dev-null" c 1 3 || return 1 -- cgit v0.12