It is currently Sun Aug 19, 2018 8:19 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: small debian changes
PostPosted: Sun Oct 24, 2010 10:02 pm 

Joined: Tue Oct 19, 2010 12:01 pm
Posts: 27
Here's some small changes that are needed to get openl2tp running properly on my Debian Squeeze system (arch armel):

/etc/init.d/openl2tp script
Code:
        modprobe -n $MODULE2 2> /dev/null
        if [ $? -eq 0 ]; then
            MODULE=$MODULE2
        else
            MODULE=$MODULE1
        fi

will cause the script to exit abruptly if modprobe -n produces an error code (set -e is enabled at the top of the initscript). I propose to replace this code by the following lines
Code:
        modprobe -n $MODULE2 2> /dev/null || MODULE=$MODULE1
        if [ -z $MODULE ]; then
            MODULE=$MODULE2
        fi


and at the top of the init.d script, I'd replace the required-start line with
Code:
# Required-Start:    $network $remote_fs $syslog $portmap

to make sure the RPC service has been started when the attempt is made to start openl2tp during system startup; openl2tp will not start if portmap is not yet running during startup.

Makefile
The detection code for the presence of if_pppol2tp.h fails, because the KERNEL_SRCDIR variable gets overridden with what debian/rules defines. The definition used in Makefile is correct for the check for if_pppol2tp.h. All other instances of use of KERNEL_SRCDIR probably need the debian/rules definition. I've therefore added another variable to makefile, and changed the if_pppol2tp.h detection line to use this (center line is new):
Code:
KERNEL_SRCDIR=          /lib/modules/$(shell uname -r)/source
PPPOL2TP_SRCDIR=        /lib/modules/$(shell uname -r)/source
KERNEL_BLDDIR=          /lib/modules/$(shell uname -r)/build

and the detection line now reads:
Code:
@if [ ! -f $(PPPOL2TP_SRCDIR)/include/linux/if_pppol2tp.h ]; then \


Further more, I get compiler errors ('strict aliasing') when I compile openl2tp-1.7 on Debian Squeeze on my armel architecture box. I don't know how to fix the source files it is referring to to get rid of this error, so I've used the following hack to compile it: I've removed the optimization flags for the compiler in Makefile (appearantly it overrides those set in debian/rules this way).
Code:
OPT_CFLAGS?=           -O

now reads
Code:
OPT_CFLAGS=           


Top
 Profile  
 
 Post subject: Re: small debian changes
PostPosted: Thu Nov 04, 2010 1:40 pm 
Site Admin

Joined: Sun Jul 27, 2008 1:39 pm
Posts: 122
Thanks Frank. I'll roll most of these into the next release.

I can't apply the KERNEL_SRCDIR change as it would prevent building on systems with an installed kernel which predates 2.6.23. I'm actually thinking of including the required kernel headers with the openl2tp release, to avoid the build dependency on kernel headers anyway.

Thanks again.


Top
 Profile  
 
 Post subject: Re: small debian changes
PostPosted: Tue Nov 23, 2010 3:36 pm 

Joined: Tue Oct 19, 2010 12:01 pm
Posts: 27
I see nearly all issues have been resolved in openl2tp-1.8, nice!

I stumbled into an orphaned file in the ./debian directory:
openl2tp-default

this file doesn't seem to have any function any more, as openl2tp.default is the script that gets installed into /etc/default/openl2tpd


Top
 Profile  
 
 Post subject: Re: small debian changes
PostPosted: Thu Nov 25, 2010 9:46 am 
Site Admin

Joined: Sun Jul 27, 2008 1:39 pm
Posts: 122
Thanks for the heads up about openl2tp-default.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group