summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-06-28 22:50:58 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-06-28 22:50:58 +0400
commitcc882fe30e524de68a5628c644622fc0aab6e4e9 (patch)
tree288c3c954dddd1e80ccd37c375a9e8fe4d4b0df0
parent89e42c9b04a69c6aec2bee5c2edabef4218588f2 (diff)
downloadlive-cc882fe30e524de68a5628c644622fc0aab6e4e9.tar.gz
Properly configure devices
-rwxr-xr-xfs-root15
1 files 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