Bug 55288 - do_netreport fails if user uses tcsh
do_netreport fails if user uses tcsh
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-10-29 05:23 EST by Kamil Iskra
Modified: 2014-03-16 22:24 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-11-13 09:32:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix for do_netreport in /etc/sysconfig/network-scripts/network-functions (504 bytes, patch)
2001-10-29 05:25 EST, Kamil Iskra
no flags Details | Diff

  None (edit)
Description Kamil Iskra 2001-10-29 05:23:56 EST
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):


How reproducible:
Always

Steps to Reproduce:
1. Change your shell to /bin/tcsh
2. Start your ppp connection using rp3
3.

Actual Results:  When the connection is established, rp3 does not notice.

Expected Results:  rp3 should notice that the connection is established, it
should
change the color of connection status "light", start counting
connection time etc.

Additional info:

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.
Comment 1 Kamil Iskra 2001-10-29 05:25:29 EST
Created attachment 35383 [details]
Fix for do_netreport in /etc/sysconfig/network-scripts/network-functions
Comment 2 Pete Chown 2001-11-03 04:38:41 EST
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.)
Comment 3 diego.santacruz 2001-11-07 07:28:03 EST
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
line is:

$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.
Comment 4 sdh4 2001-11-11 18:36:05 EST
This was in 7.1 also, and was supposedly fixed. See bug #37716, particularly 
the comment at the end
Comment 5 Kamil Iskra 2001-11-13 09:32:22 EST
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
addressed.

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 :-).
Comment 6 Bill Nottingham 2002-01-25 00:23:45 EST
Both fixed in 6.51-1 - thanks!
Comment 7 Pete Chown 2002-01-28 04:38:40 EST
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?
Comment 8 Andrey 2002-07-15 08:17:57 EDT
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  ]
Activate ppp999:

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 
established.

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

Note You need to log in before you can comment on or make changes to this bug.