From e7a7da10cbec34ced8981d9a770e727f02262de9 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 9 Nov 2016 10:19:10 -0500 Subject: [PATCH 01/10] Fix backwards compatibility If a user has an existing rootimg.gz, use that so that an upgrade does not require re doing packimage for no particular reason. --- xCAT-server/lib/xcat/plugins/anaconda.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 90f65cfa7c..a5d006985f 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -464,6 +464,7 @@ sub mknetboot $platform = xCAT_plugin::anaconda::getplatform($osver); my $suffix = 'cpio.gz'; $suffix = 'sfs' if (-r "$rootimgdir/rootimg.sfs"); + $suffix = 'gz' if (-r "$rootimgdir/rootimg.gz"); $suffix = 'cpio.xz' if (-r "$rootimgdir/rootimg.cpio.xz"); $suffix = 'tar.gz' if (-r "$rootimgdir/rootimg.tar.gz"); $suffix = 'tar.xz' if (-r "$rootimgdir/rootimg.tar.xz"); @@ -515,7 +516,7 @@ sub mknetboot copy("$rootimgdir/initrd.gz", "$rootimgdir/initrd-stateless.gz"); } } - unless (-r "$rootimgdir/rootimg.cpio.gz" or -r "$rootimgdir/rootimg.cpio.xz" or -r "$rootimgdir/rootimg.tar.gz" or -r "$rootimgdir/rootimg.tar.xz" or -r "$rootimgdir/rootimg.sfs") { + unless (-r "$rootimgdir/rootimg.cpio.gz" or -r "$rootimgdir/rootimg.cpio.xz" or -r "$rootimgdir/rootimg.tar.gz" or -r "$rootimgdir/rootimg.tar.xz" or -r "$rootimgdir/rootimg.sfs" or -r "$rootimgdir/rootimg.gz") { $callback->({ error => ["No packed image for platform $osver, architecture $arch, and profile $profile found at $rootimgdir/rootimg.gz or $rootimgdir/rootimg.sfs on $myname, please run packimage (e.g. packimage -o $osver -p $profile -a $arch"], errorcode => [1] }); From 967dd0f5fba362ddf2624bcda8ba10e4eec63661 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 9 Nov 2016 11:24:58 -0500 Subject: [PATCH 02/10] Fix Debian and SLES rootimg.gz compatibility Do not require repacking of a rootimage if the environment has the 'old style' packed image. --- xCAT-server/lib/xcat/plugins/debian.pm | 3 ++- xCAT-server/lib/xcat/plugins/sles.pm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 412e8a87fa..6f9802468c 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -1171,6 +1171,7 @@ sub mknetboot $platform = xCAT_plugin::debian::getplatform($osver); my $suffix = 'cpio.gz'; + $suffix = 'gz' if (-r "$rootimgdir/rootimg.gz"); $suffix = 'cpio.xz' if (-r "$rootimgdir/rootimg.cpio.xz"); $suffix = 'tar.gz' if (-r "$rootimgdir/rootimg.tar.gz"); $suffix = 'tar.xz' if (-r "$rootimgdir/rootimg.tar.xz"); @@ -1223,7 +1224,7 @@ sub mknetboot copy("$rootimgdir/initrd.gz", "$rootimgdir/initrd-stateless.gz"); } } - unless (-r "$rootimgdir/rootimg.cpio.gz" or -r "$rootimgdir/rootimg.cpio.xz" or -r "$rootimgdir/rootimg.tar.gz" or -r "$rootimgdir/rootimg.tar.xz" or -r "$rootimgdir/rootimg.sfs") { + unless (-r "$rootimgdir/rootimg.cpio.gz" or -r "$rootimgdir/rootimg.cpio.xz" or -r "$rootimgdir/rootimg.tar.gz" or -r "$rootimgdir/rootimg.tar.xz" or -r "$rootimgdir/rootimg.sfs" or -r "$rootimgdir/rootimg.gz") { $callback->({ error => ["No packed image for platform $osver, architecture $arch, and profile $profile, please run packimage (e.g. packimage -o $osver -p $profile -a $arch"], errorcode => [1] }); diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 2de029f120..ea3518bb6d 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -329,6 +329,7 @@ sub mknetboot my $suffix = 'cpio.gz'; $suffix = 'sfs' if (-r "$rootimgdir/rootimg.sfs"); + $suffix = 'gz' if (-r "$rootimgdir/rootimg.gz"); $suffix = 'cpio.xz' if (-r "$rootimgdir/rootimg.cpio.xz"); $suffix = 'tar.gz' if (-r "$rootimgdir/rootimg.tar.gz"); $suffix = 'tar.xz' if (-r "$rootimgdir/rootimg.tar.xz"); @@ -383,7 +384,7 @@ sub mknetboot } } - unless (-r "$rootimgdir/rootimg.cpio.gz" or -r "$rootimgdir/rootimg.cpio.xz" or -r "$rootimgdir/rootimg.tar.gz" or -r "$rootimgdir/rootimg.tar.xz" or -r "$rootimgdir/rootimg.sfs") { + unless (-r "$rootimgdir/rootimg.cpio.gz" or -r "$rootimgdir/rootimg.cpio.xz" or -r "$rootimgdir/rootimg.tar.gz" or -r "$rootimgdir/rootimg.tar.xz" or -r "$rootimgdir/rootimg.sfs" or -r "$rootimgdir/rootimg.gz") { $callback->({ error => [qq{No packed image for platform $osver, architecture $arch, and profile $profile, please run packimage before nodeset}], errorcode => [1] From 843fee9ad3cf9fa27f8b6ee3ab6949bbb02046af Mon Sep 17 00:00:00 2001 From: chenglch Date: Thu, 10 Nov 2016 10:44:03 +0800 Subject: [PATCH 03/10] Modify build spec to require ipmitool-xcat-1.8.17-1 --- xCAT/debian/control | 2 +- xCAT/xCAT.spec | 4 ++-- xCATsn/debian/control | 2 +- xCATsn/xCATsn.spec | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT/debian/control b/xCAT/debian/control index 29b2c2c1c1..913d00c945 100644 --- a/xCAT/debian/control +++ b/xCAT/debian/control @@ -7,6 +7,6 @@ Standards-Version: 3.7.2 Package: xcat Architecture: amd64 ppc64el -Depends: ${perl:Depends}, xcat-server, xcat-client, libdbd-sqlite3-perl, isc-dhcp-server, apache2, nfs-kernel-server, nmap, bind9, libxml-parser-perl, xinetd, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, ipmitool-xcat (>=1.8.15-2), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat, xcat-buildkit, xcat-probe (>=2.12) +Depends: ${perl:Depends}, xcat-server, xcat-client, libdbd-sqlite3-perl, isc-dhcp-server, apache2, nfs-kernel-server, nmap, bind9, libxml-parser-perl, xinetd, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, ipmitool-xcat (>=1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat, xcat-buildkit, xcat-probe (>=2.12) Description: Server and configuration utilities of the xCAT management project xcat-server provides the core server and configuration management components of xCAT. This package should be installed on your management server diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index 1d0f1d234e..d1d935e3f4 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -64,12 +64,12 @@ Requires: elilo-xcat xnba-undi %ifarch i386 i586 i686 x86 x86_64 Requires: syslinux -Requires: ipmitool-xcat >= 1.8.17 +Requires: ipmitool-xcat >= 1.8.17-1 %endif %ifos linux %ifarch ppc ppc64 ppc64le -Requires: ipmitool-xcat >= 1.8.17 +Requires: ipmitool-xcat >= 1.8.17-1 %endif %endif diff --git a/xCATsn/debian/control b/xCATsn/debian/control index 105f973046..7ed6120d96 100644 --- a/xCATsn/debian/control +++ b/xCATsn/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.7.2 Package: xcatsn Architecture: all -Depends: ${perl:Depends}, xcat-server, perl-xcat, xcat-client, libdbd-sqlite3-perl, libxml-parser-perl, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, dhcp3-server, apache2, expect, nfs-kernel-server, nmap, bind9, ipmitool-xcat (>=1.8.15-2), syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat,libsys-virt-perl, xcat-probe (>=2.12) +Depends: ${perl:Depends}, xcat-server, perl-xcat, xcat-client, libdbd-sqlite3-perl, libxml-parser-perl, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, dhcp3-server, apache2, expect, nfs-kernel-server, nmap, bind9, ipmitool-xcat (>=1.8.17-1), syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat,libsys-virt-perl, xcat-probe (>=2.12) Recommends: yaboot-xcat Description: Metapackage for a common, default xCAT service node setup xCATsn is a service node management package intended for at-scale management, including hardware management and software management. diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index 688cffb2c4..ed793aee60 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -59,11 +59,11 @@ Requires: elilo-xcat xnba-undi %ifarch i386 i586 i686 x86 x86_64 Requires: syslinux -Requires: ipmitool-xcat >= 1.8.17 +Requires: ipmitool-xcat >= 1.8.17-1 %endif %ifos linux %ifarch ppc ppc64 ppc64le -Requires: ipmitool-xcat >= 1.8.17 +Requires: ipmitool-xcat >= 1.8.17-1 %endif %endif From 6d415c704029c37c8a7ed785b0aa6228d44d2495 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Wed, 9 Nov 2016 22:37:58 -0500 Subject: [PATCH 04/10] Add back in the code to upload the deps package to xcat.org --- build-ubunturepo | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/build-ubunturepo b/build-ubunturepo index 6eae013940..b4220b4a64 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -96,6 +96,13 @@ if [ -z "$c_flag" -a -z "$d_flag" ];then exit 2 fi +USER="xcat" +SERVER="xcat.org" +FILES_PATH="files" +FRS="/var/www/${SERVER}/${FILES_PATH}" +APT_DIR="${FRS}/xcat" +APT_REPO_DIR="${APT_DIR}/repos/apt" + if [ "$c_flag" -a "$d_flag" ];then printusage exit 2 @@ -474,6 +481,32 @@ __EOF__ chgrp root $dep_tar_name chmod g+w $dep_tar_name + # Decide whether to upload or not (default NOT to upload) + if [ "$UP" != "1" ]; then + echo "Upload not specified, Done! (rerun with UP=1, to upload)" + cd $old_pwd + exit 0 + fi + + #upload the dep packages + i=0 + echo "Uploading debs from xcat-dep to ${APT_REPO_DIR}/xcat-dep/ ..." + while [ $((i+=1)) -le 5 ] && ! rsync -urLv --delete xcat-dep $USER@${SERVER}:${APT_REPO_DIR}/ + do : ; done + + #upload the tarball + i=0 + echo "Uploading $dep_tar_name to ${APT_DIR}/xcat-dep/2.x_Ubuntu/ ..." + while [ $((i+=1)) -le 5 ] && ! rsync -v --force $dep_tar_name $USER@${SERVER}:${APT_DIR}/xcat-dep/2.x_Ubuntu/ + do : ; done + + #upload the README file + cd debs + i=0 + echo "Uploading README to ${APT_DIR}/xcat-dep/2.x_Ubuntu/ ..." + while [ $((i+=1)) -le 5 ] && ! rsync -v --force README $USER@${SERVER}:${APT_DIR}/xcat-dep/2.x_Ubuntu/ + do : ; done + cd $old_pwd exit 0 fi From 214fc9ab0db97aef30db8d8a385eecb6b3cfd62c Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Thu, 10 Nov 2016 00:06:50 -0500 Subject: [PATCH 05/10] modify some message of bug 1528 --- xCAT-probe/subcmds/xcatmn | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xCAT-probe/subcmds/xcatmn b/xCAT-probe/subcmds/xcatmn index e30f546507..6285d06ff5 100755 --- a/xCAT-probe/subcmds/xcatmn +++ b/xCAT-probe/subcmds/xcatmn @@ -510,9 +510,14 @@ sub check_disk { foreach $mountpoint (keys %mountpointinfo) { if ($mountpointinfo{$mountpoint}{need} > $mountpointinfo{$mountpoint}{available}) { foreach (@{ $mountpointinfo{$mountpoint}{mount} }) { - $msg .= "'$_' needs $dir_expectedspace_list{$_} G, "; + $msg .= "'$_' needs $dir_expectedspace_list{$_} GiB disk space, "; + } + my $mountmun = $#{$mountpointinfo{$mountpoint}{mount}} +1 ; + if($mountmun >1){ + $msg .= "these directories are parts of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it isn't enough."; + }else{ + $msg .= "This directory is a part of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it isn't enough."; } - $msg .= "These directories are mounted on '$mountpoint', the free space of '$mountpoint' is $mountpointinfo{$mountpoint}{available} G, it isn't enough."; $rst = 1; } } From b6311fa98324a1c3a7ea4b8b569815dd0460cd3a Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Thu, 10 Nov 2016 00:17:22 -0500 Subject: [PATCH 06/10] modify depending on gongjie's comment --- xCAT-probe/subcmds/xcatmn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-probe/subcmds/xcatmn b/xCAT-probe/subcmds/xcatmn index 6285d06ff5..36f10c4ef0 100755 --- a/xCAT-probe/subcmds/xcatmn +++ b/xCAT-probe/subcmds/xcatmn @@ -514,9 +514,9 @@ sub check_disk { } my $mountmun = $#{$mountpointinfo{$mountpoint}{mount}} +1 ; if($mountmun >1){ - $msg .= "these directories are parts of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it isn't enough."; + $msg .= "these directories are parts of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough."; }else{ - $msg .= "This directory is a part of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it isn't enough."; + $msg .= "This directory is a part of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough."; } $rst = 1; } From a7dcbd93eb50bcb6674a3c49088c90301ba325ec Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Thu, 10 Nov 2016 00:20:36 -0500 Subject: [PATCH 07/10] modify depending on gongjie's comment --- xCAT-probe/subcmds/xcatmn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-probe/subcmds/xcatmn b/xCAT-probe/subcmds/xcatmn index 36f10c4ef0..e62ee0688e 100755 --- a/xCAT-probe/subcmds/xcatmn +++ b/xCAT-probe/subcmds/xcatmn @@ -516,7 +516,7 @@ sub check_disk { if($mountmun >1){ $msg .= "these directories are parts of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough."; }else{ - $msg .= "This directory is a part of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough."; + $msg .= "this directory is a part of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough."; } $rst = 1; } From dffecd4e95c7dd8c150a8f60573aaa0e1759bc22 Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Thu, 10 Nov 2016 00:23:24 -0500 Subject: [PATCH 08/10] modify depending on gongjie's comment --- xCAT-probe/subcmds/xcatmn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-probe/subcmds/xcatmn b/xCAT-probe/subcmds/xcatmn index e62ee0688e..e439dfc7f9 100755 --- a/xCAT-probe/subcmds/xcatmn +++ b/xCAT-probe/subcmds/xcatmn @@ -510,13 +510,13 @@ sub check_disk { foreach $mountpoint (keys %mountpointinfo) { if ($mountpointinfo{$mountpoint}{need} > $mountpointinfo{$mountpoint}{available}) { foreach (@{ $mountpointinfo{$mountpoint}{mount} }) { - $msg .= "'$_' needs $dir_expectedspace_list{$_} GiB disk space, "; + $msg .= "'$_' needs $dir_expectedspace_list{$_} GiB disk space. "; } my $mountmun = $#{$mountpointinfo{$mountpoint}{mount}} +1 ; if($mountmun >1){ - $msg .= "these directories are parts of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough."; + $msg .= "These directories are parts of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough."; }else{ - $msg .= "this directory is a part of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough."; + $msg .= "This directory is a part of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough."; } $rst = 1; } From ee67c6808691bb1e626ad909ee19f4897c52ea19 Mon Sep 17 00:00:00 2001 From: immarvin Date: Wed, 9 Nov 2016 22:25:24 -0500 Subject: [PATCH 09/10] fix [FVT]mkdef with osimage returns object name invalid #2131 --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 263e386580..dee9b82b1f 100755 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -608,7 +608,7 @@ sub processArgs } # check the new object name specified with -n - if ($::command eq "chdef" && $::opt_n && (!isobjnamevalid($::opt_n))) { + if ($::command eq "chdef" && $::opt_n && (!isobjnamevalid($::opt_n,$::opt_t))) { my $rsp; $rsp->{data}->[0] = "The new object name \'$::opt_n\' is not valid.Please refer to \"man xcatdb\" for the valid \"xCAT Object Name Format\" "; xCAT::MsgUtils->message("E", $rsp, $::callback); @@ -1546,7 +1546,7 @@ sub defmk my $invalidobjname = (); my $invalidnodename = (); foreach my $node (@::allobjnames) { - unless(isobjnamevalid($node)){ + unless(isobjnamevalid($node,$::opt_t)){ $invalidobjname .= ",$node"; } if (($node =~ /[A-Z]/) && (((!$::opt_t) && (!$::FILEATTRS{$node}{'objtype'})) || ($::FILEATTRS{$node}{'objtype'} eq "node") || ($::opt_t eq "node"))) { @@ -1556,7 +1556,7 @@ sub defmk if ($invalidobjname) { $invalidobjname =~ s/,//; my $rsp; - $rsp->{data}->[0] = "The object name \'$invalidnodename\' is invalid, please refer to \"man xcatdb\" for the valid \"xCAT Object Name Format\""; + $rsp->{data}->[0] = "The object name \'$invalidobjname\' is invalid, please refer to \"man xcatdb\" for the valid \"xCAT Object Name Format\""; xCAT::MsgUtils->message("E", $rsp, $::callback); $error = 1; return 1; @@ -4542,16 +4542,21 @@ sub initialize_variables #isobjnamevalid: #description: check whether the object name is valid #argument: -# $objname: the objname string +# $objname: the object name string +# $objtype: the object type string #return: # 1: valid # 0: invalid #----------------------- sub isobjnamevalid{ my $objname=shift; - #the ip address as a valid object name is a hack for p7IH support - if(($objname !~ /^[a-zA-Z0-9-_]+$/) and !xCAT::NetworkUtils->isIpaddr($objname)){ - return 0; + my $objtype=shift; + $objtype="node" unless(defined $objtype and ($objtype ne "")); + if($objtype eq "node"){ + #the ip address as a valid node object name is a hack for p7IH support + if(($objname !~ /^[a-zA-Z0-9-_]+$/) and !xCAT::NetworkUtils->isIpaddr($objname)){ + return 0; + } } return 1; } From aac736afcb7f463b00ea983638c568f533b8c018 Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 10 Nov 2016 01:07:59 -0500 Subject: [PATCH 10/10] create /opt/xcat under rootimage dir incase it is not there --- xCAT-server/share/xcat/netboot/rh/genimage | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 3289000a18..17e06fd196 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -2020,7 +2020,10 @@ sub generic_post { #This function is meant to leave the image in a state approxi if(-e "$rootimg_dir/etc/rc3.d/S61xcatpostinit"){ unlink("$rootimg_dir/etc/rc3.d/S61xcatpostinit"); } - + + if (!-d "$rootimg_dir/opt/xcat/") { + mkdir "$rootimg_dir/opt/xcat/"; + } if(-e "$rootimg_dir/usr/lib/systemd/"){ #if systemd is the service management framework for the diskless image