Add needed symlink for Fedora deployment ramdisk.

Symlink /usr/lib -> ../lib for Fedora deployment ramdisk.  This
symlink is needed for systemd-udevd.  Otherwise, the network device is
not loaded and initialized when the deployment image is booted.  This
logic was previously contained in
elements/deploy/root.d/50-redhat-prepare-fs, but now that ramdisk
images are built in a chroot, the change needs to be moved so that it
is applied to the ramdisk build.

Change-Id: Icea43230126956ccf5fb8a6a96ca706b75d5c32f
This commit is contained in:
James Slagle 2013-07-25 16:44:32 -04:00
parent f33c4ebdde
commit 92fa96b2f6
2 changed files with 10 additions and 15 deletions

View file

@ -1,15 +0,0 @@
#!/bin/bash
set -e
[ -n "$TARGET_ROOT" ]
DISTRO=`lsb_release -si` || true
if [[ "Fedora RedHatEnterpriseServer" =~ "$DISTRO" ]]; then
mkdir -p "$TARGET_ROOT/usr"
ln -s ../lib "$TARGET_ROOT/usr/lib"
if [ "`uname -m`" = "x86_64" ]; then
ln -s lib "$TARGET_ROOT/lib64"
fi
fi

View file

@ -43,6 +43,16 @@ function create_ramdisk_base () {
mkdir -p "$TMP_MOUNT_PATH/var/run"
mkdir -p "$TMP_MOUNT_PATH/lib/udev/rules.d"
DISTRO=`lsb_release -si` || true
if [[ "Fedora RedHatEnterpriseServer" =~ "$DISTRO" ]]; then
mkdir -p "$TMP_MOUNT_PATH/usr"
ln -s ../lib "$TMP_MOUNT_PATH/usr/lib"
if [ "`uname -m`" = "x86_64" ]; then
ln -s lib "$TMP_MOUNT_PATH/lib64"
fi
fi
if [ -e $LIB_UDEV/rules.d/50-firmware.rules ]; then
cp -a "$LIB_UDEV/rules.d/50-firmware.rules" "$TMP_MOUNT_PATH/lib/udev/rules.d"
fi