summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-02-09 23:25:50 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-02-09 23:25:50 +0400
commite38962c7e5b7c3164451ef704aad4549b5b2c8f8 (patch)
treedd2da357ae5ad36a57c8f067157c7af8fe0fb217
parent12ba91a1ca97c13d361c827d82fe50184aff8acf (diff)
downloaddebootstrap-e38962c7e5b7c3164451ef704aad4549b5b2c8f8.tar.gz
Illumos: setup devices in chroot, test for /dev/null
-rw-r--r--debian/changelog7
-rw-r--r--functions16
2 files changed, 23 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index a3bb1e1..1bd9312 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debootstrap (1.0.38+dyson1) unstable; urgency=low
+
+ * Illumos: setup devices in chroot
+ * Illumos: test for /dev/null
+
+ -- Igor Pashev <pashev.igor@gmail.com> Thu, 09 Feb 2012 23:16:10 +0400
+
debootstrap (1.0.38) unstable; urgency=low
[ Joey Hess ]
diff --git a/functions b/functions
index de1f10c..61f7b6e 100644
--- a/functions
+++ b/functions
@@ -977,6 +977,9 @@ setup_proc () {
hurd*)
;;
illumos*)
+ umount_on_exit /proc
+ umount "$TARGET/proc" 2>/dev/null || true
+ mount -F proc - "$TARGET/proc"
;;
*)
umount_on_exit /dev/pts
@@ -1016,6 +1019,13 @@ setup_devices () {
hurd*)
setup_devices_hurd ;;
illumos*)
+ umount_on_exit /devices
+ umount_on_exit /dev/fd
+ umount "$TARGET/devices" 2>/dev/null || true
+ umount "$TARGET/dev/fd" 2>/dev/null || true
+ mount -F lofs /devices "$TARGET/devices"
+ mount -F fd - "$TARGET/dev/fd"
+ devfsadm -r "$TARGET"
;;
*)
if [ -e "$DEVICES_TARGZ" ]; then
@@ -1264,6 +1274,12 @@ check_sane_mount () {
*freebsd*|hurd*)
;;
illumos*)
+ mknod "$1/test-dev-null" c 67 2 || return 1
+ if ! echo test > "$1/test-dev-null"; then
+ rm -f "$1/test-dev-null"
+ return 1
+ fi
+ rm -f "$1/test-dev-null"
;;
*)
mknod "$1/test-dev-null" c 1 3 || return 1