You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/ash
|
|
|
|
|
|
|
|
backup() {
|
|
|
|
echo -ne "\033[0G\033[0K"
|
|
|
|
}
|
|
|
|
|
|
|
|
parse_opt() {
|
|
|
|
case "$1" in
|
|
|
|
*\=*)
|
|
|
|
echo "$1" | cut -f2 -d=
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
modules_scan() {
|
|
|
|
local MODS
|
|
|
|
MODS=`cat /etc/modules/${1}`
|
|
|
|
for x in ${MODS}
|
|
|
|
do
|
|
|
|
echo -ne "${HILITE}---- Scanning for ${x}..."
|
|
|
|
# MODULE=`find /lib/modules -name "${x}.$KSUFF"`
|
|
|
|
modprobe ${x}
|
|
|
|
# > /dev/null 2>&1
|
|
|
|
if [ $? -eq 0 ]
|
|
|
|
then
|
|
|
|
backup
|
|
|
|
echo -e "${GOOD}---- Detected ${x} hardware${NORMAL}"
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
backup
|
|
|
|
echo -ne "${NORMAL}"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
findcdmount() {
|
|
|
|
if [ "$#" -gt "1" ]
|
|
|
|
then
|
|
|
|
for x in $*
|
|
|
|
do
|
|
|
|
echo -e "${HILITE}---- Attempting to mount CD -- ${x}${NORMAL}"
|
|
|
|
mount -t iso9660 -r ${x} /newroot/mnt/cdrom > /dev/null 2>&1
|
|
|
|
if [ "$?" = "0" ]
|
|
|
|
then
|
|
|
|
REAL_ROOT="${x}"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ "${REAL_ROOT}" != "" ]
|
|
|
|
then
|
|
|
|
echo -e "${HILITE}---- CD medium found on $1${NORMAL}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
kill_devfsd() {
|
|
|
|
killall devfsd > /dev/null 2>&1
|
|
|
|
}
|