Bug 1988 - "network restart" doesn't work
Summary: "network restart" doesn't work
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: initscripts
Version: 1.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-04-04 21:10 UTC by Jay Freeman
Modified: 2014-03-17 02:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-04-06 16:25:26 UTC

Attachments (Terms of Use)

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

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