Fix for bug 83276 and add udevsend binary to initramfs for newer udevs
authorEric Edgar <rocket@gentoo.org>
Tue, 16 Aug 2005 21:55:17 +0000 (21:55 +0000)
committerEric Edgar <rocket@gentoo.org>
Tue, 16 Aug 2005 21:55:17 +0000 (21:55 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@310 67a159dc-881f-0410-a524-ba9dfbe2cb84

gen_compile.sh
gen_initrd.sh
generic/initrd.scripts
generic/linuxrc

index f27a6bc8d106374fefe8942a3ea7e722cbef62da..daeb7785f3c27dc67fb74ec214f0fa1c30833cf1 100644 (file)
@@ -729,6 +729,11 @@ compile_udev() {
                then
                        strip udevstart || gen_die 'Failed to strip the udevstart binary!'
                fi
+               
+               if [ -e udevsend ]
+               then
+                       strip udevsend || gen_die 'Failed to strip the udevsend binary!'
+               fi
 
                print_info 1 '      >> Installing...'
                install -d "${TEMP}/udev/etc/udev" "${TEMP}/udev/sbin" "${TEMP}/udev/etc/udev/scripts" "${TEMP}/udev/etc/udev/rules.d" "${TEMP}/udev/etc/udev/permissions.d" ||
@@ -741,6 +746,12 @@ compile_udev() {
                        install -m 0755 udevstart "${TEMP}/udev/sbin" ||
                                gen_die 'Could not install udevstart binary!'
                fi
+               
+               if [ -e udevsend ]
+               then
+                       install -m 0755 udevsend "${TEMP}/udev/sbin" ||
+                               gen_die 'Could not install udevsend binary!'
+               fi
 
                install -m 0644 etc/udev/udev.conf "${TEMP}/udev/etc/udev" ||
                                gen_die 'Could not install udev configuration!'
index a990cb68f72187003ce18046e6bded3f450d2ae1..d74e88a394f41b53797166fa91fdeec8bc19075b 100644 (file)
@@ -100,7 +100,16 @@ create_base_initrd_sys() {
        if [ "${UDEV}" -eq '1' ]
        then
                /bin/tar -jxpf "${UDEV_BINCACHE}" -C "${TEMP}/initrd-temp" || gen_die 'Could not extract udev binary cache!'
-               ln -sf "./udev" "${TEMP}/initrd-temp/bin/udevstart" ||  gen_die 'Could not symlink udev -> udevstart!'
+               if [ ! -e "${TEMP}/initrd-temp/bin/udevstart" ]
+               then
+                   ln -sf "./udev" "${TEMP}/initrd-temp/bin/udevstart" ||      gen_die 'Could not symlink udev -> udevstart!'
+               fi
+               
+               if [ ! -e "${TEMP}/initrd-temp/bin/udevsend" ]
+               then
+                   ln -sf "./udev" "${TEMP}/initrd-temp/bin/udevsend" ||       gen_die 'Could not symlink udev -> udevsend!'
+               fi
+
        fi
        
        #unionfs modules
index 220200051fa026e621fc381a3866a44f809d668a..c845bbd5602ef38bd6c9df7be0c34e6fcf41b3c8 100644 (file)
@@ -210,6 +210,7 @@ runUdev() {
        mount -t tmpfs -o size=100k udev /dev
        mkdir /dev/pts
        mkdir /dev/shm
+       echo /sbin/udevsend > /proc/sys/kernel/hotplug 
        /sbin/udevstart
        ln -snf /proc/self/fd /dev/fd
        ln -snf /proc/self/fd/0 /dev/stdin
index 5bb529749f1500b9059eb5bd2cfb77dee11c2ef6..20ae66278b734b630e585607a98d4264e78e866f 100644 (file)
@@ -38,6 +38,12 @@ then
        then
                ln -s /sbin/udev /sbin/udevstart
        fi
+       
+       if [ ! -e /sbin/udevsend ]
+       then
+               ln -s /sbin/udev /sbin/udevsend
+       fi
+
     fi
 
     if [ -e /bin/lvm ]