Bug 38 - 'cd /etc/rc.d/init.d/; network restart' doesn't work
Summary: 'cd /etc/rc.d/init.d/; network restart' doesn't work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 5.2
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1998-11-11 11:54 UTC by redhat-bugzilla
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-05-17 14:01:05 UTC
Embargoed:


Attachments (Terms of Use)

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
	start)
		netstart
		;;
	stop)
		netstop
		;;
	restart)
		netstop
		netstart
		;;
esac

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


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