From cd498aa924553422e64c4b56d2fb01e63a170bac Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 11 Apr 2008 18:13:58 +0000 Subject: * Major repository revision --- contrib/ffluci | 5 - contrib/ffluci-flash | 88 ------------- contrib/ffluci-upload | 4 - contrib/index.cgi | 3 - contrib/index.html | 10 -- contrib/init.d/luci_fw | 121 ------------------ contrib/media/cascade.css | 256 ------------------------------------- contrib/media/cbi.js | 36 ------ contrib/media/css/public_index.css | 3 - contrib/media/logo.png | Bin 4002 -> 0 bytes contrib/package/ffluci/Makefile | 37 ++++-- contrib/uci/luci | 35 ----- contrib/uci/luci_fw | 2 - 13 files changed, 23 insertions(+), 577 deletions(-) delete mode 100755 contrib/ffluci delete mode 100644 contrib/ffluci-flash delete mode 100755 contrib/ffluci-upload delete mode 100755 contrib/index.cgi delete mode 100644 contrib/index.html delete mode 100644 contrib/init.d/luci_fw delete mode 100644 contrib/media/cascade.css delete mode 100644 contrib/media/cbi.js delete mode 100644 contrib/media/css/public_index.css delete mode 100644 contrib/media/logo.png delete mode 100644 contrib/uci/luci delete mode 100644 contrib/uci/luci_fw (limited to 'contrib') diff --git a/contrib/ffluci b/contrib/ffluci deleted file mode 100755 index e090d560c..000000000 --- a/contrib/ffluci +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/haserl --shell=luac -package.path = "/usr/lib/lua/?.lua;/usr/lib/lua/?/init.lua;" .. package.path -package.cpath = "/usr/lib/lua/?.so;" .. package.cpath -require("ffluci").dispatch() - diff --git a/contrib/ffluci-flash b/contrib/ffluci-flash deleted file mode 100644 index 3ff478f0f..000000000 --- a/contrib/ffluci-flash +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -. /etc/functions.sh - -# initialize defaults -RAMFS_COPY_BIN="" # extra programs for temporary ramfs root -RAMFS_COPY_DATA="" # extra data files -export KEEP_PATTERN="" -export VERBOSE=1 - -# parse options -while [ -n "$1" ]; do - case "$1" in - -k) - shift - export KEEP_PATTERN="$1" - ;; - -*) - echo "Invalid option: $1" - exit 1 - ;; - *) break;; - esac - shift; -done - -export CONFFILES=/tmp/sysupgrade.conffiles -export CONF_TAR=/tmp/sysupgrade.tgz - -[ -f $CONFFILES ] && rm $CONFFILES -[ -f $CONF_TAR ] && rm $CONF_TAR - -export ARGV="$*" -export ARGC="$#" - -[ -z "$ARGV" ] && { - cat < - -Options: - -k <"file 1, file 2, ..."> Files to be kept -EOF - exit 1 -} - -add_pattern_conffiles() { - local file="$1" - find $KEEP_PATTERN >> "$file" 2>/dev/null - return 0 -} - -# hooks -sysupgrade_image_check="platform_check_image" -sysupgrade_init_conffiles="" - -[ -n "$KEEP_PATTERN" ] && append sysupgrade_init_conffiles "add_pattern_conffiles" - -include /lib/upgrade - -do_save_conffiles() { - [ -z "$(rootfs_type)" ] && { - echo "Cannot save config while running from ramdisk." - exit 3 - return 0 - } - run_hooks "$CONFFILES" $sysupgrade_init_conffiles - - v "Saving config files..." - [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V="" - tar c${TAR_V}zf "$CONF_TAR" -T "$CONFFILES" 2>/dev/null -} - -type platform_check_image >/dev/null 2>/dev/null || { - echo "Firmware upgrade is not implemented for this platform." - exit 1 -} - -for check in $sysupgrade_image_check; do - ( eval "$check \"\$ARGV\"" ) || { - echo "Image check '$check' failed." - exit 2 - } -done - -[ -n "$sysupgrade_init_conffiles" ] && do_save_conffiles -run_hooks "" $sysupgrade_pre_upgrade - -v "Switching to ramdisk..." -run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade' \ No newline at end of file diff --git a/contrib/ffluci-upload b/contrib/ffluci-upload deleted file mode 100755 index 0128c2dd7..000000000 --- a/contrib/ffluci-upload +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/haserl --shell=luac --upload-limit=6144 --- This is a bit hacky: remove -upload from SCRIPT_NAME -ENV.SCRIPT_NAME = ENV.SCRIPT_NAME:sub(1, #ENV.SCRIPT_NAME - 7) -dofile("ffluci") \ No newline at end of file diff --git a/contrib/index.cgi b/contrib/index.cgi deleted file mode 100755 index c9c98b0b2..000000000 --- a/contrib/index.cgi +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/haserl --shell=luac -print("Status: 302 Found") -print("Location: ffluci/admin\n") diff --git a/contrib/index.html b/contrib/index.html deleted file mode 100644 index 58387a5fe..000000000 --- a/contrib/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - -FFLuCI - Freifunk Lua Configuration Interface - - \ No newline at end of file diff --git a/contrib/init.d/luci_fw b/contrib/init.d/luci_fw deleted file mode 100644 index 880c87dbe..000000000 --- a/contrib/init.d/luci_fw +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh /etc/rc.common -START=46 - -apply_portfw() { - local cfg="$1" - config_get proto "$cfg" proto - config_get dport "$cfg" dport - config_get iface "$cfg" iface - config_get to "$cfg" to - - ports=$(echo $to | cut -sd: -f2) - if [ -n "$ports" ]; then - ports="--dport $(echo $ports | sed -e 's/-/:/')" - else - ports="--dport $dport" - fi - - ip=$(echo $to | cut -d: -f1) - - if ([ "$proto" == "tcpudp" ] || [ "$proto" == "tcp" ]); then - iptables -t nat -A luci_prerouting -i "$iface" -p tcp --dport "$dport" -j DNAT --to "$to" - iptables -A luci_forward -i "$iface" -p tcp -d "$ip" $ports -j ACCEPT - fi - - if ([ "$proto" == "tcpudp" ] || [ "$proto" == "udp" ]); then - iptables -t nat -A luci_prerouting -i "$iface" -p udp --dport "$dport" -j DNAT --to "$to" - iptables -A luci_forward -i "$iface" -p udp -d "$ip" $ports -j ACCEPT - fi -} - -apply_rule() { - local cfg="$1" - local cmd="" - - config_get chain "$cfg" chain - [ -n "$chain" ] || return 0 - [ "$chain" == "forward" ] && cmd="$cmd -A luci_forward" - [ "$chain" == "input" ] && cmd="$cmd -A luci_input" - [ "$chain" == "output" ] && cmd="$cmd -A luci_output" - [ "$chain" == "prerouting" ] && cmd="$cmd -t nat -A luci_prerouting" - [ "$chain" == "postrouting" ] && cmd="$cmd -t nat -A luci_postrouting" - - config_get iface "$cfg" iface - [ -n "$iface" ] && cmd="$cmd -i $iface" - - config_get oface "$cfg" oface - [ -n "$oface" ] && cmd="$cmd -o $oface" - - config_get proto "$cfg" proto - [ -n "$proto" ] && cmd="$cmd -p $proto" - - config_get source "$cfg" source - [ -n "$source" ] && cmd="$cmd -s $source" - - config_get destination "$cfg" destination - [ -n "$destination" ] && cmd="$cmd -d $destination" - - config_get sport "$cfg" sport - [ -n "$sport" ] && cmd="$cmd --sport $sport" - - config_get dport "$cfg" dport - [ -n "$dport" ] && cmd="$cmd --dport $dport" - - config_get todest "$cfg" todest - [ -n "$todest" ] && cmd="$cmd --to-destination $todest" - - config_get tosrc "$cfg" tosrc - [ -n "$tosrc" ] && cmd="$cmd --to-source $tosrc" - - config_get jump "$cfg" jump - [ -n "$jump" ] && cmd="$cmd -j $jump" - - config_get command "$cfg" command - [ -n "$command" ] && cmd="$cmd $command" - - iptables $cmd -} - -start() { - ### Create subchains - iptables -N luci_input - iptables -N luci_output - iptables -N luci_forward - iptables -t nat -N luci_prerouting - iptables -t nat -N luci_postrouting - - ### Hook in the chains - iptables -A input_rule -j luci_input - iptables -A output_rule -j luci_output - iptables -A forwarding_rule -j luci_forward - iptables -t nat -A prerouting_rule -j luci_prerouting - iptables -t nat -A postrouting_rule -j luci_postrouting - - ### Read chains from config - config_load luci_fw - config_foreach apply_portfw portfw - config_foreach apply_rule rule -} - -stop() { - ### Hook out the chains - iptables -D input_rule -j luci_input - iptables -D output_rule -j luci_output - iptables -D forwarding_rule -j luci_forward - iptables -t nat -D prerouting_rule -j luci_prerouting - iptables -t nat -D postrouting_rule -j luci_postrouting - - ### Clear subchains - iptables -F luci_input - iptables -F luci_output - iptables -F luci_forward - iptables -t nat -F luci_prerouting - iptables -t nat -F luci_postrouting - - ### Delete subchains - iptables -X luci_input - iptables -X luci_output - iptables -X luci_forward - iptables -t nat -X luci_prerouting - iptables -t nat -X luci_postrouting -} diff --git a/contrib/media/cascade.css b/contrib/media/cascade.css deleted file mode 100644 index d09ab7477..000000000 --- a/contrib/media/cascade.css +++ /dev/null @@ -1,256 +0,0 @@ -@charset "utf-8"; - -body { - font-family: Verdana, Arial, sans-serif; - background-color: #aaaaaa; -} - -h1 { - margin: 0%; - font-size: 1.4em; - font-weight: bold; - margin-bottom: 0.5em; -} - -h2 { - margin: 0%; - font-size: 1.2em; - font-weight: bold; -} - -h3 { - margin: 0%; -} - -#header { - padding: 0.2em; - height: 4.5em; - background-color: #262626; -} - -#columns { - border-left: 10.1em solid #262626; - border-right: 10.1em solid #262626; - display: block; - background-color: white; - padding: 0.1em; -} - -#columnswrapper { - display: block; - margin-left: -10em; - margin-right: -10em; -} - -#content { - margin-left: 14em; - margin-right: 14em; - display: block; - position: relative; - padding: 2px; - font-size: 0.8em; -} - -.headerlogo { - height: 4em; - padding: 5px; -} - -.headerlogo img { - height: 100%; -} - -.headertitle { - font-size: 2.4em; - color: gray; - letter-spacing: 0.5em; - text-transform: lowercase; -} - -.separator { - padding-left: 0.25em; - font-weight: bold; - font-size: 0.8em; - line-height: 1.4em; -} - -.whitetext { - color: white; -} - -.yellowtext { - color: #ffcb05; -} - -.magentatext { - color: #dc0065; -} - -.inheritcolor { - color: inherit; -} - -.smalltext { - font-size: 0.8em; -} - -.yellow { - background-color: #ffcb05; -} - -.magenta { - background-color: #dc0065; -} - -.nodeco { - text-decoration: none; -} - -.redhover:hover { - color: red; -} - -.bold { - font-weight: bold; -} - -.sidebar { - position: relative; - padding: 0.25em; - color: gray; - width: 9em; - font-weight: bold; -} - -.separator a, .sidebar a { - color: inherit; - text-decoration: inherit; -} - -.separator a:hover, .sidebar a:hover { - color: red; -} - -.sidebar div { - padding-bottom: 0.5em; -} - -.sidebar ul { - font-size: 0.8em; - color: white; - list-style-type: none; - padding-left: 1em; - margin-top: 0%; -} - -.left { - float: left; - text-align: left; -} - -.right { - float: right; - text-align: right; -} - -.clear { - clear: both; -} - -.hidden { - display: none; -} - -.inline { - display: inline; -} - -.code { - background: #f7f7f7; - border: 1px solid #d7d7d7; - margin: 1em 1.75em; - padding: 1em; -} - -code { - display: block; - background: #f7f7f7; - border: 1px solid #d7d7d7; - margin: 1em 1.75em; - padding: 1em; - overflow: auto; - white-space: pre; -} - -.cbi-section { - margin-top: 1em; -} - -.cbi-section-remove { - text-align: right; -} - -.cbi-value-title { - line-height: 1.75em; - width: 15em; - font-weight: bold; -} - -.cbi-value-field { - text-align: left; - line-height: 1.75em; -} - -.cbi-value-field input, .cbi-value-field select, -.cbi-optionals select, .cbi-optionals input, -.cbi-section-remove input, .cbi-section-create input { - font-size: 0.8em; - margin: 0%; -} - -.cbi-value-description { - font-style: italic; - font-size: 0.8em; - margin-bottom: 0.5em; -} - -.cbi-form-separator { - margin-top: 1em; -} - -.cbi-section-node { - display: block; - background: #f7f7f7; - border: 1px solid #d7d7d7; - overflow: auto; - margn-bottom: 0%; -} - -.cbi-section-node h3 { - margin-bottom: 0.5em; -} - -.cbi-error { - color: red; - font-weight: bold; - font-size: 0.8em; - margin-bottom: 0.75em; -} - -.cbi-optionals { - margin-top: 1em; -} - -.cbi-optionals option { - font-size: 0.8em; -} - -.error { - color: red; - font-weight: bold; -} - -.ok { - color: green; - font-weight: bold; -} \ No newline at end of file diff --git a/contrib/media/cbi.js b/contrib/media/cbi.js deleted file mode 100644 index f9e463bca..000000000 --- a/contrib/media/cbi.js +++ /dev/null @@ -1,36 +0,0 @@ -var cbi_d = {}; - -function cbi_d_add(field, target, value) { - if (!cbi_d[target]) { - cbi_d[target] = {}; - } - if (!cbi_d[target][value]) { - cbi_d[target][value] = []; - } - cbi_d[target][value].push(field); -} - -function cbi_d_update(target) { - if (!cbi_d[target]) { - return; - } - - for (var x in cbi_d[target]) { - for (var i=0; i