summaryrefslogtreecommitdiff
path: root/functions
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 /functions
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.
Diffstat (limited to 'functions')
-rw-r--r--functions19
1 files changed, 11 insertions, 8 deletions
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"