Merge "ramdisk: switch from lsb_release to $DISTRO_NAME"

This commit is contained in:
Jenkins 2015-05-15 17:40:33 +00:00 committed by Gerrit Code Review
commit d469e6086d

View File

@ -32,15 +32,15 @@ function create_ramdisk_base () {
# cjk adding for discovery support # cjk adding for discovery support
mkdir -p "${TMP_MOUNT_PATH}/"{lib/udev/rules.d,var/{lib/dhcp,run}} mkdir -p "${TMP_MOUNT_PATH}/"{lib/udev/rules.d,var/{lib/dhcp,run}}
DISTRO=`lsb_release -si` || true case "$DISTRO_NAME" in
fedora|rhel|rhel7|opensuse)
if [[ "Fedora RedHatEnterpriseServer \"openSUSE project\"" =~ "$DISTRO" ]]; then mkdir -p "$TMP_MOUNT_PATH/usr"
mkdir -p "$TMP_MOUNT_PATH/usr" ln -s ../lib "$TMP_MOUNT_PATH/usr/lib"
ln -s ../lib "$TMP_MOUNT_PATH/usr/lib" if [ "`uname -m`" = "x86_64" ]; then
if [ "`uname -m`" = "x86_64" ]; then
ln -s lib "$TMP_MOUNT_PATH/lib64" ln -s lib "$TMP_MOUNT_PATH/lib64"
fi fi
fi ;;
esac
if [ -e $LIB_UDEV/rules.d/50-firmware.rules ]; then 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" cp -a "$LIB_UDEV/rules.d/50-firmware.rules" "$TMP_MOUNT_PATH/lib/udev/rules.d"