From f7dbd08b96d07e2e3347e0d9fe1146a9c3093b54 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Fri, 1 May 2020 12:33:11 -0400 Subject: [PATCH] Testcase and genimage fixes for squashfs --- xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot | 2 +- .../installation/reg_linux_diskless_installation_flat | 6 +++--- .../installation/reg_linux_diskless_installation_hierarchy | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot index a3f6c373a..bc244e073 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot @@ -65,7 +65,6 @@ if [ -r /rootimg.sfs ]; then mkdir -p /rw mount -t squashfs /rootimg.sfs /ro mount -t tmpfs rw /rw - mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT modinfo overlay if [ $? -eq 0 ]; then echo "Mounting $NEWROOT with type overlay" @@ -75,6 +74,7 @@ if [ -r /rootimg.sfs ]; then mount -t overlay -o lowerdir=/ro,upperdir=/rw/upper,workdir=/rw/work mergedroot $NEWROOT else echo "Mounting $NEWROOT with type aufs" + mount -t aufs -o dirs=/rw:/ro mergedroot $NEWROOT mkdir -p $NEWROOT/ro mkdir -p $NEWROOT/rw mount --move /ro $NEWROOT/ro diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index ab39cd496..b07c66ed2 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -131,13 +131,13 @@ check:rc==0 cmd:rm -rf /tmp/mountoutput #Make sure squashfs-tools rpm is installed on RHEL -cmd:if [ "$$OS" =~ "rhel" ];then yum install -y squashfs-tools; fi +cmd:if [[ "$$OS" =~ "rhel" ]]; then yum install -y squashfs-tools; fi #Make sure squashfs-tools rpm is installed on Ubuntu -cmd:if [ "$$OS" =~ "ubuntu" ];then apt-get install -y squashfs-tools; fi +cmd:if [[ "$$OS" =~ "ubuntu" ]]; then apt-get install -y squashfs-tools; fi #Make sure squashfs rpm is installed on SLES -cmd:if [ "$$OS" =~ "sle" ];then zypper install -y squashfs; fi +cmd:if [[ "$$OS" =~ "sle" ]]; then zypper install -y squashfs; fi cmd:packimage -m squashfs __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 7a399e7b0..5586630d4 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -154,13 +154,13 @@ cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-comput check:rc==0 #Make sure squashfs-tools rpm is installed on RHEL -cmd:if [ "$$OS" =~ "rhel" ];then yum install -y squashfs-tools; fi +cmd:if [[ "$$OS" =~ "rhel" ]]; then yum install -y squashfs-tools; fi #Make sure squashfs-tools rpm is installed on Ubuntu -cmd:if [ "$$OS" =~ "ubuntu" ];then apt-get install -y squashfs-tools; fi +cmd:if [[ "$$OS" =~ "ubuntu" ]]; then apt-get install -y squashfs-tools; fi #Make sure squashfs rpm is installed on SLES -cmd:if [ "$$OS" =~ "sle" ];then zypper install -y squashfs; fi +cmd:if [[ "$$OS" =~ "sle" ]]; then zypper install -y squashfs; fi cmd:packimage -m squashfs __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0