Bug#766764: Support PATH ~ expansion?
Alexandre Detiste
alexandre.detiste at gmail.com
Sun Oct 26 21:52:13 GMT 2014
> Version: 1.3.1+ds1-1
> Severity: wishlist
>
> I'm dropping this as a whishlist here, but I would gladly implement this *as well*:
>
> It would be nice if PATH= would support ~ expansion *directly*, as an extension.
>
> Since variable interpolation is not supported, I always had to hardcode my home
> directory in there.
>
> For an extra line of python, I would /gladly/ fix this.
>
This could be nice, I don't mind adding interresting features not avaible in cron.
But maybe PATH ~ expansion is not enough, you'd need "command" rewriting too:
While cron allways use a shell:
http://anonscm.debian.org/cgit/pkg-cron/pkg-cron.git/tree/do_command.c#n375 ,
from version 1.3.2, systemd-cron tries to avoid it:
*) it strips "> /dev/null" of the end of the command line and replace it by
"StandardOutput=null"
*) it translates "[ -x /usr/lib/command ] && /usr/lib/command" into
- ExecStart=/usr/lib/command
- ConditionFileIsExecutable=/usr/lib/command
This is really common, by policy:
https://www.debian.org/doc/debian-policy/ch-opersys.html
> The scripts or crontab entries in these directories should check if all necessary programs
> are installed before they try to execute them. Otherwise, problems will arise
> when a package was removed but not purged since configuration files are kept on the system in this situation.
If the remainder is not an full path, it is run with "$SHELL -c '<command>'", like cron.
More information about the Pkg-systemd-maintainers
mailing list