From 08409051bea263523a0883b2fc3167d1da3612b4 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 29 Dec 2009 01:04:10 +0100 Subject: add atm network script order network scripts. Add atm example. enable reboot option for mtd. --- .../extra/etc/network/if-post-down.d/01-bridge | 24 ++++++++++++ .../extra/etc/network/if-post-down.d/bridge | 24 ------------ .../extra/etc/network/if-pre-up.d/01-atm | 43 ++++++++++++++++++++++ .../extra/etc/network/if-pre-up.d/02-bridge | 32 ++++++++++++++++ .../extra/etc/network/if-pre-up.d/bridge | 32 ---------------- package/mpd/files/mpd.conf | 14 +++++++ package/mtd/src/mtd.c | 20 ++++++++-- package/ppp/files/ppp.pre-up | 2 +- 8 files changed, 130 insertions(+), 61 deletions(-) create mode 100755 package/base-files/extra/etc/network/if-post-down.d/01-bridge delete mode 100755 package/base-files/extra/etc/network/if-post-down.d/bridge create mode 100644 package/base-files/extra/etc/network/if-pre-up.d/01-atm create mode 100755 package/base-files/extra/etc/network/if-pre-up.d/02-bridge delete mode 100755 package/base-files/extra/etc/network/if-pre-up.d/bridge (limited to 'package') diff --git a/package/base-files/extra/etc/network/if-post-down.d/01-bridge b/package/base-files/extra/etc/network/if-post-down.d/01-bridge new file mode 100755 index 000000000..eda1fe3bf --- /dev/null +++ b/package/base-files/extra/etc/network/if-post-down.d/01-bridge @@ -0,0 +1,24 @@ +#!/bin/sh + +if [ ! -x /usr/sbin/brctl ] +then + exit 0 +fi + +case "$IF_BRIDGE_PORTS" in + "") + exit 0 + ;; + none) + INTERFACES="" + ;; + *) + INTERFACES="$IF_BRIDGE_PORTS" + ;; +esac + +for IF in $INTERFACES; do + ip link set down dev $IF && brctl delif $IFACE $IF +done + +ip link set down dev $IFACE || exit 1 diff --git a/package/base-files/extra/etc/network/if-post-down.d/bridge b/package/base-files/extra/etc/network/if-post-down.d/bridge deleted file mode 100755 index eda1fe3bf..000000000 --- a/package/base-files/extra/etc/network/if-post-down.d/bridge +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -if [ ! -x /usr/sbin/brctl ] -then - exit 0 -fi - -case "$IF_BRIDGE_PORTS" in - "") - exit 0 - ;; - none) - INTERFACES="" - ;; - *) - INTERFACES="$IF_BRIDGE_PORTS" - ;; -esac - -for IF in $INTERFACES; do - ip link set down dev $IF && brctl delif $IFACE $IF -done - -ip link set down dev $IFACE || exit 1 diff --git a/package/base-files/extra/etc/network/if-pre-up.d/01-atm b/package/base-files/extra/etc/network/if-pre-up.d/01-atm new file mode 100644 index 000000000..08baf73c7 --- /dev/null +++ b/package/base-files/extra/etc/network/if-pre-up.d/01-atm @@ -0,0 +1,43 @@ +#!/bin/sh + +if [ ! -x /usr/sbin/br2684ctl ] +then + exit 0 +fi + +[ "$METHOD" == "atm" ] || exit 0 + +[ "$IF_ATM_ENCAPS" ] || encap=0 +[ "$IF_ATM_PAYLOAD" ] || payload=1 +[ "$IF_ATM_VPI" ] || $IF_ATM_VPI=1 +[ "$IF_ATM_VCI" ] || $IF_ATM_VCI=32 + +case "$IF_ATM_PAYLOAD" in +bridged) + payload=1 + ;; +routed) + payload=0 + ;; +*) + echo "Wrong payload, use either bridged or routed" + exit 1 + ;; +esac + +case "$IF_ATM_ENCAPS" in +llc) + encap=0 + ;; +vc) + encap=1 + ;; +*) + echo "Wrong Encapsulation use either llc or vc" + exit 1 + ;; +esac + +br2684ctl -b -c 0 -e $encap -p $payload -a $IF_ATM_VPI.$IF_ATM_VCI +ifconfig nas0 up +exit 0 diff --git a/package/base-files/extra/etc/network/if-pre-up.d/02-bridge b/package/base-files/extra/etc/network/if-pre-up.d/02-bridge new file mode 100755 index 000000000..766084de1 --- /dev/null +++ b/package/base-files/extra/etc/network/if-pre-up.d/02-bridge @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ ! -x /usr/sbin/brctl ] +then + exit 0 +fi + +case "$IF_BRIDGE_PORTS" in + "") + exit 0 + ;; + none) + INTERFACES="" + ;; + *) + INTERFACES="$IF_BRIDGE_PORTS" + ;; +esac + +brctl addbr $IFACE || exit 1 + +for IF in $INTERFACES; do + if ! grep -q $IF /proc/net/dev; then + echo "Error: interface '$IF' does not exist!" + brctl delbr $IFACE + exit 1 + fi + brctl addif $IFACE $IF + ip link set up dev $IF +done + +exit 0 diff --git a/package/base-files/extra/etc/network/if-pre-up.d/bridge b/package/base-files/extra/etc/network/if-pre-up.d/bridge deleted file mode 100755 index 766084de1..000000000 --- a/package/base-files/extra/etc/network/if-pre-up.d/bridge +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -if [ ! -x /usr/sbin/brctl ] -then - exit 0 -fi - -case "$IF_BRIDGE_PORTS" in - "") - exit 0 - ;; - none) - INTERFACES="" - ;; - *) - INTERFACES="$IF_BRIDGE_PORTS" - ;; -esac - -brctl addbr $IFACE || exit 1 - -for IF in $INTERFACES; do - if ! grep -q $IF /proc/net/dev; then - echo "Error: interface '$IF' does not exist!" - brctl delbr $IFACE - exit 1 - fi - brctl addif $IFACE $IF - ip link set up dev $IF -done - -exit 0 diff --git a/package/mpd/files/mpd.conf b/package/mpd/files/mpd.conf index 6c23d582d..6e5309e86 100644 --- a/package/mpd/files/mpd.conf +++ b/package/mpd/files/mpd.conf @@ -15,3 +15,17 @@ audio_output { } # Volume control mixer mixer_type "alsa" + +# shout example +#audio_output { +# type "shout" +# name "personal mpd stream" +# host "127.0.0.1" +# port "8000" +# mount "/mpd" +# quality "5.0" +# format "44100:16:2" +# user "source" +# password "musicrockz" +#} + diff --git a/package/mtd/src/mtd.c b/package/mtd/src/mtd.c index 6812c5e31..1230688b1 100644 --- a/package/mtd/src/mtd.c +++ b/package/mtd/src/mtd.c @@ -43,6 +43,7 @@ #include #include +#include #define BUFSIZE (16 * 1024) #define MAX_ARGS 8 @@ -253,15 +254,16 @@ usage(void) " -q quiet mode (once: no [w] on writing,\n" " twice: no status messages)\n" " -e erase before executing the command\n\n" - "Example: To write linux.trx to mtd1 labeled as linux\n" - " mtd write linux.trx linux\n\n"); + " -r reboot after successful command\n" + "Example: To write linux.img to mtd partition labeled as linux\n" + " mtd write linux.img linux\n\n"); exit(1); } int main(int argc, char **argv) { - int ch, i, imagefd = -1, quiet, unlocked; + int ch, i, imagefd = -1, quiet, unlocked, boot; char *erase[MAX_ARGS], *device; const char *imagefile = NULL; enum { @@ -271,6 +273,7 @@ main(int argc, char **argv) } cmd; erase[0] = NULL; + boot = 0; buflen = 0; quiet = 0; @@ -282,6 +285,9 @@ main(int argc, char **argv) case 'q': quiet++; break; + case 'r': + boot = 1; + break; case 'e': i = 0; while ((erase[i] != NULL) && ((i + 1) < MAX_ARGS)) @@ -373,7 +379,13 @@ main(int argc, char **argv) fprintf(stderr, "\n"); break; } - + sync(); + if (boot) { + fprintf(stderr, "\nRebooting ... "); + fflush(stdout); + fflush(stderr); + syscall(SYS_reboot,LINUX_REBOOT_MAGIC1,LINUX_REBOOT_MAGIC2,LINUX_REBOOT_CMD_RESTART,NULL); + } return 0; } diff --git a/package/ppp/files/ppp.pre-up b/package/ppp/files/ppp.pre-up index ec6cc5a31..c83a09177 100755 --- a/package/ppp/files/ppp.pre-up +++ b/package/ppp/files/ppp.pre-up @@ -36,7 +36,7 @@ sed "$REPLACE" < /etc/ppp/templates/$IF_USE_TEMPLATE > /etc/ppp/peers/$IF_PROVID [ "$IF_PPP_ENCAPS" ] || encap=0 [ "$IF_PPP_PAYLOAD" ] || payload=1 [ "$IF_PPP_VPI" ] || $IF_PPP_VPI=1 -[ "$IF_PPP_PAYLOAD" ] || $IF_PPP_VCI=32 +[ "$IF_PPP_VCI" ] || $IF_PPP_VCI=32 case "$IF_PPP_PAYLOAD" in bridged) -- cgit v1.2.3 From 924999934627e03db5963cc58e1d226e047cd9e1 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 29 Dec 2009 01:07:31 +0100 Subject: flatten package selection menu - fix another xorg-server dependency --- package/Config.in | 90 +++++++++++++++++++------------------------- package/opensips/Makefile | 1 + package/xorg-server/Makefile | 2 +- 3 files changed, 41 insertions(+), 52 deletions(-) (limited to 'package') diff --git a/package/Config.in b/package/Config.in index eeb65119c..e76397d57 100644 --- a/package/Config.in +++ b/package/Config.in @@ -3,8 +3,6 @@ menu "Package selection" -menu "Applications" - menu "Basesystem" source "package/base-files/Config.in" source "package/busybox/Config.in.manual" @@ -28,12 +26,22 @@ source "package/obexftp/Config.in" source "package/ussp-push/Config.in" endmenu -menu "Browser" +menu "Browser / Editor / Pager" +source "package/less/Config.in" +source "package/nano/Config.in" +source "package/vim/Config.in" source "package/links/Config.in" source "package/elinks/Config.in" source "package/lynx/Config.in" endmenu +menu "Archivers / Compression" +source "package/bzip2/Config.in" +source "package/cpio/Config.in" +source "package/tar/Config.in" +source "package/xz/Config.in" +endmenu + menu "Debugging / Analyzing" source "package/exmap/Config.in" source "package/gdb/Config.in" @@ -43,12 +51,6 @@ source "package/strace/Config.in" source "package/valgrind/Config.in" endmenu -menu "Editors / Pager" -source "package/less/Config.in" -source "package/nano/Config.in" -source "package/vim/Config.in" -endmenu - menu "Filesystem / Blockdevice utilities" source "package/aufs2-util/Config.in" source "package/dosfstools/Config.in" @@ -63,7 +65,6 @@ source "package/wdfs/Config.in" source "package/xfsprogs/Config.in" endmenu - menu "Mail" source "package/bogofilter/Config.in" source "package/dovecot/Config.in" @@ -76,12 +77,9 @@ source "package/vilistextum/Config.in" endmenu menu "Misc" -source "package/bzip2/Config.in" -source "package/cpio/Config.in" source "package/collectd/Config.in" source "package/deco/Config.in" source "package/digitemp/Config.in" -source "package/gawk/Config.in" source "package/gpm/Config.in" source "package/gpsd/Config.in" source "package/logrotate/Config.in" @@ -89,7 +87,6 @@ source "package/mc/Config.in" source "package/mgetty/Config.in" source "package/monit/Config.in" source "package/motion/Config.in" -source "package/mysql/Config.in" source "package/osiris/Config.in" source "package/rrdtool/Config.in" source "package/rrdcollect/Config.in" @@ -99,8 +96,6 @@ source "package/scsi-spin/Config.in" source "package/ser2net/Config.in" source "package/sqlite/Config.in" source "package/syslog-ng/Config.in" -source "package/tar/Config.in" -source "package/xz/Config.in" endmenu menu "Multimedia" @@ -132,7 +127,7 @@ source "package/heimdal/Config.in" source "package/krb5/Config.in" source "package/openct/Config.in" source "package/opensc/Config.in" -source "package/openssl/Config.in" # libopenssl +source "package/openssl/Config.in" source "package/openssl-pkcs11/Config.in" endmenu @@ -162,16 +157,35 @@ source "package/procps/Config.in" source "package/sispmctl/Config.in" source "package/stress/Config.in" source "package/sysstat/Config.in" +source "package/swconfig/Config.in" #source "package/udev/Config.in" source "package/watchdog/Config.in" endmenu - +menu "Programming / Languages" +source "package/autoconf/Config.in" +source "package/automake/Config.in" +source "package/binutils/Config.in" +source "package/bison/Config.in" +source "package/diffutils/Config.in" +source "package/flex/Config.in" +source "package/gawk/Config.in" +source "package/gcc/Config.in" +source "package/gperf/Config.in" +source "package/haserl/Config.in" +source "package/jamvm/Config.in" +source "package/lua/Config.in" +source "package/m4/Config.in" +source "package/make/Config.in" +source "package/microperl/Config.in" +source "package/perl/Config.in" +source "package/php/Config.in" +source "package/python/Config.in" +source "package/ruby/Config.in" +source "package/tcl/Config.in" endmenu -menu "Networking" - -menu "Analyze / Debugging / Monitoring" +menu "Network - Analyze / Debugging / Monitoring" source "package/bwm/Config.in" source "package/dsniff/Config.in" source "package/ethtool/Config.in" @@ -224,7 +238,6 @@ source "package/ndisc/Config.in" source "package/radvd/Config.in" endmenu - menu "IRC / ICQ / JABBER" source "package/bitlbee/Config.in" source "package/irssi/Config.in" @@ -233,7 +246,6 @@ source "package/reaim/Config.in" source "package/tmsnc/Config.in" endmenu - menu "Firewall / Routing / Bridging" source "package/arpd/Config.in" source "package/bridge-utils/Config.in" @@ -256,7 +268,7 @@ source "package/wondershaper/Config.in" source "package/vrrpd/Config.in" endmenu -menu "Misc" +menu "Networking Misc" source "package/cups/Config.in" source "package/fakeidentd/Config.in" source "package/gkrellmd/Config.in" @@ -276,7 +288,6 @@ source "package/rsync/Config.in" source "package/shat/Config.in" source "package/socat/Config.in" source "package/subversion/Config.in" -source "package/swconfig/Config.in" source "package/udp-broadcast-relay/Config.in" source "package/vgp/Config.in" source "package/vnstat/Config.in" @@ -329,7 +340,7 @@ source "package/tor/Config.in" source "package/vnc-reflector/Config.in" endmenu -menu "Security" +menu "Networking Security" source "package/arpwatch/Config.in" source "package/autossh/Config.in" source "package/axtls/Config.in" @@ -363,31 +374,6 @@ source "package/wireless-firmware/Config.in" source "package/wpa_supplicant/Config.in" endmenu -endmenu - -menu "Programming" -source "package/autoconf/Config.in" -source "package/automake/Config.in" -source "package/binutils/Config.in" -source "package/bison/Config.in" -source "package/diffutils/Config.in" -source "package/flex/Config.in" -source "package/gcc/Config.in" -source "package/gperf/Config.in" -source "package/haserl/Config.in" -source "package/jamvm/Config.in" -source "package/lua/Config.in" -source "package/m4/Config.in" -source "package/make/Config.in" -source "package/microperl/Config.in" -source "package/perl/Config.in" -source "package/php/Config.in" -source "package/python/Config.in" -source "package/ruby/Config.in" -source "package/tcl/Config.in" -endmenu - - menu "Libraries" source "package/alsa-lib/Config.in" @@ -453,6 +439,8 @@ source "package/jpeg/Config.in" source "package/jpeg/Config.in.lib" source "package/lame/Config.in.lib" source "package/mpfr/Config.in" +source "package/mysql/Config.in" +source "package/mysql/Config.in.lib" source "package/nspr/Config.in" source "package/nss/Config.in" source "package/libtool/Config.in" diff --git a/package/opensips/Makefile b/package/opensips/Makefile index e49516e02..dd48a61de 100644 --- a/package/opensips/Makefile +++ b/package/opensips/Makefile @@ -10,6 +10,7 @@ PKG_BUILDDEP+= openssl PKG_MD5SUM:= 87c6fe40c143775d6a1be1beb75c3eb2 PKG_DESCR:= a high-performance, configurable, free SIP server PKG_SECTION:= net +PKG_MULTI:= 1 PKG_VARIANT:= tls PKG_URL:= http://opensips.org PKG_SITES:= http://opensips.org/pub/opensips/$(PKG_VERSION)/src/ diff --git a/package/xorg-server/Makefile b/package/xorg-server/Makefile index 3927ca2c6..4380f3663 100644 --- a/package/xorg-server/Makefile +++ b/package/xorg-server/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 913a672cbd6da516de15965d594e20b9 PKG_DESCR:= Xorg server PKG_SECTION:= x11 -PKG_DEPENDS:= libopenssl libxfont pixman libpciaccess libxkbfile +PKG_DEPENDS:= libopenssl libxfont pixman libpciaccess libxkbfile libfontenc PKG_BUILDDEP+= libX11 randrproto renderproto fixesproto damageproto scrnsaverproto resourceproto fontsproto videoproto compositeproto evieext libxkbfile libXfont pixman libpciaccess openssl xf86dgaproto PKG_URL:= http://www.x.org PKG_SITES:= ${MASTER_SITE_XORG} -- cgit v1.2.3 From 42bf426caea1d9ce4b6f92befa71cfb1df5f7458 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 29 Dec 2009 01:08:34 +0100 Subject: fix duplicate entries --- package/Config.in | 2 -- 1 file changed, 2 deletions(-) (limited to 'package') diff --git a/package/Config.in b/package/Config.in index a778bcecc..e76397d57 100644 --- a/package/Config.in +++ b/package/Config.in @@ -451,8 +451,6 @@ source "package/libmad/Config.in" source "package/libmad/Config.in.lib" source "package/libmms/Config.in" source "package/libmms/Config.in.lib" -source "package/mysql/Config.in" -source "package/mysql/Config.in.lib" source "package/ncurses/Config.in" source "package/ncurses/Config.in.lib" source "package/neon/Config.in" -- cgit v1.2.3