From 3e065b5f527411f3b6de6eb6ebe7d0137d8f0294 Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Tue, 16 Aug 2005 21:55:17 +0000 Subject: [PATCH] Fix for bug 83276 and add udevsend binary to initramfs for newer udevs git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@310 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- gen_compile.sh | 11 +++++++++++ gen_initrd.sh | 11 ++++++++++- generic/initrd.scripts | 1 + generic/linuxrc | 6 ++++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/gen_compile.sh b/gen_compile.sh index f27a6bc..daeb778 100644 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -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!' diff --git a/gen_initrd.sh b/gen_initrd.sh index a990cb6..d74e88a 100644 --- a/gen_initrd.sh +++ b/gen_initrd.sh @@ -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 diff --git a/generic/initrd.scripts b/generic/initrd.scripts index 2202000..c845bbd 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -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 diff --git a/generic/linuxrc b/generic/linuxrc index 5bb5297..20ae662 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -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 ] -- 2.26.2