Closed dalgibbard closed 9 years ago
v1.4 Planned Change:
\ Allow flag to NOT delete the patch files.
\ Add new flag to documenation as appropriate.
This is almost working. After the patches are applied all files except the source files are removed.
-rw-r--r-- 1 root root 18982874 Sep 20 04:49 XS62ESP1011-src-pkgs.tar.bz2
-rw-r--r-- 1 root root 18982100 Sep 26 05:31 XS62ESP1013-src-pkgs.tar.bz2
-rw-r--r-- 1 root root 4821139 Oct 3 09:03 XS62ESP1014-src-pkgs.tar.bz2
This is about the deleting the the downloaded zip file. I am considering about once the patch installed you can see the /var/patch will occupies some space of disk.
Should consider to have options as --cleanpatch this should work as xe patch-clean command in backed.
I solved this another way.
create a file in /etc/cron.daily call it clean-var-patch it contains
#!/bin/bash
/usr/bin/find /var/patch -maxdepth 1 -type f -name "*-*-*-*" -mtime + 1 -exec rm {} \; 2>/dev/null
And let the cleanup happen by itself.
Tested this in the new code; works well. Both src packages and /var/patch files are cleaned after each patch is successfully deployed. -C
flag has been made available to disable the cleaning actions.
The only caveat is that the patch-clean command doesn't apply to pool slaves in a pool scenario; but that's a small price to pay really.
Will close this once i've committed my changes.
--no-delete
or-d
or something should be made available for stopping this deletion process.