From: <smi...@us...> - 2003-12-26 18:45:50
|
Update of /cvsroot/devil-linux/build/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv29705/scripts Added Files: l2tpd Log Message: initial checkin of l2tpd --- NEW FILE: l2tpd --- #!/bin/bash # # http://www.devil-linux.org # you need the next line, otherwise script won't be executed !!! # DL-build-system v3 ### BEGIN INIT INFO # Provides: l2tpd # Required-Start: $basebuildtools $libs ppp # Required-Stop: # Default-Start: 1 2 # Default-Stop: # Description: Layer 2 Tunneling Protocol ### END INIT INFO # get the directoryname of the script MYDIR=${0%/*} # source functions and config source $MYDIR/settings source $MYDIR/functions MYNAME=L2TPD L2TPDPATCHDIR=$WORKDIR/l2tpd-patches case $1 in build ) if [ "$CONFIG_L2TPD" = "y" ]; then if [ ! -f l2tpd-patches.done ]; then touch l2tpd-patches.done for PATCH in $(ls $L2TPDPATCHDIR/p0/* 2> /dev/null ) do echo applying patch: $PATCH patch -p0 -i $PATCH || exit 1 done for PATCH in $(ls $L2TPDPATCHDIR/p1/* 2> /dev/null ) do echo applying patch: $PATCH patch -p1 -i $PATCH || exit 1 done fi make || exit 1 strip_debug fi ;; install ) if [ "$CONFIG_L2TPD" = "y" ]; then # Create needed directories mkdir -p $CDDIR/usr/sbin || exit 1 mkdir -p $ETCDIR/etc/l2tpd || exit 1 mkdir -p $ETCDIR/etc/ppp || exit 1 # Copy binary files to appropriate directories copy_files "l2tpd" $CDDIR/usr/sbin # Copy sample config files to appropriate directories cp ./doc/l2tpd.conf.sample $ETCDIR/etc/l2tpd/l2tpd.conf || exit 1 cp ./doc/l2tp-secrets.sample $ETCDIR/etc/l2tpd/l2tp-secrets || exit 1 cp $MYDIR/scripts/options.l2tpd.lns $ETCDIR/etc/ppp ||exit 1 # Copy l2tp documentation onto the cd copy_man ./doc # Copy our own startup script into /etc/init.d cp $MYDIR/scripts/l2tpd $ETCDIR/etc/init.d || exit 1 # Create the l2tp option in the config file echo "# Start $MYNAME?" >> $CONFIGFILE echo "START_L2TPD=no" >> $CONFIGFILE echo >> $CONFIGFILE echo "HELP_L2TPD=\"L2TPD is an implementation of the l2tp protocol (www.l2tpd.org)\"" >> $SOFTWAREHELP fi ;; * ) echo "ERROR ($0)" echo "please add parameter so I know what to do" exit 1 ;; esac |