Red Hat Bugzilla – Bug 55288
do_netreport fails if user uses tcsh
Last modified: 2014-03-16 22:24:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; SunOS 5.8 sun4u)
Description of problem:
do_netreport in /etc/sysconfig/network-scripts/network-functions,
in initscripts 6.40-1, does an "su" to user and performs a kill with
output redirection. The syntax it uses is not valid under tcsh, so
the kill fails.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Change your shell to /bin/tcsh
2. Start your ppp connection using rp3
Actual Results: When the connection is established, rp3 does not notice.
Expected Results: rp3 should notice that the connection is established, it
change the color of connection status "light", start counting
connection time etc.
I would recommend checking other scripts for similar problems.
I did a quick "grep" and I found just one other script doing such
"su"-things, namely /etc/apm/apm-scripts/apmscripts, but I'm not
sure if it is correct or not.
Created attachment 35383 [details]
Fix for do_netreport in /etc/sysconfig/network-scripts/network-functions
Yes this problem occurs with zsh too. If you have a ppp connection which is
brought up at boot time, and you change root's shell to zsh (or tcsh) you can't
boot any more. The system gets to trying to bring up the connection, then hangs
up. (Of course it will still come up single user.)
In addition to the do_netreport() function
/etc/sysconfig/network-scripts/network-functions this problem could also appear
in the /etc/rc.d/init.d/functions file, in the daemon() function. The affected
$nice initlog $INITLOG_ARGS -c "su - $user -c \"$*\"" && success $"$base
startup" || failure $"$base startup"
It should be
$nice initlog $INITLOG_ARGS -c "su -s /bin/bash - $user -c \"$*\"" && success
$"$base startup" || failure $"$base startup"
so that bash is always used (I suppose the daemon function is passedbash syntax,
so that should be used).
The fix for /etc/sysconfig/network-scripts/network-functions is also adding "-s
/bin/bash" to the su options, so that bash will be used.
This was in 7.1 also, and was supposedly fixed. See bug #37716, particularly
the comment at the end
Indeed, bug #37716 describes the same problem. I guess I missed it since
it was reported agains rp3 and not initscripts, or maybe because it was
already CLOSED. I guess I should mark "my" bug #55288 as a duplicate of the
other one, but as already mentioned that one is CLOSED, and I don't have the
permission to reopen it. So I guess I better leave things as they are, so
that it's at least clear that there still is a problem that needs to be
Apparently, the problem originally described in bug #37716 has been fixed,
so closing the bug was a right decision IMHO, but it turns out that there
is yet another problem in the same line of the script. Let's hope this is
going to be the last one :-).
Both fixed in 6.51-1 - thanks!
Would it be possible to make the fix for this available in the 7.2 errata? This
bug probably catches quite a lot of people, and if their machines won't start it
will be annoying for them. Of course your QA resources are finite so I can
understand if you don't want to do this, but I thought it was worth asking. :-)
Alternatively if I install the Rawhide version of the initscripts, will that
work okay with 7.2 or have there been other changes?
But i have RedHat 7.3 with some bug..
pppd not retrying in the background on boot if modem not connected to other
peer (link fail or some else..)
[root@edge network-scripts]# service network restart
Deactivate eth0: [ ok ]
Deactivate lo0: [ ok ]
..: [ ok ]
Activate lo0: [ ok ]
Activate eth0: [ ok ]
and its all, after that string not booted..
On RedHat 6.2 all work fine for me:
eth0: [ ok ]
lo0: [ ok ]
..: [ ok ]
lo0: [ ok ]
eth0: [ ok ]
ppp999: Failed to activate ppp999, retrying in the background
[ FAIL ]
It's OK, because after remote peer activate link, pppd connected and link
I have initscripts-6.67 and try initscripts from rawhide - 6.82 it's not solved
problem. But if i copy ifup-ppp from RH7.0 it's on half worked