Skip to content

Commit

Permalink
Merge pull request #1401 from vpodzime/master-hub_reflinks
Browse files Browse the repository at this point in the history
Use reflinks if possible for copying masterfiles and web UI
  • Loading branch information
vpodzime authored Mar 28, 2024
2 parents c0a325a + f77489f commit 7795304
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packaging/common/cfengine-hub/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if [ ! -f "$PREFIX/ppkeys/localhost.priv" ]; then
fi

if [ ! -f "$PREFIX/masterfiles/promises.cf" ]; then
/bin/cp -R "$PREFIX/share/NovaBase/masterfiles" "$PREFIX"
/bin/cp --reflink=auto -R "$PREFIX/share/NovaBase/masterfiles" "$PREFIX"
touch "$PREFIX/masterfiles/cf_promises_validated"
find "$PREFIX/masterfiles" -type d -exec chmod 700 {} \;
find "$PREFIX/masterfiles" -type f -exec chmod 600 {} \;
Expand Down Expand Up @@ -114,7 +114,7 @@ EOF
)
true "Done creating httpd/secrets.ini file"

cp -r --remove-destination $PREFIX/share/GUI/* $PREFIX/httpd/htdocs
cp --reflink=auto -r --remove-destination $PREFIX/share/GUI/* $PREFIX/httpd/htdocs

# If old files were moved aside during upgrade, we should move them back so that
# rpm can do its cleanup procedures. But avoid overwriting new files with the
Expand Down

0 comments on commit 7795304

Please sign in to comment.