Skip to content

Commit

Permalink
specify full path for exportfs
Browse files Browse the repository at this point in the history
The autocleaner.py is executed by cron which sets path to
PATH=/usr/bin:/bin. As exportfs is in /usr/sbin it must have full path
specified, otherwise the script is crashing and fails to clean up old
jobs directories

Fixes freeipa#422
  • Loading branch information
sorlov-rh committed Mar 4, 2021
1 parent c3debe1 commit 96879fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autocleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def prune_exports_file(prune_dirs):
exports.close()

# sync exportfs before deleting the folders
subprocess.run(['exportfs', '-ar'], timeout=TIMEOUT)
subprocess.run(['/usr/sbin/exportfs', '-ar'], timeout=TIMEOUT)

return entries_deleted

Expand Down

0 comments on commit 96879fa

Please sign in to comment.