Bug 1988

Summary: "network restart" doesn't work
Product: [Retired] Red Hat Raw Hide Reporter: Jay Freeman <saurik>
Component: initscriptsAssignee: Bill Nottingham <notting>
Severity: low Docs Contact:
Priority: low    
Version: 1.0CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-04-06 16:25:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jay Freeman 1999-04-04 21:10:31 UTC
[root(6)@ironclad init.d]# network restart
./network: ./network: No such file or directory
./network: ./network: No such file or directory

At first I assumed this was because it wasn't finding the
script when it did $0 because "." wasn't on the scripts path
(was on mine, but I did a printenv from inside the script
and it wasn't on its).  But then I changed the "$0 stop" to
"echo $0 stop" and got back "./network stop" which is
including the ./ which should be required to get around the
path problem.

Comment 1 Preston Brown 1999-04-05 20:18:59 UTC
this works for me in both 5.2 and 5.9.x.  You must have messed up
something on your system.

Comment 2 Jay Freeman 1999-04-05 22:31:59 UTC
I figured out why it happens (don't know why this didn't occur to me
before), and it IS a "problem" with the script.  The script contains
the line:

cd /etc/sysconfig/network-scripts

:before it gets to the case statement to see how it was called, which
bumps you (the script) out of the init.d directory, causing "network
restart" or "./network restart" to not function.
/etc/rc.d/init.d/network restart DOES function because the directory
in that case is explicitly named.  I understand if this is intended
functionality and not a problem, but it was rather disconcerting when
I tried it because the other scripts don't have a problem when run
like that.

Comment 3 Bill Nottingham 1999-04-06 16:25:59 UTC
fixed in latest initscripts (3.99-2).