code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/sh # # This should work with the GNU version of tar and gzip! # This should work with the bash or ash shell! # Requires the programs (ar, tar, gzip, and the pager more or less). # usage() { echo "Usage: undeb -c package.deb <Print control file info>" echo " undeb -l package.deb <List ...
Shell
#!/bin/sh # only for use as a "zcip" callback script if [ "x$interface" = x ] then exit 1 fi # zcip should start on boot/resume and various media changes case "$1" in init) # for now, zcip requires the link to be already up, # and it drops links when they go down. that isn't # the most robust model... exit 0 ;...
Shell
#!/bin/sh # # This should work with the GNU version of cpio and gzip! # This should work with the bash or ash shell! # Requires the programs (cpio, gzip, and the pager more or less). # usage() { echo "Usage: unrpm -l package.rpm <List contents of rpm package>" echo " unrpm -x package.rpm /foo/boo <Ex...
Shell
#!/bin/sh # Sample udhcpc deconfig script /sbin/ifconfig $interface 0.0.0.0
Shell
#!/bin/sh # Currently, we only dispatch according to command. However, a more # elaborate system might dispatch by command and interface or do some # common initialization first, especially if more dhcp event notifications # are added. exec /usr/share/udhcpc/sample.$1
Shell
#!/bin/sh # Sample udhcpc bound script RESOLV_CONF="/etc/udhcpc/resolv.conf" [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" [ -n "$subnet" ] && NETMASK="netmask $subnet" /sbin/ifconfig $interface $ip $BROADCAST $NETMASK if [ -n "$router" ] then echo "deleting routers" while /sbin/route del default gw 0.0...
Shell
#!/bin/sh # Sample udhcpc nak script echo Received a NAK: $message
Shell
#!/bin/sh # Sample udhcpc renew script RESOLV_CONF="/etc/udhcpc/resolv.conf" [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" [ -n "$subnet" ] && NETMASK="netmask $subnet" /sbin/ifconfig $interface $ip $BROADCAST $NETMASK if [ -n "$router" ] then echo "deleting routers" while /sbin/route del default gw 0.0...
Shell
#!/bin/sh # udhcpc script edited by Tim Riker <Tim@Rikers.org> RESOLV_CONF="/etc/resolv.conf" [ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; } NETMASK="" [ -n "$subnet" ] && NETMASK="netmask $subnet" BROADCAST="broadcast +" [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" case "$1" in ...
Shell
#!/bin/sh # Build Busybox against Android's bionic # Originally by Dan Fandrich # # Configure with "make android_defconfig" # # This file has been tested on Android Froyo (the lack of ttyname_r in # the android libc must be patched around) and Gingerbread. # Point this to the Android root directory; it's used in the d...
Shell
#!/bin/sh # # Simple depmod, use to generate modprobe.conf # # Copyright (C) 2008 by Vladimir Dronnikov <dronnikov@gmail.com> # # Licensed under GPLv2, see file LICENSE in this source tree. # local BASE="${1:-/usr/lib/modules}" find "$BASE" -name '*.ko.gz' | while read I ; do N=`basename "$I" '.ko.gz'` echo -n "@$N...
Shell
#!/bin/sh target="$1" loc="$2" test "$target" || exit 1 test "$loc" || loc=. test -x "$loc/usage" || exit 1 test "$SED" || SED=sed test "$DD" || DD=dd # Some people were bitten by their system lacking a (proper) od od -v -t x1 </dev/null >/dev/null if test $? != 0; then echo 'od tool is not installed or cannot acce...
Shell
#!/bin/sh # Make busybox links list file. # input $1: full path to Config.h # input $2: full path to applets.h # output (stdout): list of pathnames that should be linked to busybox # Maintainer: Larry Doolittle <ldoolitt@recycle.lbl.gov> export LC_ALL=POSIX export LC_CTYPE=POSIX CONFIG_H=${1:-include/autoconf.h} AP...
Shell
#!/bin/sh export LC_ALL=POSIX export LC_CTYPE=POSIX prefix=$1 if [ -z "$prefix" ]; then echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--scriptwrapper]" exit 1 fi h=`sort busybox.links | uniq` linkopts="" scriptwrapper="n" cleanup="0" noclobber="0" case "$2" in --hardlinks) linkopts="-f"...
Shell
#!/bin/sh # Disabling features we do not match exactly: system_mke2fs='/sbin/mke2fs -O ^resize_inode' bbox_mke2fs='./busybox mke2fs' gen_image() { # params: mke2fs_invocation image_name >$2 dd seek=$((kilobytes-1)) bs=1K count=1 </dev/zero of=$2 >/dev/null 2>&1 || exit 1 $1 -F $2 $kilobytes >$2.raw_out 2>...
Shell
if [ -z "$ANDROID_NDK_R3" ] ; then echo '$ANDROID_NDK_R3' must point to an android-ndk-r3 installation echo 'Get it at: http://dl.google.com/android/ndk/android-ndk-r3-linux-x86.zip' exit -1 fi cd vanilla make mrproper cd .. egrep -v 'CONFIG_CROSS_COMPILER_PREFIX|CONFIG_SYSROOT|CONFIG_EXTRA_CFLAGS' config > vanil...
Shell
#!/bin/sh # # CA - wrapper around ca to make it easier to use ... basically ca requires # some setup stuff to be done before you can use it and this makes # things easier between now and when Eric is convinced to fix it :-) # # CA -newca ... will setup the right stuff # CA -newreq ... will generate a certific...
Shell
#!/bin/sh # # build using pthreads where it's already built into the system # /bin/rm -f mttest gcc -DPTHREADS -I../../include -g mttest.c -o mttest -L../.. -lssl -lcrypto -lpthread
Shell
#!/bin/sh # # build using pthreads # # http://www.mit.edu:8001/people/proven/pthreads.html # /bin/rm -f mttest pgcc -DPTHREADS -I../../include -g mttest.c -o mttest -L../.. -lssl -lcrypto
Shell
#!/bin/sh /bin/rm -f mttest cc -DSOLARIS -I../../include -g mttest.c -o mttest -L../.. -lthread -lssl -lcrypto -lnsl -lsocket
Shell
#!/bin/sh /bin/rm -f mttest cc -p -DSOLARIS -I../../include -g mttest.c -o mttest -L/usr/lib/libc -ldl -L../.. -lthread -lssl -lcrypto -lnsl -lsocket
Shell
#!/bin/sh /bin/rm -f mttest purify cc -DSOLARIS -I../../include -g mttest.c -o mttest -L../.. -lthread -lssl -lcrypto -lnsl -lsocket
Shell
#! /bin/bash # libtoolT - Provide generalized library-building support services. # Generated automatically by (GNU lzo 2.03) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # ...
Shell
#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2007-03-29.01 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public ...
Shell
#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2008 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # # This file is fre...
Shell
# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # # Th...
Shell
#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby ...
Shell
#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2007-03-30.02 # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software # Foundation, Inc. # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995 # # This program is free software; you can redistribute it...
Shell
#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redi...
Shell
#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2006-05-11.19 # Original author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>...
Shell
#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2005-05-14.22 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the ...
Shell
#!/bin/sh # py-compile - Compile a Python program scriptversion=2005-05-14.22 # Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software ...
Shell
#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2007-11-22.22 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, # 2007 Free Software Foundation, Inc. # # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it ...
Shell
#! /bin/sh set -e # # usage: util/overlap.sh [directory] # # This script runs the overlap example program on a complete directory tree. # # Copyright (C) 1996-2008 Markus Franz Xaver Johannes Oberhumer # OVERLAP="overlap" test -x ./examples/overlap && OVERLAP="./examples/overlap" test -x ./overlap.exe && OVERLAP="./o...
Shell
#! /bin/sh set -e # # usage: util/check.sh [directory] # # This script runs lzotest with all algorithms on a complete directory tree. # It is not suitable for accurate timings. # # Copyright (C) 1996-2008 Markus Franz Xaver Johannes Oberhumer # LZOTEST="lzotest" test -x ./lzotest/lzotest && LZOTEST="./lzotest/lzotest...
Shell
#! /bin/sh set -e # # usage: util/checkasm.sh [directory] # # This script runs lzotest with all assembler decompressors # on a complete directory tree. # It is not suitable for accurate timings. # # Copyright (C) 1996-2008 Markus Franz Xaver Johannes Oberhumer # LZOTEST="lzotest" test -x ./lzotest/lzotest && LZOTEST=...
Shell
#! /bin/sh # vi:ts=4:et # Copyright (C) 1996-2008 Markus F.X.J. Oberhumer rm -f *.o liblzo2.a dict.out lzopack.out precomp.out precomp2.out simple.out lzotest.out testmini.out true
Shell
#! /bin/sh # vi:ts=4:et test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../.. LZO_CFG_FREESTANDING=1 . $top_srcdir/B/generic/build.sh
Shell
#! /bin/sh # vi:ts=4:et set -e echo "// Copyright (C) 1996-2008 Markus F.X.J. Oberhumer" echo "//" echo "// Generic Posix/Unix system" echo "// Generic C compiler" test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../.. test "X${AR}" = X && AR="ar" test "X${CC}" = X && CC="cc" test "X${CFLAGS+...
Shell
#! /bin/sh # vi:ts=4:et set -e echo "// Using GNU C compiler." echo "//" test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../.. UNAME_MACHINE=unknown CC="gcc -fPIC" CC="gcc -static" CC="gcc" CFLAGS="-Wall -Wno-uninitialized -O2 -fomit-frame-pointer" # delete the next line to disable assembler su...
Shell
#!/bin/sh # # openvpn This shell script takes care of starting and stopping # openvpn on RedHat or other chkconfig-based system. # # chkconfig: 345 24 76 # # description: OpenVPN is a robust and highly flexible tunneling application that # uses all of the encryption, authentication, and...
Shell
#!/bin/bash ################################# # Set up Ethernet bridge on Linux # Requires: bridge-utils ################################# # Define Bridge Interface br="br0" # Define list of TAP interfaces to be bridged, # for example tap="tap0 tap1 tap2". tap="tap0" # Define physical ethernet interface to be bridg...
Shell
#!/bin/bash #################################### # Tear Down Ethernet bridge on Linux #################################### # Define Bridge Interface br="br0" # Define list of TAP interfaces to be bridged together tap="tap0" ifconfig $br down brctl delbr $br for t in $tap; do openvpn --rmtun --dev $t done
Shell
#!/bin/bash ################################# # Set up Ethernet bridge on Linux # Requires: bridge-utils ################################# # Define Bridge Interface br="br0" # Define list of TAP interfaces to be bridged, # for example tap="tap0 tap1 tap2". tap="tap7" # Define physical ethernet interface to be bridg...
Shell
#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2007-03-29.01 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public ...
Shell
#!/bin/bash # Like build-req, but protect your private key # with a password. export EASY_RSA="${EASY_RSA:-.}" "$EASY_RSA/pkitool" --interact --csr --pass $*
Shell
#!/bin/bash # Similar to build-key, but protect the private key # with a password. export EASY_RSA="${EASY_RSA:-.}" "$EASY_RSA/pkitool" --interact --pass $*
Shell
#!/bin/bash # # Build a root certificate # export EASY_RSA="${EASY_RSA:-.}" "$EASY_RSA/pkitool" --interact --initca $*
Shell
#!/bin/bash # Make a certificate/private key pair using a locally generated # root certificate. export EASY_RSA="${EASY_RSA:-.}" "$EASY_RSA/pkitool" --interact $*
Shell
#!/bin/bash # Make an intermediate CA certificate/private key pair using a locally generated # root certificate. export EASY_RSA="${EASY_RSA:-.}" "$EASY_RSA/pkitool" --interact --inter $*
Shell
#!/bin/bash # list revoked certificates CRL="${1:-crl.pem}" if [ "$KEY_DIR" ]; then cd "$KEY_DIR" && \ $OPENSSL crl -text -noout -in "$CRL" else echo 'Please source the vars script first (i.e. "source ./vars")' echo 'Make sure you have edited it to reflect your configuration.' fi
Shell
#!/bin/bash # Build a certificate signing request and private key. Use this # when your root certificate and key is not available locally. export EASY_RSA="${EASY_RSA:-.}" "$EASY_RSA/pkitool" --interact --csr $*
Shell
#!/bin/sh if [ "$OPENSSL" ]; then if $OPENSSL version | grep 0.9.6 > /dev/null; then echo "$1/openssl-0.9.6.cnf" else echo "$1/openssl.cnf" fi else echo "$1/openssl.cnf" fi exit 0
Shell
#!/bin/bash # Build a new PKI which is rooted on an intermediate certificate generated # by ./build-inter or ./pkitool --inter from a parent PKI. The new PKI should # have independent vars settings, and must use a different KEY_DIR directory # from the parent. This tool can be used to generate arbitrary depth # cert...
Shell
#!/bin/bash # Initialize the $KEY_DIR directory. # Note that this script does a # rm -rf on $KEY_DIR so be careful! if [ "$KEY_DIR" ]; then rm -rf "$KEY_DIR" mkdir "$KEY_DIR" && \ chmod go-rwx "$KEY_DIR" && \ touch "$KEY_DIR/index.txt" && \ echo 01 >"$KEY_DIR/serial" else echo 'Please source the vars s...
Shell
#!/bin/bash # Make a certificate/private key pair using a locally generated # root certificate. # # Explicitly set nsCertType to server using the "server" # extension in the openssl.cnf file. export EASY_RSA="${EASY_RSA:-.}" "$EASY_RSA/pkitool" --interact --server $*
Shell
#!/bin/bash # Make a certificate/private key pair using a locally generated # root certificate and convert it to a PKCS #12 file including the # the CA certificate as well. export EASY_RSA="${EASY_RSA:-.}" "$EASY_RSA/pkitool" --interact --pkcs12 $*
Shell
#!/bin/bash # revoke a certificate, regenerate CRL, # and verify revocation CRL="crl.pem" RT="revoke-test.pem" if [ $# -ne 1 ]; then echo "usage: revoke-full <cert-name-base>"; exit 1 fi if [ "$KEY_DIR" ]; then cd "$KEY_DIR" rm -f "$RT" # set defaults export KEY_CN="" export KEY_OU="" ...
Shell
#!/bin/bash # Build Diffie-Hellman parameters for the server side # of an SSL/TLS connection. if [ -d $KEY_DIR ] && [ $KEY_SIZE ]; then $OPENSSL dhparam -out ${KEY_DIR}/dh${KEY_SIZE}.pem ${KEY_SIZE} else echo 'Please source the vars script first (i.e. "source ./vars")' echo 'Make sure you have edited it t...
Shell
#!/bin/bash # Sign a certificate signing request (a .csr file) # with a local root certificate and key. export EASY_RSA="${EASY_RSA:-.}" "$EASY_RSA/pkitool" --interact --sign $*
Shell
#!/bin/sh # OpenVPN -- An application to securely tunnel IP networks # over a single TCP/UDP port, with support for SSL/TLS-based # session authentication and key exchange, # packet encryption, packet authentication, and # packet compression. # # Copyright (C) 2002-200...
Shell
#!/bin/sh # # Like build-req, but protect your private key # with a password. # if test $# -ne 1; then echo "usage: build-req-pass <name>"; exit 1 fi if test $KEY_DIR; then cd $KEY_DIR && \ openssl req -days 3650 -new -keyou...
Shell
#!/bin/sh # # Similar to build-key, but protect the private key # with a password. # if test $# -ne 1; then echo "usage: build-key-pass <name>"; exit 1 fi if test $KEY_DIR; then cd $KEY_DIR && \ openssl req -days 3650 -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \ openssl ca -days 3650 -...
Shell
#!/bin/sh # # Build a root certificate # if test $KEY_DIR; then cd $KEY_DIR && \ openssl req -days 3650 -nodes -new -x509 -keyout ca.key -out ca.crt -config $KEY_CONFIG && \ chmod 0600 ca.key else echo you must define KEY_DIR fi
Shell
#!/bin/sh # # Make a certificate/private key pair using a locally generated # root certificate. # if test $# -ne 1; then echo "usage: build-key <name>"; exit 1 fi if test $KEY_DIR; then cd $KEY_DIR && \ openssl req -days 3...
Shell
#!/bin/sh # # Make an intermediate CA certificate/private key pair using a locally generated # root certificate. # if test $# -ne 1; then echo "usage: build-inter <name>"; exit 1 fi if test $KEY_DIR; then cd $KEY_DIR && \ ...
Shell
#!/bin/sh # # list revoked certificates # # if test $# -ne 1; then echo "usage: list-crl <crlfile.pem>"; exit 1 fi if test $KEY_DIR; then cd $KEY_DIR && \ openssl crl -text -noout -in $1 else echo you must define KEY_DIR fi
Shell
#!/bin/sh # # Build a certificate signing request and private key. Use this # when your root certificate and key is not available locally. # if test $# -ne 1; then echo "usage: build-req <name>"; exit 1 fi if test $KEY_DIR; then ...
Shell
#!/bin/sh # # revoke a certificate # # if test $# -ne 1; then echo "usage: revoke-crt <file.crt>"; exit 1 fi if test $KEY_DIR; then cd $KEY_DIR && \ openssl ca -revoke $1 -config $KEY_CONFIG else echo you must define KEY_DIR fi
Shell
#!/bin/sh # # Initialize the $KEY_DIR directory. # Note that this script does a # rm -rf on $KEY_DIR so be careful! # d=$KEY_DIR if test $d; then rm -rf $d mkdir $d && \ chmod go-rwx $d && \ touch $d/index.txt && \ echo 01 >$d/serial else echo you must define KEY_DIR fi
Shell
#!/bin/sh # # Make a certificate/private key pair using a locally generated # root certificate. # # Explicitly set nsCertType to server using the "server" # extension in the openssl.cnf file. if test $# -ne 1; then echo "usage: build-key-server <name>"; exit 1 fi ...
Shell
#!/bin/sh # # Make a certificate/private key pair using a locally generated # root certificate and convert it to a PKCS #12 file including the # the CA certificate as well. if test $# -ne 1; then echo "usage: build-key-pkcs12 <name>"; exit 1 fi ...
Shell
#!/bin/sh # revoke a certificate, regenerate CRL, # and verify revocation CRL=crl.pem RT=revoke-test.pem if test $# -ne 1; then echo "usage: revoke-full <name>"; exit 1 fi if test $KEY_DIR; then cd $KEY_DIR rm -f $RT # revoke key and generate a new CRL openssl ca -revoke...
Shell
#!/bin/sh # # generate a CRL # # if test $# -ne 1; then echo "usage: make-crl <crlfile.pem>"; exit 1 fi if test $KEY_DIR; then cd $KEY_DIR && \ openssl ca -gencrl -out $1 -config $KEY_CONFIG else echo you must define KEY_DIR fi
Shell
#!/bin/sh # # Build Diffie-Hellman parameters for the server side # of an SSL/TLS connection. # if test $KEY_DIR; then openssl dhparam -out ${KEY_DIR}/dh${KEY_SIZE}.pem ${KEY_SIZE} else echo you must define KEY_DIR fi
Shell
#!/bin/sh # # Sign a certificate signing request (a .csr file) # with a local root certificate and key. # if test $# -ne 1; then echo "usage: sign-req <name>"; exit 1 fi if test $KEY_DIR; then cd $KEY_DIR && \ openssl ca -...
Shell
#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby ...
Shell
#!/bin/bash # Copyright (c) 2005-2009 OpenVPN Technologies, Inc. # Licensed under the GPL version 2 # First version by Jesse Adelman # someone at boldandbusted dink com # http://www.boldandbusted.com/ # PURPOSE: This script automatically removes the /etc/resolv.conf entries previously # set by the companion script "...
Shell
#!/bin/bash # Copyright (c) 2005-2009 OpenVPN Technologies, Inc. # Licensed under the GPL version 2 # First version by Jesse Adelman # someone at boldandbusted dink com # http://www.boldandbusted.com/ # PURPOSE: This script automatically sets the proper /etc/resolv.conf entries # as pulled down from an OpenVPN serve...
Shell
#!/bin/sh # # Bring down vpn routing. # calculate the network address remote_network=`ipcalc -n "$remote"/"$remote_netmask_bits"` remote_network="${remote_network#*=}" # clear routing via VPN ip route del "$remote_network"/"$remote_netmask_bits" via "$5" table vpn.out ip route del table vpnonly.out via "$5" iptabl...
Shell
#!/bin/sh # # Bring up vpn routing. # calculate the network address remote_network=`ipcalc -n "$remote"/"$remote_netmask_bits"` remote_network="${remote_network#*=}" # add the stuff that doesn't change if it's not already there grep -q '^202 ' /etc/iproute2/rt_tables if [ "$?" -ne 0 ] then echo 202 vpn.out >> /e...
Shell
#!/bin/bash # A Sample OpenVPN-aware firewall. # eth0 is connected to the internet. # eth1 is connected to a private subnet. # Change this subnet to correspond to your private # ethernet subnet. Home will use HOME_NET/24 and # Office will use OFFICE_NET/24. PRIVATE=10.0.0.0/24 # Loopback address LOOP=127.0.0.1 # ...
Shell
#!/bin/sh # stop all openvpn processes killall -TERM openvpn
Shell
#!/bin/sh route add -net 10.0.0.0 netmask 255.255.255.0 gw $5
Shell
#!/bin/sh # A sample OpenVPN startup script # for Linux. # openvpn config file directory dir=/etc/openvpn # load the firewall $dir/firewall.sh # load TUN/TAP kernel module modprobe tun # enable IP forwarding echo 1 > /proc/sys/net/ipv4/ip_forward # Invoke openvpn for each VPN tunnel # in daemon mode. Alternative...
Shell
#!/bin/sh route add -net 10.0.1.0 netmask 255.255.255.0 gw $5
Shell
#!/bin/sh ### BEGIN INIT INFO # Provides: openvpn # Required-Start: $network # Required-Stop: $network # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: This shell script takes care of starting and stopping OpenVP...
Shell
#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redi...
Shell
#!/bin/sh # prepare files for building on Windows # run from top directory: install-win32/winconfig rm -rf autodefs mkdir autodefs # build multi-grammar definition files perl install-win32/m4todef.pl <version.m4 >autodefs/version.in for g in "h" "sh" "nsi" "in" ; do perl install-win32/trans.pl $g install-win32/s...
Shell
#!/bin/sh # Get and sign the OpenVPN GUI # load version.nsi definitions . autodefs/defs.sh GUI="$OPENVPN_GUI_DIR/$OPENVPN_GUI" if [ -f "$GUI" ]; then mkdir -p $GENOUT/bin &>/dev/null cp $GUI $GENOUT/bin if [ -d "$SIGNTOOL" ]; then TARGET_EXE="$GENOUT/bin/$OPENVPN_GUI" $SIGNTOOL/signexe fi fi i...
Shell
#!/bin/sh # load version.nsi definitions . autodefs/defs.sh # build the installer rm -f $GENOUT/*.exe '/c/Program Files/NSIS/makensis' $GENOUT/nsi/openvpn.nsi &>makensis.log tail -20 makensis.log # sign the installer if [ -d "$SIGNTOOL" ]; then TARGET_EXE="$(echo $(pwd)/$GENOUT/*.exe)" $SIGNTOOL/signexe fi
Shell
#!/bin/sh # get version.nsi definitions . autodefs/defs.sh # Get PKCS11-helper libraries if [ -d "$GENOUT_PREBUILT" ] && ! [ -d "$GENOUT" ]; then echo LOADING prebuilt binaries from $GENOUT_PREBUILT cp -a $GENOUT_PREBUILT $GENOUT fi
Shell
#!/bin/sh # get version.nsi definitions . autodefs/defs.sh # Get PKCS11-helper libraries if [ -d "$PKCS11_HELPER_DIR" ] ; then mkdir -p $GENOUT/lib &>/dev/null for f in libpkcs11-helper-1.dll ; do cp $PKCS11_HELPER_DIR/usr/local/bin/$f $GENOUT/lib if [ -z "$NO_STRIP" ]; then strip $GENOUT/li...
Shell
#!/bin/sh # get version.nsi definitions . autodefs/defs.sh # Get OpenSSL binaries if [ -d "$OPENSSL_DIR" ] ; then mkdir -p $GENOUT/lib &>/dev/null mkdir -p $GENOUT/bin &>/dev/null for f in libeay32.dll libssl32.dll out/openssl.exe ; do cp $OPENSSL_DIR/$f $GENOUT/lib if [ -z "$NO_STRIP" ];...
Shell
#!/bin/sh # get version.nsi definitions . autodefs/defs.sh [ "$CLEAN" = "yes" ] && rm -rf $GENOUT && KEEPAUTODEFS="yes" ./doclean
Shell
#!/bin/sh # get version.nsi definitions . autodefs/defs.sh mkdir -p $GENOUT/text &>/dev/null # build license file cat COPYING COPYRIGHT.GPL >$GENOUT/text/license.txt # copy install file cp INSTALL-win32.txt $GENOUT/text/INSTALL-win32.txt # copy sample configuration files and docs s=$GENOUT/samples mkdir -p $s &>/d...
Shell
#!/bin/sh # Build the x86 and x64 versions of the tapinstall tool # Requires the Windows DDK. # TISRC should be set to directory containing # tapinstall source code. # get version.nsi definitions . autodefs/defs.sh if [ -n "$DDKVER" ] && [ -d "/c/WINDDK/$DDKVER" ] ; then if ! [ -d "$TISRC" ] ; then echo "$TISRC...
Shell
#!/bin/sh # Get and sign the OpenVPN XML-based GUI # load version.nsi definitions . autodefs/defs.sh if [ -d "$OPENVPN_XGUI_DIR" ]; then SIGNED_EXES="gui/ovpn-xgui-en.exe sta/ovpn-tray.exe" UNSIGNED_EXES="xmlserv/ovpn-xmlserv.exe" EXES="$SIGNED_EXES $UNSIGNED_EXES" mkdir -p $GENOUT/bin &>/dev/null ...
Shell
#!/bin/sh # Build the x86 and x64 versions of the TAP driver # Requires the Windows DDK # get version.nsi definitions . autodefs/defs.sh if [ -n "$DDKVER" ] && [ -d "/c/WINDDK/$DDKVER" ] ; then # common declarations for all DDK build targets . install-win32/ddk-common # configure tap driver sources MACRO="perl ins...
Shell
F=pkcs11-helper-1.06-beta1 OPENSSL_DIR=`pwd`/openssl-0.9.8h PKCS11_HELPER_DIR=`pwd`/pkcs11-helper rm -rf $PKCS11_HELPER_DIR mkdir $PKCS11_HELPER_DIR tbz=$F.tar.bz2 rm -rf $F tar xfj $tbz cd $F ./configure \ MAN2HTML=true \ --disable-crypto-engine-gnutls \ --disable-crypto-engine-nss \ PKG_CONFIG=tr...
Shell