Bug 38 - 'cd /etc/rc.d/init.d/; network restart' doesn't work
'cd /etc/rc.d/init.d/; network restart' doesn't work
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
5.2
i386 Linux
low Severity low
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1998-11-11 06:54 EST by redhat-bugzilla
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-05-17 10:01:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description redhat-bugzilla 1998-11-11 06:54:29 EST
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 11:59:59 EST
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-12 19:46:59 EST
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
	start)
		netstart
		;;
	stop)
		netstop
		;;
	restart)
		netstop
		netstart
		;;
esac
Comment 3 Bill Nottingham 1999-05-17 10:01:59 EDT
fixed

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