How to make hotplug work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to make my small embedded system work with hotplug, I copied /lib
/boot /bin /sbin /usr/bin /usr/sbin from RHFC 3 to my embedded system, I
didn't copy /etc
I have my inittab to start /etc/rc.d/rcS script., I also have my
/sbin/hotplug script, they both have attrib 0755
I boot this embedded system without initrd, After I boot this embedded
system, I see bash prompt.
but when I plug a usb flash drive, nothing happened.
Would anyone please tell me what else do I need to do to so I can set
/hot.txt has the desired string?

#!/bin/sh
# /sbin/hotplug
echo "starting hotplug" > /hot.txt
#end of /sbin/hotplug

#!/bin/sh
# /etc/rc.d/rcS
kill_init=`ls /dev |grep -c tty`
if [ $kill_init -eq 0 ]; then
    mount -n -t proc proc /proc
    mount -n -t sysfs sys /sys
    mount -n -t usbfs usbfs /proc/bus/usb
    mount -n -t tmpfs dev /dev
    echo /sbin/udevsend > /proc/sys/kernel/hotplug
    udevstart
    kill -HUP 1
    sleep 10
fi
ln -s /proc/self/fd  /dev/fd
ln -s /proc/self/fd0 /dev/stdin
ln -s /proc/self/fd1 /dev/stdout
ln -s /proc/self/fd2 /dev/stderr
ln -s /proc/kcore /dev/core
moun -o remount, rw /
exit 0
#end of /etc/rc.d/rcS


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux