Merge "Fix dhclient in Fedora ramdisks"
This commit is contained in:
commit
74b777dae8
@ -1,2 +1,3 @@
|
|||||||
dhclient
|
dhclient
|
||||||
|
ip
|
||||||
busybox
|
busybox
|
||||||
|
@ -52,8 +52,18 @@ function create_ramdisk_base () {
|
|||||||
cp -a "$LIB_UDEV/firmware" "$TMP_MOUNT_PATH/lib/udev"
|
cp -a "$LIB_UDEV/firmware" "$TMP_MOUNT_PATH/lib/udev"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# cjk adding for hwdiscovery support
|
# cjk adding dhclient for hwdiscovery support
|
||||||
cp "/sbin/dhclient-script" "$TMP_MOUNT_PATH/sbin"
|
# dhclient scripts on some distros appear in different places, copy any we find
|
||||||
|
for FILE in /sbin/dhclient-script /usr/sbin/dhclient-script /etc/sysconfig/network-scripts/* /etc/rc.d/init.d/functions /etc/init.d/functions ; do
|
||||||
|
if [ -f $FILE ] ; then
|
||||||
|
mkdir -p $(dirname $TMP_MOUNT_PATH/$FILE)
|
||||||
|
cp $FILE $TMP_MOUNT_PATH/$FILE
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# /var/lib/dhclient is a directory on Fedora
|
||||||
|
if [ -d "/var/lib/dhclient" ] ; then
|
||||||
|
mkdir -p "$TMP_MOUNT_PATH/var/lib/dhclient"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "$TMP_MOUNT_PATH/etc/modprobe.d"
|
mkdir -p "$TMP_MOUNT_PATH/etc/modprobe.d"
|
||||||
echo "blacklist evbug" > "$TMP_MOUNT_PATH/etc/modprobe.d/blacklist.conf"
|
echo "blacklist evbug" > "$TMP_MOUNT_PATH/etc/modprobe.d/blacklist.conf"
|
||||||
@ -143,7 +153,8 @@ function populate_lib () {
|
|||||||
for i in "$BUSYBOX" bash lsmod modprobe udevadm \
|
for i in "$BUSYBOX" bash lsmod modprobe udevadm \
|
||||||
wget reboot shutdown $UDEVD $UDEV_FIRMWARE \
|
wget reboot shutdown $UDEVD $UDEV_FIRMWARE \
|
||||||
$(cat /etc/dib_binary_deps) ; do
|
$(cat /etc/dib_binary_deps) ; do
|
||||||
if busybox_list | grep "^$i\$" >/dev/null; then
|
# Don't take the ip command from busybox, its missing some features
|
||||||
|
if busybox_list | grep -v "^ip$" | grep "^$i\$" >/dev/null; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
path=`which $i 2>/dev/null` || path=$i
|
path=`which $i 2>/dev/null` || path=$i
|
||||||
|
Loading…
Reference in New Issue
Block a user