summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-01-27 05:14:41 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-01-27 05:14:41 +0000
commitbc64c5865b94ce29f1ae583fe5a2207fd0b90f50 (patch)
tree466a7589e16cfa5b6cea3b6c979683e37c9648ed
parent66db23e591f34d5c66e126ba1d56b877a16df47b (diff)
downloaddebootstrap-bc64c5865b94ce29f1ae583fe5a2207fd0b90f50.tar.gz
debootstrap (1.0.38+dyson2) unstable; urgency=low
* Test for /dev/null again on illumos, determining major number from /etc/name_to_major. * Add support for solaris-* architecture.
-rw-r--r--debian/changelog8
-rw-r--r--functions19
2 files changed, 19 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index 1bd9312..f44c540 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debootstrap (1.0.38+dyson2) unstable; urgency=low
+
+ * Test for /dev/null again on illumos, determining major number
+ from /etc/name_to_major.
+ * Add support for solaris-* architecture.
+
+ -- Igor Pashev <pashev.igor@gmail.com> Sun, 27 Jan 2013 05:14:19 +0000
+
debootstrap (1.0.38+dyson1) unstable; urgency=low
* Illumos: setup devices in chroot
diff --git a/functions b/functions
index c3fd387..c1b3763 100644
--- a/functions
+++ b/functions
@@ -1271,17 +1271,20 @@ check_sane_mount () {
mkdir -p "$1"
case "$HOST_OS" in
- *freebsd*|hurd*)
+ *freebsd*|hurd*)
;;
- illumos*|solaris*)
- mknod "$1/test-dev-null" c 67 2 || return 1
- if ! echo test > "$1/test-dev-null"; then
+ illumos*|solaris*)
+ local nullmajor=$(awk '/^mm/ {print $2}' /etc/name_to_major 2>/dev/null)
+ if [ -n "$nullmajor" ]; then
+ mknod "$1/test-dev-null" c $nullmajor 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"
- return 1
fi
- rm -f "$1/test-dev-null"
- ;;
- *)
+ ;;
+ *)
mknod "$1/test-dev-null" c 1 3 || return 1
if ! echo test > "$1/test-dev-null"; then
rm -f "$1/test-dev-null"