Guest User

Untitled

a guest
Jan 14th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. WTF Is this????
  2.  
  3.  
  4. # The temp files are for storing working results so we don't call commands many
  5. # times (gives inconsistent results, maybe adds load on things I don't want to
  6. # such as RAID controllers). They must not exist -- if they did, someone would
  7. # symlink them to /etc/passwd and then run this program as root. Call this
  8. # function with "rm" or "touch" as an argument.
  9. temp_files() {
  10. for file in /tmp/percona-toolkit /tmp/percona-toolkit2; do
  11. case "$1" in
  12. touch)
  13. if ! touch "${file}"; then
  14. echo "I can't make my temp file ${file}";
  15. exit 1;
  16. fi
  17. ;;
  18. rm)
  19. rm -f "${file}"
  20. ;;
  21. esac
  22. done
  23. }
Add Comment
Please, Sign In to add comment