Re: Loop in vi
On 15 Apr 1999, Gordon Matzigkeit wrote:
> >>>>> Dale Scheetz writes:
>
> DS> As a result, I don't see the problem you seem to think exists
> DS> with the /bin/vi script, as it will be replaced with an
> DS> update-alternatives link in /usr/bin/vi once the first vi package
> DS> is instlled.
>
> DS> Have I missed something here?
>
> You've missed the fact that no self-respecting GNU/Hurd user would
> *ever* install vi.
>
> Just kidding. ;)
>
> Actually, the real reason is that users try typing `vi' while they're
> installing their Debian GNU/Hurd system, just like with Debian
> GNU/Linux.
>
> They expect to get an editor, not `file not found', and *definitely*
> not an infinite loop. At that point they have to guess at what the
> editor could possibly be called: `ae' isn't exactly the first attempt
> I'd make... I'd probably try using sed first.
>
> The reason I'm spending time trying to fix this infinite loop is the
> same reason the /bin/vi script exists in the first place: people want
> to use vi, but they can't because it isn't actually installed.
OK, now the logic of your script becomes clear.
>
> DS> As for the way your patch may help remove the script, it made me
> DS> realize that if the script can tell that there is a "real" vi
> DS> installed then it could remove itself.
>
> Isn't there a way that you can make update-alternatives think that
> /bin/ae is just an alternative for /usr/bin/vi? If it's done in the
> postinstall script, then everything will work.
>
Well, the thing that has kept me from doing it this way is because
update-alternatives provides no way to pass parameters in the "alternate"
symlink redirector. I had always figured I would have to modify ae to
recognize whether it is called as ae or vi in order to load the correct rc
file, but it just dawned on me that I can do this in a "wrapper" script.
I'll try to impliment the update alternatives method this weekend, and
remove the script all together. Does this sound like an answer?
> DS> Under the conditions that /usr is not linked to / the current
> DS> script can to that, and will be modified to slit its own throat
> DS> when such conditions are found.
>
> Can you post your new implementation, so I can understand its
> implications?
If I can make update-alternatives work this will become a moot point.
Waiting is,
Dwarf
--
_-_-_-_-_- Author of "The Debian Linux User's Guide" _-_-_-_-_-_-
aka Dale Scheetz Phone: 1 (850) 656-9769
Flexible Software 11000 McCrackin Road
e-mail: dwarf@polaris.net Tallahassee, FL 32308
_-_-_-_-_-_- If you don't see what you want, just ask _-_-_-_-_-_-_-
Reply to: