vaeth / squashmount

Init and management script for mounting rewritable squashfs-compressed data
43 stars 3 forks source link

running squashmount in a cron script #6

Closed josch09 closed 8 years ago

josch09 commented 8 years ago

not sure whether it's really an issue. but we should be aware that /sbin should be in the path....

here an excerpt of an cron email... ...

vaeth commented 8 years ago

PATH is what you set it to; squashmount does not change it.

BTW, running squashmount in a cronjob can be dangerous if something else is running.

josch09 commented 8 years ago

thanx,

I recently switched from vixie-cron to cronie (and this was the only change I made - using still the same cron scripts). cronie seems to have a slightly different handling of environment vars or different default settings. Anyways I added the correct PATH environment to the cron entry and now it works.

vaeth commented 8 years ago

If crony really provides this path ("/usr/bin:/bin:/usr/sbin"), you might think about filing a bug against crony (probably at your distribution, since I suppose - but please check, I didn't verify it! - that the path was configured at compile time for crony by your distribution): In my opinion, it is "broken" to include /bin and /usr/sbin but not /sbin into the path (at least, if your distribution does provide /sbin and does not by default let it symlink to /bin): It is hard to believe that /sbin was excluded intentionally; probably this is an oversight somewhere.