diff --git a/xCAT-genesis-builder/buildrpm b/xCAT-genesis-builder/buildrpm index 28a544d5b..491dfbebb 100755 --- a/xCAT-genesis-builder/buildrpm +++ b/xCAT-genesis-builder/buildrpm @@ -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