X-Git-Url: http://git.onelab.eu/?p=vserver-reference.git;a=blobdiff_plain;f=build.sh;fp=build.sh;h=a5ccb4010b86a7f9dd68a094d079cee3a583f344;hp=7db9fc34c809135ee1cc62e15d056265883e3fcd;hb=4ae5ab29c29d13490b095d2524b99ea90548437f;hpb=63bec23c89fff5068a1550680c139063080db237 diff --git a/build.sh b/build.sh index 7db9fc3..a5ccb40 100755 --- a/build.sh +++ b/build.sh @@ -96,9 +96,9 @@ systemvserver_count=$(ls ../build/config.${pldistro}/vserver-*.pkgs 2> /dev/null yum -c ${vdir}/etc/mkfedora-yum.conf --installroot=${vdir} -y groupinstall "$group" done - pkgsdir=$(dirname $pkgsfile) - pkgsname=$(basename $pkgsfile .pkgs) - postfile=$(pl_locateDistroFile ../build/ ${pldistro} "${pkgsname}.post") + # search e.g. vserver-planetflow.post in config. or in config.planetlab otherwise + postfile=$(pl_locateDistroFile ../build/ ${pldistro} vserver-${NAME}.post || : ) + [ -f $postfile ] && /bin/bash $postfile ${vdir} || : # Create a copy of the system vserver w/o the vserver reference files and make it smaller. @@ -130,9 +130,9 @@ systemvserver_count=$(ls ../build/config.${pldistro}/vserver-*.pkgs 2> /dev/null echo "--------DONE BUILDING system vserver ${NAME}: $(date)" done -pkgsdir=$(dirname $pkgsfile) -pkgsname=$(basename $pkgsfile .pkgs) -postfile=$(pl_locateDistroFile ../build/ ${pldistro} "${pkgsname}.post") +# search vserver.post in config. or in config.planetlab otherwise +postfile=$(pl_locateDistroFile ../build/ ${pldistro} vserver.post) + [ -f $postfile ] && /bin/bash $postfile ${vref} || : # fix sudoers config