code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/bin/sh
DEFAULT=/etc/default/autopid
RUN_D=/var/run
PID_F=$RUN_D/autoipd.pid
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
[ -d $RUN_D ] || mkdir -p $RUN_D
autoipd $OPTIONS
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F)
;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
exit $?
| Shell |
#!/bin/sh
DEFAULT=/etc/default/autopid
RUN_D=/var/run
PID_F=$RUN_D/autoipd.pid
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
[ -d $RUN_D ] || mkdir -p $RUN_D
autoipd $OPTIONS
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F)
;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
exit $?
| Shell |
#!/bin/sh
DEFAULT=/etc/default/mDNSResponder
RUN_D=/var/run
PID_F=$RUN_D/mDNSResponder.pid
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
[ -d $RUN_D ] || mkdir -p $RUN_D
mDNSResponder $OPTIONS
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F)
;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
exit $?
| Shell |
#!/bin/sh
BIN=tor
DEFAULT=/etc/default/$BIN
LOG_D=/var/log/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
mkdir -p $LOG_D
mkdir -p $RUN_D
$BIN $OPTIONS
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F)
;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
exit $?
| Shell |
#!/bin/sh
BIN=tor
DEFAULT=/etc/default/$BIN
LOG_D=/var/log/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
mkdir -p $LOG_D
mkdir -p $RUN_D
$BIN $OPTIONS
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F)
;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
exit $?
| Shell |
#!/bin/sh
name=tor
id=52
# do not change below
# check if we are on real system
if [ -z "${IPKG_INSTROOT}" ]; then
# create copies of passwd and group, if we use squashfs
rootfs=`mount |awk '/root/ { print $5 }'`
if [ "$rootfs" = "squashfs" ]; then
if [ -h /etc/group ]; then
rm /etc/group
cp /rom/etc/group... | Shell |
#!/bin/sh
name=tor
id=52
# do not change below
# check if we are on real system
if [ -z "${IPKG_INSTROOT}" ]; then
# create copies of passwd and group, if we use squashfs
rootfs=`mount |awk '/root/ { print $5 }'`
if [ "$rootfs" = "squashfs" ]; then
if [ -h /etc/group ]; then
rm /etc/group
cp /rom/etc/group... | Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
DEFAULT=/etc/default/radiusd
LOG_D=/var/log/radius
RUN_D=/var/run
PID_F=$RUN_D/radiusd.pid
start() {
[ -f $DEFAULT ] && . $DEFAULT
[ -d $LOG_D ] || mkdir -p $LOG_D
[ -d $RUN_D ] || mkdir -p $RUN_D
radiusd $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $... | Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
DEFAULT=/etc/default/radiusd
LOG_D=/var/log/radius
RUN_D=/var/run
PID_F=$RUN_D/radiusd.pid
start() {
[ -f $DEFAULT ] && . $DEFAULT
[ -d $LOG_D ] || mkdir -p $LOG_D
[ -d $RUN_D ] || mkdir -p $RUN_D
radiusd $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $... | Shell |
#!/bin/sh
[ -e /etc/functions.sh ] && . /etc/functions.sh || . ./functions.sh
[ -x /sbin/modprobe ] && insmod="modprobe" || insmod="insmod"
add_insmod() {
eval "export isset=\${insmod_$1}"
case "$isset" in
1) ;;
*) append INSMOD "$insmod $* >&- 2>&-" "$N"; export insmod_$1=1;;
esac
}
# Kamikaze compatibility f... | Shell |
#!/bin/sh
[ -e /etc/functions.sh ] && . /etc/functions.sh || . ./functions.sh
[ -x /sbin/modprobe ] && insmod="modprobe" || insmod="insmod"
add_insmod() {
eval "export isset=\${insmod_$1}"
case "$isset" in
1) ;;
*) append INSMOD "$insmod $* >&- 2>&-" "$N"; export insmod_$1=1;;
esac
}
# Kamikaze compatibility f... | Shell |
#!/bin/sh
[ "$ACTION" = ifup ] && /usr/lib/qos/generate.sh interface "$INTERFACE" | sh
| Shell |
#!/bin/sh
[ "$ACTION" = ifup ] && /usr/lib/qos/generate.sh interface "$INTERFACE" | sh
| Shell |
#!/bin/sh
/usr/lib/qos/generate.sh firewall | sh
| Shell |
#!/bin/sh
/usr/lib/qos/generate.sh firewall | sh
| Shell |
#!/bin/sh
case "${ACTION:-ifup}" in
ifup)
ps | grep 'bin/[h]tpdate' >&- || {
route -n 2>&- | grep '^0.0.0.0' >&- && /etc/init.d/htpdate start
}
;;
ifdown)
route -n 2>&- | grep '^0.0.0.0' >&- || /etc/init.d/htpdate stop
;;
esac
| Shell |
#!/bin/sh /etc/rc.common
START=60
BIN=htpdate
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
[ -f $DEFAULT ] && . $DEFAULT
start() {
mkdir -p $RUN_D
$BIN -l -s -t $OPTIONS
$BIN -D -i $PID_F $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}
| Shell |
#!/bin/sh /etc/rc.common
START=60
BIN=htpdate
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
[ -f $DEFAULT ] && . $DEFAULT
start() {
mkdir -p $RUN_D
$BIN -l -s -t $OPTIONS
$BIN -D -i $PID_F $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}
| Shell |
#!/bin/sh
case "${ACTION:-ifup}" in
ifup)
ps | grep 'bin/[h]tpdate' >&- || {
route -n 2>&- | grep '^0.0.0.0' >&- && /etc/init.d/htpdate start
}
;;
ifdown)
route -n 2>&- | grep '^0.0.0.0' >&- || /etc/init.d/htpdate stop
;;
esac
| 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 "HotSpot" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"`" = "##WEBIF:category:HotSpot" ]; then
cat "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories" |sed '/##WEBIF:category:HotSpot/a\
##WEBIF:category:Freeloader'>"${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"
... | Shell |
#!/bin/sh
#
# Webif post-install script.
#
if [ "`grep "HotSpot" "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"`" = "##WEBIF:category:HotSpot" ]; then
cat "${IPKG_INSTROOT}/www/cgi-bin/webif/.categories" |sed '/##WEBIF:category:HotSpot/a\
##WEBIF:category:Freeloader'>"${IPKG_INSTROOT}/www/cgi-bin/webif/.categories"
... | 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=50
BIN=siproxd
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
start() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
$BIN $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}
| Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
BIN=siproxd
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
start() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
$BIN $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}
| Shell |
#!/bin/sh
# restore busybox's imperfection
rm -f $IPKG_INSTROOT/bin/tar.bb 2>/dev/null
rm -f $IPKG_INSTROOT/bin/tar 2>/dev/null
if [ -n "$IPKG_INSTROOT" ]; then
ln -sf busybox $IPKG_INSTROOT/bin/tar 2>/dev/null
else
/bin/busybox --help 2>/dev/null | grep -q "[[:space:]]tar\>" && ln -sf busybox $IPKG_INSTROOT/bin/tar ... | Shell |
#!/bin/sh
# backup busybox's imperfection
rm -f $IPKG_INSTROOT/bin/tar.bb 2>/dev/null
rm -f $IPKG_INSTROOT/bin/tar 2>/dev/null
if [ -n "$IPKG_INSTROOT" ]; then
ln -sf busybox $IPKG_INSTROOT/bin/tar.bb 2>/dev/null
else
/bin/busybox --help 2>/dev/null | grep -q "[[:space:]]tar\>" && ln -sf busybox $IPKG_INSTROOT/bin/ta... | Shell |
#!/bin/sh
# backup busybox's imperfection
rm -f $IPKG_INSTROOT/bin/tar.bb 2>/dev/null
rm -f $IPKG_INSTROOT/bin/tar 2>/dev/null
if [ -n "$IPKG_INSTROOT" ]; then
ln -sf busybox $IPKG_INSTROOT/bin/tar.bb 2>/dev/null
else
/bin/busybox --help 2>/dev/null | grep -q "[[:space:]]tar\>" && ln -sf busybox $IPKG_INSTROOT/bin/ta... | Shell |
#!/bin/sh
# restore busybox's imperfection
rm -f $IPKG_INSTROOT/bin/tar.bb 2>/dev/null
rm -f $IPKG_INSTROOT/bin/tar 2>/dev/null
if [ -n "$IPKG_INSTROOT" ]; then
ln -sf busybox $IPKG_INSTROOT/bin/tar 2>/dev/null
else
/bin/busybox --help 2>/dev/null | grep -q "[[:space:]]tar\>" && ln -sf busybox $IPKG_INSTROOT/bin/tar ... | Shell |
#!/bin/sh
DEFAULT=/etc/default/olsrd
OPTIONS="-f /tmp/olsrd.conf"
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
lanip="$(nvram get lan_ipaddr)"
case "${lanip%\.*}" in
192.168.1|192.168.0)
HNA_IP=
HNA_MASK=
;;
*)
HNA_IP="$lanip"
HNA_MASK="$(nvram get lan_netmask)"
;;
esac
wifi_if... | Shell |
#!/bin/sh
DEFAULT=/etc/default/olsrd
OPTIONS="-f /tmp/olsrd.conf"
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
lanip="$(nvram get lan_ipaddr)"
case "${lanip%\.*}" in
192.168.1|192.168.0)
HNA_IP=
HNA_MASK=
;;
*)
HNA_IP="$lanip"
HNA_MASK="$(nvram get lan_netmask)"
;;
esac
wifi_if... | Shell |
#!/bin/sh
. /etc/functions.sh
type=$1
[ "$(nvram get ${type}_proto)" = "pptp" ] || exit
mkdir -p /var/lock
for module in slhc ppp_generic ppp_async ip_gre; do
/sbin/insmod $module 2>&- >&-
done
(while :; do
PPTP_PROTO="$(nvram get pptp_proto)"
[ "$PPTP_PROTO" = "static" ] || PPTP_PROTO=""
PPTP_PROTO="${PPTP_PRO... | Shell |
#!/bin/sh
. /etc/functions.sh
type=$1
[ "$(nvram get ${type}_proto)" = "pptp" ] || exit
mkdir -p /var/lock
for module in slhc ppp_generic ppp_async ip_gre; do
/sbin/insmod $module 2>&- >&-
done
(while :; do
PPTP_PROTO="$(nvram get pptp_proto)"
[ "$PPTP_PROTO" = "static" ] || PPTP_PROTO=""
PPTP_PROTO="${PPTP_PRO... | Shell |
#!/bin/sh
[ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
RESOLV_CONF="/tmp/resolv.conf.auto"
hotplug_event() {
nvram show 2>&- | grep _proto=dhcp | {
while :; do
read FOO
[ -z "$FOO" ] && break
FOO="${FOO%%_*}"
[ "$(nvram get ${FOO}_ifname)" = "${interface}" ] || continue
env -i ACTI... | Shell |
#!/bin/sh
[ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
RESOLV_CONF="/tmp/resolv.conf.auto"
hotplug_event() {
nvram show 2>&- | grep _proto=dhcp | {
while :; do
read FOO
[ -z "$FOO" ] && break
FOO="${FOO%%_*}"
[ "$(nvram get ${FOO}_ifname)" = "${interface}" ] || continue
env -i ACTI... | Shell |
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
. $IPKG_INSTROOT/etc/functions.sh
START=50
start() {
return 0
}
stop() {
return 0
}
reload() {
return 1
}
restart() {
trap '' TERM
stop
start
}
boot() {
start
}
shutdown() {
return 0
}
disable() {
name="$(basename "${initscript}")"
rm -f "$IPKG_INSTROOT"/etc... | Shell |
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006 Fokus Fraunhofer <carsten.tittel@fokus.fraunhofer.de>
alias debug=${DEBUG:-:}
# valid interface?
if_valid () (
ifconfig "$1" >&- 2>&- ||
[ "${1%%[0-9]}" = "br" ] ||
{
[ "${1%%[0-9]*}" = "vlan" ] && (
i=${1#vlan}
hwname=$(nvram get ... | Shell |
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
. /etc/functions.sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
# the shell really doesn't like having stdin/out closed
# that's why we use /dev/pty/m0 and m1 as replacement
# for /dev/console if there's no serial console available
dd if=/dev/console of=/dev/null bs=1 count=0 ... | Shell |
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
. /etc/functions.sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
# the shell really doesn't like having stdin/out closed
# that's why we use /dev/pty/m0 and m1 as replacement
# for /dev/console if there's no serial console available
dd if=/dev/console of=/dev/null bs=1 count=0 ... | Shell |
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
. $IPKG_INSTROOT/etc/functions.sh
START=50
start() {
return 0
}
stop() {
return 0
}
reload() {
return 1
}
restart() {
trap '' TERM
stop
start
}
boot() {
start
}
shutdown() {
return 0
}
disable() {
name="$(basename "${initscript}")"
rm -f "$IPKG_INSTROOT"/etc... | Shell |
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006 Fokus Fraunhofer <carsten.tittel@fokus.fraunhofer.de>
alias debug=${DEBUG:-:}
# valid interface?
if_valid () (
ifconfig "$1" >&- 2>&- ||
[ "${1%%[0-9]}" = "br" ] ||
{
[ "${1%%[0-9]*}" = "vlan" ] && (
i=${1#vlan}
hwname=$(nvram get ... | Shell |
#!/bin/sh
[ -f /etc/banner ] && cat /etc/banner
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PS1='\u@\h:\w\$ '
alias less=more
alias vim=vi
arp() { cat /proc/net/arp; }
ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
reboot() { ifdown wan 2>&1 >/dev/null ; /sbin/reboot; }
| Shell |
#!/bin/sh
[ -f /etc/banner ] && cat /etc/banner
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PS1='\u@\h:\w\$ '
alias less=more
alias vim=vi
arp() { cat /proc/net/arp; }
ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
reboot() { ifdown wan 2>&1 >/dev/null ; /sbin/reboot; }
| Shell |
#!/bin/sh
HOSTNAME=$(nvram get wan_hostname)
HOSTNAME=${HOSTNAME%%.*}
echo ${HOSTNAME:=OpenWrt}>/proc/sys/kernel/hostname
syslog_ip=$(nvram get log_ipaddr)
eval $(ipcalc.sh "$syslog_ip")
[ "$syslog_ip" = "$IP" ] || syslog_ip=""
syslogd -C16 ${syslog_ip:+-L -R $syslog_ip}
klogd
for i in /etc/init.d/S*; do
$i start 2... | Shell |
#!/bin/sh
mkdir -p /var/spool/cron
ln -s /etc/crontabs /var/spool/cron/crontabs
crond -c /etc/crontabs
| Shell |
#!/bin/sh
# don't run the telnetd if dropbear (ssh) is active since
# OpenWrt will have disabled the telnetd login anyway.
[ ! -f "/etc/dropbear/dropbear_rsa_host_key" ] && {
telnetd -l /bin/login
}
| Shell |
#!/bin/sh
case "$1" in
start|restart)
rm -f /tmp/resolv.conf
ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
ifup_interfaces=$(nvram get ifup_interfaces)
ifup_interfaces=${ifup_interfaces:-"lan wan wifi"}
for iface in $ifup_interfaces; do
ifup $iface
if [ "$iface" = "wifi" ]; then
$iface up
fi
done
... | Shell |
#!/bin/sh
. /etc/functions.sh
sysctl -p >&-
# automagically run firstboot
[ "$(nvram get no_root_swap)" != 1 ] && {
[ -d /tmp/root ] && {
lock /tmp/.switch2jffs
firstboot switch2jffs
lock -u /tmp/.switch2jffs
}
}
# set leds to normal state
set_state done
| Shell |
#!/bin/sh
[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
mkdir -p /var/run
mkdir -p /var/log
touch /var/log/wtmp
touch /var/log/lastlog
sed 's/^[^#]/insmod &/' /etc/modules /etc/modules.d/* 2>&-|ash
ifconfig lo 127.0.0.1 up
ifconfig eth0 promisc
# configure the switch based on nvram
[ -d /proc/switch/eth0 ] &... | Shell |
#!/bin/sh
[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
mkdir -p /var/run
mkdir -p /var/log
touch /var/log/wtmp
touch /var/log/lastlog
sed 's/^[^#]/insmod &/' /etc/modules /etc/modules.d/* 2>&-|ash
ifconfig lo 127.0.0.1 up
ifconfig eth0 promisc
# configure the switch based on nvram
[ -d /proc/switch/eth0 ] &... | Shell |
#!/bin/sh
# don't run the telnetd if dropbear (ssh) is active since
# OpenWrt will have disabled the telnetd login anyway.
[ ! -f "/etc/dropbear/dropbear_rsa_host_key" ] && {
telnetd -l /bin/login
}
| Shell |
#!/bin/sh
. /etc/functions.sh
REALM=$(nvram get wan_hostname)
REALM=${REALM%%.*}
httpd -p 80 -h /www -r ${REALM:-OpenWrt}
| Shell |
#!/bin/sh
HOSTNAME=$(nvram get wan_hostname)
HOSTNAME=${HOSTNAME%%.*}
echo ${HOSTNAME:=OpenWrt}>/proc/sys/kernel/hostname
syslog_ip=$(nvram get log_ipaddr)
eval $(ipcalc.sh "$syslog_ip")
[ "$syslog_ip" = "$IP" ] || syslog_ip=""
syslogd -C16 ${syslog_ip:+-L -R $syslog_ip}
klogd
for i in /etc/init.d/S*; do
$i start 2... | Shell |
#!/bin/sh
mkdir -p /var/spool/cron
ln -s /etc/crontabs /var/spool/cron/crontabs
crond -c /etc/crontabs
| Shell |
#!/bin/sh
case "$1" in
start|restart)
rm -f /tmp/resolv.conf
ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
ifup_interfaces=$(nvram get ifup_interfaces)
ifup_interfaces=${ifup_interfaces:-"lan wan wifi"}
for iface in $ifup_interfaces; do
ifup $iface
if [ "$iface" = "wifi" ]; then
$iface up
fi
done
... | Shell |
#!/bin/sh
. /etc/functions.sh
sysctl -p >&-
# automagically run firstboot
[ "$(nvram get no_root_swap)" != 1 ] && {
[ -d /tmp/root ] && {
lock /tmp/.switch2jffs
firstboot switch2jffs
lock -u /tmp/.switch2jffs
}
}
# set leds to normal state
set_state done
| Shell |
#!/bin/sh
# NVRAM setup
#
# This file handles the NVRAM quirks of various hardware.
alias debug=${DEBUG:-:}
remap () {
for type in lan wifi wan pppoe
do
for s in '' s
do
eval nvram set ${type}_ifname$s=\"$(nvram get ${type}_ifname$s|sed s/$1/$2/g)\"
done
done
}
nvram_default() {
[ -z "$(nvram get $1)" ... | Shell |
#!/bin/sh
. /etc/functions.sh
REALM=$(nvram get wan_hostname)
REALM=${REALM%%.*}
httpd -p 80 -h /www -r ${REALM:-OpenWrt}
| Shell |
#!/bin/sh
# NVRAM setup
#
# This file handles the NVRAM quirks of various hardware.
alias debug=${DEBUG:-:}
remap () {
for type in lan wifi wan pppoe
do
for s in '' s
do
eval nvram set ${type}_ifname$s=\"$(nvram get ${type}_ifname$s|sed s/$1/$2/g)\"
done
done
}
nvram_default() {
[ -z "$(nvram get $1)" ... | Shell |
#!/bin/sh
/usr/sbin/rpc.mountd -r
/usr/sbin/rpc.nfsd
| Shell |
#!/bin/sh
/usr/sbin/rpc.mountd -r
/usr/sbin/rpc.nfsd
| Shell |
#!/bin/sh
BIN=frickin
DEFAULT=/etc/default/$BIN
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
$BIN $OPTIONS &
;;
*)
echo "usage: $0 (start)"
exit 1
esac
exit $?
| Shell |
#!/bin/sh
BIN=frickin
DEFAULT=/etc/default/$BIN
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
$BIN $OPTIONS &
;;
*)
echo "usage: $0 (start)"
exit 1
esac
exit $?
| Shell |
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
[ -f /etc/hotplug.d/net/00-nas ] && . /etc/hotplug.d/net/00-nas
[ "${INTERFACE%%[0-9]*}" = "wds" ] && {
ifconfig $INTERFACE 0.0.0.0 up
/usr/sbin/brctl addif br0 $INTERFACE
}
| Shell |
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
[ -f /etc/hotplug.d/net/00-nas ] && . /etc/hotplug.d/net/00-nas
[ "${INTERFACE%%[0-9]*}" = "wds" ] && {
ifconfig $INTERFACE 0.0.0.0 up
/usr/sbin/brctl addif br0 $INTERFACE
}
| Shell |
#!/bin/sh
nasrunning() {
[ -f "/var/run/nas.lan.pid" ] && {
kill -0 $(cat /var/run/nas.lan.pid 2>/dev/null)
}
return
}
nas4not() {
nasrunning || /etc/init.d/S??wpa start
[ -e /tmp/.nas_wait ] && {
# Wait - nas dosn't always accept registration immediately
sleep 10
}
/usr/sbin/nas4not $@
# wait for a s... | Shell |
#!/bin/sh
nasrunning() {
[ -f "/var/run/nas.lan.pid" ] && {
kill -0 $(cat /var/run/nas.lan.pid 2>/dev/null)
}
return
}
nas4not() {
nasrunning || /etc/init.d/S??wpa start
[ -e /tmp/.nas_wait ] && {
# Wait - nas dosn't always accept registration immediately
sleep 10
}
/usr/sbin/nas4not $@
# wait for a s... | Shell |
#!/bin/sh
. /etc/functions.sh
ifname=""
real_ifname=$(nvram get wl0_ifname)
real_ifname=${real_ifname:-eth1}
brctl show 2>&- | grep "${real_ifname}" >&- 2>&- && ifname=br0
start_nas() {
# don't start a new nas process if the old one still lives
pid="$(cat /var/run/nas.lan.pid 2>&-)"
[ -n "$pid" -a -d "/proc/$pid" ... | Shell |
#!/bin/sh
. /etc/functions.sh
ifname=""
real_ifname=$(nvram get wl0_ifname)
real_ifname=${real_ifname:-eth1}
brctl show 2>&- | grep "${real_ifname}" >&- 2>&- && ifname=br0
start_nas() {
# don't start a new nas process if the old one still lives
pid="$(cat /var/run/nas.lan.pid 2>&-)"
[ -n "$pid" -a -d "/proc/$pid" ... | Shell |
#!/bin/sh
RUN_D=/var/run
PID_F=$RUN_D/chilli.pid
case $1 in
start)
/sbin/insmod tun >/dev/null 2>&1
[ -d $RUN_D ] || mkdir -p $RUN_D
/usr/sbin/chilli --dns1="$(nvram get lan_ipaddr)"
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1
;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
exit $... | Shell |
#!/bin/sh
RUN_D=/var/run
PID_F=$RUN_D/chilli.pid
case $1 in
start)
/sbin/insmod tun >/dev/null 2>&1
[ -d $RUN_D ] || mkdir -p $RUN_D
/usr/sbin/chilli --dns1="$(nvram get lan_ipaddr)"
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1
;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
exit $... | Shell |
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
iptables -F input_rule
iptables -F output_rule
iptables -F forwarding_rule
iptables -t nat -F prerouting_rule
iptables -t nat -F postrouting_rule
# The following chains are for traffic directed at the IP of the
# WAN interface
iptables -F input_wan
iptables -F forwarding_w... | Shell |
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
iptables -F input_rule
iptables -F output_rule
iptables -F forwarding_rule
iptables -t nat -F prerouting_rule
iptables -t nat -F postrouting_rule
# The following chains are for traffic directed at the IP of the
# WAN interface
iptables -F input_wan
iptables -F forwarding_w... | Shell |
#!/bin/sh
## Please make changes in /etc/firewall.user
. /etc/functions.sh
WAN="$(nvram get wan_ifname)"
WANDEV="$(nvram get wan_device)"
LAN="$(nvram get lan_ifname)"
[ -n "$(nvram get wifi_ifname)" ] && WIFI="$(nvram get lan_ifnames | grep -q $(nvram get wifi_ifname) || nvram get wifi_ifname)"
[ "$WAN" = "$WIFI" ] ... | Shell |
#!/bin/sh
## Please make changes in /etc/firewall.user
. /etc/functions.sh
WAN="$(nvram get wan_ifname)"
WANDEV="$(nvram get wan_device)"
LAN="$(nvram get lan_ifname)"
[ -n "$(nvram get wifi_ifname)" ] && WIFI="$(nvram get lan_ifnames | grep -q $(nvram get wifi_ifname) || nvram get wifi_ifname)"
[ "$WAN" = "$WIFI" ] ... | Shell |
#!/bin/sh
[ -d /etc/maradns ] || mkdir -p /etc/maradns
[ -d /etc/maradns/logger ] || mkdir -p /etc/maradns/logger
duende /usr/sbin/maradns
duende /usr/sbin/zoneserver
| Shell |
#!/bin/sh
[ -d /etc/maradns ] || mkdir -p /etc/maradns
[ -d /etc/maradns/logger ] || mkdir -p /etc/maradns/logger
duende /usr/sbin/maradns
duende /usr/sbin/zoneserver
| Shell |
#!/bin/sh
DEFAULT=/etc/default/snort
LOG_D=/var/log/snort
RUN_D=/var/run
[ -f $DEFAULT ] && . $DEFAULT
PID_F=$RUN_D/snort_$INTERFACE.pid
case $1 in
start)
[ -d $LOG_D ] || mkdir -p $LOG_D
[ -d $RUN_D ] || mkdir -p $RUN_D
snort $OPTIONS
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F)
;;
*)
echo "usage: $... | Shell |
#!/bin/sh
DEFAULT=/etc/default/snort
LOG_D=/var/log/snort
RUN_D=/var/run
[ -f $DEFAULT ] && . $DEFAULT
PID_F=$RUN_D/snort_$INTERFACE.pid
case $1 in
start)
[ -d $LOG_D ] || mkdir -p $LOG_D
[ -d $RUN_D ] || mkdir -p $RUN_D
snort $OPTIONS
;;
stop)
[ -f $PID_F ] && kill $(cat $PID_F)
;;
*)
echo "usage: $... | Shell |
#! /bin/sh -e
# DP: Lossless-crop patch from <http://sylvana.net/jpegcrop/croppatch.tar.gz>
# DP: by <guido@jpegclub.org>.
case "$1" in
-patch) patch -f --no-backup-if-mismatch -p1 < $0;;
-unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-un... | Shell |
#! /bin/sh -e
# DP: Lossless-crop patch from <http://sylvana.net/jpegcrop/croppatch.tar.gz>
# DP: by <guido@jpegclub.org>.
case "$1" in
-patch) patch -f --no-backup-if-mismatch -p1 < $0;;
-unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-un... | Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
BIN=monit
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
start() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
$BIN $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}
| Shell |
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
BIN=monit
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
start() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
$BIN $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}
| Shell |
getvar() {
eval "echo \"\${$1}\""
}
var2file() {
local var
eval "var=\"\${$1}\""
if [ -n "$var" ]; then echo "$var" > "$2"; fi
}
isset() {
local var
eval "var=\"\${$1}\""
[ -n "$var" ]
}
trapret() {(
local retvals="$1"; shift
local cmd="$1"; shift
for retval in $(echo $retvals); do
local trap_$retval=1
... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#!/bin/sh
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=4
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_off_... | Shell |
#! /bin/sh
# A little script I whipped up to make it easy to
# patch source trees and have sane error handling
# -Erik
#
# (c) 2002 Erik Andersen <andersen@codepoet.org>
# Set directories from arguments, or use defaults.
targetdir=${1-.}
patchdir=${2-../kernel-patches}
patchpattern=${3-*}
if [ ! -d "${targetdir}" ] ;... | Shell |
#!/bin/sh
set -e
pkg_dir=$1
if [ -z $pkg_dir ] || [ ! -d $pkg_dir ]; then
echo "Usage: ipkg-make-index <package_directory>"
exit 1
fi
which md5sum 2>&1 >/dev/null || alias md5sum=md5
for pkg in `find $pkg_dir -name '*.ipk' | sort`; do
echo "Generating index for package $pkg" >&2
file_size=$(ls -l $pkg | awk '{p... | Shell |
#!/bin/sh
BASE=http://svn.openwrt.org/openwrt/trunk/openwrt
TARGET=$1
CONTROL=$2
VERSION=$3
ARCH=$4
WD=$(pwd)
mkdir -p "$TARGET/CONTROL"
grep '^[^(Version|Architecture)]' "$CONTROL" > "$TARGET/CONTROL/control"
grep '^Maintainer' "$CONTROL" 2>&1 >/dev/null || \
echo "Maintainer: OpenWrt Developers Team <openwr... | Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.