|
|
@ -187,17 +187,13 @@ cache_cd_contents() {
|
|
|
|
mount_sysfs() {
|
|
|
|
mount_sysfs() {
|
|
|
|
if [ "${KV_2_6_OR_GREATER}" ]
|
|
|
|
if [ "${KV_2_6_OR_GREATER}" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
# Udev is semi-broken on non /sys sysfs mount points.
|
|
|
|
|
|
|
|
mount -t sysfs /sys /sys >/dev/null 2>&1
|
|
|
|
mount -t sysfs /sys /sys >/dev/null 2>&1
|
|
|
|
ret=$?
|
|
|
|
ret=$?
|
|
|
|
|
|
|
|
[ "$ret" -eq '0' ] || bad_msg "Failed to mount /sys!"
|
|
|
|
# sysfs mount failed .. udev wont work fall back to devfs if available
|
|
|
|
|
|
|
|
[ "$ret" -eq '0' ] || USE_UDEV_NORMAL=0
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
findnfsmount() {
|
|
|
|
findnfsmount() {
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${IP}" != '' ] || busybox udhcpc -R rootpath -n -s /bin/udhcpc.scripts
|
|
|
|
if [ "${IP}" != '' ] || busybox udhcpc -R rootpath -n -s /bin/udhcpc.scripts
|
|
|
|
then
|
|
|
|
then
|
|
|
|
[ -e /rootpath ] && NFSROOT=`cat /rootpath`
|
|
|
|
[ -e /rootpath ] && NFSROOT=`cat /rootpath`
|
|
|
@ -263,10 +259,6 @@ findnfsmount() {
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kill_devfsd() {
|
|
|
|
|
|
|
|
killall devfsd > /dev/null 2>&1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
check_loop() {
|
|
|
|
check_loop() {
|
|
|
|
if [ "${LOOP}" = '' -o ! -e "mnt/cdrom/${LOOP}" ]
|
|
|
|
if [ "${LOOP}" = '' -o ! -e "mnt/cdrom/${LOOP}" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
@ -375,49 +367,37 @@ bind_mount_dev() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setup_hotplug() {
|
|
|
|
setup_hotplug() {
|
|
|
|
# Check udev is available...
|
|
|
|
if [ "${KV_2_6_OR_GREATER}" ]
|
|
|
|
if [ "${KV_2_6_OR_GREATER}" -a "${USE_UDEV_NORMAL}" != '0' ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
USE_UDEV_NORMAL=1
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
USE_UDEV_NORMAL=0
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${USE_UDEV_NORMAL}" = '1' ]
|
|
|
|
|
|
|
|
then
|
|
|
|
then
|
|
|
|
# catch udev hotplug events
|
|
|
|
|
|
|
|
echo /sbin/mdev > /proc/sys/kernel/hotplug
|
|
|
|
echo /sbin/mdev > /proc/sys/kernel/hotplug
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
start_dev_mgr() {
|
|
|
|
check_slowusb() {
|
|
|
|
# Check udev is available...
|
|
|
|
[ "${DO_slowusb}" ] || \
|
|
|
|
if [ "${KV_2_6_OR_GREATER}" -a "${USE_UDEV_NORMAL}" != '0' ]
|
|
|
|
for dir in /sys/bus/usb/drivers/usb-storage/*
|
|
|
|
then
|
|
|
|
do
|
|
|
|
USE_UDEV_NORMAL=1
|
|
|
|
[ -d "${dir}" ] && FORCE_slowusb="1"
|
|
|
|
else
|
|
|
|
done
|
|
|
|
USE_UDEV_NORMAL=0
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${USE_UDEV_NORMAL}" = '1' ]
|
|
|
|
start_dev_mgr() {
|
|
|
|
|
|
|
|
if [ "${KV_2_6_OR_GREATER}" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
cd /sys
|
|
|
|
cd /sys
|
|
|
|
[ "${DO_slowusb}" ] && sleep 10
|
|
|
|
[ "${DO_slowusb}" ] && sleep 10
|
|
|
|
kill_devfsd
|
|
|
|
check_slowusb
|
|
|
|
|
|
|
|
[ "${FORCE_slowusb}" ] && sleep 10
|
|
|
|
good_msg 'Activating mdev'
|
|
|
|
good_msg 'Activating mdev'
|
|
|
|
runmdev
|
|
|
|
runmdev
|
|
|
|
[ "${DO_slowusb}" ] && sleep 20
|
|
|
|
[ "${DO_slowusb}" ] || \
|
|
|
|
|
|
|
|
[ "${FORCE_slowusb}" ] && sleep 20
|
|
|
|
cd /
|
|
|
|
cd /
|
|
|
|
else
|
|
|
|
|
|
|
|
good_msg 'Activating devfs'
|
|
|
|
|
|
|
|
mount -t devfs devfs /dev 2>/dev/null
|
|
|
|
|
|
|
|
devfsd /dev -np
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
cmdline_hwopts() {
|
|
|
|
cmdline_hwopts() {
|
|
|
|
# Scan CMDLINE for any "doscsi" or "noscsi"-type arguments
|
|
|
|
# Scan CMDLINE for any "doscsi" or "noscsi"-type arguments
|
|
|
|
|
|
|
|
|
|
|
|
local FOUND
|
|
|
|
local FOUND
|
|
|
|
local TMP_HWOPTS
|
|
|
|
local TMP_HWOPTS
|
|
|
|
|
|
|
|
|
|
|
|