2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

Remove trailing spaces in file xCAT-genesis-builder/buildrpm

This commit is contained in:
GONG Jie 2017-12-31 23:59:59 +00:00
parent d4917e379a
commit 12595dfa12

View File

@ -45,8 +45,8 @@ if [ ! -e "./default_module_list" ]; then
mv ./installkernel ./default_module_list
fi
echo "#!/bin/bash" > ./installkernel
for line in `cat /lib/modules/$KERVER/modules.dep | awk -F: '{print \$1}'`; do
basename $line >> ./installkernel;
for line in `cat /lib/modules/$KERVER/modules.dep | awk -F: '{print \$1}'`; do
basename $line >> ./installkernel;
done
sed -i 's/\(.*\)\.ko.*/instmods \1/g' ./installkernel
chmod +x ./installkernel
@ -158,7 +158,7 @@ if [ -e "${DRACUTMODDIR}/cmdlist_check" ]; then
fi
fi
mkdir -p /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs
mkdir -p /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs
# run dracut
if [ "$HOSTOS" = "mcp" ]; then
@ -181,7 +181,7 @@ if [ $? -ne 0 ]; then
fi
echo Expanding the initramfs into /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs ...
cd /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs
cd /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs
zcat /tmp/xcatgenesis.$$.rfs|cpio -dumi
@ -201,7 +201,7 @@ done
# create the predictable naming for nics
LIB_UDEV_RULES="/lib/udev/rules.d/"
if [ ! -e "$LIB_UDEV_RULES/80-net-name-slot.rules" ]; then
cp $DRACUTMODDIR/80-net-name-slot.rules /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs/lib/udev/rules.d/
cp $DRACUTMODDIR/80-net-name-slot.rules /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs/lib/udev/rules.d/
if [ $? -ne 0 ]; then
echo "ERROR - expanding the initramfs, please correct the issues and try again"
exit 1
@ -225,5 +225,5 @@ tar jcf ~/rpmbuild/SOURCES/xCAT-genesis-base-$BUILDARCH.tar.bz2 opt
# build the rpm
echo Building xCAT-genesis-base rpm from ~/rpmbuild/SOURCES/xCAT-genesis-base-$BUILDARCH.tar.bz2 and $DIR/xCAT-genesis-base.spec ...
rpmbuild -ba $DIR/xCAT-genesis-base.spec
rpmbuild -ba $DIR/xCAT-genesis-base.spec
rm -rf $DRACUTMODDIR