summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-08-15 14:34:24 -0400
committerJoey Hess <joey@kitenet.net>2011-08-15 14:34:24 -0400
commita0785d5497a1971834764e11662d915647d7da14 (patch)
tree1bc05af124cd36b8d668839cc85293bf7a85204e
parent82ab93491c86fa45abc7f4a4b0d18827807244be (diff)
downloaddebootstrap-a0785d5497a1971834764e11662d915647d7da14.tar.gz
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.
-rw-r--r--debian/changelog2
-rwxr-xr-xdebootstrap3
-rw-r--r--functions6
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 <joeyh@debian.org> 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