Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 38

Summary: 'cd /etc/rc.d/init.d/; network restart' doesn't work
Product: [Retired] Red Hat Linux Reporter: redhat-bugzilla
Component: initscriptsAssignee: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: low    
Version: 5.2   
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-05-17 14:01:05 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 redhat-bugzilla 1998-11-11 11:54:29 UTC
restart (and therefore reload when linuxconf is not
installed) doesn't work, since it does '$0 stop'
'$0 start' and the script has earlier cd'ed to
/etc/sysconfig/network-scripts where no $0 (./network)
exists. The problem is trivial to solve in several ways
but i dont know which is considered the most clean, so
i'll let you do it :)

Comment 1 David Lawrence 1998-11-13 16:59:59 UTC
More information needed; the bug report is mostly confusing. What
exactly it is failing and how can one reproduce it?

Comment 2 zblaxell 1998-12-13 00:46:59 UTC
The problem report is that "network restart" won't work if it is
invoked with a relative path.  `/etc/rc.d/init.d/network restart' will
work, 'cd /etc/rc.d/init.d; network restart' won't, and neither will
'cd /etc/rc.d; ./init.d/network restart'.  The reference to
'linuxconf' points out that 'network reload' suffers from the same bug
when there is no 'linuxconf'.

This isn't much of a loss IMHO, although trying to re-invoke your own
executable in general is very bad style.  If we really wanted this to
work, we'd define shell functions within the 'network' script and then
call them:

netstop () {
	# blah blah blah

netstart () {
	# blah blah blah

case "$1" in

Comment 3 Bill Nottingham 1999-05-17 14:01:59 UTC