Initial checkin.

This commit is contained in:
bronson 2002-01-08 09:44:44 +00:00
parent 6e9eeff9b5
commit 9a015f41e4
3 changed files with 1774 additions and 0 deletions

View File

@ -0,0 +1,81 @@
# sgml makefile
# Scott Bronson
# 19 Dec 2001
#
# Simply run "make outputformat" where output format is one of:
# html, html-one (one big file), ps, pdf, xml, dvi, tex, rtf, mirror
# If you run make with no arguments, it makes ALL the formats.
# "make validate" to validate the sgml.
# "make clean" to remove all files except for the source files
# TODO: make it recognize output files so it doesn't unnec. remake things
#
# Benefits over compiles-sgml: doesn't re-do work, stops on all errors,
# provides clean target.
#
# This Makefile is configured for Debian. You need to install:
# docbook-dsssl, jade, perl, tetex-bin
# This is the name of your document without the .sgml extension
# We will produce DOCUMENT.rtf, DOCUMENT.xml, etc.
DOCUMENT=ppp-ssh
# If you want to generate an index, use "INDEX=HTML.index".
# If not, then just comment this line out.
# INDEX=HTML.index
all: html html-one rtf xml tex mirror ps
# This creates the empty index file
index.sgml: $(DOCUMENT).sgml
perl /usr/bin/collateindex.pl -N -o index.sgml
HTML.index: index.sgml
jade -t sgml -V html-index -d /usr/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl $(DOCUMENT).sgml
perl /usr/bin/collateindex.pl -o index.sgml HTML.index
html: $(INDEX)
rm -f `find . -name "*.html" -not -name $(DOCUMENT).html`
jade -t sgml -i html -d /usr/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl $(DOCUMENT).sgml
html-one: $(INDEX)
rm -f $(DOCUMENT).html
jade -t sgml -i html -V nochunks -d /usr/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl $(DOCUMENT).sgml > $(DOCUMENT).html
rtf: $(INDEX)
rm -f $(DOCUMENT).rtf
jade -t rtf -V rtf-backend -d /usr/share/sgml/docbook/stylesheet/dsssl/modular/print/docbook.dsl $(DOCUMENT).sgml
# XML is broken on my system until I can find a docbook.xsl file that works.
xml: $(INDEX)
rm -f $(DOCUMENT).xml
jade -t sgml -i xml -d docbook.xsl $(DOCUMENT).sgml
tex: $(INDEX)
rm -f $(DOCUMENT).tex $(DOCUMENT).dvi
jade -t tex -V tex-backend -d /usr/share/sgml/docbook/stylesheet/dsssl/modular/print/docbook.dsl $(DOCUMENT).sgml
jadetex $(DOCUMENT).tex
mirror: $(INDEX) tex
rm -f $(DOCUMENT).mirror.ps
dvips -h /usr/share/texmf/dvips/misc/mirr.hd -O 1.5cm,3cm -f $(DOCUMENT).dvi -o $(DOCUMENT).mirror.ps
# This was originally the following command, but "-The" kept causing errors. dvips v. 5.86d
# dvips -The 1.5cm,3cm -f $(DOCUMENT).dvi -o $(DOCUMENT).ps
ps: $(INDEX) tex
rm -f $(DOCUMENT).ps
dvips -f $(DOCUMENT).dvi -o $(DOCUMENT).ps
validate:
nsgmls -s $(DOCUMENT).sgml
clean:
rm -f *.htm *.html index.sgml HTML.index
rm -f $(DOCUMENT).rtf $(DOCUMENT).xml
rm -f $(DOCUMENT).tex $(DOCUMENT).dvi $(DOCUMENT).aux $(DOCUMENT).log
rm -f $(DOCUMENT).ps $(DOCUMENT).mirror.ps

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,92 @@
#!/bin/sh
# /usr/local/bin/vpn-pppssh
#
# This script initiates a ppp-ssh vpn connection.
# see the VPN PPP-SSH HOWTO on http://www.linuxdoc.org for more information.
#
# revision history:
# 1.6 11-Nov-1996 miquels@cistron.nl
# 1.7 20-Dec-1999 bart@jukie.net
# 2.0 16-May-2001 bronson@trestle.com
#
# You will need to change these variables...
#
# The host name or IP address of the SSH server that we are
# sending the connection request to:
SERVER_HOSTNAME=eldivino.domain.com
# The username on the VPN server that will run the tunnel.
# For security reasons, this should NOT be root. (Any user
# that can use PPP can intitiate the connection on the client)
SERVER_USERNAME=vpn
# The VPN network interface on the server should use this address:
SERVER_IFIPADDR=192.168.3.2
# ...and on the client, this address:
CLIENT_IFIPADDR=192.168.3.1
# This tells ssh to use unprivileged high ports, even though it's
# running as root. This way, you don't have to punch custom holes
# through your firewall.
LOCAL_SSH_OPTS="-P"
#
# The rest of this file should not need to be changed.
#
PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11/:
#
# required commands...
#
PPPD=/usr/sbin/pppd
SSH=/usr/bin/ssh
if ! test -f $PPPD ; then echo "can't find $PPPD"; exit 3; fi
if ! test -f $SSH ; then echo "can't find $SSH"; exit 4; fi
case "$1" in
start)
# echo -n "Starting vpn to $SERVER_HOSTNAME: "
${PPPD} updetach noauth passive pty "${SSH} ${LOCAL_SSH_OPTS} ${SERVER_HOSTNAME} -l${SERVER_USERNAME} -o Batchmode=yes sudo ${PPPD} nodetach notty noauth" ipparam vpn ${CLIENT_IFIPADDR}:${SERVER_IFIPADDR}
# echo "connected."
;;
stop)
# echo -n "Stopping vpn to $SERVER_HOSTNAME: "
PID=`ps ax | grep "${SSH} ${LOCAL_SSH_OPTS} ${SERVER_HOSTNAME} -l${SERVER_USERNAME} -o" | grep -v ' passive ' | grep -v 'grep ' | awk '{print $1}'`
if [ "${PID}" != "" ]; then
kill $PID
echo "disconnected."
else
echo "Failed to find PID for the connection"
fi
;;
config)
echo "SERVER_HOSTNAME=$SERVER_HOSTNAME"
echo "SERVER_USERNAME=$SERVER_USERNAME"
echo "SERVER_IFIPADDR=$SERVER_IFIPADDR"
echo "CLIENT_IFIPADDR=$CLIENT_IFIPADDR"
;;
*)
echo "Usage: vpn {start|stop|config}"
exit 1
;;
esac
exit 0