
Author: rmh
Status:
11:00 < nyu> aj: btw, is #319799 ok now?
11:01 < aj> -  in_target mount -t proc proc /proc
11:01 < aj> +  in_target mount -t ${procfs} proc /proc
11:01 < aj> err, ewww
11:02 < nyu> no?
11:02 < aj> just move it into the case
11:02 < nyu> ok
11:02 < aj> otherwise that's fine
11:02 < aj> feel free to double check it works on linux and nmu
11:03 < nyu> i'll check, but i'm no longer DD.  I'll ask someone else to NMU
11:03 < nyu> thanks
11:03 < aj> oh, right

diff -ur debootstrap-0.3.2.old/functions debootstrap-0.3.2/functions
--- debootstrap-0.3.2.old/functions	2005-10-23 17:45:24.000000000 +0200
+++ debootstrap-0.3.2/functions	2005-10-28 15:38:38.000000000 +0200
@@ -759,29 +759,45 @@
 }
 
 setup_proc () {
-  on_exit "umount $TARGET/dev/pts"
-  on_exit "umount $TARGET/dev/shm"
-  on_exit "umount $TARGET/proc/bus/usb"
-  on_exit "umount $TARGET/proc"
-  umount $TARGET/proc 2>/dev/null || true
-  in_target mount -t proc proc /proc
-  if [ -d "$TARGET/sys" ] && grep -q '[[:space:]]sysfs' /proc/filesystems 2>/dev/null; then
-    on_exit "umount $TARGET/sys"
-    umount $TARGET/sys 2>/dev/null || true
-    in_target mount -t sysfs sysfs /sys
-  fi
+  case "$ARCH" in
+    kfreebsd-*)
+      on_exit "umount $TARGET/dev"
+      on_exit "umount $TARGET/proc"
+      umount $TARGET/proc 2>/dev/null || true
+      in_target mount -t linprocfs proc /proc
+    ;;
+    *)
+      on_exit "umount $TARGET/dev/pts"
+      on_exit "umount $TARGET/dev/shm"
+      on_exit "umount $TARGET/proc/bus/usb"
+      on_exit "umount $TARGET/proc"
+      umount $TARGET/proc 2>/dev/null || true
+      in_target mount -t proc proc /proc
+      if [ -d "$TARGET/sys" ] && grep -q '[[:space:]]sysfs' /proc/filesystems 2>/dev/null; then
+        on_exit "umount $TARGET/sys"
+        umount $TARGET/sys 2>/dev/null || true
+        in_target mount -t sysfs sysfs /sys
+      fi
+    ;;
+  esac
 }
 
 setup_devices () {
-  if [ -e $DEVICES_TARGZ ]; then
-    (cd "$TARGET"; zcat $DEVICES_TARGZ | tar -xf -)
-  else
-    if [ -e /dev/.devfsd ]; then
-      in_target mount -t devfs devfs /dev
-    else
-      error 1 NODEVTGZ "no %s. cannot create devices" "$DEVICES_TARGZ"
-    fi
-  fi
+  case "$ARCH" in
+    kfreebsd-*)
+      in_target mount -t devfs devfs /dev ;;
+    *)
+      if [ -e $DEVICES_TARGZ ]; then
+        (cd "$TARGET"; zcat $DEVICES_TARGZ | tar -xf -)
+      else
+        if [ -e /dev/.devfsd ] ; then
+          in_target mount -t devfs devfs /dev
+        else
+          error 1 NODEVTGZ "no %s. cannot create devices" "$DEVICES_TARGZ"
+        fi
+      fi
+    ;;
+  esac
 }
 
 setup_dselect_method () {
