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
|
RETVAL=0
|
||||||
prog="network"
|
prog="network"
|
||||||
|
INTERFACE=eth0
|
||||||
|
|
||||||
startService()
|
startService()
|
||||||
{
|
{
|
||||||
# just do networking
|
# just do networking
|
||||||
echo -n $"Starting $prog:"
|
echo -n "Starting $prog:"
|
||||||
@dhcp@/sbin/dhclient
|
@dhcp@/sbin/dhclient $INTERFACE
|
||||||
|
|
||||||
|
RETVAL=$?
|
||||||
|
echo "retval $RETVAL"
|
||||||
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
stopService()
|
stopService()
|
||||||
{
|
{
|
||||||
echo -n $"Stopping $prog:"
|
echo "BLAAT"
|
||||||
}
|
}
|
||||||
|
|
||||||
reload()
|
reload()
|
||||||
|
@ -13,6 +13,7 @@ NIXPKGS=@nixpkgs@
|
|||||||
|
|
||||||
start_deps() {
|
start_deps() {
|
||||||
for i in $deps; do
|
for i in $deps; do
|
||||||
|
echo $i
|
||||||
name=`$i/control name`
|
name=`$i/control name`
|
||||||
|
|
||||||
if ! test -a "$RCDIR/$name"; then
|
if ! test -a "$RCDIR/$name"; then
|
||||||
@ -57,12 +58,28 @@ start() {
|
|||||||
# if not, continue
|
# if not, continue
|
||||||
# launch all hard dependencies
|
# launch all hard dependencies
|
||||||
start_deps
|
start_deps
|
||||||
|
|
||||||
|
RETVAL=$?
|
||||||
|
|
||||||
|
if test $RETVAL != 0; then
|
||||||
|
echo $prog failed
|
||||||
|
exit $RETVAL
|
||||||
|
fi
|
||||||
|
|
||||||
# launch all preferred dependencies
|
# launch all preferred dependencies
|
||||||
echo "softdeps" $softdeps
|
echo "softdeps" $softdeps
|
||||||
start_softdeps
|
start_softdeps
|
||||||
# launch our own program
|
# launch our own program
|
||||||
startService
|
startService
|
||||||
# if successful, then register
|
# if successful, then register
|
||||||
|
|
||||||
|
RETVAL=$?
|
||||||
|
|
||||||
|
if test $RETVAL != 0; then
|
||||||
|
echo $prog failed
|
||||||
|
exit $RETVAL
|
||||||
|
fi
|
||||||
|
|
||||||
register
|
register
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,6 +91,7 @@ stop() {
|
|||||||
fi
|
fi
|
||||||
# stop our own program
|
# stop our own program
|
||||||
stopService
|
stopService
|
||||||
|
echo "unregistering"
|
||||||
unregister
|
unregister
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user