ramdisk: switch from lsb_release to $DISTRO_NAME

Instead of executing `lsb_release` to know the current distro being
built, use the $DISTRO_NAME environment variable, already provided by
distribution elements.

Change-Id: I22b67afb481983cc40c198fd408ad5c7f4d68bec
This commit is contained in:
Pino Toscano 2015-05-12 17:03:46 +02:00
parent 97954ccd4e
commit cb37ef5384

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"