[BusyBox] Fix default editor path in miscutils/crontab.c

Lars Kellogg-Stedman lars at larsshack.org
Sun Jul 6 18:26:19 UTC 2003


The 'crontab' commands looks for /usr/bin/vi if no editor is specified
in the environment.  However, 'busybox --install' puts vi in /bin -- so
crontab, without additional configuration, can't find an editor.

There are two solutions to this problem:

(1) Have crontab look for /bin/vi instead.

(2) Since the editor is run via 'sh -c ...', one could simply make the
default value 'vi' (no path), and crontab would find whatever 'vi' comes
first in the user's path.

Does anyone care?  The attached patch implements (1).

-- Lars

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: crontab.patch
Url: http://lists.busybox.net/pipermail/busybox/attachments/20030706/d993003e/attachment.diff 


More information about the busybox mailing list