. /etc/sysconfig/initrd
fi
+if is_yes $USEBSP ; then
+ [ ! -x /sbin/bsp ] && USEBSP="no"
+fi
target=""
kernel=""
force=""
exit 1
}
+
+my_find() {
+ for name in `ls`
+ do
+ if [ -d $name ]; then
+ (cd $name;my_find $1/$name $2)
+ else
+ [ -f $name -a "$name" = "$2" ] && echo $1/$name
+ fi
+ done
+}
+
findmodule() {
skiperrors=""
modName=$1
- if [ "$(echo $modName | cut -b1)" = "-" ]; then
+ if [ "$(echo $modName | awk '{print(substr($0,1,1));}')" = "-" ]; then
skiperrors=1
- modName="$(echo $modName | cut -b2-)"
+ modName="$(echo $modName | awk '{print(substr($0,2));}')"
fi
if [ "$modName" = "pluto" ]; then
findmodule socal
fi
- fmPath="`(cd /lib/modules/$kernel; find -type f -name "$modName.o")`"
+ fmPath="`(cd /lib/modules/$kernel; my_find . "$modName.o")`"
if [ ! -f "/lib/modules/$kernel/$fmPath" ]; then
if [ -n "$skiperrors" ]; then
fi
# check to see if we need to set up a loopback filesystem
-if is_yes "`echo "$rootdev" | cut -d/ -f3 | awk '/loop/ { print "yes"; }'`" ; then
+if is_yes "`echo "$rootdev" | awk -F/ '{print($3);}' | awk '/loop/ { print "yes"; }'`" ; then
if [ ! -x /sbin/losetup ]; then
echo "losetup is missing"
exit 1
fi
- key="^# $(echo $rootdev | cut -d/ -f3 | tr '[a-z]' '[A-Z]'):"
+ key="^# $(echo $rootdev | awk -F/ '{print($3);}' | tr '[a-z]' '[A-Z]'):"
if ! is_yes "`awk '/'$key'/ { print( "yes"); }' $fstab`" ; then
echo "The root filesystem is on a $rootdev, but there is no magic entry in $fstab" 1>&2
echo "for this device. Consult the geninitrd man page for more information" 2>&2