small debian changes
Page 1 of 1

Author:  FrankL [ Sun Oct 24, 2010 10:02 pm ]
Post subject:  small debian changes

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
        modprobe -n $MODULE2 2> /dev/null
        if [ $? -eq 0 ]; then

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
        modprobe -n $MODULE2 2> /dev/null || MODULE=$MODULE1
        if [ -z $MODULE ]; then

and at the top of the init.d script, I'd replace the required-start line with
# 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.

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):
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:
@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).
OPT_CFLAGS?=           -O

now reads

Author:  jchapman [ Thu Nov 04, 2010 1:40 pm ]
Post subject:  Re: small debian changes

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.

Author:  FrankL [ Tue Nov 23, 2010 3:36 pm ]
Post subject:  Re: small debian changes

I see nearly all issues have been resolved in openl2tp-1.8, nice!

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

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

Author:  jchapman [ Thu Nov 25, 2010 9:46 am ]
Post subject:  Re: small debian changes

Thanks for the heads up about openl2tp-default.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group