From cc882fe30e524de68a5628c644622fc0aab6e4e9 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sat, 28 Jun 2014 22:50:58 +0400 Subject: Properly configure devices --- fs-root | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fs-root b/fs-root index 925c8e7..53f53ee 100755 --- a/fs-root +++ b/fs-root @@ -1,6 +1,5 @@ #!/sbin/sh -set -e set -u MOUNTPOINT="/cdrom" @@ -12,24 +11,27 @@ exec >/dev/msglog 2>&1 # First, remount / read-write to update /dev mount -o remount / -# The sd nodes are not created till you try to access them. -echo "Probing for device nodes ..." -ls -lR /devices/* >/dev/null +echo "Configuring devices ..." +devfsadm -I -P +devfsadm -C echo "Mounting /usr image ..." # Now, search removable media for $USR found='no' for dfile in /dev/removable-media/dsk/*s2; do if [ -e "$dfile" ]; then - if mount -F hsfs -o ro "$dfile" "${MOUNTPOINT}" - then + if mount -F hsfs -o ro "$dfile" "${MOUNTPOINT}"; then if [ -f "${MOUNTPOINT}/${USR}" ]; then found='yes' break else umount "${MOUNTPOINT}" fi + else + echo "mount failed: $?" fi + else + echo "$dfile does not exist" fi done @@ -56,7 +58,6 @@ mount -F hsfs -o ro /dev/lofi/1 /usr2 rm -f /usr ln -sf /usr2 /usr -devfsadm -C devfsadm -I -P exit 0 -- cgit v1.2.3