dhclient would return 0 if invoked without an interface argument, so set this
to eth0. Oh, what a hack...but it works :) svn path=/nixpkgs/trunk/; revision=5050
This commit is contained in:
parent
35e30e7797
commit
67971a4349
@ -15,17 +15,22 @@ source @initscripts@/functions
|
||||
|
||||
RETVAL=0
|
||||
prog="network"
|
||||
INTERFACE=eth0
|
||||
|
||||
startService()
|
||||
{
|
||||
# just do networking
|
||||
echo -n $"Starting $prog:"
|
||||
@dhcp@/sbin/dhclient
|
||||
echo -n "Starting $prog:"
|
||||
@dhcp@/sbin/dhclient $INTERFACE
|
||||
|
||||
RETVAL=$?
|
||||
echo "retval $RETVAL"
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stopService()
|
||||
{
|
||||
echo -n $"Stopping $prog:"
|
||||
echo "BLAAT"
|
||||
}
|
||||
|
||||
reload()
|
||||
|
@ -13,6 +13,7 @@ NIXPKGS=@nixpkgs@
|
||||
|
||||
start_deps() {
|
||||
for i in $deps; do
|
||||
echo $i
|
||||
name=`$i/control name`
|
||||
|
||||
if ! test -a "$RCDIR/$name"; then
|
||||
@ -57,12 +58,28 @@ start() {
|
||||
# if not, continue
|
||||
# launch all hard dependencies
|
||||
start_deps
|
||||
|
||||
RETVAL=$?
|
||||
|
||||
if test $RETVAL != 0; then
|
||||
echo $prog failed
|
||||
exit $RETVAL
|
||||
fi
|
||||
|
||||
# launch all preferred dependencies
|
||||
echo "softdeps" $softdeps
|
||||
start_softdeps
|
||||
# launch our own program
|
||||
startService
|
||||
# if successful, then register
|
||||
|
||||
RETVAL=$?
|
||||
|
||||
if test $RETVAL != 0; then
|
||||
echo $prog failed
|
||||
exit $RETVAL
|
||||
fi
|
||||
|
||||
register
|
||||
}
|
||||
|
||||
@ -74,6 +91,7 @@ stop() {
|
||||
fi
|
||||
# stop our own program
|
||||
stopService
|
||||
echo "unregistering"
|
||||
unregister
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user