@@ -344,12 +344,12 @@ Merge packs and virtualenvs from st2 with those from st2packs images
344344    - 'sh'
345345    - '-ec'
346346    - >
347-       if command  rsync; then
348-         rsync -a  /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
349-         rsync -a  /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
347+       if hash  rsync 2>/dev/null ; then
348+         rsync -rlptD  /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
349+         rsync -rlptD  /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
350350      else
351-         /bin/ cp -aR  /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
352-         /bin/ cp -aR  /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
351+         cp -P --preserve=mode,timestamps,links,xattr  /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
352+         cp -P --preserve=mode,timestamps,links,xattr  /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
353353      fi
354354  { {- with .securityContext | default  $.Values.st2actionrunner.securityContext | default  $.Values.securityContext } 
355355  { {/* st2actionrunner is likely the most permissive so use that if  defined. */} 
@@ -371,12 +371,12 @@ Merge packs and virtualenvs from st2 with those from st2packs images
371371    - 'sh'
372372    - '-ec'
373373    - >
374-       if command  rsync; then
375-         rsync -a  /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
376-         rsync -a  /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
374+       if hash  rsync 2>/dev/null ; then
375+         rsync -rlptD  /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
376+         rsync -rlptD  /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared;
377377      else
378-         /bin/ cp -aR  /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
379-         /bin/ cp -aR  /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
378+         cp -P --preserve=mode,timestamps,links,xattr  /opt/stackstorm/packs/. /opt/stackstorm/packs-shared &&
379+         cp -P --preserve=mode,timestamps,links,xattr  /opt/stackstorm/virtualenvs/. /opt/stackstorm/virtualenvs-shared
380380      fi
381381  { {- with .Values.st2actionrunner.securityContext | default  .Values.securityContext } 
382382  { {/* st2actionrunner is likely the most permissive so use that if  defined. */} 
@@ -397,10 +397,10 @@ Merge packs and virtualenvs from st2 with those from st2packs images
397397    - 'sh'
398398    - '-ec'
399399    - >
400-       if command  rsync; then
401-         rsync -a  /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
400+       if hash  rsync 2>/dev/null ; then
401+         rsync -rlptD  /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
402402      else
403-         /bin/ cp -aR  /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
403+         cp -P --preserve=mode,timestamps,links,xattr  /opt/stackstorm/configs/. /opt/stackstorm/configs-shared;
404404      fi
405405  { {- with .Values.st2actionrunner.securityContext | default  .Values.securityContext } 
406406  { {/* st2actionrunner is likely the most permissive so use that if  defined. */} 
0 commit comments