git.iko.soy/typeable/nixpkgs
on master help sign in
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

commit67971a4349d0bb187a6d0dc8b8991529e79afc61 authorArmijn Hemel <armijn@gpl-violations.org> dateFri 17 Mar 2006, 16:33 (21 years ago) parent35e30e7
2 files changed+26−3
pkgs/servers/network-script/network+8−3 pkgs/servers/server-scripts/generic/functions+18
pkgs/servers/network-script/network+8−3
@@ -15,17 +15,22 @@ source @initscripts@/functions
1515
1616RETVAL=0
1717prog="network"
18+INTERFACE=eth0
1819
1920startService()
2021{
2122 # just do networking
22− echo -n $"Starting $prog:"
23− @dhcp@/sbin/dhclient
23+ echo -n "Starting $prog:"
24+ @dhcp@/sbin/dhclient $INTERFACE
25+
26+ RETVAL=$?
27+ echo "retval $RETVAL"
28+ return $RETVAL
2429}
2530
2631stopService()
2732{
28− echo -n $"Stopping $prog:"
33+ echo "BLAAT"
2934}
3035
3136reload()
pkgs/servers/server-scripts/generic/functions+18
@@ -13,6 +13,7 @@ NIXPKGS=@nixpkgs@
1313
1414start_deps() {
1515 for i in $deps; do
16+ echo $i
1617 name=`$i/control name`
1718
1819 if ! test -a "$RCDIR/$name"; then
@@ -57,12 +58,28 @@ start() {
5758 # if not, continue
5859 # launch all hard dependencies
5960 start_deps
61+
62+ RETVAL=$?
63+
64+ if test $RETVAL != 0; then
65+ echo $prog failed
66+ exit $RETVAL
67+ fi
68+
6069 # launch all preferred dependencies
6170 echo "softdeps" $softdeps
6271 start_softdeps
6372 # launch our own program
6473 startService
6574 # if successful, then register
75+
76+ RETVAL=$?
77+
78+ if test $RETVAL != 0; then
79+ echo $prog failed
80+ exit $RETVAL
81+ fi
82+
6683 register
6784}
6885
@@ -74,6 +91,7 @@ stop() {
7491 fi
7592 # stop our own program
7693 stopService
94+ echo "unregistering"
7795 unregister
7896}
7997