Set explicit UID at the creation of tar archive
authorAndy Witter <awitter@georgialibraries.org>
Fri, 11 Nov 2016 16:27:42 +0000 (11:27 -0500)
committerAndy Witter <awitter@georgialibraries.org>
Fri, 11 Nov 2016 16:27:42 +0000 (11:27 -0500)
GenaSYS.sh

index c245a5d..1982f78 100755 (executable)
@@ -25,8 +25,8 @@
     PURPOSE_="Generate config files needed for Evergreen-ILS Cluster"
    SYNOPSIS_="$NAME_"
    REQUIRES_="standard GNU commands, apt, dpkg"
-    VERSION_="1.69"
-       DATE_="2010-11-23; last update: 2016-11-10"
+    VERSION_="1.70"
+       DATE_="2010-11-23; last update: 2016-11-11"
      AUTHOR_="Andy Witter <awitter@georgialibraries.org>"
         URL_="http://evergreen-ils.org"
    CATEGORY_="devel"
@@ -3014,8 +3014,8 @@ do
                cp $TMPOPENSRF_XML openils/conf/opensrf.xml
                Optimize_OpenSRF
        fi
-        tar zcf ../$(echo -e ${FOLDER%/*}).tar.gz *
-       [ -e etc/hosts ] && tar zcf ../$(echo -e ${FOLDER%/*})_etc-hosts.tar.gz etc/hosts 
+        tar zcf --owner="0" --group="0" ../$(echo -e ${FOLDER%/*}).tar.gz *
+       [ -e etc/hosts ] && tar zcf --owner="0" --group="0"../$(echo -e ${FOLDER%/*})_etc-hosts.tar.gz etc/hosts 
         cd ..
        #popd
         if test -e brick0[1-9].tar.gz ; then rm brick0[1-9].tar.gz ; fi
@@ -3087,10 +3087,10 @@ do
                mv setup*.sh ../setup_${SUBFOLDER}/setup_${SUBFOLDER}.sh
                mv setup-vars ../setup_${SUBFOLDER}/
                mv "setup-functions" ../setup_${SUBFOLDER}/
-                tar zcf ../setup_${SUBFOLDER}/${SUBFOLDER}.tar.gz *
-               tar zcf ../setup_${SUBFOLDER}/${SUBFOLDER}_etc-hosts.tar.gz etc/hosts
+                tar zcf --owner="0" --group="0" ../setup_${SUBFOLDER}/${SUBFOLDER}.tar.gz *
+               tar zcf --owner="0" --group="0" ../setup_${SUBFOLDER}/${SUBFOLDER}_etc-hosts.tar.gz etc/hosts
                cd ..
-               tar zcf setup_${SUBFOLDER}.tar.gz setup_${SUBFOLDER}
+               tar zcf --owner="0" --group="0" setup_${SUBFOLDER}.tar.gz setup_${SUBFOLDER}
                rm -rf setup_${SUBFOLDER}
        done
         cd ..
@@ -3203,7 +3203,7 @@ sed -i "s^_EGVER^$EG_VERSION^g" "setup_${NODE_FOLDER}/setup-vars"
 sed -i "s^CLUSTER_DOMAINNAME^${CLUSTERDOMAINNAME}^g" "setup_${NODE_FOLDER}/setup_$NODE_FOLDER.sh"
 mv "$NODE_FOLDER.tar.gz" "setup_${NODE_FOLDER}"
 mv "${NODE_FOLDER}_etc-hosts.tar.gz" "setup_${NODE_FOLDER}"
-tar zcf "setup_$NODE_FOLDER.tar.gz" "setup_${NODE_FOLDER}"
+tar zcf --owner="0" --group="0" "setup_$NODE_FOLDER.tar.gz" "setup_${NODE_FOLDER}"
 rm -rf "setup_${NODE_FOLDER}"
 cd ..
 }