strange bug in ipv6 initscripts, ideas?

Pekka Savola pekkas at netcore.fi
Thu Jul 24 06:16:33 UTC 2003


On Wed, 23 Jul 2003, Bill Nottingham wrote:
> Pekka Savola (pekkas at netcore.fi) said: 
> > Hi,
> > 
> > When looking at a bug report in IPv6 initscripts:
> > 
> > http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86210
> > 
> > I came across a very strange bug.  When a command is run from 
> > interactively, it works fine.  When it's run via hotplug, it bugs under a 
> > very specific scenario: sometimes when we're redirecting stderr to stdin.
> 
> Hotplug runs with stdin/stdout/stderr to /dev/null, FWIW.

Ok.  Now I see that:

--8<--
ipv6_exec_ifconfig() {
        local options=$*
                                                                                
        LC_ALL=C /sbin/ifconfig $options 2>&1
                                                                                
        return $?
}

ipv6_exec_ifconfig $device inet6 add $address || return 3
--8<--

1) works if you remove "2>&1", or

2) works if you change the command to like:
"ipv6_exec_ifconfig $device inet6 add $address > /dev/null || return 3"

I.e. it seems as if "2>&1" does not work with hotplug's "unspecified" 
stdout/stderr fd's.

So..

- Is there a bug in hotplug's handling of stdout/stderr ?
- Is there a bug in sh's handling of "2>&1" when 1 is implicitly /dev/null?
- Is there something I'm missing? :-)

(Note: I've done all my tests on RHL73, so if something has changed in the 
meantime...)

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings







More information about the fedora-devel-list mailing list