ppcrcd/trunk/initrd.dir/linuxrc
sparky
cvs at pld-linux.org
Thu Mar 23 22:28:38 CET 2006
Author: sparky
Date: Thu Mar 23 22:28:33 2006
New Revision: 7301
Modified:
ppcrcd/trunk/initrd.dir/linuxrc
Log:
- add try=<N> option
Modified: ppcrcd/trunk/initrd.dir/linuxrc
==============================================================================
--- ppcrcd/trunk/initrd.dir/linuxrc (original)
+++ ppcrcd/trunk/initrd.dir/linuxrc Thu Mar 23 22:28:33 2006
@@ -54,9 +54,21 @@
$B/echo
}
+#@initrd@: try=<N>:
+#@ How many times try to mount devices looking for ppcrcd.sqf.
+#@ Default is 5.
+#@ If trying to boot from hfsplus should be set to 1, as HFS+ is
+#@ broken and should not be tried if there's possibility to find file
+#@ on other device.
+#@ If trying to boot from usb-storage devices should be at last 2,
+#@ as kernel needs time to find it.
findcd() {
FOUND=""
- for TRY in 1 2 3 4 5; do
+ TRIES=`$B/awk '/(^| |\t)try=[1-9][0-9]*( |\t|$)/ { gsub(/^.*try=/,""); gsub(/[ \t].*$/,""); print }' /proc/cmdline`
+ $B/test -n "$TRIES" || TRIES=5
+ TRY=1
+
+ while $B/test $TRY -le $TRIES; do
$B/echo "${cG}*** Checking for IDE cdrom${cE}"
if $B/test $TRY -eq 1; then
@@ -117,6 +129,7 @@
break
fi
+ let TRY++
done
if $B/test -z "$FOUND"; then
More information about the pld-cvs-commit
mailing list