code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/bin/sh
for directorio in `ls -d tp1*`; \
do \
cd "$directorio"; \
if [ ! -e "Makefile" ]
then
ln -s ../Makefile Makefile
fi
if [ ! -e "utils" ]
then
ln -s ../utils utils
fi
if [ ! -e "ipc" ]
then
ln -s ../ipc ipc
fi
cd ..; \
done
| Shell |
#!/bin/bash
echo "## Step 00: initialize"
(
if ! [ -d build ]; then
mkdir build
mkdir build/src
mkdir build/src/trunk
fi
)
fetch() {
(
cd src
if ! [ -f "${2}/.svn/entries" ]; then
mkdir "${2}"
cd "${2}"
svn co --non-interactive --trust-server-cert "${1}" "."
else
cd "${2}"
sv... | Shell |
#!/bin/bash
find org/jivesoftware -name '*.java' -exec sed -i 's:import org.xmlpull.mxp1.MXParser:import org.xmlpull.v1.XmlPullParserFactory:' '{}' ';'
find org/jivesoftware -name '*.java' -exec sed -i 's:new MXParser():XmlPullParserFactory.newInstance().newPullParser():g' '{}' ';'
| Shell |
#!/bin/bash
rm org/xbill/DNS/spi/DNSJavaNameServiceDescriptor.java
| Shell |
#!/bin/bash
rm -rf org/ietf/
rm -rf org/apache/harmony/auth
rm -rf org/apache/harmony/javax/security/auth/kerberos/
rm -rf org/apache/harmony/javax/security/auth/x500/
rm org/apache/harmony/javax/security/auth/Policy.java
| Shell |
#!/bin/bash
find -name '*.java' -exec sed -i 's:import org.apache.harmony.javax.security.sasl.Sasl;:import de.measite.smack.Sasl;:g' '{}' ';'
| Shell |
#!/bin/bash
find org/apache/harmony -name '*.java' -exec sed -i 's:import org.apache.harmony.auth.internal.nls.Messages;::' '{}' ';'
find org/apache/harmony -name '*.java' -exec sed -i 's:Messages.getString(\("[^"]*"\)):\1:g' '{}' ';'
| Shell |
#!/bin/bash
rm org/jivesoftware/smack/debugger/LiteDebugger.java
rm org/jivesoftware/smackx/debugger/EnhancedDebugger.java
rm org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java
| Shell |
#!/bin/bash
mkdir -p org/apache/harmony/
mv javax org/apache/harmony/
find org/apache/harmony/ -name '*.java' -exec sed -i 's:package javax:package org.apache.harmony.javax:g' '{}' ';'
find -name '*.java' -exec sed -i 's:import javax.security.sasl:import org.apache.harmony.javax.security.sasl:g' '{}' ';'
find -name '*... | Shell |
#!/bin/bash
function dumplib()
{
LIB=$1
for arch in armeabi-v7a armeabi; do
VER=$(dump_syms obj/local/$arch/$LIB |grep MODULE | cut -d " " -f 4)
mkdir -p symbols/$LIB/$VER
dump_syms obj/local/armeabi-v7a/$LIB > symbols/$LIB/$VER/$LIB.sym
done
}
dumplib libopenvpn.so
| Shell |
#!/bin/bash
#NDK_DEBUG=1 ndk-build -j8
# Quick and dirty from ndk-gdb
. ${ANDROID_NDK_HOME}/build/tools/ndk-common.sh
ANDROID_NDK_ROOT=${ANDROID_NDK_HOME}
PROJECT=.
APP_ABI=armeabi-v7a
AWK_SCRIPTS=${ANDROID_NDK_ROOT}/build/awk
PACKAGE_NAME=de.blinkt.openvpn
DEBUG_PORT=5039
JDB_PORT=65534
ADB_CMD=adb
AWK_CMD=awk
ge... | Shell |
#! /bin/zsh
set -o shwordsplit
if [ "$ICSCROWDAPIKEY" != "" ]
then
echo "Generating new translation archives"
fetch -q -1 -o - "http://api.crowdin.net/api/project/ics-openvpn/export?key=$ICSCROWDAPIKEY"
fi
echo "Fetch translation archive"
fetch -q http://crowdin.net/download/project/ics-openvpn.zip
# Chinese lang... | Shell |
#!/bin/bash
# Exit on errors
set -e
# Generate git config if the openvpn directory is checked out from git
if [ -d openvpn/.git ]; then
GIT=git
cd openvpn
CONFIGURE_GIT_CHFILES=$($GIT diff-files --name-status -r --ignore-submodules --quiet -- || echo "+")
CONFIGURE_GIT_UNCOMMITTED=$($GIT diff-index --cached... | Shell |
export O3=$PWD/openvpn3
mkdir -p src/ovpn3/java/net/openvpn/ovpn3
swig -outdir src/ovpn3/java/net/openvpn/ovpn3/ -c++ -java -package net.openvpn.ovpn3 -I$O3/client -I$O3 $O3/javacli/ovpncli.i | 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=2013-05-30.07; # UTC
# Copyright (C) 1999-2014 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
# ... | 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-2014 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is fre... | Shell |
#! /bin/sh
# libtool (GNU libtool) 2.4.2.418
# Provide generalized library-building support services.
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even fo... | Shell |
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2013-12-25.23; # UTC
# 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 ... | Shell |
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
scriptversion=2010-08-21.06; # UTC
# Copyright (C) 1995-2014 Free Software Foundation, Inc.
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# This program is free software; you can redistribute it and/or modify
# it under ... | Shell |
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it und... | Shell |
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2009-04-28.21; # UTC
# 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@g... | Shell |
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2014 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 GNU General ... | Shell |
#!/bin/sh
# py-compile - Compile a Python program
scriptversion=2011-06-08.12; # UTC
# Copyright (C) 2000-2014 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 Foundation; e... | Shell |
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
scriptversion=2013-01-12.17; # UTC
# Copyright (C) 1996-2014 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 GNU General Public Lic... | 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-2014 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-2014 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-2014 Markus Franz Xaver Johannes Oberhumer
#
LZOTEST="lzotest"
test -x ./lzotest/lzotest && LZOTEST=... | Shell |
#! /bin/sh
# vi:ts=4:et
# Copyright (C) 1996-2014 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-2014 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 -O2 -fomit-frame-pointer"
# delete the next line to disable assembler support
UNAME_MACHINE... | Shell |
#!/bin/sh
#
set -e
export LANG=C
export LC_ALL=C
PROGDIR=$(dirname "$0")
PROGNAME=$(basename "$0")
panic () {
echo "ERROR: $@"
exit 1
}
VERBOSE=1
# Dump message is $VERBOSE >= $1
# $1+: message.
dump_n () {
local LOG_LEVEL=$1
shift
if [ "$VERBOSE" -ge "$LOG_LEVEL" ]; then
printf "%s\n" "$@"
fi
}
#... | Shell |
#!/bin/bash
#
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 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/bash
#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 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
#
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | Shell |
#!/bin/sh
if [ "$1" = "" ]; then
key=../apps/server.pem
else
key="$1"
fi
if [ "$2" = "" ]; then
cert=../apps/server.pem
else
cert="$2"
fi
ssltest="adb shell /system/bin/ssltest -key $key -cert $cert -c_key $key -c_cert $cert"
if adb shell /system/bin/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key... | Shell |
OPENVPN_PACKAGE_NAME="@PACKAGE_NAME@"
OPENVPN_PACKAGE_TARNAME="@PACKAGE_TARNAME@"
OPENVPN_PACKAGE_VERSION="@PACKAGE_VERSION@"
OPENVPN_PACKAGE_HOST="@host@"
| Shell |
#!@SHELL@
#
# run OpenVPN client against ``test reference'' server
# - check that ping, http, ... via tunnel works
# - check that interface config / routes are properly cleaned after test end
#
# prerequisites:
# - openvpn binary in current directory
# - writable current directory to create subdir for logs
# - t_client... | Shell |
#! /bin/sh
#
# t_cltsrv.sh - script to test OpenVPN's crypto loopback
# Copyright (C) 2005, 2006, 2008 Matthias Andree
#
# 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 Foundation; either version 2
# of th... | Shell |
#! /bin/sh
echo "${role}:${signal}" >&3
| Shell |
#! /bin/sh
#
# t_lpback.sh - script to test OpenVPN's crypto loopback
# Copyright (C) 2005 Matthias Andree
# Copyright (C) 2014 Steffan Karger
#
# 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 Foundation;... | Shell |
#!/bin/sh
# Sample script to perform OCSP queries with OpenSSL
# given a certificate serial number.
# If you run your own CA, you can set up a very simple
# OCSP server using the -port option to "openssl ocsp".
# Full documentation and examples:
# http://www.openssl.org/docs/apps/ocsp.html
# Edit the following val... | Shell |
#!/bin/sh
# Copyright (c) 2005-2010 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 "cl... | Shell |
#!/bin/sh
# Copyright (c) 2005-2010 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 server.... | 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/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, a... | 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
#################################
# 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 bridged... | Shell |
#!/bin/sh
####################################
# 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/sh
#
# Build an OpenVPN plugin module on *nix. The argument should
# be the base name of the C source file (without the .c).
#
# This directory is where we will look for openvpn-plugin.h
CPPFLAGS="${CPPFLAGS:--I../../../include}"
CC="${CC:-gcc}"
CFLAGS="${CFLAGS:--O2 -Wall -g}"
$CC $CPPFLAGS $CFLAGS -fPIC -... | Shell |
#!/bin/sh
#
# Build an OpenVPN plugin module on *nix. The argument should
# be the base name of the C source file (without the .c).
#
# This directory is where we will look for openvpn-plugin.h
CPPFLAGS="${CPPFLAGS:--I../../..}"
CC="${CC:-gcc}"
CFLAGS="${CFLAGS:--O2 -Wall -g}"
$CC $CPPFLAGS $CFLAGS -fPIC -c $1.c &... | Shell |
#!/bin/sh
#
# Build an OpenVPN plugin module on *nix. The argument should
# be the base name of the C source file (without the .c).
#
# This directory is where we will look for openvpn-plugin.h
CPPFLAGS="${CPPFLAGS:--I../../../include}"
CC="${CC:-gcc}"
CFLAGS="${CFLAGS:--O2 -Wall -g}"
$CC $CPPFLAGS $CFLAGS -fPIC -... | Shell |
#!/bin/sh
# 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
# De... | 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
#
# Run this script to set up a test CA, and test key-certificate pair for a
# server, and various clients.
#
# Copyright (C) 2014 Steffan Karger <steffan@karger.me>
set -eu
command -v openssl >/dev/null 2>&1 || { echo >&2 "Unable to find openssl. Please make sure openssl is installed and in your path."; exi... | Shell |
#!/bin/bash
# USO: GlogY <comando> <tipo> <mensaje>
# $1: Comando invocante
# $2: Tipo severidad (I|W|E|SE)
# $3: Mensaje (max longitud 120 caracteres)
# Retornos:
# 0: Exito
# 1: Cantidad argumentos incorrecta
# 2: Comando invocante desconocido
# 3: Tipo de severidad incorrecta
# 4: Longitud de mensaje excedida
# 5:... | Shell |
#!/bin/bash
#
# Primer Cuatrimestre 2013 - Grupo 08
#
# Comando: InstalY.sh
# Descripcion: realiza la instalacion de los componentes necesarios para el correcto funcionamiento.
#
#***************************************************************************
# $1: Comando
# $2: Tipo
# $3: Mensaje
loguear(){
# Registra e... | Shell |
#!/bin/bash
#
# Primer Cuatrimestre 2013 - Grupo 08
#
# Comando: InstalY.sh
# Descripcion: realiza la instalacion de los componentes necesarios para el correcto funcionamiento.
#
#***************************************************************************
# $1: Comando
# $2: Tipo
# $3: Mensaje
loguear(){
# Registra e... | Shell |
#!/bin/bash
# USO: GlogY <comando> <tipo> <mensaje>
# $1: Comando invocante
# $2: Tipo severidad (I|W|E|SE)
# $3: Mensaje (max longitud 120 caracteres)
# Retornos:
# 0: Exito
# 1: Cantidad argumentos incorrecta
# 2: Comando invocante desconocido
# 3: Tipo de severidad incorrecta
# 4: Longitud de mensaje excedida
# 5:... | Shell |
#!/bin/bash
# USO: VlogY <comando> [-n=<lineas>] [-t=(i|w|e|s)] [-d=<dd/mm/aaaa>] [-g=<palabra>]
# Opciones:
# -n: Se muestran los resultados de aplicar los filtros en las ultimas n lineas
# Filtros:
# -t: Muestra los registros de tipo:
# t=i: INFORMATIVO
# t=w: ADVERTENCIA
# t=e: ERROR
# t=s: ERROR SEVERO
# -d: M... | Shell |
#!/bin/bash
# USO: StartY.sh
# Retornos:
# 0: Exito
# 1: Cantidad argumentos incorrecta
# 2: Ambiente no inicializado
# 3: Proceso DetectaY ya en ejecucion
# Verifico cantidad de parametros
if [ $# -ne 0 ]; then
echo 'Cantidad de parametros incorrectos. USO: StartY.sh'
exit 1
fi
# Verifico si el demonio se encuen... | Shell |
#!/bin/bash
# USO: MoverY <archivo origen> <directorio destino>
# $1: Archivo de origen
# $2: Directorio destino
# Retornos:
# 0: Exito
# 1: Numero de parametros incorrectos
# 2: No existe el archivo de origen
# 3: No existe el directorio destino
# Chequeo cantidad de parametros
if [ $# -ne 2 ]; then
echo 'Cantidad... | Shell |
#!/bin/bash
# **********************************************************************
# Trabajo Práctico de Sistemas Operativos (75.08)
#
# Primer Cuatrimestre 2013 - Grupo 8
#
# Comando: InicioY.sh
#
# Descripción: Este comando se encarga de:
# 1. Setear las variables de ambiente.
# 2. Verifica que existan los archiv... | Shell |
#!/bin/bash
# USO: VlogY <comando> [-n=<lineas>] [-t=(i|w|e|s)] [-d=<dd/mm/aaaa>] [-g=<palabra>]
# Opciones:
# -n: Se muestran los resultados de aplicar los filtros en las ultimas n lineas
# Filtros:
# -t: Muestra los registros de tipo:
# t=i: INFORMATIVO
# t=w: ADVERTENCIA
# t=e: ERROR
# t=s: ERROR SEVERO
# -d: M... | Shell |
#!/bin/bash
# USO: MoverY <archivo origen> <directorio destino>
# $1: Archivo de origen
# $2: Directorio destino
# Retornos:
# 0: Exito
# 1: Numero de parametros incorrectos
# 2: No existe el archivo de origen
# 3: No existe el directorio destino
# Chequeo cantidad de parametros
if [ $# -ne 2 ]; then
echo 'Cantidad... | Shell |
#!/bin/bash
# **********************************************************************
# Trabajo Práctico de Sistemas Operativos (75.08)
#
# Primer Cuatrimestre 2013 - Grupo 8
#
# Comando: InicioY.sh
#
# Descripción: Este comando se encarga de:
# 1. Setear las variables de ambiente.
# 2. Verifica que existan los archiv... | Shell |
#!/bin/bash
# USO: StopY.sh
# Retornos:
# 0: Exito
# 1: Cantidad argumentos incorrecta
# 2: No se pudo finalizar el proceso DetectaY
# 3: El proceso DetectaY no estaba en ejecucion
# Verifico cantidad de parametros
if [ $# -ne 0 ]; then
echo 'Cantidad de parametros incorrectos. USO: StopY.sh'
exit 1
fi
# Busco el... | Shell |
#!/bin/bash
# Descripcion: Comando que detecta la llegada de archivos al directorio '$grupo/ARRIDIR'.
# Mueve archivos a la carpeta '$grupo/ACEPDIR' en caso de que el formato
# del nombre del archivo sea correcto. En caso de que el nombre tenga un
# formato incorrecto, se reenvia a la carpeta '$grupo/RECHDIR'.
# ... | Shell |
#!/bin/bash
# USO: StartY.sh
# Retornos:
# 0: Exito
# 1: Cantidad argumentos incorrecta
# 2: Ambiente no inicializado
# 3: Proceso DetectaY ya en ejecucion
# Verifico cantidad de parametros
if [ $# -ne 0 ]; then
echo 'Cantidad de parametros incorrectos. USO: StartY.sh'
exit 1
fi
# Verifico si el demonio se encuen... | Shell |
#!/bin/bash
# ********************************************************************************************************************
#
# El propósito de este comando es leer los archivos que se encuentran en el directorio $ACEPDIR y grabar sus registros
# formateados en archivos de préstamos por país.
# - Es el te... | Shell |
#!/bin/bash
# Descripcion: Comando que detecta la llegada de archivos al directorio '$grupo/ARRIDIR'.
# Mueve archivos a la carpeta '$grupo/ACEPDIR' en caso de que el formato
# del nombre del archivo sea correcto. En caso de que el nombre tenga un
# formato incorrecto, se reenvia a la carpeta '$grupo/RECHDIR'.
# ... | Shell |
#!/bin/bash
# ********************************************************************************************************************
#
# El propósito de este comando es leer los archivos que se encuentran en el directorio $ACEPDIR y grabar sus registros
# formateados en archivos de préstamos por país.
# - Es el te... | Shell |
#!/bin/bash
# USO: StopY.sh
# Retornos:
# 0: Exito
# 1: Cantidad argumentos incorrecta
# 2: No se pudo finalizar el proceso DetectaY
# 3: El proceso DetectaY no estaba en ejecucion
# Verifico cantidad de parametros
if [ $# -ne 0 ]; then
echo 'Cantidad de parametros incorrectos. USO: StopY.sh'
exit 1
fi
# Busco el... | Shell |
sudo chmod +x cliente/*
sudo chmod +x server-gns3/*
sudo chmod +x servicios.sh
| Shell |
#!/bin/bash
#export http_proxy="http://157.92.49.223:8080"
case "$1" in
#Web Server
web)
echo "Web Server"
apt-get install apache2
echo ""
echo ""
ps -ef | grep "apache2" | grep -v "grep" > /dev/null
if [ "$?" -eq "0" ]
then
echo "Servidor Web apache 2 está corriendo."
else
echo "Servidor Web apache 2... | Shell |
#!/bin/bash
#Se chequea que todo este bien
if [ $# -ne "1" ]
then
echo "USO: ${0} <IP_host_c>"
exit 0
fi
IP=${1} #La IP de la maquina fisica donde corre en host
TAP="tap66" #La interfaz "tap" usada para este host
TITULO="Host_C"
PORT_NUM="14147" #El numero de puerto donde ... | Shell |
#! /bin/bash
#Se chequea que todo este bien
if [ $# -ne "1" ]
then
echo "USO: ${0} <IP_host_a>"
exit 0
fi
IP=${1} #La IP de la maquina fisica donde corre en host
TAP="tap64" #La interfaz "tap" usada para este host
TITULO="Host_A"
PORT_NUM="14258" #El numero de puerto donde... | Shell |
#!/bin/bash
#Se chequea que todo este bien
if [ $# -ne "1" ]
then
echo "USO: ${0} <IP_Telnet_server>"
exit 0
fi
IP_D=${1}
TAP_D="tap321"
TITULO_D="Telnet_D"
PORT_NUM_D="14363"
NETMASK_D="255.255.255.128"
IP_END_TUNNEL_D="10.4.1.140"
IP_Q=${1}
TAP_Q="tap654"
TITULO_Q="Telnet_Q"
PORT_NUM_Q="14364"
NETMASK_Q="255.255... | Shell |
#!/bin/bash
#Se chequea que todo este bien
if [ $# -ne "1" ]
then
echo "USO: ${0} <IP_Web_server>"
exit 0
fi
IP=${1}
TAP="tap118"
TITULO="Web_Server"
PORT_NUM="25369"
NETMASK="255.255.255.0"
IP_END_TUNNEL="192.168.21.75"
#Se crea una interfaz "tap" ethernet para cada cliente externo
sudo openvpn --mktun --dev ${TA... | Shell |
#!/bin/bash
#Se chequea que todo este bien
if [ $# -ne "1" ]
then
echo "USO: ${0} <nombre_cliente>"
exit 0
fi
#Configura el cliente indicado
if [ "${1}" == "HostA" ]
then
TAP="tap64"
PUERTO="14258"
elif [ "${1}" == "HostB" ]
then
TAP="tap65"
PUERTO="14369"
elif [ "${1}" == "HostC" ]
then
TAP="tap66"
PUERTO... | Shell |
#!/bin/bash
#Se chequea que todo este bien
if [ $# -ne "1" ]
then
echo "USO: ${0} <IP_host_b>"
exit 0
fi
IP=${1} #La IP de la maquina fisica donde corre en host
TAP="tap65" #La interfaz "tap" usada para este host
TITULO="Host_B"
PORT_NUM="14369" #El numero de puerto donde ... | Shell |
#!/bin/bash
#Se chequea que todo este bien
if [ $# -ne "1" ]
then
echo "USO: ${0} <IP_FTP_server>"
exit 0
fi
IP=${1}
TAP="tap119"
TITULO="FTP_Server"
PORT_NUM="25147"
NETMASK="255.255.255.0"
IP_END_TUNNEL="10.9.2.10"
#Se crea una interfaz "tap" ethernet para cada cliente externo
sudo openvpn --mktun --dev ${TAP}
s... | Shell |
#!/bin/bash
#Los PID de todos los processos que se llaman "openvpn"
PID_OPENVPN=$(ps -a | grep 'openvpn' | cut -d' ' -f2)
#Como se corre en un cliente los unicos tuneles openVPN van a ser los nuestros
for PID in ${PID_OPENVPN}
do
echo "Cerrando openVPN (${PID})..."
sudo kill ${PID}
done
#Las taps del telserv... | Shell |
#!/bin/bash
# Redes:
REDA="10.9.3.0/26"
REDB="192.168.21.0/24"
REDC="10.4.2.160/30"
REDD="10.4.1.128/25"
REDG="10.9.3.128/25"
REDH="10.4.2.164/30"
REDI="10.9.3.64/27"
REDJ="10.4.2.144/28"
REDK="10.9.3.96/27"
REDL="10.9.2.0/24"
REDM1="172.43.0.64/30"
REDM2="172.43.0.68/30"
REDM3="172.43.0.72/30"
REDM4="172.43.0.76/30"
... | Shell |
#!/bin/bash
#Los PID de todos los processos que se llaman "openvpn"
PID_OPENVPN=$(ps -a | grep 'openvpn' | cut -d' ' -f2)
for PID in ${PID_OPENVPN}
do
sudo kill ${PID}
done
#Recupera todas las interfaces tap del sistema
LISTA_TAPS=$(ifconfig -a | grep 'tap' | cut -d' ' -f1)
for TAP in ${LISTA_TAPS}
do
#Limpia... | Shell |
#!/bin/bash
#Se chequean los parametros
if [ $# -ne "2" ]
then
echo "USO: ${0} <Host> <IP_servidor_simulacion>"
exit 0
fi
#La IP de la maquina con la topologia
IP_DST=${2}
NOMBRE_CLIENTE=${1}
# ATENCION: si se cambia el puerto aca, hay que cambiar el puerto en teardownCliente
if [ "${NOMBRE_CLIENTE}" == "HostA" ]... | Shell |
#!/bin/bash
if [ $# -ne "1" ]
then
echo "USO: ${0} <nombre_cliente> "
exit 0
fi
NOMBRE_CLIENTE=${1}
#Redes y mascaras para el ruteo
RED_A="10.9.3.0"
RED_B="192.168.21.0"
RED_C="10.4.2.160"
RED_D="10.4.1.128"
RED_G="10.9.3.128"
RED_H="10.4.2.164"
RED_I="10.9.3.64"
RED_J="10.4.2.144"
RED_K="10.9.3.96"
RED_L="1... | Shell |
#!/bin/bash
#Se chequea que todo este bien
if [ $# -ne "2" ]
then
echo "USO: ${0} <server> <IP_servidor_simulacion>"
exit 0
fi
#Donde esta el servidor de simulacion
IP_DST=${2}
NOMBRE_CLIENTE=${1}
if [ "${NOMBRE_CLIENTE}" == "WEBSERVER" ]
then
TAP="tap118"
HOST_IP="192.168.21.71"
NETMASK="255.255.255.0"
PORT_... | Shell |
#!/bin/bash
#
# Starts a basic web server on the port specified.
#
# ./serve.sh 3000 -> http://localhost:3000
#
# Copyright 2012 Eric Bidelman <ebidel@gmail.com>
port=$1
if [ $# -ne 1 ]
then
port=8000
fi
open http://localhost:$port/template.html && python -m SimpleHTTPServer $port;
| Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.