[Lunar-commits] r23822 - moonbase/trunk/net/net-tools/init.d

Kok, Auke sofar at foo-projects.org
Mon Mar 26 23:37:09 CEST 2007


Samuel Verstraete wrote:
> Author: elangelo
> Date: 2007-03-26 23:01:15 +0200 (Mon, 26 Mar 2007)
> New Revision: 23822
> 
> Modified:
>    moonbase/trunk/net/net-tools/init.d/network
> Log:
> fixing path for dhcpcd
> 
> 
> Modified: moonbase/trunk/net/net-tools/init.d/network
> ===================================================================
> --- moonbase/trunk/net/net-tools/init.d/network	2007-03-26 18:12:28 UTC (rev 23821)
> +++ moonbase/trunk/net/net-tools/init.d/network	2007-03-26 21:01:15 UTC (rev 23822)
> @@ -126,7 +126,7 @@
>  			case $DHCP_CLIENT in
>  			    [dD][hH][cC][pP][cC][dD])
>  				PIDFILE=/var/run/dhcpcd-$1.pid
> -				RUNFILE=/usr/sbin/dhcpcd
> +				RUNFILE=/sbin/dhcpcd
>  			    ;;
>  			    [dD][hH][cC][lL][iI][eE][nN][tT])
>  				PIDFILE=/var/run/dhclient-$1.pid
> @@ -220,7 +220,7 @@
>  
>  		case $DHCP_CLIENT in
>  		    [dD][hH][cC][pP][cC][dD])
> -			KILLCMD="dhcpcd -k"
> +			KILLCMD="dhcpcd -k $1"
>  			PIDFILE=/var/run/dhcpcd-$1.pid

this is why I dislike these hardcoded path's.

1) the killcmd here completely ignores the hardcoded path in the _up_ code

2) it's not needed anyway, instead init and /sbin/service should force paths to 
be sane anyway (i.e. include /sbin, /usr/sbin, /bin and /usr/bin only).

let's stop breaking this?

Auke


More information about the Lunar-commits mailing list