From 740497ea941f6eeefda9347803b15b6512672350 Mon Sep 17 00:00:00 2001 From: Nico Dietrich Date: Mon, 23 Jan 2006 15:09:37 +0000 Subject: which durch binfinder ersetzt, hw_random blacklisted git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@32 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/bin/.hwautocfg.swp | Bin 32768 -> 0 bytes initrd/initrd-stuff/bin/hwautocfg | 2 +- initrd/mkdxsinitrd | 22 +++++++++++++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) delete mode 100644 initrd/initrd-stuff/bin/.hwautocfg.swp diff --git a/initrd/initrd-stuff/bin/.hwautocfg.swp b/initrd/initrd-stuff/bin/.hwautocfg.swp deleted file mode 100644 index 2a4776d5..00000000 Binary files a/initrd/initrd-stuff/bin/.hwautocfg.swp and /dev/null differ diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index e19f533a..396b58fa 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -305,7 +305,7 @@ Please check that\n hwsetup is properly installed and executable." # "drivers" (pseudo, placeholder strings, ...) to exclude from loading DRIVERLIST="disabled unknown ignore pcspkr synaptics" # driver blacklist (real modules which fail to load) -DRIVERLIST=" "${DRIVERLIST} +DRIVERLIST="hw_random "${DRIVERLIST} # check for USB, pcmcia and ieee1394 hardware drivers for DRIVER in ohci-hcd uhci-hcd ehci-hcd \ ohci1394; do diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index a2bfe7d5..01172185 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -47,16 +47,31 @@ D_DEFAULTCOUNTRY="" # End of global variable declaration, nothing needed to be changed at # default below that line +# replaces which to find executables inside ROOTDIR +binfinder() +{ + local PROGRAM="$1" + local RET=1 + for ELEMENT in sbin bin usr/bin usr/local/bin usr/bin/X11; do + if [ -f "${ROOTDIR}/$ELEMENT/$PROGRAM" ] && [ -x "${ROOTDIR}/$ELEMENT/$PROGRAM" ]; then + printf '%s\n' "${ROOTDIR}/$ELEMENT/$PROGRAM" + RET=0 + break + fi + done + return "$RET" +} + # copy some binary to given destination. Takes binary in $1 and # destination in $2 cobi() { local DEST=$2 -local FPTB=`which $1` +local FPTB=`binfinder $1` if [ -z ${FPTB} ] ; then return 1; else - cp ${ROOTDIR}/${FPTB} ${INSTDIR}/${DEST} + cp ${FPTB} ${INSTDIR}/${DEST} fi } @@ -85,6 +100,7 @@ fi } + # Resolve dynamic library dependencies. Returns a list of symbolic links # to shared objects and shared object files for the binaries in $*. # stolen from SuSE mkinitrd @@ -349,7 +365,7 @@ done # one of the dhcp clients for dhcp in dhclient dhcpcd pump ipconfig ; do - which $dhcp && break; + binfinder $dhcp && break; done cobi $dhcp bin mkdir -p ${INSTDIR}/var/{lib,run} -- cgit v1.2.3-55-g7522