From 92fa96b2f60367ec6c1e3a0180f2834d4f6a21db Mon Sep 17 00:00:00 2001 From: James Slagle Date: Thu, 25 Jul 2013 16:44:32 -0400 Subject: [PATCH] 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 --- elements/deploy/root.d/50-redhat-prepare-fs | 15 --------------- lib/ramdisk-functions | 10 ++++++++++ 2 files changed, 10 insertions(+), 15 deletions(-) delete mode 100755 elements/deploy/root.d/50-redhat-prepare-fs diff --git a/elements/deploy/root.d/50-redhat-prepare-fs b/elements/deploy/root.d/50-redhat-prepare-fs deleted file mode 100755 index 317d4fe4..00000000 --- a/elements/deploy/root.d/50-redhat-prepare-fs +++ /dev/null @@ -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 diff --git a/lib/ramdisk-functions b/lib/ramdisk-functions index dd5d4b60..e3a8e04c 100644 --- a/lib/ramdisk-functions +++ b/lib/ramdisk-functions @@ -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