From e38962c7e5b7c3164451ef704aad4549b5b2c8f8 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Thu, 9 Feb 2012 23:25:50 +0400 Subject: Illumos: setup devices in chroot, test for /dev/null --- functions | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'functions') 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 -- cgit v1.2.3