Manish Jain <invalid.poin...@gmail.com> wrote:
> From all the discussion I have walked through on the issue of
> where to place vi, it does appear FreeBSD has a skewed policy
> on the issue. There are plenty of reasons you might need access
> an editor in single-user mode - editing  fstab is just one.
> Having to use the workarounds suggested in place of vi is not
> so good, and manually moving vi to /bin is not simply a matter
> of 'mv /usr/bin/vi /bin/'.
>
> One of the things I would dearly like to see in a future release
> is vi being placed under /bin.

Maybe put something like this [untested] in /bin/vi:

#!/bin/sh
[ -x /usr/bin/vi ] && exec /usr/bin/vi "$@"
exec /rescue/vi "$@"

That should run /usr/bin/vi if it's available, else fall back to
/rescue/vi.  Beats linking /rescue/vi into /bin, since that would
cause the statically-linked version to be used by anyone who has
/bin ahead of /usr/bin in PATH, even when the dynamically-linked
version is available.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to