Bug 55288 - do_netreport fails if user uses tcsh
Summary: do_netreport fails if user uses tcsh
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-29 10:23 UTC by Kamil Iskra
Modified: 2014-03-17 02:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-11-13 14:32:26 UTC
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2002:022 0 normal SHIPPED_LIVE New initscripts packages available for Red Hat Linux 7.2 2002-02-06 05:00:00 UTC

Description Kamil Iskra 2001-10-29 10:23:56 UTC
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 10:25:29 UTC
Created attachment 35383 [details]
Fix for do_netreport in /etc/sysconfig/network-scripts/network-functions

Comment 2 Pete Chown 2001-11-03 09:38:41 UTC
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 12:28:03 UTC
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 Steve Holland 2001-11-11 23:36:05 UTC
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 14:32:22 UTC
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 05:23:45 UTC
Both fixed in 6.51-1 - thanks!

Comment 7 Pete Chown 2002-01-28 09:38:40 UTC
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 12:17:57 UTC
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.