[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#646961: moot



On 05.04.2012 23:25, Robert Millan wrote:
> El 5 d’abril de 2012 14:25, Michael Tokarev <mjt@tls.msk.ru> ha escrit:

>> --- a/debian/tree/udhcpc/etc/udhcpc/default.script
>> +++ b/debian/tree/udhcpc/etc/udhcpc/default.script
>> @@ -15,13 +15,23 @@ case $1 in
>>
>>        if [ -n "$router" ]; then
>>            echo "$0: Resetting default routes"
>> -           while /sbin/route del default gw 0.0.0.0 dev $interface; do :; done
>> -
>> -           metric=0
>> -           for i in $router; do
>> -               /sbin/route add default gw $i dev $interface metric $metric
>> -               metric=$(($metric + 1))
>> -           done
>> +           case $(uname) in
>> +               *FreeBSD*) # kFreeBSD route uses different location & syntax
>> +                   /lib/freebsd/route del default
>> +                   set -- $route #XXX can we have >1 route?
>> +                   /lib/freebsd/route add default $1
>> +                   ;;
>> +               *)
>> +                   #XXX should we delete any route or only device-specific?
>> +                   while /sbin/route del default dev $interface
>> +                   do :; done
>> +                   m=0
>> +                   for i in $router; do #XXX can we have >1 route?
>> +                       /sbin/route add default gw $i dev $interface metric $m
>> +                       m=$(($m+1))
>> +                   done
>> +                   ;;
>> +           esac
>>        fi
> 
> Do you need me to test this?

There's no need to.  The thing is: current busybox udhcpc
does not compile on FreeBSD at all.  Right now the applet
is marked as linux-only, and here's what you get if you
try to compile it on kFreeBSD:

  CC      networking/udhcp/arpping.o
networking/udhcp/arpping.c: In function ‘arpping’:
networking/udhcp/arpping.c:51:13: error: ‘PF_PACKET’ undeclared (first use in this function)
networking/udhcp/arpping.c:51:13: note: each undeclared identifier is reported only once for each function it appears in
networking/udhcp/arpping.c:51:24: error: ‘SOCK_PACKET’ undeclared (first use in this function)
make[1]: *** [networking/udhcp/arpping.o] Error 1
make: *** [networking/udhcp] Error 2

Looking at the git log, I see this has been this way for
a long time: udhcp* was linux-specific, and it were marked
as such by this commit:

commit 1d7266d3b59be361763dab61f680103bbb70f3e9
Author: Jeremie Koenig <jk@jk.fr.eu.org>
Date:   Mon Jul 19 00:44:56 2010 +0200

    mark Linux-specific configuration options

    PLATFORM_LINUX is used as a dependency for applets or features
    which require Linux-specific interfaces.

Now I wonder how it work{s,ed} in debian-installer...

Digging further... ;)

/mjt



Reply to: