Re: [mu TECH] tcpdump tweak silly newbie question

From: Michele Andreoli (m.andreoli@tin.it)
Date: Fri Apr 07 2000 - 11:09:43 CEST


On Thu, Apr 06, 2000 at 07:18:45PM -0400, Alfie Costa nicely wrote:
> > >
> > >The only line of code in the file is:
> > >
> > > exec trafshow $@
> > >
> > >Deleting this file and replacing it with a:
> > >
> > >"ln -s /usr/bin/trafshow /usr/bin/trafshow"
> > >
> > >...would be simpler -- unless there are plans to add more code to
> > >this script.
> >
> > My newbie mind didn't follow your reasoning, Alfie.
> > Is this a symlink pointing to a program that has the same name and is in the
> > same place? How does it work?
>

Why I used a script-wrapper and not a symlink? Well. The symlink is
static, i.e. it can't be upgraded, adding other tcp sniffer.

If I use a script-wrapper, and not symlink, I can do something like:

                if [ "`which A`" ]; then
                        exec A $@
                elif [ "`which B`" ] ; then
                        exec B $@
                .......
                fi

In this example, commands A and B resides in some (unmonted) addon.
What happens to symlinks if it point a command residing in a umounted
addons?

This is a general problem, with a phisa-filesystem-structure like muLinux.
We wish the GOOD command should win over the FAKE one.
This is the right behaviour if cmd-good and cmd-fake have the same name
and PATH variable is set correctly.

But if names are different (for ex: quark and lynx), I've to use wrapper.

Michele

-- 
I'd like to conclude with a positive statement, but I can't 
remember any. Would two negative ones do?       -- Woody Allen
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:13 CET