Update of /cvsroot/devil-linux/build/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv10373/build/scripts
Added Files:
shorewall
Log Message:
Added shorewall 1.4.8
--- NEW FILE: shorewall ---
#!/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: shorewall
# Required-Start: $libs
# Required-Stop:
# Default-Start: 1 2
# Default-Stop:
# Description: Shorewall firewall (www.shorewall.net)
### END INIT INFO
# get the directoryname of the script
MYDIR=${0%/*}
# source functions and config
source $MYDIR/settings
source $MYDIR/functions
MYNAME=SHOREWALL
MY_DOCDIR=$DOCDIR/shorewall
case $1 in
build )
;;
install )
if [ "$CONFIG_SHOREWALL" = "y" ]; then
rm -rf $WORKDIR/tmp || exit 1
mkdir -p $WORKDIR/tmp || exit 1
# Install shorewall into $WORKDIR/tmp
PREFIX=$WORKDIR/tmp ./install.sh /etc/init.d || exit 1
# Create the directories for /var
mkdir -p $CDDIR/var/lib/shorewall
touch $CDDIR/var/log/messages
chmod 644 $CDDIR/var/log/messages
# Copy all the shorewall files to the appropriate directories on the cd
copy_files $WORKDIR/tmp/sbin $CDDIR || exit 1
copy_files $WORKDIR/tmp/usr/share/shorewall $CDDIR/usr/share || exit 1
copy_files $WORKDIR/tmp/etc/shorewall $ETCDIR/etc || exit 1
# Copy the shorewall documentation onto the cd
mkdir -p $MY_DOCDIR
cp -pr documentation/* $MY_DOCDIR || exit 1
# Copy our own startup script into /etc/init.d
cp $MYDIR/scripts/shorewall $ETCDIR/etc/init.d/
rm -rf $WORKDIR/tmp || exit 1
# Create the shorewall option in the config file
echo "# Start $MYNAME?" >> $CONFIGFILE
echo "START_SHOREWALL=no" >> $CONFIGFILE
echo >> $CONFIGFILE
echo "HELP_SHOREWALL=\"SHOREWALL is an alternate firewall creation script (www.shorewall.net)\"" >> $SOFTWAREHELP
fi
;;
* )
echo "ERROR ($0)"
echo "please add parameter so I know what to do"
exit 1
;;
esac
|