summaryrefslogtreecommitdiff
path: root/functions
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 /functions
parent12ba91a1ca97c13d361c827d82fe50184aff8acf (diff)
downloaddebootstrap-e38962c7e5b7c3164451ef704aad4549b5b2c8f8.tar.gz
Illumos: setup devices in chroot, test for /dev/null
Diffstat (limited to 'functions')
-rw-r--r--functions16
1 files changed, 16 insertions, 0 deletions
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