You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by GitBox <gi...@apache.org> on 2022/06/20 18:53:18 UTC

[GitHub] [bigtop] iwasakims commented on a diff in pull request #914: BIGTOP-3705: Refine the Ambari RPM spec to fix warning after rpm uninstallation

iwasakims commented on code in PR #914:
URL: https://github.com/apache/bigtop/pull/914#discussion_r901938746


##########
bigtop-packages/src/rpm/ambari/SPECS/ambari.spec:
##########
@@ -391,7 +395,10 @@ if [ "$1" -eq 0 ]; then  # Action is uninstall
     if [ -d "/etc/ambari-agent/conf.save" ]; then
         mv /etc/ambari-agent/conf.save /etc/ambari-agent/conf_$(date '+%d_%m_%y_%H_%M').save
     fi
-    mv /etc/ambari-agent/conf /etc/ambari-agent/conf.save
+
+    if [ -d "/etc/ambari-agent/conf" ]; then
+        cp -r /etc/ambari-agent/conf /etc/ambari-agent/conf.save

Review Comment:
   `cp -rp` should be better if there are configuration files having permissions like 600?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@bigtop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org