code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/bin/sh
# Copyright (C) 2009 Fabian Omar Franzotti <fofware@gmail.com>
# http://pastebin.ca/2098184
#
#include /lib/network
. /etc/functions.sh
. /lib/config/uci.sh
local INTERFACE="$INTERFACE"
local DEVICE="$DEVICE"
saveundo () {
[ ! -e /var/mroute/$DEVICE ] && mkdir -p /var/mroute/$DEVICE
[ ! -e /var/mroute/$D... | Shell |
#!/bin/sh
. /etc/functions.sh
. /lib/config/uci.sh
internetping () {
ip route replace default via $gateway dev $DEVICE table default > /dev/null 2>&1
ping -W $TIMEOUT -I $DEVICE -c 1 $TESTIP > /dev/null 2>&1
cps=$?
if [ "$cps" -eq 1 ]; then
internetc=$(expr $internetc + 1)
else
internetc="0"
fi
# echo "$MY... | Shell |
#!/bin/sh
. /etc/functions.sh
. /lib/config/uci.sh
internetping () {
ip route replace default via $gateway dev $DEVICE table default > /dev/null 2>&1
ping -W $TIMEOUT -I $DEVICE -c 1 $TESTIP > /dev/null 2>&1
cps=$?
if [ "$cps" -eq 1 ]; then
internetc=$(expr $internetc + 1)
else
internetc="0"
fi
# echo "$MY... | Shell |
#!/bin/sh
#
# Webif post-removal script.
#
sed -e '/##WEBIF:category:Applications/d' -i ${IPKG_INSTROOT}/www/cgi-bin/webif/.categories 2>/dev/null
| Shell |
#!/bin/sh
#
# Webif post-install script.
#
if $(grep -q "Mesh" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"); then
sed -i '/##WEBIF:category:Mesh/a##WEBIF:category:Applications' "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"
else
sed -i '/##WEBIF:category:Network/a##WEBIF:category:Applications' "${IPKG_INSTROOT... | Shell |
#!/bin/sh
#
# Webif post-removal script.
#
sed -e '/##WEBIF:category:Applications/d' -i ${IPKG_INSTROOT}/www/cgi-bin/webif/.categories 2>/dev/null
| Shell |
#!/bin/sh
#
# Webif post-install script.
#
if $(grep -q "Mesh" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"); then
sed -i '/##WEBIF:category:Mesh/a##WEBIF:category:Applications' "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"
else
sed -i '/##WEBIF:category:Network/a##WEBIF:category:Applications' "${IPKG_INSTROOT... | Shell |
#!/bin/sh
. /etc/functions.sh
uci_get() {
uci -P /var/state get "$1" 2>/dev/null
}
export ENTITY=$1
HOST=$2
export KEY_SIZE=$(uci_get "openssl.$ENTITY.CA_default_bits")
export KEY_EXPIRE=$(uci_get "openssl.$ENTITY.CA_default_days")
export KEY_CRLDAYS=$(uci_get "openssl.$ENTITY.CA_default_crldays")
export KEY_MD=$(uc... | Shell |
#!/bin/sh
. /etc/openssl/read_uci
#openssl req -new -batch \
openssl req -new -nodes -batch \
-keyout /etc/openssl/$ENTITY/private/$KEY_COMMON_NAME.key \
-out /etc/openssl/$ENTITY/csr/$KEY_COMMON_NAME.csr \
-config /etc/openssl/openssl.cnf
#openssl ca -batch -passout $KEY_PASSWD \
openssl ca -batch \
-out /etc/ope... | Shell |
#!/bin/sh
. /etc/openssl/read_uci
#openssl req -days 3650 -batch \
openssl req -days 3650 -nodes -batch \
-new -x509 \
-keyout /etc/openssl/$ENTITY/topsecret/cakey.pem \
-out /etc/openssl/$ENTITY/cacert.crt \
-config /etc/openssl/openssl.cnf
| Shell |
#!/bin/sh
. /etc/functions.sh
uci_get() {
uci -P /var/state get "$1" 2>/dev/null
}
export ENTITY=$1
HOST=$2
export KEY_SIZE=$(uci_get "openssl.$ENTITY.CA_default_bits")
export KEY_EXPIRE=$(uci_get "openssl.$ENTITY.CA_default_days")
export KEY_CRLDAYS=$(uci_get "openssl.$ENTITY.CA_default_crldays")
export KEY_MD=$(uc... | Shell |
#!/bin/sh
openssl dhparam -out /etc/openssl/testingfof/dh.pem 1024
##openvpn --genkey --secret ta.key
| Shell |
#!/bin/sh
. /etc/openssl/read_uci
openssl ca -revoke /etc/openssl/$ENTITY/certs/$KEY_COMMON_NAME.crt -config /etc/openssl/openssl.cnf
openssl ca -gencrl -out /etc/openssl/$ENTITY/crl/crl.pem -config /etc/openssl/openssl.cnf | Shell |
#!/bin/sh
. /etc/openssl/read_uci
#openssl req -days 3650 -batch \
openssl req -days 3650 -nodes -batch \
-new -x509 \
-keyout /etc/openssl/$ENTITY/topsecret/cakey.pem \
-out /etc/openssl/$ENTITY/cacert.crt \
-config /etc/openssl/openssl.cnf
| Shell |
#!/bin/sh
. /etc/openssl/read_uci
#openssl req -new -batch \
openssl req -new -nodes -batch \
-keyout /etc/openssl/$ENTITY/private/$KEY_COMMON_NAME.key \
-out /etc/openssl/$ENTITY/csr/$KEY_COMMON_NAME.csr \
-config /etc/openssl/openssl.cnf
#openssl ca -batch -passout $KEY_PASSWD \
openssl ca -batch \
-out /etc/ope... | Shell |
#!/bin/sh
. /etc/openssl/read_uci
openssl ca -revoke /etc/openssl/$ENTITY/certs/$KEY_COMMON_NAME.crt -config /etc/openssl/openssl.cnf
openssl ca -gencrl -out /etc/openssl/$ENTITY/crl/crl.pem -config /etc/openssl/openssl.cnf | Shell |
#!/bin/sh
openssl dhparam -out /etc/openssl/testingfof/dh.pem 1024
##openvpn --genkey --secret ta.key
| Shell |
#!/bin/sh
#
# this script embeds the global revision number in document(s) given
# on command line
# document should have __SVN_REVISION__ where it wants the revision
# number to be placed. Wildcards okay.
#
if [ $# -lt 1 ]; then
echo " Invalid usage. Must supply one or more files."
exit 1
fi
revision_number=$(svn ... | Shell |
#!/bin/sh
#
# Webif^2 utility functions - X-Wrt
#
. /etc/functions.sh
#
# Misc. functions
#
# workarounds for stupid busybox slowness on [ ]
empty() {
case "$1" in
"") return 0 ;;
*) return 255 ;;
esac
}
equal() {
case "$1" in
"$2") return 0 ;;
*) return 255 ;;
esac
}
neq() {
case "$1" in
"$2") retur... | Shell |
#!/bin/sh
themes_lst="/etc/themes.lst"
tmpthemeslst=$(mktemp "/tmp/.webif-XXXXXX")
opkg list | awk '/webif-theme/ { gsub("webif-theme-",""); if ($5) print "option|"$1"|"$5}' | sort | uniq >> "$tmpthemeslst"
if [ "'cat $tmpthemeslst'" != "" ]; then
if [ "'cat $tmpthemeslst'" != "'cat $themes_lst'" ]; then
rm -f "$the... | Shell |
#!/bin/ash
#
#
# Handler for config application of all types.
#
# Types supported:
# uci-* UCI config files
# file-* Undefined format for whatever
# edited-files-* raw edited files
#
#
. /usr/lib/webif/functions.sh
. /lib/config/uci.sh
config_cb() {
[ "$1" = "system" ] && system_cfg="$2"
[ "$1" = "server" ] && ... | Shell |
#!/bin/sh
themes_lst="/etc/themes.lst"
tmpthemeslst=$(mktemp "/tmp/.webif-XXXXXX")
opkg list | awk '/webif-theme/ { gsub("webif-theme-",""); if ($5) print "option|"$1"|"$5}' | sort | uniq >> "$tmpthemeslst"
if [ "'cat $tmpthemeslst'" != "" ]; then
if [ "'cat $tmpthemeslst'" != "'cat $themes_lst'" ]; then
rm -f "$the... | Shell |
#!/bin/sh
LANGLIST_NEEDS_UPDATE=0
languages_root="/etc/languages.root"
languages_lst="/etc/languages.lst"
if [ ! -f "$languages_lst" ]; then
cp -pf "$languages_root" "$languages_lst" 2>/dev/null
fi
lists_path=$(cat /etc/opkg.conf 2>/dev/null | grep ^lists_dir | cut -d' ' -f3)
if [ -z "$lists_path" ]; then
lists_path=... | Shell |
#!/bin/sh
N="
"
SW_DEVICE
SW_DRIVER="Unknow"
SW_PORT_CPU=0
SW_PORT_BASE=0
SW_PORT_MAX=0
SW_PORT_COUNT=0
SW_VLAN_BASE=0
SW_VLAN_MAX=0
SW_VLAN_COUNT=0
switch_info() {
[ -z "$1" ] && {
echo "Usage: $0 <dev>"
exit 0
}
SW_DEVICE=$1
[ -e /proc/switch ] && {
[ -e /proc/switch/$SW_DEVICE/driver ] && {
SW_DRIVER=... | Shell |
#!/bin/ash
#
#
# Handler for config application of all types.
#
# Types supported:
# uci-* UCI config files
# file-* Undefined format for whatever
# edited-files-* raw edited files
#
#
. /usr/lib/webif/functions.sh
. /lib/config/uci.sh
config_cb() {
[ "$1" = "system" ] && system_cfg="$2"
[ "$1" = "server" ] && ... | Shell |
#!/bin/sh
#
# Webif^2 utility functions - X-Wrt
#
. /etc/functions.sh
#
# Misc. functions
#
# workarounds for stupid busybox slowness on [ ]
empty() {
case "$1" in
"") return 0 ;;
*) return 255 ;;
esac
}
equal() {
case "$1" in
"$2") return 0 ;;
*) return 255 ;;
esac
}
neq() {
case "$1" in
"$2") retur... | Shell |
#!/bin/sh
LANGLIST_NEEDS_UPDATE=0
languages_root="/etc/languages.root"
languages_lst="/etc/languages.lst"
if [ ! -f "$languages_lst" ]; then
cp -pf "$languages_root" "$languages_lst" 2>/dev/null
fi
lists_path=$(cat /etc/opkg.conf 2>/dev/null | grep ^lists_dir | cut -d' ' -f3)
if [ -z "$lists_path" ]; then
lists_path=... | Shell |
######################################################
# Webif base
#
# Description:
# Holds primary functions. Header, footer, etc..
#
# Author(s) [in order of work date]:
# A variety of people. Several X-Wrt developers.
#
# Major revisions:
#
# Configuration files referenced:
#
libdir=/usr/lib/webif
w... | Shell |
#!/bin/sh
N="
"
SW_DEVICE
SW_DRIVER="Unknow"
SW_PORT_CPU=0
SW_PORT_BASE=0
SW_PORT_MAX=0
SW_PORT_COUNT=0
SW_VLAN_BASE=0
SW_VLAN_MAX=0
SW_VLAN_COUNT=0
switch_info() {
[ -z "$1" ] && {
echo "Usage: $0 <dev>"
exit 0
}
SW_DEVICE=$1
[ -e /proc/switch ] && {
[ -e /proc/switch/$SW_DEVICE/driver ] && {
SW_DRIVER=... | Shell |
#!/bin/sh /etc/rc.common
# backup dmesg
#
START=99
dmesgbackup_config() {
local cfg="$1"
local enabled file gzip GZIP_CMD
local DEFAULT_enabled=0
local DEFAULT_file="/var/log/dmesg"
local DEFAULT_gzip=1
config_get_bool enabled "$cfg" enabled "$DEFAULT_enabled"
[ "$enabled" -eq 1 ] && {
config_get file "$cfg"... | Shell |
#!/bin/sh /etc/rc.common
#
# identification of the device
#
START=90
start() {
. /lib/config/uci.sh
. /usr/lib/webif/functions.sh
uci_load "webif"
# initialize default webif theme
if [ ! -e /www/themes/active ]; then
config_get newtheme theme id
# if theme isn't present, then install it
! exists "/www/themes/$... | Shell |
#!/bin/sh /etc/rc.common
START=90
# place your own startup commands here
#
# REMEMBER: You *MUST* place an '&' after launching programs you
# that are to continue running in the background.
#
# i.e.
# BAD: upnpd
# GOOD: upnpd &
#
# Failure to do this will result in the startup process halting
# on this file... | Shell |
#!/bin/sh /etc/rc.common
START=11
timezone_config() {
local cfg="$1"
local posixtz
local etctz="/etc/TZ"
config_get posixtz "$cfg" posixtz
if [ ! -h $etctz ]; then
ln -sf /tmp/TZ "$etctz"
fi
[ -n "$posixtz" ] && echo "$posixtz" > "$etctz" || echo "UTC+0" > "$etctz"
}
start() {
config_load timezone
conf... | Shell |
#!/bin/sh /etc/rc.common
START=90
start() {
. /lib/config/uci.sh
. /usr/lib/webif/functions.sh
uci_load "webif"
config_get enabled firewall log
if [ "$enabled" = "1" ]; then
iptables -A input_rule -j LOG --log-prefix "input_rule:DROP "
iptables -A forwarding_rule -j LOG --log-prefix "forwarding_rule:DROP "
i... | Shell |
#!/bin/sh /etc/rc.common
START=90
# place your own startup commands here
#
# REMEMBER: You *MUST* place an '&' after launching programs you
# that are to continue running in the background.
#
# i.e.
# BAD: upnpd
# GOOD: upnpd &
#
# Failure to do this will result in the startup process halting
# on this file... | Shell |
#!/bin/sh /etc/rc.common
#
# identification of the device
#
START=90
start() {
. /lib/config/uci.sh
. /usr/lib/webif/functions.sh
uci_load "webif"
# initialize default webif theme
if [ ! -e /www/themes/active ]; then
config_get newtheme theme id
# if theme isn't present, then install it
! exists "/www/themes/$... | Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2008 x-wrt.org
START=49
config_cb() {
local cfg_type="$1"
local cfg_name="$2"
case "$cfg_type" in
crontab)
append CRONTABS_cfg "$cfg_name"
;;
esac
}
start () {
config_load crontabs
echo "# WARNING: this is an auto generated file, please use uci to set cron ent... | Shell |
#!/bin/sh /etc/rc.common
START=11
timezone_config() {
local cfg="$1"
local posixtz
local etctz="/etc/TZ"
config_get posixtz "$cfg" posixtz
if [ ! -h $etctz ]; then
ln -sf /tmp/TZ "$etctz"
fi
[ -n "$posixtz" ] && echo "$posixtz" > "$etctz" || echo "UTC+0" > "$etctz"
}
start() {
config_load timezone
conf... | Shell |
#!/bin/sh /etc/rc.common
# backup dmesg
#
START=99
dmesgbackup_config() {
local cfg="$1"
local enabled file gzip GZIP_CMD
local DEFAULT_enabled=0
local DEFAULT_file="/var/log/dmesg"
local DEFAULT_gzip=1
config_get_bool enabled "$cfg" enabled "$DEFAULT_enabled"
[ "$enabled" -eq 1 ] && {
config_get file "$cfg"... | Shell |
#!/bin/sh /etc/rc.common
START=90
start() {
. /lib/config/uci.sh
. /usr/lib/webif/functions.sh
uci_load "webif"
config_get enabled firewall log
if [ "$enabled" = "1" ]; then
iptables -A input_rule -j LOG --log-prefix "input_rule:DROP "
iptables -A forwarding_rule -j LOG --log-prefix "forwarding_rule:DROP "
i... | Shell |
#!/bin/sh
# Create default language list from translations.
# (c) 2008 Lubos Stanek - X-Wrt project
# Released under GPL license.
#
WEBIF_ROOT="$1"
WEBIF_TARGET="$2"
[ "$#" -lt 2 ] && {
echo "USAGE: $0 webif_base_file_folder build_folder"
exit 1
}
LANG_ROOT_FILE="languages.root"
create_lang_list() {
tmplanglst="${... | Shell |
#!/bin/sh
#
# Webif post-install script.
#
#########################################################################################
# functions
TestInstall()
{
this_version="__SVN_REVISION__"
installed_version=$(cat "${IPKG_INSTROOT}/www/.version")
if [ -f "/www/.version" ] && [ "$this_version" = "$installed_ver... | Shell |
#!/bin/sh
#
if [ -z "${IPKG_INSTROOT}" ]; then # only run below on 'real' system (not image builder)
# install new httpd.conf
if [ -f "/etc/httpd.conf" ]; then
cp /etc/httpd.conf /tmp/httpd.conf.old # make a copy for comparing
else
echo > /tmp/httpd.conf.old
fi
fi | Shell |
#!/bin/sh
#
if [ -z "${IPKG_INSTROOT}" ]; then # only run below on 'real' system (not image builder)
# install new httpd.conf
if [ -f "/etc/httpd.conf" ]; then
cp /etc/httpd.conf /tmp/httpd.conf.old # make a copy for comparing
else
echo > /tmp/httpd.conf.old
fi
fi | Shell |
#!/bin/sh
#
# Webif post-install script.
#
#########################################################################################
# functions
TestInstall()
{
this_version="__SVN_REVISION__"
installed_version=$(cat "${IPKG_INSTROOT}/www/.version")
if [ -f "/www/.version" ] && [ "$this_version" = "$installed_ver... | Shell |
#!/bin/sh
# Create default language list from translations.
# (c) 2008 Lubos Stanek - X-Wrt project
# Released under GPL license.
#
WEBIF_ROOT="$1"
WEBIF_TARGET="$2"
[ "$#" -lt 2 ] && {
echo "USAGE: $0 webif_base_file_folder build_folder"
exit 1
}
LANG_ROOT_FILE="languages.root"
create_lang_list() {
tmplanglst="${... | Shell |
#!/bin/sh
#
# this script embeds the global revision number in document(s) given
# on command line
# document should have __SVN_REVISION__ where it wants the revision
# number to be placed. Wildcards okay.
#
if [ $# -lt 1 ]; then
echo " Invalid usage. Must supply one or more files."
exit 1
fi
revision_number=$(svn ... | Shell |
#!/bin/sh
#
# Hotspot apply handler.
reload_hotspot() {
echo '@TR<<Exporting>> @TR<<hotspot settings>> ...'
[ -e /bin/save_hotspot ] && {
/bin/save_hotspot >&- 2>&-
}
(
config_cb() {
[ "$1" = "chillispot" ] && service_cfg="$2"
}
config_load "hotspot"
config_get_bool test "$service_cfg" enable 0
chilli_ini... | Shell |
#!/bin/sh
#
# Hotspot apply handler.
reload_hotspot() {
echo '@TR<<Exporting>> @TR<<hotspot settings>> ...'
[ -e /bin/save_hotspot ] && {
/bin/save_hotspot >&- 2>&-
}
(
config_cb() {
[ "$1" = "chillispot" ] && service_cfg="$2"
}
config_load "hotspot"
config_get_bool test "$service_cfg" enable 0
chilli_ini... | Shell |
#!/bin/sh
#
# Webif post-install script.
#
if $(grep -q "Mesh" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"); then
sed -i '/##WEBIF:category:Mesh/a##WEBIF:category:HotSpot' "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"
else
sed -i '/##WEBIF:category:Network/a##WEBIF:category:HotSpot' "${IPKG_INSTROOT}/www/cgi-... | Shell |
#!/bin/sh
#
# Webif post-removal script.
#
sed -e '/##WEBIF:category:HotSpot/d' -i ${IPKG_INSTROOT}/www/cgi-bin/webif/.categories 2>/dev/null
| Shell |
#!/bin/sh
#
# Webif post-install script.
#
if $(grep -q "Mesh" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"); then
sed -i '/##WEBIF:category:Mesh/a##WEBIF:category:HotSpot' "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"
else
sed -i '/##WEBIF:category:Network/a##WEBIF:category:HotSpot' "${IPKG_INSTROOT}/www/cgi-... | Shell |
#!/bin/sh
#
# Webif post-removal script.
#
sed -e '/##WEBIF:category:HotSpot/d' -i ${IPKG_INSTROOT}/www/cgi-bin/webif/.categories 2>/dev/null
| Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2008 x-wrt.org
######################################
# #
# Orginal script by ben@wildblue.de #
# #
######################################
###################################################################
# fon heartbeat script
#
# Description:
#
# Author(... | Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2008 x-wrt.org
######################################
# #
# Orginal script by ben@wildblue.de #
# #
######################################
###################################################################
# fon heartbeat script
#
# Description:
#
# Author(... | Shell |
#!/bin/sh
#
# Webif post-removal script.
#
echo "+ removing entry from cron"
sed -e '/fonheartbeat/d' -i /etc/crontabs/root
echo "+ restarting cron"
/etc/init.d/cron restart
echo "+ removing download.fon.com from knownhosts"
sed -e '/download.fon.com/d' -i /root/.ssh/known_hosts
| Shell |
#!/bin/sh
#
# Webif post-install script.
#
if [ ! -f /root/.ssh/known_hosts ]; then
echo "+ known_hosts not found, creating file"
touch /root/.ssh/known_hosts
fi
if [ "`cat /root/.ssh/known_hosts|grep download.fon.com`" = "" ]; then
echo "+ download.fon.com not found in known_hosts, adding download.fon.com"
echo "... | Shell |
#!/bin/sh
#
# Webif post-removal script.
#
echo "+ removing entry from cron"
sed -e '/fonheartbeat/d' -i /etc/crontabs/root
echo "+ restarting cron"
/etc/init.d/cron restart
echo "+ removing download.fon.com from knownhosts"
sed -e '/download.fon.com/d' -i /root/.ssh/known_hosts
| Shell |
#!/bin/sh
#
# Webif post-install script.
#
if [ ! -f /root/.ssh/known_hosts ]; then
echo "+ known_hosts not found, creating file"
touch /root/.ssh/known_hosts
fi
if [ "`cat /root/.ssh/known_hosts|grep download.fon.com`" = "" ]; then
echo "+ download.fon.com not found in known_hosts, adding download.fon.com"
echo "... | Shell |
# freeloader-include.sh created by m4rc0 02-03-2007
# version 1.3
###################################################################
# freeloader-include.sh
# (c)2007 X-Wrt project (http://www.x-wrt.org)
# (c)2007-03-02 m4rc0
#
# version 1.3
#
# Description:
# Holds the major setting for freeloader.
#
# Author(s) [in ... | Shell |
#!/bin/sh
#
# Webif post-removal script.
#
sed -e '/##WEBIF:category:Freeloader/d' -i ${IPKG_INSTROOT}/www/cgi-bin/webif/.categories 2>/dev/null | Shell |
#!/bin/sh
#
# Webif post-install script.
#
if $(grep -q "HotSpot" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"); then
sed -i '/##WEBIF:category:HotSpot/a##WEBIF:category:Freeloader' "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"
elif $(grep -q "VPN" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"); then
sed -i... | Shell |
#!/bin/sh
#
# Webif post-install script.
#
if $(grep -q "HotSpot" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"); then
sed -i '/##WEBIF:category:HotSpot/a##WEBIF:category:Freeloader' "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"
elif $(grep -q "VPN" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"); then
sed -i... | Shell |
#!/bin/sh
#
# Webif post-removal script.
#
sed -e '/##WEBIF:category:Freeloader/d' -i ${IPKG_INSTROOT}/www/cgi-bin/webif/.categories 2>/dev/null | Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=11
STOP=97
start() {
logtrigger &
}
stop() {
killall logtrigger
}
| Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=11
STOP=97
start() {
logtrigger &
}
stop() {
killall logtrigger
}
| Shell |
#!/bin/sh
#
# L2TPns apply script
# Applies the uci configuration to l2tpns' configuration file /etc/l2tpns/startup-config
#
# Author: Liran Tal <liran@enginx.com>
# <liran.tal@gmail.com>
#
# Last edited: 27 Nov 2007 - added support for proper restart of l2tpns service
#
#============================... | Shell |
#!/bin/sh
#
# L2TPns apply script
# Applies the uci configuration to l2tpns' configuration file /etc/l2tpns/startup-config
#
# Author: Liran Tal <liran@enginx.com>
# <liran.tal@gmail.com>
#
# Last edited: 27 Nov 2007 - added support for proper restart of l2tpns service
#
#============================... | Shell |
#!/bin/sh
NET=/tmp/net
LOG=$NET/log
SRV_USR=$NET/users
SRV_IPS=$NET/srv_ip
CLI_IPS=$NET/cli_ip
PATH=/sbin:/usr/sbin:$PATH
export PATH
[ -d $NET ] || mkdir -p $NET
rm_entry() {
grep -v "^$1 " $2 > $2.new
mv $2.new $2
}
clear_dev() {
for file in `grep -l "^$1 " $NET/*`; do
rm_entry $1 $file
done
}
#... | Shell |
#!/bin/sh
. /etc/functions-net.sh
USERS=/etc/ppp/users
PEERS=/etc/ppp/peers
# users.pptpd format:
# username password ip-address
# users.pptp format:
# peername username password ip-address
# peers.pptp format:
# peername host-name username
ppp_del_user() {
rm_entry "$2" $USERS.$1
}
ppp_add_user() {
ppp... | Shell |
#!/bin/sh
. /etc/functions-net.sh
USERS=/etc/ppp/users
PEERS=/etc/ppp/peers
# users.pptpd format:
# username password ip-address
# users.pptp format:
# peername username password ip-address
# peers.pptp format:
# peername host-name username
ppp_del_user() {
rm_entry "$2" $USERS.$1
}
ppp_add_user() {
ppp... | Shell |
#!/bin/sh
NET=/tmp/net
LOG=$NET/log
SRV_USR=$NET/users
SRV_IPS=$NET/srv_ip
CLI_IPS=$NET/cli_ip
PATH=/sbin:/usr/sbin:$PATH
export PATH
[ -d $NET ] || mkdir -p $NET
rm_entry() {
grep -v "^$1 " $2 > $2.new
mv $2.new $2
}
clear_dev() {
for file in `grep -l "^$1 " $NET/*`; do
rm_entry $1 $file
done
}
#... | Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
# Liran Tal <liran@enginx.com> <liran.tal@gmail.com>
# Last updated: 16 August 2007
START=70
NAME=l2tpns
BIN=$(which $NAME 2>/dev/null)
DEFAULT=/etc/default/$NAME
RUN_D=/var/run
PID_F=$RUN_D/$NAME.pid
start() {
[ -z "$BIN" ] && return
[ -f $DEFAULT ] && . $D... | Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
# Liran Tal <liran@enginx.com> <liran.tal@gmail.com>
# Last updated: 16 August 2007
START=70
NAME=l2tpns
BIN=$(which $NAME 2>/dev/null)
DEFAULT=/etc/default/$NAME
RUN_D=/var/run
PID_F=$RUN_D/$NAME.pid
start() {
[ -z "$BIN" ] && return
[ -f $DEFAULT ] && . $D... | Shell |
#!/bin/sh /etc/rc.common
START=60
report_log() {
[ "$#" -gt 0 ] && logger -s -t "webifopenvpn" "$@"
}
append_bool() {
local section="$1"
local option="$2"
local value="$3"
local _loctmp
config_get_bool _loctmp "$section" "$option"
[ "$_loctmp" -gt 0 ] && append args "$value"
}
append_parm() {
local section=... | Shell |
#!/bin/sh /etc/rc.common
START=60
report_log() {
[ "$#" -gt 0 ] && logger -s -t "webifopenvpn" "$@"
}
append_bool() {
local section="$1"
local option="$2"
local value="$3"
local _loctmp
config_get_bool _loctmp "$section" "$option"
[ "$_loctmp" -gt 0 ] && append args "$value"
}
append_parm() {
local section=... | Shell |
#!/usr/bin/env bash
rm -f database/dev.db
mkdir -p database
sqlite3 database/dev.db <<EOF
BEGIN TRANSACTION;
CREATE TABLE schema_info (version integer);
INSERT INTO "schema_info" VALUES(17);
CREATE TABLE boards ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255), "arch" varchar(255), "kernel" varchar(255), "title" ... | Shell |
#!/usr/bin/env bash
rm -f database/dev.db
mkdir -p database
sqlite3 database/dev.db <<EOF
BEGIN TRANSACTION;
CREATE TABLE schema_info (version integer);
INSERT INTO "schema_info" VALUES(17);
CREATE TABLE boards ("id" INTEGER PRIMARY KEY NOT NULL, "name" varchar(255), "arch" varchar(255), "kernel" varchar(255), "title" ... | Shell |
#!/bin/bash
CWMP="./cwmpd --platform=fakecpe"
DELAY=2
$CWMP "$@"
code=$?
DNLD=download.tgz
if [ $code -eq 32 ] && [ -f $DNLD ]; then
tar xzf $DNLD
rm $DNLD
echo "cwmpd exited deliberately. Respawning in $DELAY seconds." >&2
sleep $DELAY
exec ./fakecpe.sh "$@"
fi
exit 1
| Shell |
#!/bin/sh
echo This script takes a minute to run. Be patient. 1>&2
LC_CTYPE=C export LC_CTYPE
# pad stdin to multiple of 120 lines
pad()
{
awk '{print} END{for(; NR%120!=0; NR++) print ""}'
}
# create formatted (numbered) files
mkdir -p fmt
rm -f fmt/*
cp README fmt
files=`grep -v '^#' runoff.list | awk '{print $... | Shell |
#!/bin/sh
echo This script takes a minute to run. Be patient. 1>&2
LC_CTYPE=C export LC_CTYPE
# pad stdin to multiple of 120 lines
pad()
{
awk '{print} END{for(; NR%120!=0; NR++) print ""}'
}
# create formatted (numbered) files
mkdir -p fmt
rm -f fmt/*
cp README fmt
files=`grep -v '^#' runoff.list | awk '{print $... | Shell |
#!/bin/sh
echo This script takes a minute to run. Be patient. 1>&2
LC_CTYPE=C export LC_CTYPE
# pad stdin to multiple of 120 lines
pad()
{
awk '{print} END{for(; NR%120!=0; NR++) print ""}'
}
# create formatted (numbered) files
mkdir -p fmt
rm -f fmt/*
cp README fmt
files=`grep -v '^#' runoff.list | awk '{print $... | Shell |
#!/bin/sh
echo This script takes a minute to run. Be patient. 1>&2
LC_CTYPE=C export LC_CTYPE
# pad stdin to multiple of 120 lines
pad()
{
awk '{print} END{for(; NR%120!=0; NR++) print ""}'
}
# create formatted (numbered) files
mkdir -p fmt
rm -f fmt/*
cp README fmt
files=`grep -v '^#' runoff.list | awk '{print $... | Shell |
#!/bin/sh
echo This script takes a minute to run. Be patient. 1>&2
LC_CTYPE=C export LC_CTYPE
# pad stdin to multiple of 120 lines
pad()
{
awk '{print} END{for(; NR%120!=0; NR++) print ""}'
}
# create formatted (numbered) files
mkdir -p fmt
rm -f fmt/*
cp README fmt
files=`grep -v '^#' runoff.list | awk '{print $... | Shell |
#!/bin/sh
echo This script takes a minute to run. Be patient. 1>&2
LC_CTYPE=C export LC_CTYPE
# pad stdin to multiple of 120 lines
pad()
{
awk '{print} END{for(; NR%120!=0; NR++) print ""}'
}
# create formatted (numbered) files
mkdir -p fmt
rm -f fmt/*
cp README fmt
files=`grep -v '^#' runoff.list | awk '{print $... | Shell |
#!/bin/sh
mkdir /opt/AntiyPasswordMixer/keys
mkdir /opt/AntiyPasswordMixer/database
cp ./pwd.lst /opt/AntiyPasswordMixer/database
openssl genrsa -out /opt/AntiyPasswordMixer/keys/privkey.pem 4096
openssl rsa -in /opt/AntiyPasswordMixer/keys/privkey.pem -out /opt/AntiyPasswordMixer/keys/pubkey.pem -pubout
| Shell |
#!/bin/sh
mkdir /opt/AntiyPasswordMixer/keys
mkdir /opt/AntiyPasswordMixer/database
cp ./pwd.lst /opt/AntiyPasswordMixer/database
openssl genrsa -out /opt/AntiyPasswordMixer/keys/privkey.pem 4096
openssl rsa -in /opt/AntiyPasswordMixer/keys/privkey.pem -out /opt/AntiyPasswordMixer/keys/pubkey.pem -pubout
| Shell |
#!/bin/sh
mkdir /opt/AntiyPasswordMixer/keys
mkdir /opt/AntiyPasswordMixer/database
cp ./pwd.lst /opt/AntiyPasswordMixer/database
openssl genrsa -out /opt/AntiyPasswordMixer/keys/privkey.pem 4096
openssl rsa -in /opt/AntiyPasswordMixer/keys/privkey.pem -out /opt/AntiyPasswordMixer/keys/pubkey.pem -pubout
| Shell |
#!/bin/sh
# for this to work you need to have the following installed:
# - Xcode 3.1.3 or higher: http://developer.apple.com/
# - git: http://help.github.com/mac-git-installation/
# - mercurial / hg: http://mercurial.berkwood.com/
# pull three20
cd ..
git clone git://github.com/facebook/three20.git
# pull mailcore
hg... | 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-2003 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is ... | Shell |
#!/bin/bash
recode latin1..utf-8 </usr/share/i2e/i2e.dict >i2e.dict.utf
gcc -g `pkg-config --cflags --libs glib-2.0` i2e2dict.c -o i2e2dict
./i2e2dict
rm i2e.dict.utf
echo "Restart StarDict now!"
| Shell |
#!/bin/sh
# Create images for StarDict, like application icon, tray icons, Acrobat plugin icons
# StarDict icons may be created from a single multilayer image.
# Most layers are used only for specific icon types, but images of two books are present
# on all icons. This script deletes layers, resize image and change co... | Shell |
#!/bin/bash
gcc `pkg-config --cflags --libs glib-2.0` ooo2dict.c -o ooo2dict
echo |./ooo2dict 2>/dev/null
recode latin1..utf-8 </usr/share/myspell/dicts/th_de_DE_v2.dat >th_de_DE_v2.dat.utf
echo "OpenThesaurus.de_German" |./ooo2dict th_de_DE_v2.dat.utf 2>/dev/null
recode latin1..utf-8 </usr/share/myspell/dicts/th_it_... | Shell |
#!/bin/bash
gcc exc2i2e.c -o exc2i2e
rename /usr/share/stardict/dic/i2e /usr/share/stardict/dic/temp /usr/share/stardict/dic/i2e.* 2>/dev/null
rename /usr/share/stardict/dic/e2i /usr/share/stardict/dic/temp2 /usr/share/stardict/dic/e2i.* 2>/dev/null
./exc2i2e >t
/usr/lib/stardict/i2e2dict t
rm t
rename /usr/share/sta... | Shell |
#!/bin/bash
gcc `pkg-config --cflags --libs glib-2.0` myspell2dic.c -o myspell2dic
echo "Please wait..."
recode latin1..utf-8 </usr/share/myspell/dicts/es_ES.dic >es_ES.dic.utf
recode latin1..utf-8 </usr/share/myspell/dicts/es_ES.aff >es_ES.aff.utf
echo |./myspell2dic es_ES.dic.utf es_ES.aff.utf 2>/dev/null
recode ko... | Shell |
#!/bin/sh
echo "Boostrapping StarDict tools..."
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
echo;
echo "You must have libtool installed to compile Stardict";
echo;
exit;
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo;
echo "You must have automake installed to compile Stardict";
ech... | 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-2003 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is ... | Shell |
#!/bin/sh
# postrm script for stardict
set -e
case "$1" in
remove)
# if [ -x /usr/bin/scrollkeeper-update ]; then
# /usr/bin/scrollkeeper-update -q
# fi
;;
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'"... | Shell |
#!/bin/sh
# postinst script for stardict
set -e
case "$1" in
configure)
# if [ -e /etc/gconf/schemas/stardict.schemas ]; then
# HOME=/root \
# GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
# /usr/bin/gconftool-2 \
# --makefile-install-rule /etc/gconf/schemas/stardict.schemas ... | Shell |
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
echo "Boostrapping StarDict dictionary..."
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="stardict"
REQUIRED_AUTOMAKE_VERSION=1.9
(test -f $srcdir/configure.ac \
&& test -f $srcdir/ChangeLog \
&& test -d $srcdir/src) || {
echo -n ... | Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.