--- /dev/null
+###scanner unter windows vista zum laufen bekommen\r
+Here is a workaround to install a Mustek 600 CU scanner in Windows Vista Home Premium:\r
+\r
+ * Make sure you have Microsoft Windows Vista Service Pack 1 installed.\r
+ * Download and unpack the zipfile.\r
+ * Execute the "Mustek_600_CU_Vista_Install.exe" file, as administrator if necessary, which installs the drivers and GUI.\r
+ When asked to reboot, click 'cancel'\r
+ * Go to "Control Panel", "Device manager" and rightclick the "unknown device" under "other devices",\r
+ select "update driver", "Automatically Search for drivers", "Don't search online". When asked, select "Install Driver"\r
+ * Install the programme in which you want to scan (i.e. Paint Shop Pro)\r
+ * Reboot your machine.\r
+ * Go to "Control Panel", "Scanners and Cameras", select "600CU" and click "Properties", "Test Camera or Scanner"\r
+ * Start the programme in which you want to scan (i.e. Paint Shop Pro) and try to scan. It should work now\r
+\r
+It can be a bit tricky to get this to work. If it doesn't work at first, play a little with\r
+(un)installing the scanner and/or programme. Eventually it should work.\r
+I've tested it this way and it works fine on my pc.\r
+\r
--- /dev/null
+###Ideen für Apps
+Memory für Kinder mit Buchstaben
+-quasi lauter buttons mit bildern drauf, beim click anzeige von buchstabe und beim zweiten button dann auch anzeige vom buchstaben
+-wenn richtig sound und offen lassen, wenn falsch sound und wieder verdecken
+-große und kleine buchstben gemischt, also a==A
+-nächste stufe mit zahlen und vielleicht 1=="eins"
+-schöne grafiken, schöne musik, vielleicht von beatbox programm ...
--- /dev/null
+###einrichten des encfs
+encfs ~/Encoded ~/Decoded
+
+Should also work for KDE - edit /etc/pam.d/kdm instead of /etc/pam.d/gdm .
+
+Adapted from http://www.ubuntu-eee.com/wiki/index.php5?title=Transparent_Encryption_for_home_folder .
+
+Tested under Ubuntu EEE 8.04.1, Ubuntu 8.04.1
+
+Notes
+
+ *
+
+ This uses pass-through filesystem encryption with EncFS. You don't need an encrypted partition nor do you need to decide how large the encrypted portion should be. See http://www.arg0.net/encfsintro for a detailed explaination.
+ * I don't use ecryptfs because it can't encrypt filenames. This is unacceptable for me as the filenames contain private information.
+ * I use EncFS for a long time now and i didn't hit a single problem.
+ * I use pam-encfs and not pam-mount because pam-mount had problems i don't remember exactly with the FUSE EncFS mount
+ * You must have a second account (root or sudo) handy to log into a console and fix things up
+
+Required packages
+
+ 1. encfs
+ 2.
+
+ libpam-encfs (DO NOT INSTALL VIA APT (if you are on Hardy) - broken in the Hardy repos - see https://bugs.launchpad.net/ubuntu/+source/libpam-encfs/+bug/205783 )
+
+Install encfs from the Ubuntu repositories:
+
+sudo aptitude install encfs
+
+Install libpam-encfs from: http://ppa.launchpad.net/andrearatto/ubuntu/pool/main/libp/libpam-encfs/libpam-encfs_0.1.4.1-3~ppa1_i386.deb
+
+/etc/security/pam_encfs.conf
+
+The default pam_encfs.conf has a conflicting option that will cause your mounts to fail every time. Allow_other is specified in fuse_default, and allow_root is set in the automatic encfs mount per user. These two options cannot be specified together! It looks like EncFS Options and FUSE Options cannot be left empty, so i just use -v for EncFS (just verbose output) and allow_other for FUSE (you need either allow_other or allow_root for gdm to work). This is what it looks like for me, username jakob:
+
+drop_permissions
+encfs_default
+fuse_default
+
+#USERNAME SOURCE TARGET EncFS Options FUSE Options
+#jakob /home/jakob.encfs /home/jakob -v allow_other
+#
+#/etc/fuse.conf
+#
+#Uncomment or add the following line to /etc/fuse.conf so that the allow_other option in pam_encfs.conf can take effect.
+#
+#user_allow_other
+#
+#Make sure the user is in the group "fuse" as well, or else he won't be able to use FUSE mounts like EncFS.
+#
+#/etc/pam.d/gdm
+#
+#pam_encfs needs to be the first module because it doesn't take any "use_first_pass" options. Also, gdm creates a .Xauthority file in the home directory after pam_unix, EncFS needs to be mounted before this happens. Insert "auth requisite pam_encfs.so" just before "@include common-auth". For me this file looks like this:
+#
+##%PAM-1.0
+#auth requisite pam_nologin.so
+#auth required pam_env.so readenv=1
+#auth required pam_env.so readenv=1 envfile=/etc/default/locale
+#auth requisite pam_encfs.so
+#@include common-auth
+#auth optional pam_gnome_keyring.so
+#@include common-account
+#session required pam_limits.so
+#@include common-session
+#session optional pam_gnome_keyring.so auto_start
+#@include common-password
+#
+#/etc/pam.d/login
+#
+#(Optional) Edit /etc/pam.d/login like /etc/pam.d/gdm if you want the encrypted home to work even when logging in through the text mode console. WARNING: If you don't enable pam_encfs in /etc/pam.d/login you will be still able to login. You will then get an empty home directory. Bash will create a file .bash_history that will prevent subsequent mounts of EncFS, as the mountpoint is no more empty. You have to delete this file as root to fix this.
+#
+#Create encrypted folder
+#
+# * Log out and log in as a different user (sudo-enabled or root)
+# * Create necessary directories and set permissions (replace "jakob" with your username).
+#
+# sudo -s
+# mv /home/jakob /home/jakob.original
+# mkdir /home/jakob.encfs /home/jakob
+# chown jakob:jakob /home/jakob /home/jakob.encfs
+#
+# * Create encrypted folder
+#
+# sudo -u jakob encfs /home/jakob.encfs /home/jakob
+#
+# * Accept default options, or tinker with the encryption settings. I just used the default security rather than paranoid mode because paranoid mode doesn't support hard links apparently.
+# *
+#
+# The Password does not have to be the same as the login password
+# * Copy your home folder contents into the encrypted folder
+#
+# sudo -u jakob rsync -a --progress /home/jakob.original/ /home/jakob/
+#
+# * Reboot
+# * You will be asked first for your EncFS password and then for your login password
+#
+# Your home folder should now be encrypted. If it works, log in and delete your jakob.original folder.
+#
+# Known Issues
+#
+# * The home directory is not unmounted at logout. While it's possible (see /usr/share/doc/libpam-encfs/README.gz ), this caused a lot of trouble for me. Most of the time, unmounting won't work anyway because some gnome apps take long to terminate and have files open when the unmount should happen. Another thing i experienced is some gnome app creating a file (saved_state) after encfs is unmounted ( ! ). This file is created in the mountpoint. Then the mountpoint will be non-empty and subsequent logins will fail! You have to empty it again using a root shell to fix this.
+# *
+#
+# Upgrading to intrepid will break the setup: https://bugs.launchpad.net/ubuntu/+source/encfs/+bug/234818 .
+#
+# Workaround:
+#
+# 1. Log in to another (unencrypted) sudo/root account
+# 2. Copy your home directory's contents to another (not encrypted) folder
+# 3. Upgrade to Intrepid
+# 4. Create a new EncFS volume and copy your home dir contents into it - see instructions above
--- /dev/null
+###Browser in Hochformat nutzen
+Browser wie gehabt im Querformat starten, die Kombination Strg-Shift-O drücken, die Tastatur einschieben und das N900 ins Hochformat drehen
+###Repositories maemo
+http://wiki.n900.de/Repositories
+###umts internet über bluetooth nutzen
+#mac adresse vom telefon suchen (telefon muss sichtbar sein)
+hcitool scan
+hcitool info A8:7B:39:DC:52:90
+#channel number merken, brauchen wir
+sdptool search DUN
+#vi /etc/bluetooth/rfcomm.conf
+rfcomm0 {
+ bind yes;
+ device A8:7B:39:DC:52:90;
+ channel 1;
+ comment "Bluetooth PPP Connection";
+}
+#verbinden
+rfcomm bind 0 A8:7B:39:DC:52:90 1
+#vi /etc/ppp/peers/BluetoothDialup
+debug
+noauth
+connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
+usepeerdns
+/dev/rfcomm0 115200
+defaultroute
+crtscts
+lcp-echo-failure 0
+#vi /etc/chatscripts/BluetoothDialup
+debug
+noauth
+connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
+usepeerdns
+/dev/rfcomm0 115200
+defaultroute
+crtscts
+lcp-echo-failure 0
+root@laptop:~# cat /etc/chatscripts/BluetoothDialup
+TIMEOUT 35
+ECHO ON
+ABORT '\nBUSY\r'
+ABORT '\nERROR\r'
+ABORT '\nNO ANSWER\r'
+ABORT '\nNO CARRIER\r'
+ABORT '\nNO DIALTONE\r'
+ABORT '\nRINGING\r\n\r\nRINGING\r'
+'' \rAT
+OK 'AT+CGDCONT=2,"IP","internet"' #internet ist APN und 2 ist die verbindung am telefon
+OK ATD*99***2#
+CONNECT ""
+#verbindung starten
+pon BluetoothDialup
+#verbindung beenden
+poff BluetoothDialup
+###Schatte um die icons auf Desktop entfernen (DEFAULT ist akt. Theme)
+cd /usr/share/themes/DEFAULT/images
+rm ApplicationShortcutAppletPressed.png
+rm ApplicationShortcutApplet.png
+###Ovi Maps downloaden
+http://static.s2g.gate5.de/map5/maploaderzip-00.02.41.123/312.zip
+http://static.s2g.gate5.de/map5/maploaderzip-00.01.22.103/112.zip
--- /dev/null
+-------------------
+Aircrack besteht aus folgenden Programmen:
+
+Aircrack: zum Berechnen des WEP-Schlüssels und zum durchführen einer Wörterbuch-Attacke auf ein WPA-PSK Paket.
+
+Airodump: zum auffangen und speichern von Netzwerkverkehr im Monitor-Mode.
+
+Airdecap: zum entschlüsseln eines Dump-Files mit Hilfe des WEP / WPA Keys.
+
+WZCOOK: zum auslesen der im Wireless-Konfigurations-Tool von Windows gespeicherten WEP-Keys und des PMK bei WPA-Verschlüsselung.
+
+
+Hardwareanforderung:
+
+-eine unter Windows funktionierende WLAN Karte/USB-Stick mit passendem Chipsatz.
+
+Softwareanforderung:
+
+-passende WLAN Treiber, welche den Monitor Mode unter Windows unterstützen.
+
+
+Vorbereiten der WLAN Karte:
+
+Um den gesamten Netzwerkverkehr eines WLANs aufzeichnen zu können, müssen wir passende Treiber installieren, welche die Karte so einstellen, dass alle Netzwerkpakete, die durch die Luft fliegen, empfangen und aufgezeichnet werden können, ohne im Netz angemeldet zu sein. Dies nennt sich Monitor Mode.
+
+Passende Treiber gibt es für Karten mit:
+-Atheros Chipsatzen: AR5000, AR5001, AR5002, AR5004, AR5004, -AR5005, AR5006 (kein USB)
+-HermesI Chipsatz
+-PrismGT Chipsatz
+-Aironet Chipsatz
+-RTL8180 Chipsatz
+-dem altem Broadcom Chipsatz
+
+Karten mit Prism 2/2.5 Chipsatz oder gar Centrino Chips werden nicht unterstützt!
+
+Bevor wir die Austauschtreiber installieren, müssen erst die originalen Treiber installiert werden. Funktioniert die Karte damit problemlos, dann können wir die anderen installieren. Das lässt sich nicht durch ein normales Treiberupdate bewerkstelligen. Wir müssen Windows die Treiber aufzwingen. Dazu wählen wir unsere WLAN Karte im Geräte-Manager aus und klicken auf Treiber aktualisieren. Wir lassen Windows aber nicht automatisch installieren, sondern wählen unseren Treiber selbst aus und ignorieren dabei die Warnmeldungen. Nun kontrollieren wir, ob der neue Treiber angenommen wurde. Die WLAN Karte funktioniert nun immer noch wie gewohnt. Eventuell aktive WLAN Konfigurationstools des Kartenherstellers sollten deaktiviert werden und das hauseigene Windows Tool zur Konfiguration aktiviert werden.
+
+
+Installation von Aircrack:
+
+Die Programmsammlung von Aircrack muss nicht installiert werden. Nach dem Download wir sie lediglich entpackt. Je nach Downloadquelle muss man sich eventuell noch die Dateien: PEEK.dll, cygwin1.dll und MSVCR70.DLL aus dem Netz laden und in den Aircrack Ordner kopieren.
+
+
+Benutzung von Airodump:
+
+Als erstes müssen wir Airodump durch Doppelklick starten und unsere WLAN Karte durch Eingabe einer Zahl auswählen. Dann den Treiber durch Eingabe eines Buchstabens. Als nächstes werden wir nach dem Kanal befragt, auf dem unser Netzwerk sendet (z.B. 11). Danach müssen wir einen Dateinamen angeben, unter dem wir unser entstehendes File abspeichern möchten (z.B. meinAP). Nun werden wir gefragt ob wir nur die IV’s speichern wollen. Da die IV’s das einzige sind was wir zum cracken eines WEP-Keys brauchen, können wir das mit y bestätigen. Das hält unser File kleiner und das spätere berechnen des Keys geht schneller. Jetzt startet das Programm mit der Aufzeichnung der Netzwerkpakete und zeigt uns dieses auf dem Bildschirm an.
+Das File wird nun in unserem Fall in den Aircrack Ordner geschrieben und nennt sich meinAp.ivs. Wollen wir hingegen ein WPA-PSK verschlüsseltes WLAN angreifen, so müssen wir die Frage immer mit n beantworten, da es in diesen Netzen keine IV’s gibt!
+Wenn wir die Frage, ob nur die IV’s gespeichert werden sollen mit n beantworten, dann nennt sich das File meinAP.cap. Zusätzlich entsteht noch eine .txt Datei mit den Netwerkdaten, welche auch in Airodump angezeigt werden.
+
+Benutzung von Aircrack:
+
+Bei WEP Verschlüsselung:
+Zur Berechnung eines WEP-Keys brauchen wir eine gewisse Menge an aufgezeichneten Datenpaketen, welche jeweils ein IV enthalten. Je nach Verschlüsselungsstärke brauchen wir für einen 64bit Key ca. 250.000 und für einen 124bit Key ca. 500.000 dieser Pakete. Diese Zahlen sind allerdings nur Anhaltspunkte. Mal sind es weniger und mal deutlich mehr. Aber spätestens nach 16.000.000 IV’s ist der Schlüssel geknackt, wenn er nicht zwischenzeitlich geändert wurde.
+Um ein mit airodump aufgezeichnetes File an Aircrack zu übergeben, müssen wir lediglich in den Aircrack Ordner wechseln und das File mit der Maustaste festhalten und auf die aircrack.exe ziehen. Nun öffnet sich ein Eingabefenster und Aircrack beginnt in diesem mit der Berechnung des Keys. Wenn wir Aircrack mit Zusatzparametern starte wollen, dann müssen wir Aircrack selber im Eingabefenster starten. Dazu klicken wir auf Start > Ausführen und geben cmd ein. Nun wechseln wir im Eingabefenster in den Aircrack Ordner. Wenn er sich auf dem Desktop befindet und Aircrack heißt, dann geben wir cd Desktop/Aircrack ein und bestätigen mit Enter. Jetzt kommt unser Aircrackbefehl. z.B.:
+aircrack.exe –n 124 –f 3 meinAP.ivs
+um einen 124bit Key zu knacken und den fudge-faktor auf 3 zu setzen. Eine Liste alle möglichen Optionen befindet sich in der Aircrack-Doku.
+Wir können Aircrack ruhig schon recht früh starten, auch wenn Airodump noch fleißig Pakete sammelt, da Aircrack über eine Funktion verfügt, welche auch neu dazugekommene IV’s berücksichtigt und mit zur Berechnung verwendet.
+Des Weiteren können wir auch mehrere Files gleichzeitig an Aircrack übergeben. Das ist sinnvoll, wenn wir Airodump beenden und am nächsten Tag weiter IV’s sammeln. Dann heißt unser Befehl z.B.:
+aircrack.exe meinAP.ivs meinAP2.ivs meinAP3.ivs …
+Sobald Aircrack den richtigen Schlüssel gefunden hat, hört es auf zu rechnen und zeigt ihn uns unten im Eingabefenster an.
+
+Bei WPA-PSK Verschlüsselung:
+Ein WPA Netzwerk lässt sich nicht durch das Sammeln von Datenpaketen errechnen, egal wie viele Pakete auch vorhanden sind. Ein Cracken ist nur mithilfe einer Wörtebuch-Attacke oder durch Bruteforce möglich. Aircrack verwendet zum Angriff die Wörterbuch-Attacke. Hier zu bedient es sich einer Textdatei. In diesen Textdateien befindet sich in jeder Zeile ein Wort, eine Zahlenkombination, ein Name …
+Zum Testen stellen wir an unserm AP ein leichtes WPA-PSK Passwort ein.
+Der Angriff lässt sich ausschließlich auf einen aufgefangenen 4-Way-Handshake durchführen. Ein Handshake kommt ausschließlich zustande, wenn sich eine WLAN Karte am AP anmeldet! Diesen schneiden wir mit Airodump mit, und auf diesen lassen wir unser Wörterbuch los. Airodump informiert uns nicht wenn ein Handshake aufgefangen wurde, wir können es nur hin und wieder kontrolieren.
+Zuerst brauchen wir eine Wörterbuchdatei. Die können wir uns zu Testzwecken entweder selber machen oder uns aus dem Internet laden. Wichtig ist das sich das WPA Passwort in dieser Datei befindet, sonst kann es auch nicht gefunden werden. Aircrack akzeptiert Wörterbuchdateien im txt oder lst Format. Haben wir so eine Datei, kopieren wir diese in unseren Aircrack Ordner. Nun starten wir ein Eingabefenster und wechseln in diesem in unseren Aircrack Ordner. Jetzt starten wir unseren Befehl:
+aircrack.exe –a 2 –w wörterbuch.txt meinAP.cap
+Für wörterbuch.txt setzen wir natürlich den Namen unser Wörterbuchdatei ein und für meinAP.cap den unseres mit Airodump erstelltem File.
+Ist in unserem File ein Handshake gespeichert wird uns dieses angezeigt und Aircack beginnt die einzelnen Wörter unserer Textdatei auf den Handshake anzusetzen. Sobald es eine Übereinstimmung gefunden wurde stoppt Aircrack und zeigt das Passwort an.
+Komplizierte Passwörter sind vor dieser Art von Attacke relativ sicher, da es unwahrscheinlich ist das jemand das Wort: ajdtGjhFdFDFsj23437HHFDvahjfüöqÄ in seiner Wörterbuchdatei hat.
+
+Zusätzlich gibt es auch WinAircrack mit einer grafischen Oberfläche und deutschem Language-Pack.
+
+Beschleunigung des Crack-Vorgangs:
+
+Bei WEP Verschlüsselung:
+Versprecht euch von Aircrack für Windows nicht zuviel!!!
+Da das Sammeln der Datenpakete in einem Netzwerk abhängig von der Netzwerkauslastung ist, kann es sehr lange dauern, bis wir genügend IV’s gesammelt haben. Durch bloßes Surfen im Internet von einem im WLAN angemeldetem PC’s aus kommen in einer akzeptablen Zeit nicht genügend Datenpakete durch die Luft. Deshalb müssen wir in unserem Test das ganze beschleunigen. Das können wir entweder durch verschieben von größeren Datenmengen zwischen zwei angemeldeten PC’s erreichen oder wenn wir nur einen angemeldeten PC im WLAN-Netz haben, durch anpingen der Access Points mit Hilfe eines Pingflooders, welcher auf dem angemeldetem Rechner installiert ist und kontinuierlich Pings an die eingestellte IP-Adresse der AP’s sendet. Diese Programme sind aber mit Vorsicht zu benutzen, da zu viele Pings in zu kurzer Zeit einen PC, Server oder auch AP zu Absturz bringen können.
+
+Ist kein PC am AP angemeldet kommen auch keine IV’s zustande und ein Cracken unter Windows ist nicht möglich!
+
+Bei WPA-PSK Verschlüsselung:
+Einfach einen PC mit richtigem Key am AP anmelden oder einen angemeldeten kurz ab und dann wieder anmelden, um einen Handshake zu erzeugen. Keine Anmeldung, kein Handshake.
+
+
+Benutzung von Airdecap:
+
+Airdecap wird benutzt um ein mitgeschnittenes cap-File, mit Hilfe des richtigen Verschlüsselungs-Key zu entschlüsseln und nur Datenpakete eines bestimmten WLAN’s zu filtern, um es mit einem Netzwerkanalyse-Programm, wie z.B. Ethereal, zu analysieren. Es wird mit Doppelklick gestartet und man befolgt danach einfach den Bildschirmaufforderungen. Danach erhält man ein neues, unverschlüsseltes cap-File.
+
+
+Benutzung von WZCOOK:
+
+Dieses Programm läuft nicht auf jedem System. Es wird benutzt um in Windows gespeicherte Netzwerkschlüssel in Klartext anzuzeigen. Es zeigt gespeicherte Netzwerknamen, WEP-Keys sowie die Pairwise Master Keys (PMK) von WPA-Netzen.
+Nach dem Starten des Programms werden alle im System gespeicherten Netzwerke + Keys angezeigt und zusätzlich wird eine Datei namens wepkeys.txt auf die Festplatte geschrieben.
+
+
+Links:
+
+1. aircrack Dokus:
+http://www.wirelessdefence.org/Conte...kORIGINAL.html
+http://repat.re.ohost.de/aircrack.html
+
+2. Hilfe zum Verständnis von aircrack und zur rechtlichen Lage:
+http://wardriving-forum.de/viewtopic.php?t=9879
+
+3. aircrack Programmsammlung für Windows:
+http://www.subagora.com/subagora/Win...rcrackPack.zip
+
+4. Treiber:
+http://www.wildpackets.com/support/downloads/drivers
+http://500brabus.byethost22.com/driver1.htm
+
+6. Wörterbuchdatei zum Testen:
+http://ftp.se.kde.org/pub/security/t...rdlists/all.gz
--- /dev/null
+###Nexus 4 sideload
+#Nexus in Recovery Menü (POWER+VOLUME-DOWN)
+#jetzt zu Recover Mode gehen und ausführen
+#jetzt in sideload wechseln (POWER+VOLUME-UP)
+###
+ starte das Handy ins Recovery
+ verbinde das Handy mit dem PC (die USB Treiber müssen installiert sein)
+ öffne ein Kommandozeilenfenster und navigiere in den Ordner, in dem du die adb.exe installiert hast
+ notiere dir dem Mount-Zustand und die Rechte des Ordners /system
+ mounte das /system read-write über adb (adb shell-Kommando) und setze die Rechte auf 777
+ führe folgenden Befehl aus:
+
+adb pull /system/build.prop build.prop
+
+ öffne die Datei build.prop, die sich nun im Ordner der adb befindet mit einem beliebigen Textprogramm (z.B. notepad++)
+ füge an das Ende der Datei folgende Zeile ein:
+
+persist.service.adb.enable=1
+
+ speichere die Datei und schließe den Texteditor
+ führe folgenden Befehl aus:
+
+adb push build.prop /system/build.prop
+
+ setze den Mount-Zustand und die Rechte des Ordners /system auf den alten Stand zurück.
+ starte das Handy neu
+ Um Datenverlust auszuschließen sollte der Befehl sync die Eingaben abschließen.
+ nun sollte USB-Debugging dauerhaft aktiviert sein und du kannst jederzeit mit der ADB arbeiten.
+
--- /dev/null
+#web: http://www.app-entwickler-verzeichnis.de/apps-programmierung/24-android/297-android-programmierung-tutorial-der-grosse-android-newbie-guide
+#
+adb kill-server
+adb start-server
+
--- /dev/null
+###freeware zum maleware entfernen unter windows
+malewarebytes Anti-Maleware
--- /dev/null
+###server certifikat erzeugen
+pushd /etc/apache2/
+mkdir -p ssl.crt ssl.key
+umask 77
+/usr/bin/openssl genrsa 1024 > ssl.key/evk-archiv.key
+/usr/bin/openssl req -new -key ssl.key/evk-archiv.key -x509 -days 3650 -out ssl.crt/evk-archiv.crt
+Country Name (2 letter code) [AU]:DE
+State or Province Name (full name) [Some-State]:Sachsen
+Locality Name (eg, city) []:Chemnitz
+Organization Name (eg, company) [Internet Widgits Pty Ltd]:TBZ-Pariv GmbH
+Organizational Unit Name (eg, section) []:MODARCH
+Common Name (eg, YOUR name) []:evk-archiv
+Email Address []:modarch@tbz-pariv.de
+umask 0022
+make -C ssl.crt
+
+in /etc/sysconfig/apache2
+APACHE_SERVERADMIN="modarch@tbz-pariv.de"
+APACHE_CONF_INCLUDE_FILES="${FIRMA}-archiv.conf"
+###
--- /dev/null
+###baut den cache neu um Pakete zu installieren, wenn man eine source hinzugefügt hat
+apt-get update
+###installieren von paketen (vi)
+apt-get install vi
+###reinstallieren von paketen
+apt-get --reinstall install paket
+###komplettes löschen von Paketen (network-manager)
+apt-get remove --purge network-manager
+###nach Programmen suchen
+apt-cache search compiz
+###nach Programmen suchen
+aptitude search compiz
+###Paketschlüssel per wget holen und importieren
+wget -q http://apt.wicd.net/wicd.gpg -O- | sudo apt-key add -
+###installieren von mplayer mittels aptitude
+aptitude install mplayer
+###remove mplayer mittels aptitude
+aptitude remove mplayer
+###remove von mplayer + aller zusätzlich installieren abhängigen packete
+apt-get autoremove mplayer
+###Thunderbird repo
+#eintragen
+deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu jaunty main
+deb-src http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu jaunty main
+apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 247510BE
+###hold packages
+apt-mark hold package_name
+aptitude hold package_name
+echo "package hold" | sudo dpkg --set-selections
+###unhold packages
+apt-mark unhold package_name
+aptitude unhold package_name
+echo "package install" | sudo dpkg --set-selections
+###
+###
--- /dev/null
+###fake Arduino Masseproblem (http://forum.fhem.de/index.php?action=dlattach;topic=24651.0;attach=21345;image)
+pin 25 und pin 26 des ftdi müssen verbunden sein
--- /dev/null
+###Webseiten zu Colormanagement, Spyder, Farbräumen und Software
+http://www.dslr-forum.de/showthread.php?p=2937674#post2937674
+http://www.iccview.de/content/blogcategory/2/11/lang,de/
+http://nubi.bplaced.net/argyllcms_spyder2/
+http://www.homecinema-fr.com/colorimetre/index_en.php
+http://www.simpelfilter.de/farbmanagement/graupunkt.html
+http://colormanagement.org/de/testimages.html
+
+###auslesen der aktuellen Werte eines Displays/CRT's
+dispcal -yl -r
+dispcal -yc -r
+###Calibration das Helligkeit und Weißpunkt lässt
+dispcal -v TargetA
+###matrix/shaper profil erzeugen
+colprof -v -D"Display A" -qm -as DisplayA
+###lut profil
+colprof -v -D"Display A" -qm -S swop.icm -cpp -dmt DisplayA
+
+
+
+###komplette Anleitung
+##Schritt 1: dispcal
+
+Dieses Programm liefert die Basis für die Kalibrierung. Hier werden die Darstellung der Grautöne iteriert und eine Grundprüfung des Displays vorgenommen. Erzeugt wird eine cal-Datei. Der Zeitaufwand hängt von der gewünschten Genauigkeit ab.
+Das Programm wird erst mit euch einige Schritte durchgehen, um den Monitor schonmal hardwareseitig so nah wie möglich an die Zielkalibrierung zu bringen. Es wird euch nach mehreren Einstellungen fragen. Für LCDs kann man nach dem Aufruf den Punkt 1 für den Blackpoint überspringen. Wichtig sind die Einstellungen für die Weißpunkt unter 2 und die Helligkeit unter 3.
+Wenn ihr könnt, dann nutzt auch die Möglichkeiten eures Monitors aus! Umso weniger muss später softwareseitig an den Kurven herumgebogen werden! Zu beachten ist: manchmal ist das Programm dispcal etwas bugbefallen. Wenn man nämlich (jedenfalls bei mir) die Option für den Weißpunkt aufruft und damit fertig ist, so wird der Sensor anschließend nicht mehr richtig initialisiert und es wird immer nur 0 ausgelesen. Einfach das Programm neustarten und die nächste Option wählen behebt das Problem!
+Ich persönlich benutze das Programm mit folgenden Parametern:
+
+dispcal -g l -b 140 -w 0.3127,0.3290 -y l -v -q m eizo
+
+Der Schalter -g gibt an, welche Gammakurve gewünscht ist. Hier kann man einen Zahlenwert wie etwa 2.2 angeben. Ich benutze L* (-g l), was wohl ein neuer Standard für eine Helligkeitsverteilung ist, die der der Wahrnehmung des menschlichen Auges sehr nahe kommt.
+Dann folgt -b 140. Das sagt, das meine Zielhelligkeit 140cd/m² entsprechen soll. Hier wohl eine Frage des Geschmacks, wie hell man es gerne hätte.
+Die nächste Angabe (-w 0.3127,0.3290) steht für den gewünschten Weißpunkt. Dies sind chromatische Koordinaten, in diesem Fall stehen sie für D65, was etwa 6504K entspricht. Wer lieber Farbtemperaturen nach Planck angibt, kann stattdessen auch -t 6500 für 6500K benutzen (oder jeder andere Wert).
+Mein Spyder2 braucht dann die Angabe -y l um zu wissen, dass es sich bei dem Gerät um einen LCD-Monitor handelt. Der Switch -v steht für Verbose. Das würde ich generell empfehlen, damit man auch sieht, was das Programm gerade macht. Sonst sitzt man relativ lange vor der Kommandozeile und weiß nix über den Fortschritt.
+Es folgt -q h. Das ist der Qualitätsregler, wobei l, m und h für low, medium bzw. high stehen. Damit legt man also die Genauigkeit der Grauiteration fest. Der zeitliche Aufwand unterscheidet sich stark, man kann pro Schritt von einer Verdopplung bis Verdreifachung ausgehen. Ich würde die Qualitätsstufe m empfehlen, das dauert dann so 15-20 mins. Wers schneller mag, nutzt l. Die hohe Stufe ist eigentlich wenig sinnvoll, da die zu erwartenden Genauigkeitssteigerung wohl außerhalb der Wahrnehmung liegt. Ich konnte keinen Unterschied im Ergebnis feststellen, wohl aber, das etwa eine Stunde für diesen Schritt draufging.
+Danach folgt der Name für die zu erzeugende Datei, ich hab sie so genannt wie meinen Monitor. Man will ja die Übersicht behalten.
+##Schritt 2: targen
+
+Dieses Programm wertet die cal-Datei aus und erstellt eine für die Kalibrierung nötige Datei im ti1-Format. Dort stehen Farbinformationen für die Flächen drin, die anschließend durch das Colorimeter ausgelesen werden sollen. Das Programm erfüllt eigentlich nur diesen Zweck, kommt aber aufgrund der vielfältigen Anwendungsmöglichkeiten natürlich nicht um Parameter herum. Ich benutze meist folgende Einstellungen:
+
+targen -d 3 -v -f 500 eizo
+
+Der Switch -d 3 gibt an, dass es Flächen im RGB-Format erstellen soll. Denn theoretisch kann das Programm z.b. auch für die Kalibrierung von Druckern benutzt werden, wo CYMK gefragt ist.
+Verbose wird auch wieder angeschaltet, um zu wissen, was passiert. Der Parameter -f 500 gibt an, wieviele Patches erstellt werden sollen. Je mehr Farbpatches, umso genauer wird dann das Profil. Für einen gewöhnlichen CRT oder LCD reichen hier sicher wenige hundert, meine Empfehlung liegt so zwischen 400-600. Aber damit darf natürlich experimentiert werden.
+Am Ende steht der Name der zu verwendenden cal-Datei, was dann auch der ausgegebenen ti1-Datei entspricht. Das ganze dauert dann je nach Anzahl der gewünschten Farben so 2-10 Sekunden, also nicht der Rede wert.
+##Schritt 3: dispread
+
+Das ist der vorletzte Schritt, der wieder etwas zeitaufwändiger ist. Dispread greift sich die cal- und ti1-Datei und fängt an, die Farbflächen auszulesen.
+Der Aufruf benötigt entwas weniger Optionen und sieht bei mir so aus:
+
+dispread -v -y l -k eizo.cal eizo
+
+Verbose und -y l sollte klar sein. Der Parameter -k eizo.cal gibt an, welche Kalibrierungsdatei vor der Messung angewandt werden soll. Diese Angabe ist Pflicht, da sonst der nicht vorkalibrierte Monitor für die Messung benutzt wird. Das wäre pure Zeitverschwendung. Am Ende steht noch der Dateiname der eingelesenen ti1-Datei und steht gleichzeitig für die ausgegebene ti3-Datei, die die Ergebnisse enthält.
+Bei mir mit dem Spyder2 dauert das Auslesen eines Farbwertes so 1-2 Sekunden. Ihr könnt euch ausmalen, wie lange der Vorgang also in Abhängigkeit zu der Anzahl der Farbpatches, die mit targen ausgesucht wurde, dauert. Eine Viertelstunde bei 500 Patches dauert es schon.
+##Schritt 4: colprof ehemals profile
+
+Eigentlich sind alle erforderlichen Schritte jetzt vollbracht. Nur: es gibt noch keine ICM/ICC-Datei. Die muss nämlich extra erzeugt werden, auch hier gibt es nämlich Unterschiede.
+
+colprof -v -A "Eizo" -M "S2431W" -D "20080313" -C "Steffen" -qh -a l eizo
+
+So wie oben sieht es bei mir aus. In der Reihenfolge wie oben steht dort: Verbose an, Hersteller "Eizo", Modell "S2431W", Datum "20080313" und Copyright "Steffen". Hier könnt ihr eintragen, was für euch sinnig scheint. Auf das eigentliche Profil hat es keine Auswirkung. Anders ist es mit den nächsten Beiden. Das q sollt euch bekannt vorkommen, auch hier steht es wieder für Quality. Die Auswahlmöglichkeiten sind die selben, bis auf die Tatsache, dass u für "Ultra" hinzugekommen ist. Der Author des Programms empfiehlt diese Einstellung aber nicht.
+High ist hier eigentlich ganz okay, auch Medium sollte gute Ergebnisse liefern.
+Dahinter steht -a l für die Angabe der Profilart. Hier hat man für PC-Monitore im Wesentlichen zwei Möglichkeiten. Das l steht hier für CLUT und ist die genauere Variante. Sonst kann man noch s für die etwas ungenauere Variante einer Matrix benutzen. Betrachtet man das Ergebnis für beide Möglichkeiten, so fällt einem vielleicht am meisten die unterschiedliche Dateigröße auf. Ein Matrix-Profil fasst bei mir so 4KB, ein LUT-Profil kann schonmal 500KB verschlingen. Die Unterschiede in der Darstellung sind für mich nicht erkenntbar, schaut man sich hingegen die möglichen Farbwerte im Vergleich zu sRGB an, so unterscheiden sich die Ergebnisse schon. Man sieht schön, dass das rechte Profil genauere Kurven hat und auch einen etwas weiteren Farbraum erasst. Ich sehe also keinen Grund, nicht ein CLUT-Profil zu erstellen.
+
+Damit ist jetzt aber der Arbeitsakt vollzogen und ein ICM/ICC-Profil erstellt. Und es wird euch qualitativ sicher zufriedenstellen. Bei mir waren die Ergebnisse jedenfalls besser, als ich es mit basICColor oder Colorvision hinbekommen habe.
+Wie läd man nun das Profil auf die Grafikkarte? Auch hierfür liefert das Paket eine Antwort. Das Tool dispwin erledigt dies. Im einfachsten Fall schreibt man einfach dispwin profilname.icm in die Kommandozeile und das Profil ist geladen. Man muss es aber trotzdem unter den Eigenschaften der Anzeige selber als Farbprofil für den Monitor hinzufügen, dies geschieht nicht automatisch.
+Mit dispwin -c läd man dann übrigens wieder eine linease Kurve auf die Karte und bekommt somit den unkalibrierten Zustand zu Gesicht.
+Wahlweise kann man aber natürlich auch so eine Software wie xcalib benutzen (auch kostenlos), auch wenn es hierfür eigentlich keinen Grund gibt.
+###Randbemerkungen
+
+Jedes dieser Tools bietet eine Fülle von Optionen. Wenn man man wissen will, was sonst noch alles geht, einfach toolname -? in die Konsole eingeben.
+Ein Tipp von mir noch: fügt die Tools eurer Umgebungsvariable %path% hinzu, damit ihr nicht immer in den Programmordner navigieren müsst. Ich habe mir einen eigenen Ordner für die Profile erstellt, damit das ganze übersichtlicher bleibt. Die Dateien werden nämlich immer in dem Pfad erzeugt, in der auch gerade die Commandline ist. Generell ist das Tool natürlich auch für mehrere Monitore geeignet. Die meisten Tools, für die das relevant ist, lassen sich mit dem Parameter -d # auf einen Monitor festlegen, wobei die Raute hier für die Displaynummer steht.
+###Schnellmethode, alles in einem Schritt
+Mit der neuen Version von ArgyllCMS kam eine weitere Methode hinzu, schnell ein Profil mit nur einer einzigen Kommandozeile zu erzeugen. Es wird dann lediglich das Tool dispcal aufgerufen:
+
+dispcal -v -qm -yl -t6500 -g2.2 -p.5,.5,2 -K -o profilname.icm -O"Profilbeschreibung" 20090311
+
+Die Kommandozeile enthält die gleichen Befehle wie oben, nur das noch die Schalter -o profilname.icm und -O"Profilbeschreibung" angefügt wurden. Dadurch wird direkt nach der Kalibrierung gleich noch eine vorgegebene Testreihe an Farbfeldern vermessen und ein Shaper/Matrix-Profil mit dem Dateinamen profilname.icm und der Beschreibung "Profilbeschreibung" erzeugt – ganz ohne, dass man die anderen Tools aufrufen müsste.
+
+Diese Profile sind auch sehr gut geeignet und können bedenkenlos benutzt werden. Allerdings werden einem hier natürlich viele Möglichkeiten aus der Hand genommen. Es ist gewissermaßen mit dem Vorgehen von kommerziellen Produkten gleichzusetzen. Man kann die Ziele der Kalibrierung vorgeben, der Rest wird über ein Standardverfahren vom Programm erledigt.
+
+Wer allerdings nur mal schnell schauen möchte, ob Argyll die Ergebnisse liefert, die man sich wünscht, dem ist damit sicher gut geholfen. Später kann man sich ja immernoch ein Profil nach eigenen Vorstellungen erzeugen.
+dispcal -v -qm -yl -t6500 -g2.2 -p.5,.5,2 -K -o profilname.icm -O"Profilbeschreibung" 20090311
+
+###
+Schritt 1: die Kalibrierung
+
+Eigentlich ist dieser Schritt für die Erzeugung eines Monitorprofils gar nicht notwendig. Ähnlich wie bei der Software von beispielsweise basICColor kann man auch mit Argyll das Display nur Profilieren. Trotzdem ist eine zusätzliche Kalibrierung sicher nie verkehrt, wenn man einige Details beachtet: der Monitor sollte schon vor der Kalibrierung so nah wie möglich an das gewünschte Ziel gebracht werden. Dazu bedient man sich der Einstellungsmöglichkeiten im OSD des Monitors. ArgyllCMS liefert hier eine gute Unterstützung bei der Anpassung des Displays an die Zielwerte. Die erste Kommandozeile, mit der das alles erledigt wird, lautet wie folgt:
+
+dispcal -v -qm -yl -t6500 -g2.2 -p.5,.5,2 -K 20090311
+
+In der Reihenfolge der Argumente bedeutet dies: Berichterstattung ist aktiviert, die gewünschte Qualität des Profils ist Medium (das bedeutet, die erlaubte Abweichung zum Ziel beträgt maximal 0.8 dE), es handelt sich um einen LCD-Monitor (CRT wäre -yc), der gewünschte Weißpunkt beträgt 6500K, das Zielgamma beträgt 2.2 (-gs für sRGB, -gl für L-Star) und das Messfenster soll in der Mitte des Bildschirms bei doppelter Messfenstergröße positioniert werden. Der Parameter -K löst vor den Messungen die Kalibrierung des Messgerätes selbst aus, wie auch aus anderen Programmen bekannt. Die Bezeichnung dahinter ist der gewünschte Dateiname der produzierten Ergebnisdatei, bei mir wie unschwer zu erkennen immer das aktuelle Datum. Die Dateiendung .cal wird automatisch angehängt.
+
+Dies sind alles Parameter, die nach eigenen Vorstellungen angepasst werden können und teilweise auch gar nicht benötigt werden. Ich habe beispielsweise den Wert -b weggelassen, mit dem man eine Ziel-Helligkeit in cd/m^2 angeben könnte. Diesen Wert stelle ich aber bei der angeleiteten Monitorjustierung selber ein und er soll nicht über die Kalibrierung erzwungen werden. Denn es kommt mir hier nicht wirklich darauf an, ob nun 119 oder 121 cd/m^2 erreicht werden – viel lieber ist mir, das so wenig wie möglich durch die Grafikkarte an der Ausgabe herumgebogen werden muss.
+
+Führt man diese Befehlszeile aus, dann erscheint nach der Kalibrierung des Messgerätes zunächst die Aufforderung zur Monitorjustierung. Über die dritte Option erhält man eine Angabe zur aktuellen Helligkeit und des aktuellen Weißpunktes und kann nun über das OSD des Monitors die gewünschten Zielwerte so nah wie möglich einstellen. Danach kann man über den vorletzten Menüpunkt zur eigenlichen Kalibrierung fortfahren.
+
+Das Ganze rödelt jetzt – je nach gewählter Qualität – für einige Zeit vor sich hin. Ist der Prozess durchgelaufen, kann mit dem nächsten Schritt fortgefahren werden:
+
+
+
+Schritt 2: Generieren der Testfelder
+
+ArgyllCMS liefert ein umfangreiches Tool zum Erstellen der so genannten "Test-Patches" zur Verfügung. Theoretisch kann man alle möglichen Geräte vom Beamer über den Monitor bis zum Drucker profilieren. Speziell für Monitore bietet sich folgende Befehlszeile an:
+
+targen -v3 -d3 -e10 -g64 -f400 20090311
+
+Wieder wird die Berichterstattung aktiviert; der gewählte Farbmodus wird auf RGB gesetzt, es werden 10 reinweiße Patches zur Bestimmung des Weißpunktes erstellt, 64 Testfelder entlang der neutralen Achse und schließlich 400 sinnvoll verteilte Farbfelder über den gesamten RGB-Farbraum. Die letzte Bezeichnung steht wieder für den ausgegebenen Dateinamen (die Dateiendung .ti1 wird automatisch angefügt).
+
+Die Anzahl der Patches kann hier nach belieben und eigener zugewilligter Zeit verändert werden. Wesentlich mehr als 400 Patches machen das Profil zwar noch etwas genauer, allerdings kann man auch mit weniger ansehnliche Ergebnisse bekommen. Viele kommerzielle Produkte lesen hier eher so um die 40 Patches aus – ist also sicherlich eine Frage der geforderten Genauigkeit und des eigenen Anspruches.
+
+Da das Programm eigentlich nur ein wenig "herumrechnet" und selber nichts misst, sondern nur eine Datei mit Messfeldern erstellt, ist das Ganze nach wenigen Sekunden durch und wir können mit dem nächsten Utility weitermachen.
+
+
+Schritt 3: Profilieren des Bildschirms
+
+Nachdem wir eine Kalibrierungsdatei und eine Datei mit den Testpatches erzeugt haben, können wir also mit der Profilierung beginnen. Ich benutze folgende Kommandozeile:
+
+dispread -v -yl -k 20090311.cal -p.5,.5,2 -K 20090311
+
+Die Berichterstattung ist aktiviert, der Displaytyp auf LCD gesetzt, unsere zuvor erstellte Kalibrierung wird in die Grafikkarte geladen. Danach erfolgt wieder die Positionierung des Messfensters wie vorhin, es wird eine Kalibrierung des Messgerätes gefordert und als Letztes wird angegeben, wie die Datei mit den Testpatches heißt. Genau so wird auch die erzeugte Datei mit den Ergebnissen heißen, die Dateiendung .ti3 wird automatisch angehängt.
+
+Je nach Anzahl der Testpatches kann dies nun eine ganze Weile dauern. Ist dieser Schritt durchlaufen, sind alle erforderlichen Messwerte erfasst worden und es kann ein Profil erstellt werden.
+
+
+Schritt 4: Erstellung der ICC-Datei
+
+Für alle technisch Interessierten: Argyll erstellt momentan immer ICC-Profile nach dem v2-Standard. basICColor kann auch schon Profile nach dem neuen Standard v4 erzeugen, für den Endnutzer hat dies aber momentan noch keine wesentlichen Auswirkungen oder Vorteile, außer dass man sich als Nachteil Inkompatibilitätsprobleme mit einigen Programmen einhandelt. Es spricht also nichts gegen diese "Einschränkung" – bisher jedenfalls.
+
+Nachdem wir alle Dateien zusammen haben, kann mit Argyll das Profil erzeugt werden. Hier kommt auch schon eine Änderung zur alten Anleitung: das Tool wurde von profile zu colprof umbenannt.
+
+colprof -v -A"Eizo" -M"S2431W" -D"20090311, 6500K, Gamma 2.2, Matrix" -C"Steffen Sachse, 2009" -qh -as 20090311
+
+Ein letztes Mal wird die Berichterstattung aktiviert, danach folgen Hersteller, Modell und Beschreibung für das Profil. Schließlich noch das "Copyright", oder auch die Makernote genannt. Innerhalb der Anführungsstriche kann man hier sinnvolle Angaben machen, damit man sein Profil später beispielsweise in Photoshop leichter wiederfindet. Dort wird die Beschreibung angezeigt, wenn sie denn vorhanden ist. Schließlich wird noch die Qualität auf Hoch gesetzt und als Profiltyp Shaper/Matrix festgelegt. Dieser Profiltyp ist mitlerweile auch meine emfpohlene Variante, da er maximale Kompatibilität garantiert und trotzdem sehr genau ist. Am Ende steht dann – wie immer – er Name der Eingabe- und der Ausgangsdatei. Die Dateiendung .icc wird automatisch angehängt.
+
+
+Bemerkungen
+
+Alle Dateien findet man in dem Verzeichnis wieder, aus der die Kommandozeile ausgeführt wird. Hat man also, wie im Eröffnungspost beschrieben, die %PATH%-Variable von Windows um den Pfad zu den Tools von Argyll ergänzt, dann bietet es sich an, vor der Ausführung irgendeines Kommandos in einen sinnvollen Dateipfad zu navigieren. Sonst findet man aber natürlich trotzdem all seine Dateien wieder, vermutlich im Ordner /Dokumente und Einstellungen/Benutzername. Je nach Windows-Version heißt dieser ein wenig anders.
+
+Setzt man nicht die %PATH%-Variable, so muss man zum Ausführen der Dateien zwangsweise in den Pfad von ArgyllCMS navigieren und dort ins /bin/-Verzeichnis wechseln. Folgerichtig werden dann auch alle Dateien dort erzeugt.
+
+
+Die "Quick 'n' Dirty"-Methode
+
+Mit der neuen Version von ArgyllCMS kam eine weitere Methode hinzu, schnell ein Profil mit nur einer einzigen Kommandozeile zu erzeugen. Es wird dann lediglich das Tool dispcal aufgerufen:
+
+dispcal -v -qm -yl -t6500 -g2.2 -p.5,.5,2 -K -o profilname.icm -O"Profilbeschreibung" 20090311
+
+Die Kommandozeile enthält die gleichen Befehle wie oben, nur das noch die Schalter -o profilname.icm und -O"Profilbeschreibung" angefügt wurden. Dadurch wird direkt nach der Kalibrierung gleich noch eine vorgegebene Testreihe an Farbfeldern vermessen und ein Shaper/Matrix-Profil mit dem Dateinamen profilname.icm und der Beschreibung "Profilbeschreibung" erzeugt – ganz ohne, dass man die anderen Tools aufrufen müsste.
+
+Diese Profile sind auch sehr gut geeignet und können bedenkenlos benutzt werden. Allerdings werden einem hier natürlich viele Möglichkeiten aus der Hand genommen. Es ist gewissermaßen mit dem Vorgehen von kommerziellen Produkten gleichzusetzen. Man kann die Ziele der Kalibrierung vorgeben, der Rest wird über ein Standardverfahren vom Programm erledigt.
+
+Wer allerdings nur mal schnell schauen möchte, ob Argyll die Ergebnisse liefert, die man sich wünscht, dem ist damit sicher gut geholfen. Später kann man sich ja immernoch ein Profil nach eigenen Vorstellungen erzeugen.
--- /dev/null
+###Asterisk Konsole öffnen
+asterisk -r
+###Konsolenbefehle
+#reload der Konfiguration
+reload
+#sip registrierungen anschauen
+sip show registry
+#
+sip show peers
+#asterisk stoppen
+stop now
+#dialplan neu einlesen
+dialplan reload
+#sip telefon anrufen
+console dial 2000
+#aktive channels / calls anzeigen
+core show channels
+core show calls
+###Asterisk Applikationen
+#Hörer abnehmen
+Answer()
+#Auflegen
+Hangup()
+#Sounddatei abspielen
+Playback()
+#Pause (in Sekunden)
+Wait(20)
+#nichts machen (No Operation) String wird im CLI ausgegeben
+NoOP(String)
+###sip debugging auf Asterisk-Konsole einschalten
+sip set debug on
+###Dial()
+#mehrere Telefon gleichzeitig klingeln lassen, das erste was abnimmt gewinnt
+exten => s,1,Dial(SIP/2000&SIP/2001&SIP/2303)
+
+
+###Variablen benutzen
+${123456789:1} : ergibt den Teilstring 2345678
+${123456789:-4} : ergibt den Teilstring 6789
+${123456789:0:3} : ergibt den Teilstring 123
+${123456789:2:3} : ergibt den Teilstring 345
+${123456789:-4:3} : ergibt den Teilstring 678
+###länge des Variablen inhalts (auf gustav steht 123)
+${LEN(${gustav})} : ergibt 3
+###wenn telefone nach auflegen der gegenstelle weiter klingeln
+#hilft meist in der sip.conf
+pedantic=no
+###sipgate trunking Anschluß Einstellungen
+[sipconnect.sipgate.de]
+type = peer
+host = sipconnect.sipgate.de
+outboundproxy=sipconnect.sipgate.de
+port = 5060
+username = 1234567t0
+fromuser = 1234567t0
+fromdomain = sipconnect.sipgate.de
+secret = XXXXXX
+dtmfmode = rfc2833
+insecure = port,invite
+canreinvite = no
+registertimeout = 600
+disallow=all
+allow=alaw
+allow=ulaw
+###ausgehenden Gesprächen gewünschte Absenderrufnummer setzen
+#im E164-Format (also international ohne führende Nullen oder "+"-Zeichen)
+#als neuen Header P-Preferred-Identity:
+SipAddHeader(P-Preferred-Identity: <sip:492111234567@sipconnect.sipgate.de>)
+###Rufnummer unterdrücken
+SipAddHeader(P-Preferred-Identity: <sip:492111234567@sipconnect.sipgate.de>)
+SipAddHeader(Privacy: id)
+###Absendernummer für Telefone setzen in extensions.conf
+#Absendernummer ist hier 4921158000000, immer ohne führende 0 oder +
+[sipout]
+exten => _X.,1,Set(CALLERID(number)=SIPID)
+exten => _X.,n,SipAddHeader(P-Preferred-Identity: <sip:4921158000000@sipconnect.sipgate.de>)
+exten => _X.,n,Dial(SIP/${EXTEN}@sipgate-out,30,trg)
+exten => _X.,n,Hangup
+###sipgate VPN
+#Webzugangsdaten als username und passwort
+VPN-Peer: secureconnect.sipgate.net
+Groupname: secureconnect.sipgate.net
+Secret: sipgate-key
+Use Cert: Off
+###
+[secure]
+deny=0.0.0.0/0.0.0.0 ; Keine IP-Adresse darf sich registrieren...
+permit=172.17.0.0/255.255.248.0
+
+[Sekreteriat]
+include => telefontest
+include => intern
+;Antje, Sylvia, Susi
+exten => 0,1,Dial(SIP/0,20)
+exten => 0,2,VoiceMail(2000,u)
+
+[Z110]
+include => telefontest
+include => intern
+;Lars, Steffen, Sarah
+
+[Z112]
+include => telefontest
+include => intern
+;Mario, Stephan
+
+exten => 2999,1,VoiceMailMain(${CALLERID(num)},s)
+;unsere 100 Nummer erst mal alle bei uns
+;exten => 0,1,NoOp(test);
+;exten => _[1-9]X,n,NoOp(Test));
+exten => 4921163558627768,1,Dial(SIP/0)
+exten => 493713371470,n,Dial(SIP/0)
+;exten => _49371337147[1-9]X,n,Dial(SIP/0)
+;exten => _1X,n,Dial,SIP/${EXTEN}|55|Ttr
+;exten => _XXXX.,1,SipAddHeader(P-Asserted-Identity: <sip:${CALLERIDNUM}>)
+;exten => _XXXX.,1,SipAddHeader(P-Preferred-Identity: <sip:49371337147${CALLERID(num)}@sipconnect.sipgate.de>)
+exten => _XXXX.,1,SipAddHeader(P-Preferred-Identity: <sip:493713371470@sipconnect.sipgate.de>)
+;exten => _XXXX.,n,NoOp(TEST)
+;exten => _XXXX.,n,NoOp(${CALLERID(num)})
+;exten => _XXXX.,n,NoOp(${CALLERIDNUM})
+;exten => _XXXX.,n,Dial(SIP/${EXTEN}@sipconnect.sipgate.de)
+
+
+[Z101]
+include => telefontest
+include => intern
+;Holger, Thomas, Swen
+
+[Z114]
+include => telefontest
+include => intern
+;Rene, Holger, Sven, Volker
+
+[Z009]
+include => telefontest
+include => intern
+;Kuvertieren
+
+[Z010]
+include => telefontest
+include => intern
+;Matthi, Holger, Ralf, Bernd
+exten => _0[1-9].,1,Dial(SIP/${EXTEN}@sipconnect.sipgate.de)
+
+[007]
+include => telefontest
+include => intern
+;Mario, Falk
+[Chef]
+
+
+[telefontest]
+;Telefontest auf Nummer 1001
+exten => 1001,1,Answer();
+exten => 1001,n,Playback(hello-world)
+exten => 1001,n,Hangup()
+
+[intern]
+exten => _XX,1,NoOp(${EXTEN})
+exten => _XX,n,Dial(SIP/${EXTEN})
+;exten => 10,1,Dial(SIP/10)
+;exten => 11,1,Dial(SIP/11)
+;exten => 12,1,Dial(SIP/12)
+;exten => 13,1,Dial(SIP/13)
+
+
+[incomming]
+exten => 493713371470,1,NoOp(incomming call from: ${EXTEN})
+exten => 493713371470,n,Dial(SIP/0)
+
+exten => _493713371471X,1,Dial(SIP/10)
+exten => _493713371472X,1,Dial(SIP/10)
+exten => _493713371473X,1,Dial(SIP/10)
+exten => _493713371474X,1,Dial(SIP/10)
+exten => _493713371475X,1,Dial(SIP/10)
+exten => _493713371476X,1,Dial(SIP/10)
+exten => _493713371477X,1,Dial(SIP/10)
+exten => _493713371478X,1,Dial(SIP/10)
+exten => _493713371479X,1,Dial(SIP/10)
+
+[test]
+exten => _493713371470,1,NoOp(Anruf auf: ${EXTEN})
+exten => _493713371470,n,Dial(SIP/0)
+exten => _49371337147[1-9]X,1,NoOp(Anruf auf: ${EXTEN})
+exten => _49371337147[1-9]X,n,Dial(SIP/0)
+
+###mögliche callerid variablen
+exten => _XXXX.,n,NoOp(CALLERID(all)=${CALLERID(all)})
+exten => _XXXX.,n,NoOp(CALLERID(name)=${CALLERID(name)})
+exten => _XXXX.,n,NoOp(CALLERID(num)=${CALLERID(num)})
+exten => _XXXX.,n,NoOp(CALLERID(ANI)=${CALLERID(ANI)})
+exten => _XXXX.,n,NoOp(CALLERID(DNID)=${CALLERID(DNID)})
+exten => _XXXX.,n,NoOp(CALLERID(RDNIS)=${CALLERID(RDNIS)})
+exten => _XXXX.,n,NoOp(CALLERID(pres)=${CALLERID(pres)})
+exten => _XXXX.,n,NoOp(CALLERID(ton)=${CALLERID(ton)})
+
+###mit anderen Rufnummer via Sipgate telefonieren
+#Syntax (am Telefon): 99*<Absendernummer>*<Zielrufnummer>
+exten => _99.,1,Set(CALLERID(number)=<SIP-ID>)
+exten => _99.,n,Set(destination=${CUT(EXTEN,"*",3)})
+exten => _99.,n,Set(source=${CUT(EXTEN,"*",2)})
+exten => _99.,n,Set(CALLERID(name)=49${source:1})
+exten => _99.,n,Dial(SIP/${destination}@sipgate,600,t)
--- /dev/null
+###benutzen von autotools
+1) Create sources, “Makefile.am”
+2) `autoscan`
+3) Rename “configure.scan” to “configure.ac”
+4) `autoheader`
+5) Add AM_INIT_AUTOMAKE to “configure.ac”
+6) `aclocal`
+7) `automake addmissing
+copy`
+8) `autoconf`
+9) `./configure`
+10) `make`
+11) `make install`
+###
--- /dev/null
+###Adressen im Netz
+http://www.hobby-bastelecke.de/
+http://www.mschrod.de/Elektronik/AVR/Hauptseite.htm
+http://home.arcor.de/dirk.milewski/
+http://www.ulrichradig.de/home/index.php/avr/avr-car-delay/umbau-zur-alarmanlage
+http://forum.electronicwerkstatt.de/phpBB/
+http://www.electronicwerkstatt.de/
+http://avr-net-io.de
+http://www.ethersex.de
+http://www.wiesolator.de/
+http://www.avrfreaks.net/
+http://www.avrprojekte.de/
+http://www.avr-projekte.de/
+http://www.siwawi.arubi.uni-kl.de/avr_projects/
+http://www.mikrocontroller.com/de/einleitung.php
+http://www.cczwei.de/
+http://gaedtke.name/
+http://www.comwebnet.de/
+http://www.avr-asm-tutorial.net
+http://www.embedded-projects.net/index.php?page_id=74
+http://www.tschallener.net/AVR/avr.htm
+http://www.avr-asm-tutorial.net/avr_de/beginner/index.html
+#Steuerung mit Webserver NET-IO
+http://www.mikrocontroller.net/articles/Steuerung_und_Regelung_eines_Raums_mit_dem_AVR-Webserver
+#AVR in C programmieren
+http://www.stud.uni-stuttgart.de/studweb/users/etk/etk39219/avrc/
+#Display / LCD ansteuern per µC
+http://www.mikrocontroller.net/articles/AVR-Tutorial:_LCD
+#SPI
+http://www.mct.de/faq/spi.html
+#Schieberegister
+http://www.mikrocontroller.net/articles/AVR-Tutorial:_Schieberegister
+#Temperatursensor DS1621
+http://www.myplace.nu/avr/thermo/
+http://www.digitemp.com/index.shtml
+http://www.johannes-bauer.com/mcus/tempgrid/?menuid=5
+#AVR Oszi / Sensoren mit Funksendern
+http://www.avr.roehres-home.de/logikanalyzer/index.html
+#Oszi für Soundkarte
+http://www.schule-bw.de/unterricht/faecher/physik/mess/soundkarte/hardware/adamczyk/
+#AVR Handysteuerung Siemens / PIR
+http://mschrod.de/Elektronik/AVR/Projekte/HandyS45/SMS_Versand.html
+#HV Progger STK500
+http://www.der-hammer.info/hvprog/index.htm
+#Kennzeichnung von Halbleitern
+http://www.mikrocontroller.net/articles/Kennzeichnung_von_Halbleitern
+#Pegelwandlung
+http://www.mikrocontroller.net/articles/Pegelwandler#STEP-UP:_5V_-.3E_9..15V
+#Datenblätter
+http://www.alldatasheet.com/
+http://www.datasheetcatalog.com/
+http://www.datasheetcatalog.net/de/
+http://www.elektronik-kompendium.de/service/datenblatt.htm
+#AVR gesteuertes Netzteil
+http://www.tuxgraphics.org/electronics/200707/bench-power-supply-unit.shtml
+#Lötstation selbstbau
+http://stegem.de/Elektronik/Loetkolben/index.htm
+#Datenübertragung mit Funkmodulen
+http://plischka.at/blog/?p=3
+http://plischka.at/Mega32-Universal-DMX-Board.html
+http://www.das-labor.org/wiki/Datenfunk_mit_dem_AVR
+###Codebeispiele in C
+http://www.rn-wissen.de/index.php/Kategorie:Quellcode_C
+#AVR Infos
+http://www.rn-wissen.de/index.php/Avr
+###PIR aus Airwick
+Pin1 ist links
+1. VCC (3.3V-4V)
+2. GND
+3. LED GND
+4. GND
+5. PIR out
+6. switch 9 minutes (connects it to GND)
+7. switch 18 minutes (connects it to GND)
+8. switch 36 minutes (connects it to GND)
+9. switch off (connects it to GND)
+###Abblockkondensator
+http://www.rn-wissen.de/index.php/Abblockkondensator
+Kerko oder Folie (kein Elko) 100nF bis 20MHz
+###miso / mosi bei SPI
+#Drei gemeinsame Leitungen, an denen jeder Teilnehmer angeschlossen ist:
+SDO (engl. Serial Data Out) bzw. MISO oder SOMI (engl. Master in Slave out)
+SDI (engl. Serial Data In) bzw. MOSI oder SIMO (engl. Master out Slave in)
+SCK (engl. Serial Clock), wird vom Master ausgegeben
+MOSI=Master Out Slave In
+MISO=Master In Slave Out
+###Compilieren/Linken/Hex erstellen
+#http://www.rn-wissen.de/index.php/Hallo_Welt_f%C3%BCr_AVR_%28LED_blinken%29#Quellcode
+Compilieren
+
+Zunächst wird die C-Datei übersetzt. Der Übersetzungsvorgang wird gesteuert durch Kommandozeilen-Parameter (siehe avr-gcc). Die Option
+
+-c
+ legt fest, daß nur compiliert wird (und nicht gelinkt),
+-o name
+ gibt den Namen der Ausgabedatei an. Ohne diese Option heißt die Ausgabedatei immer a.out
+-mmcu=atmega8
+ legt den Controllertyp fest, in dem Beispiel den ATmega8
+-g
+ erzeugt Debug-Infos und
+-Os
+ optimiert auf Codegröße.
+-DF_CPU=xxx
+ optional, falls der Controller nicht mit 1 MHz läuft. xxx ist die Taktfrequenz in Hertz.
+
+> avr-gcc blinky.c -c -o blinky.o -Os -g -mmcu=atmega8
+
+Danach ist eine neue Datei entstanden (*.o)
+
+blinky.c blinky.o
+
+Linken
+
+Die erzeugte Objek-Datei wird nun zur Ausgabedatei (*.elf) gelinkt:
+
+> avr-gcc blinky.o -o blinky.elf -mmcu=atmega8
+
+erzeugt die ausführbare Datei (*.elf), die noch zusätzliche Informationen wie Debug-Infos etc. beinhaltet mit dem Namen blinky.elf:
+
+blinky.c blinky.elf blinky.o
+
+Umwandeln nach hex
+Code und Daten
+
+Viele Progger wollen die zu ladende Datei im Intel-hex-Format (*.hex bzw. *.ihex). Dazu gibt man an
+
+> avr-objcopy -j .text -j .data -O ihex blinky.elf blinky.hex
+
+Damit enthält die hex-Datei die Sections .text (Programm) und .data (Daten). Das Verzeichnis beinhaltet jetzt
+
+blinky.c blinky.elf blinky.hex blinky.o
+
+EEPROM
+
+Ein hex-File, das den Inhalt des EEPROMs wiederspiegelt, erhält man mit
+
+> avr-objcopy -j .eeprom --change-section-lma .eeprom=0 -O ihex blinky.elf blinky_eeprom.hex
+
+Für das Beispiel ist das EEPROM-File blinky_eeprom.hex leer, da wir keine Daten ins EEPROM gelegt haben.
+Listfile erstellen
+
+Falls man ein Listfile haben möchte, dann geht das mit
+
+> avr-objdump -h -S -j .text -j .data blinky.elf > blinky.lst
+
+Das Listfile ist eine Textdatei, die alle Assembler-Befehle auflistet, wie sie letztendlich auf den Controller geladen werden.
+
+avr-objdump gibt seine Ausgabe auf das Terminal aus. Diese Ausgabe wird mit '>' in die Datei blinky.lst umgeleitet. Hier ein Ausschnitt aus dem Listfile:
+
+00000072 <wait_10ms>:
+
+// //////////////////////////////////////////////////////////////////////
+// Wartet etwa t*10 ms.
+// timer_10ms wird alle 10ms in der Timer1-ISR erniedrigt.
+// Weil es bis zum nächsten IRQ nicht länger als 10ms dauert,
+// wartet diese Funktion zwischen (t-1)*10 ms und t*10 ms.
+void wait_10ms (const uint8_t t)
+{
+ timer_10ms = t;
+ 72: 80 93 61 00 sts 0x0061, r24
+ while (timer_10ms);
+ 76: 80 91 61 00 lds r24, 0x0061
+ 7a: 88 23 and r24, r24
+ 7c: e1 f7 brne .-8 ; 0x76 <wait_10ms+0x4>
+ 7e: 08 95 ret
+
+Links stehen die Adressen, dann die Maschinencodes der Befehle, danach die Maschinencodes in Assembler-Darstellung. Ganz rechts nach dem Kommentarzeichen ';' stehen die Dezimalcodes von Konstanten oder die Zieladressen von Sprüngen, wie bei dem brne-Befehl an Adresse 7c, der gegebenenfalls 8 Bytes zurückspringt und dann an Adresse 76 landet.
+[bearbeiten]
+Mapfile erstellen
+
+Ein Mapfile gibt Auskunft darüber, an welcher Adresse Code und Objekte landen. Erstellt wird das Mapfile während des Linkens, indem avr-gcc ein Option an den Linker weiterreicht, die diesem zum Erstellen eines solchen Files veranlasst:
+
+> avr-gcc blinky.o -o blinky.elf ... -Wl,-Map,blinky.map
+
+Dadurch entsteht das Mapfile blinky.map.
+[bearbeiten]
+Die Größe ermitteln
+
+Die Größe der erhaltenen Objekte/Files können mit avr-size ausgegeben werden.
+
+> avr-size -x blinky.o
+
+druckt aus:
+
+ text data bss dec hex filename
+ 0x7c 0x0 0x2 126 7e blinky.o
+
+Das sind die Größen der einzelnen Sections. Für das Flash relevant ist die Größe von .text (Code) + .data (initialisierte Daten), für das SRAM relevent ist .data (initialisierte Daten) + .bss (null-initialisierte Daten).
+
+Im Flash werden also 126+0=126 Bytes belegt, und im SRAM 0+2=2 Bytes.
+
+Ab binutils 2.16 gibt es für avr-size die Option -C, mit der man eine Zusammenfassung des ganzen Programms ausgeben kann:
+
+> avr-size -C --mcu=atmega8 blinky.elf
+
+druckt aus:
+
+AVR Memory Usage
+----------------
+Device: atmega8
+
+Program: 216 bytes (2.6% Full)
+(.text + .data + .bootloader)
+
+Data: 2 bytes (0.2% Full)
+(.data + .bss + .noinit)
+
+Die Gesamtgrösse ergibt sich erst aus dem elf-File, denn auch die Vektortabelle und der Startup-Code belegen Platz. Hier eine Auflistung der beteiligten Sections:
+
+> avr-size -x -A blinky.elf
+
+druckt aus:
+
+blinky.elf :
+section size addr
+.text 0xd8 0x0
+.data 0x0 0x800060
+.bss 0x2 0x800060
+.noinit 0x0 0x800062
+.eeprom 0x0 0x810000
+.stab 0x36c 0x0
+.stabstr 0x84 0x0
+.debug_aranges 0x14 0x0
+.debug_pubnames 0x48 0x0
+.debug_info 0xfc 0x0
+.debug_abbrev 0xa2 0x0
+.debug_line 0x101 0x0
+.debug_str 0xa6 0x0
+Total 0x86b
+
+Im Flash werden somit 0xd8+0=216 Bytes belegt, also 90 Bytes mehr als das Object benötigt; davon entfallen z.B. schon 38 Bytes auf die Vektortabelle des ATmega8, die 2*19 Bytes groß ist.
+
+Die Größen einzelner Funktionen/Variablen lassen sich anzeigen mit
+
+> avr-nm --size-sort -S blinky.elf
+
+was nach Größe sortiert ausdruckt:
+
+00800060 00000001 b interrupt_num_10ms.0
+00800061 00000001 b timer_10ms
+00000072 0000000e T wait_10ms
+0000005c 00000016 T timer1_init
+000000bc 0000001c T main
+00000080 0000003c T __vector_6
+
+[bearbeiten]
+HEX-Dateien zu diesem C-Code
+
+Zu dieser C-Datei gibt es HEX-Dateien für einige AVRs. Siehe dazu HEX Beispiel-Dateien für AVR.
+[bearbeiten]
+Spin-off
+
+Eine LED blinken zu lassen könnte auch wesentlich einfacher implementert werden, also z.B. ohne Funktionsaufrufe oder Interrupt-Programmierung.
+
+Neben der eigentlichen Aufgabe "LED blinken lassen" kann man an dem Code aber noch andere Dinge lernen:
+
+ * Programmierung eines Interrupts
+ * Initialisierung von Timer1 als Zähler mit "Clear Timer on Compare Match"
+ * Bedingte Codeübersetzung/Controllerunterscheidung mit #ifdef (in timer1_init)
+ * Abchecken der Gültigkeit von Defines durch den Präprozessor
+###flashen
+avrdude -p m16 -P /dev/ttyUSB0 -c ponyser -U flash:w:test1.hex
+###testen der Verbindung zum Controller
+avrdude -p m16 -F -c ponyser -P /dev/ttyS0 -v -U lfuse:r:-:i
+#Beschreibung
+-p gibt den Mikroprozessortyp an
+-c Gibt den Programmieradapter an -> in diesem Fall SerCon-Kompatibel an der 6-Pol ISP Buchse
+-P gibt den Anschluss am PC an -> in diesem Falle COM1 unter Linux
+-F veranlasst avrdude die Chipsignatur zu ignorieren, dass ist beim 644P nötig,
+ denn avrdude kennt nur den 644. Beim P stimmt die Signatur nicht mit der im
+ dude hinterlegten überein und er verweigert sonst das Beschreiben des Chips
+-U macht eine Speicheroperation - Speichertyp:Lesen/Schreiben:DatenOrt(:Datentyp)
+-v Ausgabe mehr Debuginformationen
+###setzen von FUSE Bits
+avrdude -p m644 -F -c ponyser -P /dev/ttyS0 -v -U lfuse:w:0xFF:m -U hfuse:w:0xDC:m -U efuse:w:0xFD:m
+###löschen des gesamten Chips
+avrdude -p m644 -F -c ponyser -P /dev/ttyS0 -v -e
+###
+###c programm für avr übersetzen
+Um eine C-Datei foo.c mir avr-gcc optimiert zu einem lauffähigen elf-Programm foo.elf für einen ATmega32 zu compileren, würde man angeben
+> avr-gcc -O2 -mmcu=atmega32 foo.c -o foo.elf
+Hat man seine Quellen auf zwei oder mehre Dateien verteilt, geht es analog:
+> avr-gcc -O2 -mmcu=atmega32 foo.c foo2.c -o foo.elf
+Will man nur eine Objekt-Datei erstellen (nur compilieren, nicht linken), dann geht das wie folgt. Das kann günstig sein bei grösseren Projekten, wenn man das Projekt neu erzeugen will, aber nur in einer Quelldatei was geändert hat. Oder wenn das Objekt in einer Bibliothek landen soll.
+> avr-gcc -O2 -c -mmcu=atmega32 foo.c -o foo.o
+Die ausführbare Gesamtdatei foo_all.elf erhält man dann, indem alle Objekte zusammenlinkt:
+> avr-gcc -mmcu=atmega32 foo.o foo2.o foo3.o -o foo_all.elf
+Um die ausführbare Datei in das oft verwendete Intex-HEX-Format umzuwandeln (einmal fürs Programm, einmal für ein Abbild des EEPROMs) gibt man an:
+>vr-objcopy -O ihex -j .text -j .data foo_all.elf foo_all.hex avr-objcopy -O ihex -j .text -j .data foo_all.elf foo_all.hex
+> avr-objcopy -O ihex -j .eeprom --change-section-lma .eeprom=0 foo_all.elf foo_all_eeprom.hex
+
--- /dev/null
+'###################################################
+'step2.bas.BAS
+'für
+'RoboterNetz.de AVR Tutorial in RN-Wissen
+'
+'Autor: Frank Brall
+'Weitere Beispiele und Beschreibung der Hardware
+'unter
+' http://www.Roboternetz.de oder
+' http://www.Roboternetz.de/wissen
+'#######################################################
+
+$regfile = "m32def.dat"
+$framesize = 32
+$swstack = 32
+$hwstack = 32
+$crystal = 1000000
+
+Config Portc.0 = Output 'Ein Pin wird als Ausgang konfiguriert PC0 (also Pin0 von Port C)
+
+Do
+ Portc.0 = 1 'Pin wird auf High, also 5V geschaltet
+ Waitms 100
+ Portc.0 = 0 'Pin wird auf Low, also 0V geschaltet
+ Waitms 100
+Loop
+
+End
+
--- /dev/null
+// Testprogramm: Blinken auf Pin PC0
+//
+#ifndef MCU // Welcher AVR genutzt wird, wird i.A. im Makefile definiert
+#define MCU atmega32
+#endif
+
+#ifndef F_CPU // kann auch im Makefile definiert sein
+#define F_CPU 1000000UL // Takt als LONG definieren, da zu groß für Integer
+#endif
+
+#include <avr/io.h> // Namen der IO Register
+#include <util/delay.h> // Funktionen zum warten
+// Achtung, damit delay richtig funktioniert muß mit Optimierung compiliert werden
+
+int main(void)
+{
+ DDRC = _BV(0); // Nur PC0 als output, _BV(0) = (1<<0) = 1
+ PORTC = 254; // Pullups auf allen anderen Pins
+
+ while (1)
+ {
+ PORTC &= 255-_BV(0); // 0 auf Bit 0 Ausgeben, Rest so lassen
+ _delay_ms(100); // 100 ms Warten
+ PORTC |= _BV(0); // 1 auf Bit 0 Ausgeben, Rest so lassen
+ _delay_ms(100);
+ }
+}
--- /dev/null
+###Blinki Beispielcode
+#include <avr/io.h>
+#include <avr/interrupt.h>
+
+// Für alte avr-gcc Versionen
+#ifndef SIGNAL
+#include <avr/signal.h>
+#endif // SIGNAL
+
+// Geblinkt wird PortB.1 (push-pull)
+// Eine LED in Reihe mit einem Vorwiderstand zwischen
+// PortB.1 und GND anschliessen.
+#define PAD_LED 1
+#define PORT_LED PORTB
+#define DDR_LED DDRB
+
+// Der MCU-Takt. Wird gebraucht, um Timer1 mit den richtigen
+// Werten zu initialisieren. Voreinstellung ist 1MHz.
+// (Werkseinstellung für AVRs mit internem Oszillator).
+// Das Define wird nur gemacht, wenn F_CPU noch nicht definiert wurde.
+// F_CPU kann man so auch per Kommandozeile definieren, z.B. für 8MHz:
+// avr-gcc ... -DF_CPU=8000000
+//
+// ! Der Wert von F_CPU hat rein informativen Character für
+// ! die korrekte Codeerzeugung im Programm!
+// ! Um die Taktrate zu ändern müssen die Fuses des Controllers
+// ! und/oder Quarz/Resonator/RC-Glied/Oszillator
+// ! angepasst werden!
+#ifndef F_CPU
+#define F_CPU 1000000
+#endif
+
+// So viele IRQs werden jede Sekunde ausgelöst.
+// Für optimale Genauigkeit muss
+// IRQS_PER_SECOND ein Teiler von F_CPU sein
+// und IRQS_PER_SECOND ein Vielfaches von 100.
+// Ausserdem muss gelten F_CPU / IRQS_PER_SECOND <= 65536
+#define IRQS_PER_SECOND 2000 /* 500 µs */
+
+// Anzahl IRQs pro 10 Millisekunden
+#define IRQS_PER_10MS (IRQS_PER_SECOND / 100)
+
+// Gültigkeitsprüfung.
+// Bei ungeeigneten Werten gibt es einen Compilerfehler
+#if (F_CPU/IRQS_PER_SECOND > 65536) || (IRQS_PER_10MS < 1) || (IRQS_PER_10MS > 255)
+# error Diese Werte fuer F_CPU und IRQS_PER_SECOND
+# error sind ausserhalb des gueltigen Bereichs!
+#endif
+
+// Compiler-Warnung falls die Genauigkeit nicht optimal ist.
+// Wenn das nervt für deine Werte, einfach löschen :-)
+#if (F_CPU % IRQS_PER_SECOND != 0) || (IRQS_PER_SECOND % 100 != 0)
+# warning Das Programm arbeitet nicht mit optimaler Genauigkeit.
+#endif
+
+// Prototypen
+void wait_10ms (const uint8_t);
+void timer1_init();
+
+// Zähler-Variable. Wird in der ISR erniedrigt und in wait_10ms benutzt.
+static volatile uint8_t timer_10ms;
+
+// //////////////////////////////////////////////////////////////////////
+// Implementierungen der Funktionen
+// //////////////////////////////////////////////////////////////////////
+
+#if !defined (TCNT1H)
+#error Dieser Controller hat keinen 16-Bit Timer1!
+#endif // TCNT1H
+
+// //////////////////////////////////////////////////////////////////////
+// Timer1 so initialisieren, daß er IRQS_PER_SECOND
+// IRQs pro Sekunde erzeugt.
+void timer1_init()
+{
+ // Timer1: keine PWM
+ TCCR1A = 0;
+
+ // Timer1 ist Zähler: Clear Timer on Compare Match (CTC, Mode #4)
+ // Timer1 läuft mit vollem MCU-Takt: Prescale = 1
+#if defined (CTC1) && !defined (WGM12)
+ TCCR1B = (1 << CTC1) | (1 << CS10);
+#elif !defined (CTC1) && defined (WGM12)
+ TCCR1B = (1 << WGM12) | (1 << CS10);
+#else
+#error Keine Ahnung, wie Timer1 fuer diesen AVR zu initialisieren ist!
+#endif
+
+ // OutputCompare für gewünschte Timer1 Frequenz
+ // TCNT1 zählt immer 0...OCR1A, 0...OCR1A, ...
+ // Beim überlauf OCR1A -> OCR1A+1 wird TCNT1=0 gesetzt und im nächsten
+ // MCU-Takt eine IRQ erzeugt.
+ OCR1A = (unsigned short) ((unsigned long) F_CPU / IRQS_PER_SECOND-1);
+
+ // OutputCompareA-Interrupt für Timer1 aktivieren
+#if defined (TIMSK1)
+ TIMSK1 |= (1 << OCIE1A);
+#elif defined (TIMSK)
+ TIMSK |= (1 << OCIE1A);
+#else
+#error Keine Ahnung, wie IRQs fuer diesen AVR zu initialisieren sind!
+#endif
+}
+
+// //////////////////////////////////////////////////////////////////////
+// Wartet etwa t*10 ms.
+// timer_10ms wird alle 10ms in der Timer1-ISR erniedrigt.
+// Weil es bis zum nächsten IRQ nicht länger als 10ms dauert,
+// wartet diese Funktion zwischen (t-1)*10 ms und t*10 ms.
+void wait_10ms (const uint8_t t)
+{
+ timer_10ms = t;
+ while (timer_10ms);
+}
+
+// //////////////////////////////////////////////////////////////////////
+// Die Interrupt Service Routine (ISR).
+// In interrupt_num_10ms werden die IRQs gezählt.
+// Sind IRQS_PER_10MS Interrups geschehen,
+// dann sind 10 ms vergangen.
+// timer_10ms wird alle 10 ms um 1 vermindert und bleibt bei 0 stehen.
+SIGNAL (SIG_OUTPUT_COMPARE1A)
+{
+ static uint8_t interrupt_num_10ms;
+
+ // interrupt_num_10ms erhöhen und mit Maximalwert vergleichen
+ if (++interrupt_num_10ms == IRQS_PER_10MS)
+ {
+ // 10 Millisekunden sind vorbei
+ // interrupt_num_10ms zurücksetzen
+ interrupt_num_10ms = 0;
+
+ // Alle 10ms wird timer_10ms erniedrigt, falls es nicht schon 0 ist.
+ // Wird verwendet in wait_10ms
+ if (timer_10ms != 0)
+ timer_10ms--;
+ }
+}
+
+// //////////////////////////////////////////////////////////////////////
+// Das Hauptprogramm: Startpunkt
+int main()
+{
+ // LED-Port auf OUT
+ DDR_LED |= (1 << PAD_LED);
+
+ // Timer1 initialisieren
+ timer1_init();
+
+ // Interrupts aktivieren
+ sei();
+
+ // Endlosschleife
+ // Die LED ist jeweils 1 Sekunde an und 1 Sekunde aus,
+ // blinkt also mit einer Frequenz von 0.5 Hz
+ while (1)
+ {
+ // LED an
+ PORT_LED |= (1 << PAD_LED);
+
+ // 1 Sekunde warten
+ wait_10ms (100);
+
+ // LED aus
+ PORT_LED &= ~(1 << PAD_LED);
+
+ // 1 Sekunde warten
+ wait_10ms (100);
+ }
+
+ // main braucht keine return-Anweisung, weil wir nie hier hin kommen
+}
--- /dev/null
+#include <avr/io.h>
+#include <avr/interrupt.h>
+
+// Für alte avr-gcc Versionen
+#ifndef SIGNAL
+#include <avr/signal.h>
+#endif // SIGNAL
+
+// Geblinkt wird PortB.1 (push-pull)
+// Eine LED in Reihe mit einem Vorwiderstand zwischen
+// PortB.1 und GND anschliessen.
+#define PAD_LED 1
+#define PORT_LED PORTB
+#define DDR_LED DDRB
+
+// Der MCU-Takt. Wird gebraucht, um Timer1 mit den richtigen
+// Werten zu initialisieren. Voreinstellung ist 1MHz.
+// (Werkseinstellung für AVRs mit internem Oszillator).
+// Das Define wird nur gemacht, wenn F_CPU noch nicht definiert wurde.
+// F_CPU kann man so auch per Kommandozeile definieren, z.B. für 8MHz:
+// avr-gcc ... -DF_CPU=8000000
+//
+// ! Der Wert von F_CPU hat rein informativen Character für
+// ! die korrekte Codeerzeugung im Programm!
+// ! Um die Taktrate zu ändern müssen die Fuses des Controllers
+// ! und/oder Quarz/Resonator/RC-Glied/Oszillator
+// ! angepasst werden!
+#ifndef F_CPU
+#define F_CPU 1000000
+#endif
+
+// So viele IRQs werden jede Sekunde ausgelöst.
+// Für optimale Genauigkeit muss
+// IRQS_PER_SECOND ein Teiler von F_CPU sein
+// und IRQS_PER_SECOND ein Vielfaches von 100.
+// Ausserdem muss gelten F_CPU / IRQS_PER_SECOND <= 65536
+#define IRQS_PER_SECOND 2000 /* 500 µs */
+
+// Anzahl IRQs pro 10 Millisekunden
+#define IRQS_PER_10MS (IRQS_PER_SECOND / 100)
+
+// Gültigkeitsprüfung.
+// Bei ungeeigneten Werten gibt es einen Compilerfehler
+#if (F_CPU/IRQS_PER_SECOND > 65536) || (IRQS_PER_10MS < 1) || (IRQS_PER_10MS > 255)
+# error Diese Werte fuer F_CPU und IRQS_PER_SECOND
+# error sind ausserhalb des gueltigen Bereichs!
+#endif
+
+// Compiler-Warnung falls die Genauigkeit nicht optimal ist.
+// Wenn das nervt für deine Werte, einfach löschen :-)
+#if (F_CPU % IRQS_PER_SECOND != 0) || (IRQS_PER_SECOND % 100 != 0)
+# warning Das Programm arbeitet nicht mit optimaler Genauigkeit.
+#endif
+
+// Prototypen
+void wait_10ms (const uint8_t);
+void timer1_init();
+
+// Zähler-Variable. Wird in der ISR erniedrigt und in wait_10ms benutzt.
+static volatile uint8_t timer_10ms;
+
+// //////////////////////////////////////////////////////////////////////
+// Implementierungen der Funktionen
+// //////////////////////////////////////////////////////////////////////
+
+#if !defined (TCNT1H)
+#error Dieser Controller hat keinen 16-Bit Timer1!
+#endif // TCNT1H
+
+// //////////////////////////////////////////////////////////////////////
+// Timer1 so initialisieren, daß er IRQS_PER_SECOND
+// IRQs pro Sekunde erzeugt.
+void timer1_init()
+{
+ // Timer1: keine PWM
+ TCCR1A = 0;
+
+ // Timer1 ist Zähler: Clear Timer on Compare Match (CTC, Mode #4)
+ // Timer1 läuft mit vollem MCU-Takt: Prescale = 1
+#if defined (CTC1) && !defined (WGM12)
+ TCCR1B = (1 << CTC1) | (1 << CS10);
+#elif !defined (CTC1) && defined (WGM12)
+ TCCR1B = (1 << WGM12) | (1 << CS10);
+#else
+#error Keine Ahnung, wie Timer1 fuer diesen AVR zu initialisieren ist!
+#endif
+
+ // OutputCompare für gewünschte Timer1 Frequenz
+ // TCNT1 zählt immer 0...OCR1A, 0...OCR1A, ...
+ // Beim überlauf OCR1A -> OCR1A+1 wird TCNT1=0 gesetzt und im nächsten
+ // MCU-Takt eine IRQ erzeugt.
+ OCR1A = (unsigned short) ((unsigned long) F_CPU / IRQS_PER_SECOND-1);
+
+ // OutputCompareA-Interrupt für Timer1 aktivieren
+#if defined (TIMSK1)
+ TIMSK1 |= (1 << OCIE1A);
+#elif defined (TIMSK)
+ TIMSK |= (1 << OCIE1A);
+#else
+#error Keine Ahnung, wie IRQs fuer diesen AVR zu initialisieren sind!
+#endif
+}
+
+// //////////////////////////////////////////////////////////////////////
+// Wartet etwa t*10 ms.
+// timer_10ms wird alle 10ms in der Timer1-ISR erniedrigt.
+// Weil es bis zum nächsten IRQ nicht länger als 10ms dauert,
+// wartet diese Funktion zwischen (t-1)*10 ms und t*10 ms.
+void wait_10ms (const uint8_t t)
+{
+ timer_10ms = t;
+ while (timer_10ms);
+}
+
+// //////////////////////////////////////////////////////////////////////
+// Die Interrupt Service Routine (ISR).
+// In interrupt_num_10ms werden die IRQs gezählt.
+// Sind IRQS_PER_10MS Interrups geschehen,
+// dann sind 10 ms vergangen.
+// timer_10ms wird alle 10 ms um 1 vermindert und bleibt bei 0 stehen.
+SIGNAL (SIG_OUTPUT_COMPARE1A)
+{
+ static uint8_t interrupt_num_10ms;
+
+ // interrupt_num_10ms erhöhen und mit Maximalwert vergleichen
+ if (++interrupt_num_10ms == IRQS_PER_10MS)
+ {
+ // 10 Millisekunden sind vorbei
+ // interrupt_num_10ms zurücksetzen
+ interrupt_num_10ms = 0;
+
+ // Alle 10ms wird timer_10ms erniedrigt, falls es nicht schon 0 ist.
+ // Wird verwendet in wait_10ms
+ if (timer_10ms != 0)
+ timer_10ms--;
+ }
+}
+
+// //////////////////////////////////////////////////////////////////////
+// Das Hauptprogramm: Startpunkt
+int main()
+{
+ // LED-Port auf OUT
+ DDR_LED |= (1 << PAD_LED);
+
+ // Timer1 initialisieren
+ timer1_init();
+
+ // Interrupts aktivieren
+ sei();
+
+ // Endlosschleife
+ // Die LED ist jeweils 1 Sekunde an und 1 Sekunde aus,
+ // blinkt also mit einer Frequenz von 0.5 Hz
+ while (1)
+ {
+ // LED an
+ PORT_LED |= (1 << PAD_LED);
+
+ // 1 Sekunde warten
+ wait_10ms (100);
+
+ // LED aus
+ PORT_LED &= ~(1 << PAD_LED);
+
+ // 1 Sekunde warten
+ wait_10ms (100);
+ }
+
+ // main braucht keine return-Anweisung, weil wir nie hier hin kommen
+}
+
--- /dev/null
+'###################################################
+'step5.bas.BAS
+'für
+'RoboterNetz.de AVR Tutorial in RN-Wissen
+'
+'Autor: Frank Brall
+'Weitere Beispiele und Beschreibung der Hardware
+'unter
+' http://www.Roboternetz.de oder
+' http://www.Roboternetz.de/wissen
+'#######################################################
+
+
+$regfile = "m32def.dat"
+$framesize = 32
+$swstack = 32
+$hwstack = 32
+$crystal = 16000000
+$baud = 9600
+
+Config Portc.0 = Output 'Ein Pin wird als Ausgang konfiguriert PC0 (also Pin0 von Port C)
+
+Config Pina.7 = Input 'Ein Pin (PA0) wird als Eingang definiert
+Porta.7 = 1 'Interner Pullup Widerstand ein
+
+
+Do
+ If Pina.7 = 1 Then
+ Portc.0 = 1 'Pin wird auf High, also 5V geschaltet
+ Print "Schalter nicht gedrückt"
+ Else
+ Portc.0 = 0 'Pin wird auf Low, also 0V geschaltet
+ Print "Schalter gedrückt"
+ End If
+ Wait 1
+Loop
+
+End
--- /dev/null
+/*http://www.mikrocontroller.net/articles/Entprellung */
+/************************************************************************/
+/* */
+/* Debouncing 8 Keys */
+/* Sampling 4 Times */
+/* With Repeat Function */
+/* */
+/* Author: Peter Dannegger */
+/* danni@specs.de */
+/* */
+/************************************************************************/
+
+#include <stdint.h>
+#include <avr/io.h>
+#include <avr/interrupt.h>
+
+#ifndef F_CPU
+#define F_CPU 1000000 // processor clock frequency
+#warning kein F_CPU definiert
+#endif
+
+#define KEY_DDR DDRB
+#define KEY_PORT PORTB
+#define KEY_PIN PINB
+#define KEY0 0
+#define KEY1 1
+#define KEY2 2
+#define ALL_KEYS (1<<KEY0 | 1<<KEY1 | 1<<KEY2)
+
+#define REPEAT_MASK (1<<KEY1 | 1<<KEY2) // repeat: key1, key2
+#define REPEAT_START 50 // after 500ms
+#define REPEAT_NEXT 20 // every 200ms
+
+#define LED_DDR DDRA
+#define LED_PORT PORTA
+#define LED0 0
+#define LED1 1
+#define LED2 2
+
+volatile uint8_t key_state; // debounced and inverted key state:
+ // bit = 1: key pressed
+volatile uint8_t key_press; // key press detect
+
+volatile uint8_t key_rpt; // key long press and repeat
+
+
+ISR( TIMER0_OVF_vect ) // every 10ms
+{
+ static uint8_t ct0, ct1, rpt;
+ uint8_t i;
+
+ TCNT0 = (uint8_t)(int16_t)-(F_CPU / 1024 * 10e-3 + 0.5); // preload for 10ms
+
+ i = key_state ^ ~KEY_PIN; // key changed ?
+ ct0 = ~( ct0 & i ); // reset or count ct0
+ ct1 = ct0 ^ (ct1 & i); // reset or count ct1
+ i &= ct0 & ct1; // count until roll over ?
+ key_state ^= i; // then toggle debounced state
+ key_press |= key_state & i; // 0->1: key press detect
+
+ if( (key_state & REPEAT_MASK) == 0 ) // check repeat function
+ rpt = REPEAT_START; // start delay
+ if( --rpt == 0 ){
+ rpt = REPEAT_NEXT; // repeat delay
+ key_rpt |= key_state & REPEAT_MASK;
+ }
+}
+
+///////////////////////////////////////////////////////////////////
+//
+// check if a key has been pressed. Each pressed key is reported
+// only once
+//
+uint8_t get_key_press( uint8_t key_mask )
+{
+ cli(); // read and clear atomic !
+ key_mask &= key_press; // read key(s)
+ key_press ^= key_mask; // clear key(s)
+ sei();
+ return key_mask;
+}
+
+///////////////////////////////////////////////////////////////////
+//
+// check if a key has been pressed long enough such that the
+// key repeat functionality kicks in. After a small setup delay
+// the key is reported beeing pressed in subsequent calls
+// to this function. This simulates the user repeatedly
+// pressing and releasing the key.
+//
+uint8_t get_key_rpt( uint8_t key_mask )
+{
+ cli(); // read and clear atomic !
+ key_mask &= key_rpt; // read key(s)
+ key_rpt ^= key_mask; // clear key(s)
+ sei();
+ return key_mask;
+}
+
+///////////////////////////////////////////////////////////////////
+//
+uint8_t get_key_short( uint8_t key_mask )
+{
+ cli(); // read key state and key press atomic !
+ return get_key_press( ~key_state & key_mask );
+}
+
+///////////////////////////////////////////////////////////////////
+//
+uint8_t get_key_long( uint8_t key_mask )
+{
+ return get_key_press( get_key_rpt( key_mask ));
+}
+
+int main( void )
+{
+ KEY_DDR &= ~ALL_KEYS; // konfigure key port for input
+ KEY_PORT |= ALL_KEYS; // and turn on pull up resistors
+
+ TCCR0 = (1<<CS02)|(1<<CS00); // divide by 1024
+ TIMSK |= 1<<TOIE0; // enable timer interrupt
+
+ LED_PORT = 0xFF;
+ LED_DDR = 0xFF;
+
+ sei();
+
+ while(1){
+ if( get_key_short( 1<<KEY1 ))
+ LED_PORT ^= 1<<LED1;
+
+ if( get_key_long( 1<<KEY1 ))
+ LED_PORT ^= 1<<LED2;
+
+ // single press and repeat
+
+ if( get_key_press( 1<<KEY2 ) || get_key_rpt( 1<<KEY2 )){
+ uint8_t i = LED_PORT;
+
+ i = (i & 0x07) | ((i << 1) & 0xF0);
+ if( i < 0xF0 )
+ i |= 0x08;
+ LED_PORT = i;
+ }
+ }
+}
--- /dev/null
+'###################################################
+'step3.bas.BAS
+'für
+'RoboterNetz.de AVR Tutorial in RN-Wissen
+'
+'Autor: Frank Brall
+'Weitere Beispiele und Beschreibung der Hardware
+'unter
+' http://www.Roboternetz.de oder
+' http://www.Roboternetz.de/wissen
+'#######################################################
+
+
+$regfile = "m32def.dat"
+$framesize = 32
+$swstack = 32
+$hwstack = 32
+$crystal = 1000000
+
+Config Portc.0 = Output 'Ein Pin wird als Ausgang konfiguriert PC0 (also Pin0 von Port C)
+
+Config Pina.7 = Input 'Ein Pin (PA0) wird als Eingang definiert
+Porta.7 = 1 'Interner Pullup Widerstand ein
+
+
+Do
+ If Pina.7 = 1 Then
+ Portc.0 = 1 'Pin wird auf High, also 5V geschaltet
+ Else
+ Portc.0 = 0 'Pin wird auf Low, also 0V geschaltet
+ End If
+Loop
+
+
+End
+
--- /dev/null
+###AWK Spickzettel (http://www.catonmat.net/download/awk.cheat.sheet.txt)
+
+ ===================== Predefined Variable Summary =====================
+
+.-------------+-----------------------------------.---------------------.
+| | | Support: |
+| Variable | Description '-----.-------.-------'
+| | | AWK | NAWK | GAWK |
+'-------------+-----------------------------------+-----+-------+-------'
+| FS | Input Field Separator, a space by | + | + | + |
+| | default. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| OFS | Output Field Separator, a space | + | + | + |
+| | by default. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| NF | The Number of Fields in the | + | + | + |
+| | current input record. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| NR | The total Number of input Records | + | + | + |
+| | seen so far. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| RS | Record Separator, a newline by | + | + | + |
+| | default. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| ORS | Output Record Separator, a | + | + | + |
+| | newline by default. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| FILENAME | The name of the current input | | | |
+| | file. If no files are specified | | | |
+| | on the command line, the value of | | | |
+| | FILENAME is "-". However, | + | + | + |
+| | FILENAME is undefined inside the | | | |
+| | BEGIN block (unless set by | | | |
+| | getline). | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| ARGC | The number of command line | | | |
+| | arguments (does not include | | | |
+| | options to gawk, or the program | - | + | + |
+| | source). Dynamically changing the | | | |
+| | contents of ARGV control the | - | + | + |
+| | files used for data. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| ARGV | Array of command line arguments. | | | |
+| | The array is indexed from 0 to | - | + | + |
+| | ARGC - 1. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| ARGIND | The index in ARGV of the current | - | - | + |
+| | file being processed. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| BINMODE | On non-POSIX systems, specifies | | | |
+| | use of "binary" mode for all file | | | |
+| | I/O.Numeric values of 1, 2, or 3, | | | |
+| | specify that input files, output | | | |
+| | files, or all files, respectively,| | | |
+| | should use binary I/O. String | | | |
+| | values of "r", or "w" specify | - | - | + |
+| | that input files, or output files,| | | |
+| | respectively, should use binary | | | |
+| | I/O. String values of "rw" or | | | |
+| | "wr" specify that all files | | | |
+| | should use binary I/O. Any other | | | |
+| | string value is treated as "rw", | | | |
+| | but generates a warning message. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| CONVFMT | The CONVFMT variable is used to | | | |
+| | specify the format when | - | - | + |
+| | converting a number to a string. | | | |
+| | Default: "%.6g" | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| ENVIRON | An array containing the values | - | - | + |
+| | of the current environment. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| ERRNO | If a system error occurs either | | | |
+| | doing a redirection for getline, | | | |
+| | during a read for getline, or | | | |
+| | during a close(), then ERRNO will | - | - | + |
+| | contain a string describing the | | | |
+| | error. The value is subject to | | | |
+| | translation in non-English locales. | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| FIELDWIDTHS | A white-space separated list of | | | |
+| | fieldwidths. When set, gawk | | | |
+| | parses the input into fields of | - | - | + |
+| | fixed width, instead of using the | | | |
+| | value of the FS variable as the | | | |
+| | field separator. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| FNR | Contains number of lines read, | - | + | + |
+| | but is reset for each file read. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| IGNORECASE | Controls the case-sensitivity of | | | |
+| | all regular expression and string | | | |
+| | operations. If IGNORECASE has a | | | |
+| | non-zero value, then string | | | |
+| | comparisons and pattern matching | | | |
+| | in rules, field splitting | | | |
+| | with FS, record separating | | | |
+| | with RS, regular expression | | | |
+| | matching with ~ and !~, and the | - | - | + |
+| | gensub(), gsub(), index(), | | | |
+| | match(), split(), and sub() | | | |
+| | built-in functions all ignore | | | |
+| | case when doing regular | | | |
+| | expression operations. | | | |
+| | NOTE: Array subscripting is not | | | |
+| | affected. However, the asort() | | | |
+| | and asorti() functions are | | | |
+| | affected | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| LINT | Provides dynamic control of the | | | |
+| | --lint option from within an AWK | - | - | + |
+| | program. When true, gawk prints | | | |
+| | lint warnings. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| OFMT | The default output format for | - | + | + |
+| | numbers. Default: "%.6g" | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| PROCINFO | The elements of this array | | | |
+| | provide access to information | | | |
+| | about the running AWK program. | | | |
+| | PROCINFO["egid"]: | | | |
+| | the value of the getegid(2) | | | |
+| | system call. | | | |
+| | PROCINFO["euid"]: | | | |
+| | the value of the geteuid(2) | | | |
+| | system call. | | | |
+| | PROCINFO["FS"]: | | | |
+| | "FS" if field splitting with FS | | | |
+| | is in effect, or "FIELDWIDTHS" | | | |
+| | if field splitting with | | | |
+| | FIELDWIDTHS is in effect. | | | |
+| | PROCINFO["gid"]: | - | - | + |
+| | the value of the getgid(2) system | | | |
+| | call. | | | |
+| | PROCINFO["pgrpid"]: | | | |
+| | the process group ID of the | | | |
+| | current process. | | | |
+| | PROCINFO["pid"]: | | | |
+| | the process ID of the current | | | |
+| | process. | | | |
+| | PROCINFO["ppid"]: | | | |
+| | the parent process ID of the | | | |
+| | current process. | | | |
+| | PROCINFO["uid"] | | | |
+| | the value of the getuid(2) system | | | |
+| | call. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| RT | The record terminator. Gawk sets | | | |
+| | RT to the input text that matched | - | - | + |
+| | the character or regular | | | |
+| | expression specified by RS. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| RSTART | The index of the first character | - | + | + |
+| | matched by match(); 0 if no match.| | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| RLENGTH | The length of the string matched | - | + | + |
+| | by match(); -1 if no match. | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| SUBSEP | The character used to separate | | | |
+| | multiple subscripts in array | | | |
+| | elements.Default: "\034" | - | + | + |
+| | (non-printable character, | | | |
+| | dec: 28, hex: 1C) | | | |
+'-------------+-----------------------------------+-----+-------+-------'
+| TEXTDOMAIN | The text domain of the AWK | | | |
+| | program; used to find the | - | - | + |
+| | localized translations for the | | | |
+| | program's strings. | | | |
+'-------------'-----------------------------------'-----'-------'-------'
+
+
+ ============================ I/O Statements ===========================
+
+.---------------------.-------------------------------------------------.
+| | |
+| Statement | Description |
+| | |
+'---------------------+-------------------------------------------------'
+| close(file [, how]) | Close file, pipe or co-process. The optional |
+| | how should only be used when closing one end of |
+| | a two-way pipe to a co-process. It must be a |
+| | string value, either "to" or "from". |
+'---------------------+-------------------------------------------------'
+| getline | Set $0 from next input record; set NF, NR, FNR. |
+| | Returns 0 on EOF and �1 on an error. Upon an |
+| | error, ERRNO contains a string describing the |
+| | problem. |
+'---------------------+-------------------------------------------------'
+| getline <file | Set $0 from next record of file; set NF. |
+'---------------------+-------------------------------------------------'
+| getline var | Set var from next input record; set NR, FNR. |
+'---------------------+-------------------------------------------------'
+| getline var <file | Set var from next record of file. |
+'---------------------+-------------------------------------------------'
+| command | | Run command piping the output either into $0 or |
+| getline [var] | var, as above. If using a pipe or co-process |
+| | to getline, or from print or printf within a |
+| | loop, you must use close() to create new |
+| | instances |
+'---------------------+-------------------------------------------------'
+| command |& | Run command as a co-process piping the output |
+| getline [var] | either into $0 or var, as above. Co-processes |
+| | are a gawk extension. |
+'---------------------+-------------------------------------------------'
+| next | Stop processing the current input record. |
+| | The next input record is read and processing |
+| | starts over with the first pattern in the AWK |
+| | program. If the end of the input data is |
+| | reached, the END block(s), if any, are executed.|
+'---------------------+-------------------------------------------------'
+| nextfile | Stop processing the current input file. The |
+| | next input record read comes from the next |
+| | input file. FILENAME and ARGIND are updated, |
+| | FNR is reset to 1, and processing starts over |
+| | with the first pattern in the AWK program. If |
+| | the end of the input data is reached, the END |
+| | block(s), are executed. |
+'---------------------+-------------------------------------------------'
+| print | Prints the current record. The output record is |
+| | terminated with the value of the ORS variable. |
+'---------------------+-------------------------------------------------'
+| print expr-list | Prints expressions. Each expression is |
+| | separated by the value of the OFS variable. |
+| | The output record is terminated with the value |
+| | of the ORS variable. |
+'---------------------+-------------------------------------------------'
+| print expr-list | Prints expressions on file. Each expression is |
+| >file | separated by the value of the OFS variable. The |
+| | output record is terminated with the value of |
+| | the ORS variable. |
+'---------------------+-------------------------------------------------'
+| printf fmt, | Format and print. |
+| expr-list | |
+'---------------------+-------------------------------------------------'
+| printf fmt, | Format and print on file. |
+| expr-list >file | |
+'---------------------+-------------------------------------------------'
+| system(cmd-line) | Execute the command cmd-line, and return the |
+| | exit status. |
+'---------------------+-------------------------------------------------'
+| fflush([file]) | Flush any buffers associated with the open |
+| | output file or pipe file. If file is missing, |
+| | then stdout is flushed. If file is the null |
+| | string, then all open output files and pipes |
+| | have their buffers flushed. |
+'---------------------+-------------------------------------------------'
+| print ... >> file | Appends output to the file. |
+'---------------------+-------------------------------------------------'
+| print ... | command | Writes on a pipe. |
+'---------------------+-------------------------------------------------'
+| print ... |& | Sends data to a co-process. |
+| command | |
+'---------------------'-------------------------------------------------'
+
+
+ =========================== Numeric Functions =========================
+
+.---------------------.-------------------------------------------------.
+| | |
+| Function | Description |
+| | |
+'---------------------+-------------------------------------------------'
+| atan2(y, x) | Returns the arctangent of y/x in radians. |
+'---------------------+-------------------------------------------------'
+| cos(expr) | Returns the cosine of expr, which is in radians.|
+'---------------------+-------------------------------------------------'
+| exp(expr) | The exponential function. |
+'---------------------+-------------------------------------------------'
+| int(expr) | Truncates to integer. |
+'---------------------+-------------------------------------------------'
+| log(expr) | The natural logarithm function. |
+'---------------------+-------------------------------------------------'
+| rand() | Returns a random number N, between 0 and 1, |
+| | such that 0 <= N < 1. |
+'---------------------+-------------------------------------------------'
+| sin(expr) | Returns the sine of expr, which is in radians. |
+'---------------------+-------------------------------------------------'
+| sqrt(expr) | The square root function. |
+'---------------------+-------------------------------------------------'
+| srand([expr]) | Uses expr as a new seed for the random number |
+| | generator. If no expr is provided, the time of |
+| | day is used. The return value is the previous |
+| | seed for the random number generator. |
+'---------------------'-------------------------------------------------'
+
+
+ ====================== Bit Manipulation Functions =====================
+
+.---------------------.-------------------------------------------------.
+| | |
+| Function | Description |
+| | |
+'---------------------+-------------------------------------------------'
+| and(v1, v2) | Return the bitwise AND of the values provided |
+| | by v1 and v2. |
+'---------------------+-------------------------------------------------'
+| compl(val) | Return the bitwise complement of val. |
+'---------------------+-------------------------------------------------'
+| lshift(val, count) | Return the value of val, shifted left by |
+| | count bits. |
+'---------------------+-------------------------------------------------'
+| or(v1, v2) | Return the bitwise OR of the values provided by |
+| | v1 and v2. |
+'---------------------+-------------------------------------------------'
+| rshift(val, count) | Return the value of val, shifted right by |
+| | count bits. |
+'---------------------+-------------------------------------------------'
+| xor(v1, v2) | Return the bitwise XOR of the values provided |
+| | by v1 and v2. |
+'---------------------'-------------------------------------------------'
+
+
+ =========================== String Functions ==========================
+
+.---------------------.-------------------------------------------------.
+| | |
+| Function | Description |
+| | |
+'---------------------+-------------------------------------------------'
+| asort(s [, d]) | Returns the number of elements in the source |
+| | array s. The contents of s are sorted using |
+| | gawk's normal rules for comparing values, and |
+| | the indexes of the sorted values of s are |
+| | replaced with sequential integers starting with |
+| | 1. If the optional destination array d is |
+| | specified, then s is first duplicated into d, |
+| | and then d is sorted, leaving the indexes of |
+| | the source array s unchanged. |
+'---------------------+-------------------------------------------------'
+| asorti(s [, d]) | Returns the number of elements in the source |
+| | array s. The behavior is the same as that of |
+| | asort(), except that the array indices are |
+| | used for sorting, not the array values. When |
+| | done, the array is indexed numerically, and the |
+| | values are those of the original indices. The |
+| | original values are lost; thus provide a second |
+| | array if you wish to preserve the original. |
+'---------------------+-------------------------------------------------'
+| gensub(r, s, | Search the target string t for matches of the |
+| h [, t]) | regular expression r. If h is a string |
+| | beginning with g or G, then replace all matches |
+| | of r with s. Otherwise, h is a number |
+| | indicating which match of r to replace. If t is |
+| | not supplied, $0 is used instead. Within the |
+| | replacement text s, the sequence \n, where n is |
+| | a digit from 1 to 9, may be used to indicate |
+| | just the text that matched the n'th |
+| | parenthesized subexpression. The sequence \0 |
+| | represents the entire matched text, as does the |
+| | character &. Unlike sub() and gsub(), the |
+| | modified string is returned as the result of |
+| | the function, and the original target string |
+| | is not changed. |
+'---------------------+-------------------------------------------------'
+| gsub(r, s [, t]) | For each substring matching the regular |
+| | expression r in the string t, substitute the |
+| | string s, and return the number of |
+| | substitutions. If t is not supplied, use $0. |
+| | An & in the replacement text is replaced with |
+| | the text that was actually matched. Use \& to |
+| | get a literal &. (This must be |
+| | typed as "\\&") |
+'---------------------+-------------------------------------------------'
+| index(s, t) | Returns the index of the string t in the |
+| | string s, or 0 if t is not present. (This |
+| | implies that characterindices start at one.) |
+'---------------------+-------------------------------------------------'
+| length([s]) | Returns the length of the string s, or the |
+| | length of $0 if s is not supplied. |
+'---------------------+-------------------------------------------------'
+| match(s, r [, a]) | Returns the position in s where the regular |
+| | expression r occurs, or 0 if r is not present, |
+| | and sets the values of RSTART and RLENGTH. |
+| | Note that the argument order is the same as for |
+| | the ~ operator: str ~ re. If array a is |
+| | provided, a is cleared and then elements 1 |
+| | through n are filled with the portions of s |
+| | that match the corresponding parenthesized |
+| | subexpression in r. The 0'th element of a |
+| | contains the portion of s matched by the entire |
+| | regular expression r. Subscripts a[n, "start"], |
+| | and a[n, "length"] provide the starting index |
+| | in the string and length respectively, of each |
+| | matching substring. |
+'---------------------+-------------------------------------------------'
+| split(s, a [, r]) | Splits the string s into the array a on the |
+| | regular expression r, and returns the number of |
+| | fields. If r is omitted, FS is used instead. |
+| | The array a is cleared first. Splitting behaves |
+| | identically to field splitting. |
+'---------------------+-------------------------------------------------'
+| sprintf(fmt, | Prints expr-list according to fmt, and returns |
+| expr-list) | the resulting string. |
+'---------------------+-------------------------------------------------'
+| strtonum(str) | Examines str, and returns its numeric value. |
+| | If str begins with a leading 0, strtonum() |
+| | assumes that str is an octal number. If str |
+| | begins with a leading 0x or 0X, strtonum() |
+| | assumes that str is a hexadecimal number. |
+'---------------------+-------------------------------------------------'
+| sub(r, s [, t]) | Just like gsub(), but only the first matching |
+| | substring is replaced. |
+'---------------------+-------------------------------------------------'
+| substr(s, i [, n]) | Returns the at most n-character substring of s |
+| | starting at i. If n is omitted, the rest of s |
+| | is used. |
+'---------------------+-------------------------------------------------'
+| tolower(str) | Returns a copy of the string str, with all the |
+| | upper-case characters in str translated to |
+| | their corresponding lower-case counterparts. |
+| | Non-alphabetic characters are left unchanged. |
+'---------------------+-------------------------------------------------'
+| toupper(str) | Returns a copy of the string str, with all the |
+| | lower-case characters in str translated to |
+| | their corresponding upper-case counterparts. |
+| | Non-alphabetic characters are left unchanged. |
+'---------------------'-------------------------------------------------'
+
+
+ ============================ Time Functions ===========================
+
+.---------------------.-------------------------------------------------.
+| | |
+| Function | Description |
+| | |
+'---------------------+-------------------------------------------------'
+| mktime(datespec) | Turns datespec into a time stamp of the same |
+| | form as returned by systime(). The datespec is |
+| | a string of the form YYYY MM DD HH MM SS[ DST]. |
+| | The contents of the string are six or seven |
+| | numbers representing respectively the full year |
+| | including century, the month from 1 to 12, the |
+| | day of the month from 1 to 31, the hour of the |
+| | day from 0 to 23, the minute from 0 to 59, and |
+| | the second from 0 to 60, and an optional |
+| | daylight saving flag. The values of these |
+| | numbers need not be within the ranges |
+| | specified; for example, an hour of -1 means 1 |
+| | hour before midnight. The origin-zero Gregorian |
+| | calendar is assumed, with year 0 preceding year |
+| | 1 and year -1 preceding year 0. The time is |
+| | assumed to be in the local timezone. If the |
+| | daylight saving flag is positive, the time is |
+| | assumed to be daylight saving time; if zero, |
+| | the time is assumed to be standard time; and if |
+| | negative (the default), mktime() attempts to |
+| | determine whether daylight saving time is in |
+| | effect for the specified time. If datespec does |
+| | not contain enough elements or if the resulting |
+| | time is out of range, mktime() returns -1. |
+'---------------------+-------------------------------------------------'
+| strftime([format | Formats timestamp according to the |
+| [, timestamp]]) | specification in format. The timestamp should |
+| | be of the same form as returned by systime(). |
+| | If timestamp is missing, the current time of |
+| | day is used.If format is missing, a default |
+| | format equivalent to the output of date(1) is |
+| | used. See the specification for the strftime() |
+| | function in ANSI C for the format conversions |
+| | that are guaranteed to be available. A |
+| | public-domain version of strftime(3) and a man |
+| | page for it come with gawk; if that version was |
+| | used to build gawk, then all of the conversions |
+| | described in that man page are available to |
+| | gawk. |
+'---------------------+-------------------------------------------------'
+| systime() | Returns the current time of day as the number |
+| | of seconds since the Epoch (1970-01-01 00:00:00 |
+| | UTC on POSIX systems). |
+'---------------------'-------------------------------------------------'
+
+
+ =============== Internationalization (I18N) Functions ================
+
+.---------------------.-------------------------------------------------.
+| | |
+| Function | |
+| | |
+| Description | |
+| | |
+'---------------------+-------------------------------------------------'
+| bindtextdomain(directory [, domain]) |
+| |
+| Specifies the directory where gawk looks for the .mo files. It |
+| returns the directory where domain is ``bound.'' The default domain |
+| is the value of TEXTDOMAIN. If directory is the null string (""), |
+| then bindtextdomain() returns the current binding for the given domain|
+'---------------------+-------------------------------------------------'
+| dcgettext(string [, domain [, category]]) |
+| |
+| Returns the translation of string in text domain domain for locale |
+| category category. The default value for domain is the current value |
+| of TEXTDOMAIN. The default value for category is "LC_MESSAGES". If |
+| you supply a value for category, it must be a string equal to one of |
+| the known locale categories. You must also supply a text domain. Use |
+| TEXTDOMAIN if you want to use the current domain. |
+'---------------------+-------------------------------------------------'
+| dcngettext(string1 , string2 , number [, domain [, category]]) |
+| |
+| Returns the plural form used for number of the translation of string1 |
+| and string2 in text domain domain for locale category category. The |
+| default value for domain is the current value of TEXTDOMAIN. The |
+| default value for category is "LC_MESSAGES". If you supply a value |
+| for category, it must be a string equal to one of the known locale |
+| categories. You must also supply a text domain. Use TEXTDOMAIN if |
+| you want to use the current domain. |
+'---------------------'-------------------------------------------------'
+
+
+
+
+ =============== GNU AWK's Command Line Argument Summary ===============
+
+.-------------------------.---------------------------------------------.
+| | |
+| Argument | Description |
+| | |
+'-------------------------+---------------------------------------------'
+| -F fs | Use fs for the input field separator |
+| --field-sepearator fs | (the value of the FS predefined variable). |
+'-------------------------+---------------------------------------------'
+| -v var=val | Assign the value val to the variable var, |
+| --assign var=val | before execution of the program begins. |
+| | Such variable values are available to the |
+| | BEGIN block of an AWK program. |
+'-------------------------+---------------------------------------------'
+| -f program-file | Read the AWK program source from the file |
+| --file program-file | program-file, instead of from the first |
+| | command line argument. Multiple -f |
+| | (or --file) options may be used. |
+'-------------------------+---------------------------------------------'
+| -mf NNN | Set various memory limits to the value NNN. |
+| -mr NNN | The f flag sets the maximum number of |
+| | fields, and the r flag sets the maximum |
+| | record size. (Ignored by gawk, since gawk |
+| | has no pre-defined limits) |
+'-------------------------+---------------------------------------------'
+| -W compat | Run in compatibility mode. In compatibility |
+| -W traditional | mode, gawk behaves identically to UNIX awk; |
+| --compat--traditional | none of the GNU-specific extensions are |
+| | recognized. |
+'-------------------------+---------------------------------------------'
+| -W copyleft | Print the short version of the GNU copyright|
+| -W copyright | information message on the standard output |
+| --copyleft | and exit successfully. |
+| --copyright | |
+'-------------------------+---------------------------------------------'
+| -W dump-variables[=file]| Print a sorted list of global variables, |
+| --dump-variables[=file] | their types and final values to file. If no |
+| | file is provided, gawk uses a file named |
+| | awkvars.out in the current directory. |
+'-------------------------+---------------------------------------------'
+| -W help | Print a relatively short summary of the |
+| -W usage | available options on the standard output. |
+| --help | |
+| --usage | |
+'-------------------------+---------------------------------------------'
+|-W lint[=value] | Provide warnings about constructs that |
+|--lint[=value] | are dubious or non-portable to other AWK |
+| | impl�s. With argument fatal, lint warnings |
+| | become fatal errors. With an optional |
+| | argument of invalid, only warnings about |
+| | things that are actually invalid are |
+| | issued. (This is not fully implemented yet.)|
+'-------------------------+---------------------------------------------'
+| -W lint-old--lint-old | Provide warnings about constructs that are |
+| | not portable to the original version of |
+| | Unix awk. |
+'-------------------------+---------------------------------------------'
+| -W gen-po--gen-po | Scan and parse the AWK program, and |
+| | generate a GNU .po format file on standard |
+| | output with entries for all localizable |
+| | strings in the program. The program itself |
+| | is not executed. |
+'-------------------------+---------------------------------------------'
+| -W non-decimal-data | Recognize octal and hexadecimal values in |
+| --non-decimal-data | input data. |
+'-------------------------+---------------------------------------------'
+| -W posix--posix | This turns on compatibility mode, with the |
+| | following additional restrictions: |
+| | o \x escape sequences are not recognized. |
+| | o Only space and tab act as field |
+| | separators when FS is set to a single |
+| | space, new-line does not. |
+| | o You cannot continue lines after ? and :. |
+| | o The synonym func for the keyword function|
+| | is not recognized. |
+| | o The operators ** and **= cannot be used |
+| | in place of ^ and ^=.� The fflush() |
+| | function is not available. |
+'-------------------------+---------------------------------------------'
+| -W profile[=prof_file] | Send profiling data to prof_file. |
+| --profile[=prof_file] | The default is awkprof.out. When run with |
+| | gawk, the profile is just a "pretty |
+| | printed" version of the program. When run |
+| | with pgawk, the profile contains execution |
+| | counts of each statement in the program |
+| | in the left margin and function call counts |
+| | for each user-defined function. |
+'-------------------------+---------------------------------------------'
+| -W re-interval | Enable the use of interval expressions in |
+| --re-interval | regular expression matching. Interval |
+| | expressions were not traditionally |
+| | available in the AWK language. |
+'-------------------------+---------------------------------------------'
+| -W source program-text | Use program-text as AWK program source |
+| --source program-text | code. This option allows the easy |
+| | intermixing of library functions (used via |
+| | the -f and --file options) with source code |
+| | entered on the command line. |
+'-------------------------+---------------------------------------------'
+| -W version | Print version information for this |
+| --version | particular copy of gawk on the standard |
+| | output. |
+'-------------------------+---------------------------------------------'
+| -- | Signal the end of options. This is useful |
+| | to allow further arguments to the AWK |
+| | program itself to start with a "-". This |
+| | is mainly for consistency with the argument |
+| | parsing convention used by most other POSIX |
+| | programs. |
+'-------------------------'---------------------------------------------'
+###alle Leerzeile löschen
+awk ’NF’ datei
+###zähle Zeilen der Datei
+awk ’END {print NR}’
+###Zeilennummern einfügen
+awk ’{print NR, $0}’
+###jede dritte Zeile anzeigen
+awk ’NR%3== 1’
+###Jede Eingabezeile mit mehr als vier Feldern (Wörtern) ausgeben:
+NF > 4
+###Anzahl Eingabezeilen ausgeben:
+END { print NR }
+###Zehnte Eingabezeile ausgeben:
+NR == 10
+###Gesamtzahl aller Felder (Wörter) aller Eingabezeilen ausgeben:
+{ nw += NF } END { print nw }
+###Anzahl aller Zeilen ausgeben, die Barbara enthalten:
+/Barbara/ { ++cnt } END { print cnt }
+###Jede Zeile ausgeben, die mindestens ein Feld (Wort) enthält:
+NF > 0
+###Jede Zeile ausgeben, die länger als 80 Zeichen ist:
+length($0) > 80
+###Die beiden ersten Felder (Worte) jeder Zeile vertauschen und dann die Zeile ausgeben:
+{ tmp = $1; $1 = $2; $2 = tmp; print }
+###Jede Zeile mit ihrer Zeilennummer davor ausgeben:
+{ print NR, $0 }
+###Jede Zeile ausgeben und vorher das zweite Feld (Wort) löschen:
+{ $2 = ""; print }
+###Jede Zeile ausgeben, die länger als 80 Zeichen ist:
+length($0) > 80
+###Die beiden ersten Felder (Worte) jeder Zeile vertauschen und dann die Zeile ausgeben
+tmp = $1; $1 = $2; $2 = tmp; print
+###
--- /dev/null
+#!/usr/bin/perl -w
+# ______________________________________________________________________
+#
+# Projekt: capifax
+# Name: capifax
+# Autor: mgoppold
+# Revision: $Revision$
+# letzte Änderung: $Date$
+# durch: $Author$
+# Source: $HeadURL$
+# ______________________________________________________________________
+#
+# CUPS backend for printing to capifax
+#
+
+use Carp;
+use File::Temp qw/ :mktemp /;
+use File::Basename;
+use MIME::Words qw(encode_mimewords);
+use Mail::Send;
+use MIME::Lite;
+# use Config::General;
+
+my $CUPS_BACKEND_OK=0;
+my $CUPS_BACKEND_FAILED=1;
+my $CUPS_BACKEND_AUTH_REQUIRED=2;
+my $CUPS_BACKEND_HOLD=3;
+my $CUPS_BACKEND_STOP=4;
+my $CUPS_BACKEND_CANCEL=5;
+
+my ($CUPS_SERVERROOT,$TMPDIR,$PRINTER);
+my ($scheme,$uri,$realprinter,$archivserver);
+my ($destdir,$destfile,$dest);
+my ($ppdfile,$DefaultOutput,$DefaultCategory,$DefaultCompany);
+my ($jahr,$monat,$tag,$hour,$min,$sec);
+my ($job,$user,$title,$copies,$options,$filename);
+my ($cmdln,$status);
+my ($fh,$havetoremovetempfile);
+my ($fhtif,$filenametif);
+my ($fhpdf,$filenamepdf);
+my (@optionlist);
+my (%serverconfig,$CUPS_SERVERADMIN);
+my ($msg,$unused1,$unused2,$subject,$mailtext);
+my ($debug);
+my (@jobfiles,$count_jobfiles,$suffix,$i);
+
+my ($FAXMSN,$FAXCONTROLLER,$FAXIDENT,$FAXHEADER,$FAX_GS_OPTIONS);
+
+
+$FAXMSN="3556098";
+$FAXCONTROLLER="1";
+$FAXIDENT="+493713556098";
+$FAXHEADER="Mario Hoellein";
+$FAX_GS_OPTIONS="-q -dNOPAUSE -dBATCH -sDEVICE=tiffg3 -r204x196";
+
+
+$havetoremovetempfile=0;
+$debug=1;
+
+# hier liegt Monat zw. 0 und 11
+($sec,$min,$hour,$tag,$monat, $jahr) = (localtime)[0,1,2,3,4,5];
+$monat+=1;
+$jahr+=1900;
+$monat=sprintf("%.2d",$monat);
+$tag=sprintf("%.2d",$tag);
+$sec=sprintf("%.2d",$sec);
+$min=sprintf("%.2d",$min);
+$hour=sprintf("%.2d",$hour);
+
+$_=$0;
+SWITCH: {
+ $scheme = "capifax", last SWITCH if /\/capifax$/;
+ $scheme = "capifax_test", last SWITCH if /\/capifax_test$/;
+}
+
+if (@ARGV == 0) {
+ print "direct $scheme \"Unknown\" \"Printing to $scheme\"\n";
+ exit $CUPS_BACKEND_OK;
+}
+
+
+# in case of wrong number of arguments: print usage hint
+if (@ARGV != 5 && @ARGV != 6) {
+ print "
+Usage: $scheme job-id user title copies options [file]
+ example for device-URI: '$scheme://'
+
+Install a printqueue with lpadmin -p <printer-name>
+-v $scheme:// -i /usr/share/cups/model/capifax.ppd -E
+
+";
+ exit $CUPS_BACKEND_FAILED;
+}
+
+# Flush everything immediately.
+$|=1;
+
+
+($job,$user,$title,$copies,$options,$filename)=@ARGV;
+
+$CUPS_SERVERROOT = $ENV{"CUPS_SERVERROOT"};
+$PRINTER = $ENV{"PRINTER"};
+$TMPDIR = $ENV{"TMPDIR"};
+#%serverconfig = ParseConfig($CUPS_SERVERROOT."/cupsd.conf");
+#$CPS_SERVERADMIN = $serverconfig{'ServerAdmin'};
+$CUPS_SERVERADMIN = "root\@tbz-pariv.lan";
+
+if ($debug > 0) {
+ print STDERR "DEBUG: [Job $job:$scheme] job=$job\n";
+ print STDERR "DEBUG: [Job $job:$scheme] user=$user\n";
+ print STDERR "DEBUG: [Job $job:$scheme] title=$title\n";
+ print STDERR "DEBUG: [Job $job:$scheme] copies=$copies\n";
+ printf STDERR "DEBUG: [Job $job:$scheme] options=%s\n",$options?$options:"not set";
+ printf STDERR "DEBUG: [Job $job:$scheme] filename=%s\n",$filename?$filename:"not set";
+ printf STDERR "DEBUG: [Job $job:$scheme] CUPS_SERVERADMIN=%s\n",$CUPS_SERVERADMIN?$CUPS_SERVERADMIN:"not set";
+}
+
+# Wenn in den options schon Leerzeichen vorkommen:
+# options=document-name=Allonge\ 56235:\ ComSell\ GmbH job-uuid=urn:uuid:4eaa0aff-f2b8-348c-5449-4934aff0d4fa
+# kann optionlist nicht sauber trennen, deshalb werden die Leerzeichen schon hier rausgenommen
+$options=~s/\\ //g;
+@optionlist=split(/\s/,$options);
+foreach $option (@optionlist) {
+ my ($var,$value)=split(/\s*=\s*/,$option,2);
+ print STDERR "DEBUG: [Job $job:$scheme] parse options ($var,$value)\n" if ($debug > 1);
+ $var =~ s/[ \.,;:*\-\+#~$"?&\/\\()\[\]{}]//g; # um gültige Var-Name zu erhalten
+ $value=~s/[{}]//g; # die {} entfernen weil eine Substitution von
+ # ${VAR} nicht geht wohl aber $VAR
+ $value=~s/\$(\w+)/${$1}/g; # Variablen auflösen
+ no strict 'refs';
+ print STDERR "DEBUG: [Job $job:$scheme] parse options ($var,$value)\n" if ($debug > 1);
+ $$var = $value;
+ print STDERR "DEBUG: [Job $job:$scheme] parse options ($var,$$var)\n" if ($debug > 0);
+}
+
+if ( $title ) {
+ # print STDERR "DEBUG: [Job $job:$scheme] ok title $title or $scheme\n";
+ $title=~s/[[:punct:]]+/_/g;
+ $title=~s/[[:space:]]+/_/g;
+ if ( "$title" =~ /stdin/ && ${documentname} ) {
+ $title=${documentname};
+ $title=~s/[[:punct:]]+/_/g;
+ $title=~s/[[:space:]]+/_/g;
+ }
+ else {
+ $title=~s/_stdin_/$scheme/g;
+ }
+}
+else {
+ # print STDERR "DEBUG: [Job $job:$scheme] no title use $scheme or ${documentname}\n";
+ $title="$scheme";
+ $title=${documentname} if (${documentname});
+ $title=~s/[[:punct:]]+/_/g;
+ $title=~s/[[:space:]]+/_/g;
+}
+
+$NUMBER=~s/[[:punct:]]+//g;
+$NUMBER=~s/[[:space:]]+//g;
+
+if (! defined ($filename)) {
+ ($fh,$filename) = mkstemps( "${TMPDIR}/${job}_${scheme}_${title}_XXXXXX", ".prn");
+ while (<STDIN>) {
+ print $fh $_ ;
+ }
+ close($fh);
+ $havetoremovetempfile=1;
+ $jobfiles[0]=$filename;
+ $count_jobfiles=1;
+}
+else {
+ $jobfiles[0]=$filename;
+}
+
+$user=$ENV{"USER"} if (! $user);
+$user="cups" if (! $user);
+
+$user =~ tr/ .,;:*+#~$"?&\/\\()[]/_/;
+
+# get file to which the job is "printed" from device URI, so
+# so that you can use this backend multiple times, for various
+# "modarch" printers...
+
+$uri = $ENV{"DEVICE_URI"};
+
+# load ppd-File-Options
+$ppdfile=$ENV{"PPD"};
+
+
+if ( "$NUMBER" == "" ) {
+ if ( $CUPS_SERVERADMIN || $EMAIL ) {
+ my $recipient;
+ if ($EMAIL) { $recipient=$EMAIL; } else { $recipient=$CUPS_SERVERADMIN; }
+ $msg = Mail::Send->new() || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Fehlermail an $recipient\n";
+ $msg->to($recipient);
+ $msg->subject("CUPS [Job $job:$scheme] Fehler: capifax");
+ $fh = $msg->open;
+ print $fh "Fehler beim versenden des Faxes!\n";
+ print $fh "Es wurde keine Faxnummer angegeben (Option NUMBER).\n\n";
+ print $fh "z.B.: lp -d faxprinter -o NUMBER=003713556098 -o EMAIL=mhoellein\@freenet.de\n";
+ $fh->close || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Fehlermail an $recipient\n";
+ }
+ print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden des Faxes: Es wurde keine Faxnummer angegeben.!\n";
+ print STDERR "WARNING: [Job $job:$scheme] fertig mit ret=$CUPS_BACKEND_FAILED.\n";
+ exit $CUPS_BACKEND_HOLD;
+}
+
+$suffix="";
+$i=1;
+foreach $filename ( @jobfiles ) {
+ # TMPLPD.20041102113805.QSYSPRT.EGSKEM02.719
+ # USER.20041102113805.NAME.PRINTER.ID
+ # ok ok ok ok ok
+ if ($count_jobfiles > 1) {
+ $suffix=sprintf ":%d",$i;
+ $i++;
+ }
+
+ ($fhtif,$filenametif) = mkstemps( "${TMPDIR}/${job}_${scheme}_${title}_XXXXXX", ".tif");
+ $cmdln="/usr/bin/gs $FAX_GS_OPTIONS -sOutputFile=$filenametif $filename ";
+
+ if ($debug > 0) {
+ print STDERR "DEBUG: [Job $job:$scheme] CUPS_SERVERROOT=$CUPS_SERVERROOT\n";
+ print STDERR "DEBUG: [Job $job:$scheme] filename=$filename\n";
+ if ($debug > 1) {
+ my @vars = sort(keys(%ENV));
+ foreach(@vars) {
+ print STDERR "DEBUG: [Job $job:$scheme] \$ENV{$_}=$ENV{$_}\n";
+ }
+ }
+ }
+
+ if ($> == 0) {
+ $cmdln = "su -c '".$cmdln."' lp";
+ }
+
+ print STDERR "DEBUG: [Job $job:$scheme] cmdln=$cmdln\n" if ($debug > 0);
+ $status=system ($cmdln);
+ if ( $status != 0 ) {
+ print STDERR "ERROR: [Job $job:$scheme] Fehler beim Aufbereiten des Faxes \[Fehlercode=$status\]\n";
+ if ( $CUPS_SERVERADMIN ) {
+ $msg = Mail::Send->new() || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Fehlermail an $CUPS_SERVERADMIN\n";
+ $msg->to($CUPS_SERVERADMIN);
+ $msg->subject("CUPS [Job $job:$scheme] Fehler: gs");
+ $fh = $msg->open;
+ print $fh "Fehler beim Aufbereiten des Faxex!\n";
+ print $fh "Die Kommandozeile war:\n";
+ print $fh "$cmdln\n";
+ print $fh "Der Fehlercode lautet: $status\n";
+ $fh->close || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Fehlermail an $CUPS_SERVERADMIN\n";
+ }
+ print STDERR "WARNING: [Job $job:$scheme] fertig mit ret=$CUPS_BACKEND_FAILED.\n";
+ exit $CUPS_BACKEND_FAILED;
+ }
+ print STDERR "WARNING: [Job $job:$scheme] $cmdln\n";
+
+ ($fhpdf,$filenamepdf) = mkstemps( "${TMPDIR}/${job}_${scheme}_${jahr}${monat}${tag}${hour}${min}${sec}_${NUMBER}_${title}_XXXXXX", ".pdf");
+ $cmdln="/usr/bin/tiff2pdf -z -p a4 -c capifax -a 'Sender: $EMAIL' -t capifax -k 'capifax ${title}' -s '${tag}.${monat}.${jahr}' -o $filenamepdf $filenametif";
+
+ if ($> == 0) {
+ $cmdln = "su -c '".$cmdln."' lp";
+ }
+
+ print STDERR "DEBUG: [Job $job:$scheme] cmdln=$cmdln\n" if ($debug > 0);
+ $status=system ($cmdln);
+ if ( $status != 0 ) {
+ print STDERR "ERROR: [Job $job:$scheme] Fehler beim Aufbereiten des Faxes \[Fehlercode=$status\]\n";
+ if ( $CUPS_SERVERADMIN ) {
+ $msg = Mail::Send->new() || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Fehlermail an $CUPS_SERVERADMIN\n";
+ $msg->to($CUPS_SERVERADMIN);
+ $msg->subject("CUPS [Job $job:$scheme] Fehler: gs");
+ $fh = $msg->open;
+ print $fh "Fehler beim Aufbereiten des Faxes!\n";
+ print $fh "Die Kommandozeile war:\n";
+ print $fh "$cmdln\n";
+ print $fh "Der Fehlercode lautet: $status\n";
+ $fh->close || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Fehlermail an $CUPS_SERVERADMIN\n";
+ }
+ print STDERR "WARNING: [Job $job:$scheme] fertig mit ret=$CUPS_BACKEND_FAILED.\n";
+ exit $CUPS_BACKEND_FAILED;
+ }
+ print STDERR "WARNING: [Job $job:$scheme] $cmdln\n";
+ $NUMBER="0".$NUMBER if ( length $NUMBER > 3 ); # Amtsnull davorschreiben
+ $cmdln="/usr/local/bin/capifax -ident '".$FAXIDENT."' -header '".$FAXHEADER."' -loglevel 0 -send ".$filenametif." ".$FAXCONTROLLER." ".$FAXMSN." ".$NUMBER;
+
+ if ($> == 0) {
+ $cmdln = "su -c '".$cmdln."' lp";
+ }
+
+ print STDERR "DEBUG: [Job $job:$scheme] cmdln=$cmdln\n" if ($debug > 0);
+ if (open(PH,"$cmdln 2>&1 |")) {
+ while (<PH>) {
+ $outmsg.=$_;
+ }
+ close(PH);
+ if ( $EMAIL ) {
+ $subject="CUPS [Job $job:$scheme] Protokoll des Faxes von MSN $FAXMSN an $NUMBER";
+ $mailtext="IDENT: $FAXIDENT\nHEADER: $FAXHEADER\nMSN: $FAXMSN\nNUMBER: $NUMBER\n\nAusgabe des Faxprogramms:\n$outmsg\n\nEnde der automatisch erzeugten Mail.";
+
+ $msg = MIME::Lite->new(
+ From =>$CUPS_SERVERADMIN,
+ To =>$EMAIL,
+ Subject =>encode_mimewords($subject),
+ Type =>'multipart/mixed'
+ ) || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Mail an $EMAIL\n";
+ $msg->attach(Type =>'TEXT',
+ Data =>$mailtext,
+ ) || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Mail an $EMAIL\n";
+ $msg->attach(Type =>'application/pdf',
+ Path =>$filenamepdf,
+ Filename =>basename($filenamepdf),
+ Disposition => 'attachment'
+ ) || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Mail an $EMAIL\n";
+ $msg->send || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Mail an $EMAIL\n";
+
+ }
+ }
+ else {
+ if ( $CUPS_SERVERADMIN ) {
+ $msg = Mail::Send->new() || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Fehlermail an $CUPS_SERVERADMIN\n";
+ $msg->to($CUPS_SERVERADMIN);
+ $msg->subject("CUPS [Job $job:$scheme] Fehler: capifax");
+ $fh = $msg->open;
+ print $fh "Fehler beim versenden des Faxes!\n";
+ print $fh "Die Kommandozeile war:\n";
+ print $fh "$cmdln\n";
+ print $fh "Konnte cmdln nicht ausführen!";
+ $fh->close || print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden der Fehlermail an $CUPS_SERVERADMIN\n";
+ }
+ print STDERR "ERROR: [Job $job:$scheme] Fehler beim versenden des Faxes: Konnte cmdln nicht ausführen!\n";
+ print STDERR "WARNING: [Job $job:$scheme] fertig mit ret=$CUPS_BACKEND_FAILED.\n";
+ exit $CUPS_BACKEND_FAILED;
+ }
+ print STDERR "WARNING: [Job $job:$scheme] $cmdln\n";
+
+# if ($havetoremovetempfile) {
+# unlink($filename);
+# }
+# unlink($filenametif);
+# unlink($filenamepdf);
+}
+
+print STDERR "WARNING: [Job $job:$scheme] fertig mit ret=$CUPS_BACKEND_OK.\n";
+exit $CUPS_BACKEND_OK;
--- /dev/null
+#!/usr/bin/perl
+use strict;
+use warnings;
+use FileHandle;
+use MIME::Entity;
+
+# CUPS-Backend, um aus einem Druckauftrag eine Mail zu generieren.
+# Die Device-URI muss die Form
+#
+# mail:/user@computer.domain
+#
+# haben. Alles andere geht dann von selbst :-) Ein Device für den
+# Versand an root@localhost wird dem Benutzer bei der Einrichtung
+# schon vorgegeben.
+# benötigt Debian-Paket libmime-perl
+
+unless(@ARGV){
+ # Wird kein Parameter angegeben, will CUPS nur Infos über
+ # angeschlossene Drucker. Die sind Zeilenweise in der Form
+ # class uri model description
+ # class: file, direct, serial, network
+ print 'network mail "Unknown" "EMail-Address Mailer"',"\n";
+ print 'network mail:/root@localhost "Unknown" "Mail to root"',"\n";
+ exit;
+}
+
+# Jetzt extrahiere ich die Parameter, die für mich interessant
+sind.
+# Entgegen der Dokumentation gibts nur 5-6 statt 6-7 Parameter
+# (printer als erstes wird nicht angegeben)
+
+if($#ARGV<4 or $#ARGV>5){
+ print STDERR "ERROR: mail job-id user title copies options [file]\n";
+ exit 1;
+}
+
+my($job,$user,$title,$copies,$options,$filename)=@ARGV;
+my($deviceuri)=($ENV{DEVICE_URI} or '');
+my($email)=($deviceuri=~m!^mail:/(.*)$!);
+
+# Druckdaten lesen und MIME-Type feststellen:
+my($file,$type);
+if($filename){
+ $type=`file -bi $filename`;
+ open $file, "<$filename";
+}else{
+ $file=*STDIN;
+ $type='application/octet-stream';
+}
+local $/; # slurp mode
+my $text=<$file>;
+
+# Mail erzeugen:
+my $mail=MIME::Entity->build(
+ From =>"CUPS mailer ($user)",
+ To =>$email,
+ Subject=>"CUPS printjob '$title'",
+ # Mail hat attachments und bestsht daher aus zwei Teilen:
+ Type =>'multipart/mixed',
+);
+$mail->attach(Data=><<"EOT");
+Hello $email,
+
+this mail contains a printjob. It was send to you from the CUPS
+mail-backend.
+
+Device-URI.......: $deviceuri
+Job-ID...........: $job
+Sending User.....: $user
+Documenttitle....: $title
+Number of Copies.: $copies
+MIME-Type........: $type
+
+CUPS-backend 'mail' written by Thomas Bayen.
+EOT
+$mail->attach(
+ Data =>$text,
+ Type =>$type,
+ # Druckjob wird nicht "inline" angezeigt, sondern immer als
+Attachment:
+ Disposition=>'attachment',
+ # Encoding, damit Sonderzeichen und Binärdateien nicht kaputt gehen:
+ # Encoding =>'quoted-printable', # hängt sich leider weg!?!
+ Encoding =>'base64', # geht aber auch
+);
+
+$mail->send;
+
+# So gehts auch:
+#open PIPE,"|sendmail -t";
+#print PIPE $mail->stringify;
+#close PIPE;
+
+exit 0;
--- /dev/null
+#!/usr/bin/perl -w
+# ______________________________________________________________________
+#
+# Projekt: modprint_server
+# Name: modarch
+# Autor: mgoppold
+# Revision: $Revision: 196 $
+# letzte Änderung: $Date: 2013-01-15 08:04:32 +0100 (Di, 15. Jan 2013) $
+# durch: $Author: mgoppold $
+# Source: $HeadURL: svn+ssh://svnserver/svn/modprint_server/trunk/cups/backend/modarch $
+# ______________________________________________________________________
+#
+# CUPS backend for printing to modarch
+#
+# perltidy -b -syn -i=3 -ple -bbs -bbc -bbb -bar -msc=3 -l=1000 -ndnl -nwls='.' -nwrs='.' FILE
+
+use Carp;
+use Cwd qw(chdir);
+use Cwd qw(getcwd);
+use File::Temp qw/ :mktemp /;
+use File::Basename;
+use Mail::Send;
+use Net::CUPS;
+use Net::FTP;
+use Net::Netrc;
+use Fcntl qw(:DEFAULT :flock);
+use Data::Dumper;
+use encoding 'iso 8859-15', Filter => 1;
+use Encode;
+use Archive::Tar;
+use File::Type;
+
+BEGIN { push @INC, ( ".", "bin", "lib", "../lib", "/usr/share/modprint_server/lib" ) }
+use ModPrint::Server;
+use ModPrint::Server qw ( $debug $scheme );
+
+# use Data::Hexdumper;
+
+# use Config::General;
+
+my ( $CUPS_SERVERROOT, $CUPS_REQUESTROOT, $CUPSVERSION );
+my ( $user_at_host, $TMPDIR, $PRINTER );
+my ( $scheme, $URI, $realprinter );
+my ( $archivserver, $default_archivserver );
+my ( $archivserverport,$default_archivserverport );
+my ( $archivuser, $default_archivuser );
+my ( $default_destdir );
+my ( $sshbin, $sshopt, $scpbin, $scpopt );
+my ( $destdir, $destfile, $dest );
+my ( $transmittprot, $default_transmittprot );
+my ( $PPDFILE, $DefaultOutput, $DefaultCategory, $DefaultCompany );
+my ( $DefaultHierarchic, $JobMail, $Untar, $wasTar );
+my ( $jahr, $monat, $tag, $hour, $min, $sec );
+my ( $job, $user, $title, $copies, $options, $filename );
+my ( $cmdln, $status, $cyclecountfile, $cyclecount );
+my ( $fh, @tempfilelist );
+my (@optionlist);
+my ( %serverconfig, $CUPS_SERVERADMIN );
+my ( $msg, $unused1, $unused2 );
+my ($debug);
+my ( @jobfiles, @jobfiles2, $count_jobfiles, $suffix, $jobbase, $i );
+my ( $cupsObject, $printerObject, $ppdObject );
+
+#
+# -----------------------------------------------------------------------------
+#
+
+sub send_message() {
+ my $subject = shift;
+ &debug_message( 2, "send_message to %s Subject %s\n", $CUPS_SERVERADMIN, $subject );
+ if ($CUPS_SERVERADMIN) {
+ $msg = Mail::Send->new() || &error_message( "Fehler beim versenden der Fehlermail an %s\n", $CUPS_SERVERADMIN );
+ $msg->to($CUPS_SERVERADMIN);
+ $msg->subject($subject);
+ $fh = $msg->open;
+ print $fh @_;
+ $fh->close || &error_message( "Fehler beim versenden der Fehlermail an %s\n", $CUPS_SERVERADMIN );
+ }
+}
+
+sub cleanupexit() {
+ my $retcode = shift;
+ foreach (@tempfilelist) { unlink or &die_message( "Fehler beim löschen der temporären Files\n") };
+ exit $retcode;
+}
+
+sub send_error_and_exit() {
+ my $retcode = shift;
+ my $subject = shift;
+
+ # wenn $cyclecount < 1 Mail senden sonst nicht
+ &send_message( $subject, @_ ) if ( $cyclecount < 1 );
+ &warn_message( "fertig mit ret=".$retcode."\n" );
+ &cleanupexit($retcode);
+}
+
+#
+# -----------------------------------------------------------------------------
+#
+
+# hier liegt Monat zw. 0 und 11
+( $sec, $min, $hour, $tag, $monat, $jahr ) = (localtime)[ 0, 1, 2, 3, 4, 5 ];
+$monat += 1;
+$jahr += 1900;
+$monat = sprintf( "%.2d", $monat );
+$tag = sprintf( "%.2d", $tag );
+$sec = sprintf( "%.2d", $sec );
+$min = sprintf( "%.2d", $min );
+$hour = sprintf( "%.2d", $hour );
+
+$_ = $0;
+SWITCH: {
+ $scheme = "modarch", last SWITCH if /\/modarch$/;
+ $scheme = "modarch-test", last SWITCH if /\/modarch-test$/;
+ $scheme = "modarch_test", last SWITCH if /\/modarch_test$/; # obsolete!
+}
+
+if ( @ARGV == 0 ) {
+ print "direct ".$scheme." \"Unknown\" \"archiv\"\n";
+ print "file ".$scheme."://realprinter \"Unknown\" \"archiv and print\"\n";
+ print "file ".$scheme."://realprinter[[ssh|ftp][[user\@]destserver[:port]][:destdir/destsubdir/destsubsubdir]] \"Unknown\" \"archiv to user\@destserver and print\"\n";
+ print "file ".$scheme."://".$scheme."[[ssh|ftp][[user\@]destserver[:port]][:destdir/destsubdir/destsubsubdir]] \"Unknown\" \"archiv to user\@destserver and don't print\"\n";
+ exit $CUPS_BACKEND_OK;
+}
+
+# in case of wrong number of arguments: print usage hint
+if ( @ARGV != 5 && @ARGV != 6 ) {
+ print "
+Usage: ".$scheme." job-id user title copies options [file]
+ example for device-URI: '".$scheme."://real_printer_name'
+ '".$scheme."://real_printer_name/destserver'
+ '".$scheme."://real_printer_name/[ssh:]user\@destserver'
+ '".$scheme."://real_printer_name/ftp:user\@destserver'
+ '".$scheme."://real_printer_name/[[ssh|ftp][[user\@]destserver[:port]][:destdir/destsubdir/destsubsubdir]]'
+
+Install a printqueue with lpadmin -p <printer-name>
+-v ".$scheme."://<real_printer_name> -i /usr/share/cups/model/modarcha.ppd -E
+
+";
+ exit $CUPS_BACKEND_FAILED;
+}
+
+# Flush everything immediately.
+$| = 1;
+
+( $job, $user, $title, $copies, $options, $filename ) = @ARGV;
+
+$CUPS_SERVERROOT = $ENV{"CUPS_SERVERROOT"};
+$CUPS_REQUESTROOT = $ENV{"CUPS_REQUESTROOT"};
+$PRINTER = $ENV{"PRINTER"};
+$TMPDIR = $ENV{"TMPDIR"};
+$URI = $ENV{"DEVICE_URI"}; # Bsp: "modarch://modarch" oder "modarch://PERWBA01"
+
+#%serverconfig = ParseConfig($CUPS_SERVERROOT."/cupsd.conf");
+#$CUPS_SERVERADMIN = $serverconfig{'ServerAdmin'};
+$CUPS_SERVERADMIN = "modarch\@localhost";
+
+@tempfilelist = ();
+$debug = 2;
+$default_transmittprot= "ssh";
+$default_archivserverport= "22";
+$default_archivuser = $ENV{"DEFAULT_ARCHIVUSER"}?$ENV{"DEFAULT_ARCHIVUSER"}:"modarch";
+$default_archivserver = $ENV{"DEFAULT_ARCHIVHOST"}?$ENV{"DEFAULT_ARCHIVHOST"}:"localhost";
+$default_archivhome = $ENV{"DEFAULT_ARCHIVHOME"}?$ENV{"DEFAULT_ARCHIVHOME"}:".";
+$sshbin = "/usr/bin/ssh";
+$sshopt = "-2 -a -q -T -x -c blowfish -i ".$CUPS_SERVERROOT."/ssh.identity ";
+$scpbin = "/usr/bin/scp";
+$scpopt = "-oProtocol=2 -c blowfish -p -q -i ".$CUPS_SERVERROOT."/ssh.identity ";
+$cyclecountfile = $TMPDIR."/".$job.".cnt";
+
+$ModPrint::Server::debug = $debug;
+$ModPrint::Server::job = $job;
+$ModPrint::Server::scheme = $scheme;
+
+# TODO &write_statfile("%d %s %s",$job,$scheme,"Test");
+
+## cyclecountfile anlegen oder um 1 erhöhen
+sysopen(FH, $cyclecountfile, O_RDWR | O_CREAT) or &die_message( "Fehler beim Lesen des Files: ".$cyclecountfile." ".$!."\n" );
+# autoflush FH
+$ofh = select(FH); $| = 1; select ($ofh);
+flock(FH, LOCK_EX) or &die_message( "Fehler beim write-lock für ".$cyclecountfile." ".$!."\n" );
+$cyclecount = <FH> || 0;
+seek(FH, 0, 0) or &die_message( "Fehler beim schreiben von ".$cyclecountfile." ".$!."\n" );
+print FH $cyclecount+1, "\n" or &die_message( "Fehler beim schreiben von ".$cyclecountfile." ".$!."\n" );
+truncate(FH, tell(FH)) or &die_message( "Fehler beim schreiben von ".$cyclecountfile." ".$!."\n" );
+close(FH) or &die_message( "Fehler beim schließen von ".$cyclecountfile." ".$!."\n" );
+
+&debug_message( 0, "job=%s\n", $job );
+&debug_message( 0, "user=%s\n", $user );
+&debug_message( 0, "title=%s\n", $title );
+&debug_message( 0, "copies=%s\n", $copies );
+&debug_message( 0, "options=%s\n", $options ? $options : "not set" );
+&debug_message( 0, "filename=%s\n", $filename ? $filename : "not set" );
+&debug_message( 0, "CUPS_SERVERADMIN=%s\n", $CUPS_SERVERADMIN ? $CUPS_SERVERADMIN : "not set" );
+
+# Wenn in den options schon Leerzeichen vorkommen:
+# options=document-name=Allonge\ 56235:\ ComSell\ GmbH job-uuid=urn:uuid:4eaa0aff-f2b8-348c-5449-4934aff0d4fa
+# kann optionlist nicht sauber trennen, deshalb werden die Leerzeichen schon hier durch _ ersetzt
+$options =~ s/\\ /_/g;
+@optionlist = split( /\s/, $options );
+foreach $option (@optionlist) {
+ my ( $var, $value ) = split( /\s*=\s*/, $option, 2 );
+ &debug_message( 1, "parse options ($var,$value)\n", $var, $value );
+
+ $var =~ s/[ \.,;:*\-\+#~$"?&\/\\()\[\]{}]//g; # um gültige Var-Name zu erhalten
+ $value =~ s/[{}]//g; # die {} entfernen weil eine Substitution von
+ # ${VAR} nicht geht wohl aber $VAR
+ $value =~ s/\$(\w+)/${$1}/g; # Variablen auflösen
+ no strict 'refs';
+ &debug_message( 2, "parse options (%s,%s)\n", $var, $value );
+ $$var = $value;
+ &debug_message( 1, "parse options (%s,%s)\n", $var, $$var );
+}
+
+#
+# Im PassThrough Modus hat der "documentname" eine höhere Priorität als der "title"
+#
+
+if ($title) {
+ my $utf8title = decode('utf8', $title);
+ $title=$utf8title if ( $utf8title !~ /\x{FFFD}/ );
+ # es geht auch äöüÄÖÜß (Latin1 eingegeben) und \x{e4}\x{f6}\x{fc}\x{c4}\x{d6}\x{dc}\x{df}
+ $title =~ s/\xC3\xA4/ae/g; $title =~ s/\xC3\xB6/oe/g; $title =~ s/\xC3\xBC/ue/g; $title =~ s/\xC3\x84/Ae/g; $title =~ s/\xC3\x96/Oe/g; $title =~ s/\xC3\x9C/Ue/g; $title =~ s/\xC3\x9F/ss/g;
+ $title =~ s/\xE4/ae/g; $title =~ s/\xF6/oe/g; $title =~ s/\xFC/ue/g; $title =~ s/\xC4/Ae/g; $title =~ s/\xD6/Oe/g; $title =~ s/\xDC/Ue/g; $title =~ s/\xDF/ss/g;
+ if ( !$PassThrough ) {
+ $title =~ s/[[:punct:]]+/_/g;
+ $title =~ s/[[:space:]]+/_/g;
+ if ( "$title" =~ /(stdin|Untitled)/ && $documentname ) {
+ $title = $documentname;
+ $utf8title = decode('utf8', $title);
+ $title=$utf8title if ( $utf8title !~ /\x{FFFD}/ );
+ $title =~ s/\xC3\xA4/ae/g; $title =~ s/\xC3\xB6/oe/g; $title =~ s/\xC3\xBC/ue/g; $title =~ s/\xC3\x84/Ae/g; $title =~ s/\xC3\x96/Oe/g; $title =~ s/\xC3\x9C/Ue/g; $title =~ s/\xC3\x9F/ss/g;
+ $title =~ s/\xE4/ae/g; $title =~ s/\xF6/oe/g; $title =~ s/\xFC/ue/g; $title =~ s/\xC4/Ae/g; $title =~ s/\xD6/Oe/g; $title =~ s/\xDC/Ue/g; $title =~ s/\xDF/ss/g;
+ $title =~ s/[[:punct:]]+/_/g;
+ $title =~ s/[[:space:]]+/_/g;
+ }
+ else {
+ $title =~ s/_stdin_/$scheme/g;
+ }
+ }
+ else {
+ $title = $documentname if ($documentname);
+ # print STDERR hexdump(data => $title), "\n";
+ # &debug_message( 1, " title=%s\n", $title );
+ $utf8title = decode('utf8', $title);
+ $title=$utf8title if ( $utf8title !~ /\x{FFFD}/ );
+ # print STDERR hexdump(data => $title), "\n";
+ # &debug_message( 1, " title=%s\n", $title );
+ $title =~ s/\xC3\xA4/ae/g; $title =~ s/\xC3\xB6/oe/g; $title =~ s/\xC3\xBC/ue/g; $title =~ s/\xC3\x84/Ae/g; $title =~ s/\xC3\x96/Oe/g; $title =~ s/\xC3\x9C/Ue/g; $title =~ s/\xC3\x9F/ss/g;
+ $title =~ s/\xE4/ae/g; $title =~ s/\xF6/oe/g; $title =~ s/\xFC/ue/g; $title =~ s/\xC4/Ae/g; $title =~ s/\xD6/Oe/g; $title =~ s/\xDC/Ue/g; $title =~ s/\xDF/ss/g;
+ # &debug_message( 1, "## title=%s\n", $title );
+ # print STDERR hexdump(data => $title), "\n";
+ }
+}
+else {
+ $title = "$scheme";
+ $title = $documentname if ($documentname);
+ my $utf8title = decode('utf8', $title);
+ $title=$utf8title if ( $utf8title !~ /\x{FFFD}/ );
+ $title =~ s/\xC3\xA4/ae/g; $title =~ s/\xC3\xB6/oe/g; $title =~ s/\xC3\xBC/ue/g; $title =~ s/\xC3\x84/Ae/g; $title =~ s/\xC3\x96/Oe/g; $title =~ s/\xC3\x9C/Ue/g; $title =~ s/\xC3\x9F/ss/g;
+ $title =~ s/\xE4/ae/g; $title =~ s/\xF6/oe/g; $title =~ s/\xFC/ue/g; $title =~ s/\xC4/Ae/g; $title =~ s/\xD6/Oe/g; $title =~ s/\xDC/Ue/g; $title =~ s/\xDF/ss/g;
+ $title =~ s/[[:punct:]]+/_/g;
+ $title =~ s/[[:space:]]+/_/g;
+}
+
+# wenn mehr als 1 File in einem Job werden alle ohne Filename geliefert!
+if ( !defined($filename) ) {
+ ( $fh, $filename ) = mkstemps( $TMPDIR."/".$job."_".$scheme."_".$title."_XXXXXX", ".prn" );
+ while (<STDIN>) {
+ print $fh $_;
+ }
+ close($fh);
+ push @tempfilelist, $filename;
+}
+
+$count_jobfiles = 1;
+$jobbase = sprintf "%s/d%.5d", $CUPS_REQUESTROOT, $job;
+$suffix = sprintf "-%.3d", $count_jobfiles;
+
+&debug_message( 2, "test jobfile[%d] %s \n", $count_jobfiles, $jobbase.$suffix );
+while ( -s $jobbase.$suffix ) {
+ push @jobfiles, $jobbase.$suffix;
+ $count_jobfiles++;
+ $suffix = sprintf "-%.3d", $count_jobfiles;
+ &debug_message( 2, "test jobfile[%d] %s \n", $count_jobfiles, $jobbase.$suffix );
+}
+$count_jobfiles--;
+&debug_message( 1, "found %d jobfiles\n", $count_jobfiles );
+
+$user = $ENV{"USER"} if ( !$user );
+$user = "cups" if ( !$user );
+
+$user =~ tr/ .,;:*+#~$"?&\/\\()[]/_/;
+
+# get file to which the job is "printed" from device URI, so
+# so that you can use this backend multiple times, for various
+# "modarch" printers...
+
+# $URI="modarch://realprinter[/[transmittprot:][[user\@]archivserver][:destdir/destsubdir/destsubsubdir]]";
+# $URI="modarch://realprinter/transmittprot:user\@archivserver:destdir/destsubdir/destsubsubdir";
+#
+# $URI="modarch://modarch/archivserver"; # 0004
+# $URI="modarch://modarch/archivserver:destdir"; # 0005
+# $URI="modarch://modarch/ssh:esg-archiv"; # 0006
+# $URI="modarch://modarch/ssh:modarch\@esg-archiv"; # 0007
+# $URI="modarch://modarch/ssh:modarch\@esg-archiv:destdir/destsubdir/destsubsubdir"; # 0008
+# $URI="modarch://modarch/ftp:modarch\@esg-archiv:20021:destdir/destsubdir/destsubsubdir"; # 0010
+
+# $URI="modarch://realprinter";
+# $URI="modarch://realprinter/archivserver";
+# $URI="modarch://realprinter/user\@archivserver";
+# $URI="modarch://realprinter/user\@archivserver:destdir/destsubdir/destsubsubdir";
+# $URI="modarch://realprinter/archivserver:destdir/destsubdir/destsubsubdir";
+# $URI="modarch://realprinter/:destdir/destsubdir/destsubsubdir";
+
+( $unused1, $unused2, $realprinter, $archivserver ) = split( /\//, $URI, 4 );
+
+if ( defined $archivserver && $archivserver =~ /^(ssh|ftp|transmittprot):/i ) {
+ ($transmittprot,$archivserver)=split(/:/,$archivserver,2);
+}
+$transmittprot=$default_transmittprot if (!defined $transmittprot);
+
+if ( defined $archivserver && $archivserver =~ /:/ ) {
+ if ( $archivserver =~ /:[0-9][0-9]+/ ) {
+ ($archivserver,$destdir)=split(/:/,$archivserver,2);
+ ($archivserverport,$destdir)=split(/:/,$destdir,2);
+ }
+ else{
+ ($archivserver,$destdir)=split(/:/,$archivserver,2);
+ }
+}
+$archivserver=$default_archivserver if (! (defined $archivserver && length $archivserver));
+$archivuser=$default_archivuser if (! (defined $archivuser && length $archivuser));
+
+if ( $archivserver =~ /\@/ ) {
+ ($archivuser,$archivserver)=split(/\@/,$archivserver,2);
+ $user_at_host=$archivuser."\@".$archivserver;
+}
+if (!$archivserverport) {
+ if ( $transmittprot =~ /^ssh:/i ) {
+ $archivserverport="22";
+ } elsif ( $transmittprot =~ /^ftp:/i ) {
+ $archivserverport="20";
+ } else {
+ $archivserverport="";
+ }
+}
+else {
+ if ( $transmittprot =~ /^ssh:/i ) {
+ $sshopt.=" -p ".$archivserverport;
+ $scpopt.=" -P ".$archivserverport;
+ }
+}
+$user_at_host=$default_archivuser."\@".$archivserver if (!defined $user_at_host);
+&debug_message( 0, "realprinter=%s\n", $realprinter );
+&debug_message( 0, "transmittprot=%s\n", $transmittprot );
+&debug_message( 0, "archivserver=%s\n", $archivserver );
+&debug_message( 0, "archivserverport=%s\n", $archivserverport );
+&debug_message( 0, "user_at_host=%s\n", $user_at_host );
+
+$DefaultOutput = "archiv";
+$DefaultCategory = "misc";
+$DefaultCompany = "none";
+$DefaultHierarchic = "none";
+$JobMail = 0;
+$Untar = 0;
+$wasTar = 0;
+
+# das kann mit dem perl-Net-CUPS erledigt werden:
+if ( 1 == 0 ) {
+ $cupsObject = Net::CUPS->new();
+ $printerObject = $cupsObject->getDestination( $PRINTER );
+ $ppdObject = $cupsObject->getPPD( $PRINTER );
+
+ #print STDERR "printerObject =".Dumper($printerObject)."\n";
+ #print STDERR "ppdObject =".Dumper($ppdObject)."\n";
+ #print STDERR "options =".Dumper($printerObject->getOptions())."\n";
+ #print STDERR "option Output =".Dumper($printerObject->getOptionValue("Output"))."\n";
+
+ #&debug_message( 0, "Output via perl-Net-CUPS=%s\n", &getprinter_option("Output",$printerObject,$ppdObject)) ;
+ #&debug_message( 0, "Category via perl-Net-CUPS=%s\n", &getprinter_option("Category",$printerObject,$ppdObject)) ;
+ #&debug_message( 0, "Hierarchic via perl-Net-CUPS=%s\n", &getprinter_option("Hierarchic",$printerObject,$ppdObject)) ;
+ #&debug_message( 0, "Company via perl-Net-CUPS=%s\n", &getprinter_option("Company",$printerObject,$ppdObject)) ;
+ #&debug_message( 0, "JobMail via perl-Net-CUPS=%s\n", &getprinter_option("JobMail",$printerObject,$ppdObject)) ;
+
+ $DefaultOutput = &getprinter_option("Output",$printerObject,$ppdObject);
+ $DefaultCategory = &getprinter_option("Category",$printerObject,$ppdObject);
+ $DefaultHierarchic = &getprinter_option("Hierarchic",$printerObject,$ppdObject);
+ $DefaultCompany = &getprinter_option("Company",$printerObject,$ppdObject);
+ $JobMail = 1 if ( &getprinter_option("JobMail",$printerObject,$ppdObject) =~ /mailyes/ );
+ $Untar = 1 if ( &getprinter_option("Untar",$printerObject,$ppdObject) =~ /untaryes/ );
+}
+else {
+ # load ppd-File-Options
+ $PPDFILE = $ENV{"PPD"};
+
+ open( PPD, "< $PPDFILE" ) || do {
+ &error_message( "Fehler beim Lesen des PPD-Files: ".$PPDFILE."\n" );
+ &warn_message( "fertig mit ret=".$CUPS_BACKEND_FAILED."\n" );
+ exit $CUPS_BACKEND_FAILED;
+ };
+
+ while (<PPD>) {
+ if (m!^\**DefaultOutput:\s*\"*(.*)\"*$!) {
+ chomp;
+ $DefaultOutput = $1;
+ }
+ elsif (m!^\**DefaultCategory:\s*\"*(.*)\"*$!) {
+ chomp;
+ $DefaultCategory = $1;
+ }
+ elsif (m!^\**DefaultHierarchic:\s*\"*(.*)\"*$!) {
+ chomp;
+ $DefaultHierarchic = $1;
+ }
+ elsif (m!^\**DefaultCompany:\s*\"*(.*)\"*$!) {
+ chomp;
+ $DefaultCompany = $1;
+ }
+ elsif (m!^\**DefaultJobMail:\s*\"*(.*)\"*$!) {
+ chomp;
+ $JobMail = 1 if ( $1 =~ /mailyes/ );
+ }
+ elsif (m!^\**DefaultUntar:\s*\"*(.*)\"*$!) {
+ chomp;
+ $Untar = 1 if ( $1 =~ /untaryes/ );
+ }
+ }
+ close PPD;
+}
+
+&debug_message( 1, "archivserver=%s\n", $archivserver );
+&debug_message( 1, "DefaultCompany=%s\n", $DefaultCompany );
+&debug_message( 1, "DefaultOutput=%s\n", $DefaultOutput );
+&debug_message( 1, "DefaultCategory=%s\n", $DefaultCategory );
+&debug_message( 1, "DefaultHierarchic=%s\n", $DefaultHierarchic );
+&debug_message( 1, "DefaultJobMail=%s\n", $JobMail );
+&debug_message( 1, "DefaultUntar=%s\n", $Untar );
+&debug_message( 1, "SpecialOutput=%s\n", $SpecialOutput ? $SpecialOutput : "not set" );
+&debug_message( 1, "PassThrough=%s\n", $PassThrough ? $PassThrough : "not set" );
+&debug_message( 1, "documentname=%s\n", $documentname ? $documentname : "not set" );
+&debug_message( 1, "Project=%s\n", $Project ? $Project : "not set" );
+&debug_message( 1, "destdir=%s\n", $destdir ? $destdir : "not set" );
+
+if (!defined $destdir ) {
+ $destdir = "incomming";
+}
+
+$destdir = $default_archivhome."/".$destdir if ($destdir !~ /\/(THUEGA|CAPSPARC)/i );
+
+if ($destdir =~ /\/(THUEGA|CAPSPARC)/ ) {
+ my $append="";
+ if ($Company) {
+ $append .= "/".$Company;
+ }
+ else {
+ $append .= "/".$DefaultCompany if ( $DefaultCompany !~ /none/i );
+ }
+ $append .= "/asvu/spool";
+ $_ = $Output ? $Output : $DefaultOutput;
+ SWITCH: {
+ $append .= "/test", last SWITCH if /^test$/i;
+ $append .= "/prod", last SWITCH if /^prod$/i;
+ $append .= "/prod", last SWITCH if /^print$/i;
+ $append .= "/prod", last SWITCH if /^printarchiv$/i;
+ $append .= "/misc", last SWITCH;
+ }
+ $append =~ tr/a-z/A-Z/;
+ $destdir .= $append;
+}
+else {
+ if ($SpecialOutput) {
+ $destdir .= "/".$SpecialOutput;
+ }
+ else {
+ $_ = $Output ? $Output : $DefaultOutput;
+ SWITCH: {
+ $destdir .= "/archiv", last SWITCH if /^archiv$/i;
+ $destdir .= "/print", last SWITCH if /^print$/i;
+ $destdir .= "/printarchiv", last SWITCH if /^printarchiv$/i;
+ $destdir .= "/scan", last SWITCH if /^scan$/i;
+ $destdir .= "/test", last SWITCH if /^test$/i;
+ $destdir .= "/prod", last SWITCH if /^prod$/i;
+ $destdir .= "/online", last SWITCH if /^online$/i;
+ $destdir .= "/nooutput", last SWITCH;
+ }
+ $_ = $Category ? $Category : $DefaultCategory;
+ SWITCH: {
+ $destdir .= "/misc", last SWITCH if /^misc$/i;
+ $destdir .= "/va", last SWITCH if /^va$/i;
+ $destdir .= "/svk", last SWITCH if /^svk$/i;
+ $destdir .= "/m", last SWITCH if /^mahn$/i;
+ $destdir .= "/sap", last SWITCH if /^sap$/i;
+ $destdir .= "/hr", last SWITCH if /^hr$/i;
+ $destdir .= "/kis", last SWITCH if /^kis$/i;
+ $destdir .= "/ja", last SWITCH if /^ja$/i;
+ $destdir .= "/kd", last SWITCH if /^kd$/i;
+ $destdir .= "/erech", last SWITCH if /^erech$/i;
+ $destdir .= "/net", last SWITCH if /^net$/i;
+ $destdir .= "/isu", last SWITCH if /^isu$/i;
+ $destdir .= "/core", last SWITCH if /^core$/i;
+ $destdir .= "", last SWITCH if /^none$/i;
+ $destdir .= "/nocategory", last SWITCH;
+ }
+ if ($Company) {
+ $destdir .= $Company;
+ }
+ else {
+ $destdir .= $DefaultCompany if ( $DefaultCompany !~ /none/i );
+ }
+ }
+}
+
+$_ = $Hierarchic ? $Hierarchic : $DefaultHierarchic;
+SWITCH: {
+ $destdir .= "/".$jahr."/".$monat."/".$tag, last SWITCH if /^YMD$/i;
+ $destdir .= "/".$jahr."/".$monat, last SWITCH if /^YM$/i;
+ $destdir .= "/".$jahr, last SWITCH if /^Y$/i;
+ $destdir .= "/".$jahr."/".$monat."/".$tag."-".$job, last SWITCH if /^Job$/i;
+}
+
+$status=0;
+if ( $transmittprot eq "ssh" ) {
+ $cmdln = $sshbin." ".$sshopt." ".$user_at_host." \"mkdir -p ".$destdir."\"";
+
+ if ( $> == 0 ) {
+ $cmdln = "su -c '".$cmdln."' lp";
+ }
+
+ &debug_message( 1, "cmdln=%s\n", $cmdln );
+ $status = system($cmdln);
+}
+if ( $status != 0 ) {
+ &error_message( "Fehler bei der \Übertragung zum Archiv: ".$cmdln." \[Fehlercode=".$status."\]\n" );
+ &send_error_and_exit(
+ $CUPS_BACKEND_FAILED,
+ "CUPS [Spool ".$job.":".$scheme."] Fehler: mkdir",
+ "Bei der Übertragung zum Archiv ging was schief!\n",
+ "Die Kommandozeile war:\n",
+ $cmdln."\n",
+ "Der Fehlercode lautet: ".$status."\n"
+ )
+}
+
+#
+# Im Falle eines CAPS-Archiv-Dirs muessen die Includes angelegt werden:
+#
+if ( "$destdir" =~ m/printarchiv\/va/ && $title =~ m/capsdat/ && $transmittprot eq "ssh" ) {
+
+ my $project_dir = "";
+ foreach $d ( "/usr/share/caps_".$Project, "/usr/share/caps_esg3", "/usr/share/caps_guf", "/usr/share/caps_erw", "/usr/share/caps_fm", "/usr/share/caps_fm2", "/usr/share/caps_evk", "/usr/share/caps_lkw", "/usr/share/caps_egs", "/usr/share/caps_thv", "/usr/share/caps_esm", "/usr/share/caps_swg", "/usr/share/caps_swan", "/usr/share/caps_ems" ) {
+ next until -d $d;
+ $project_dir = $d;
+ }
+ &debug_message( 1, "cmdln=%s\n", $cmdln );
+ $cmdln = $sshbin." ".$sshopt." ".$user_at_host." \"[ -d ".$destdir." ] && cd ".$destdir." && ".$project_dir."/bin/create_caps_links --cp && ".$project_dir."/bin/create_session_links --ar\"";
+
+ if ( $> == 0 ) {
+ $cmdln = "su -c '".$cmdln."' lp";
+ }
+
+ &debug_message( 1, "cmdln=%s\n", $cmdln );
+ $status = system($cmdln);
+ if ( $status != 0 ) {
+ &error_message( "Fehler bei der \Übertragung zum Archiv: ".$cmdln." \[Fehlercode=".$status."\]\n" );
+ &send_error_and_exit(
+ $CUPS_BACKEND_FAILED,
+ "CUPS [Spool ".$job.":".$scheme."] Fehler: create_caps_links/create_session_links",
+ "Bei der Übertragung zum Archiv ging was schief!\n",
+ "Die Kommandozeile war:\n",
+ $cmdln."\n",
+ "Der Fehlercode lautet: ".$status."\n"
+ )
+ }
+}
+
+@jobfiles2=();
+
+foreach $filename (@jobfiles) {
+ my $ft = File::Type->new();
+ my $filetype=$ft->checktype_filename($filename);
+ &debug_message( 1, "filetyp=%s\n", $filetype );
+ if ($filetype =~ /application\/x-tar/) {
+
+ my $cwd = getcwd;
+ chdir($TMPDIR) or die_message("Konnte nicht in das TEMP. %s wechseln!",$TMPDIR);
+
+ my $tar=Archive::Tar->new( $filename );
+ $wasTar = 1;
+ $tar->extract();
+ my @tarfiles=();
+ foreach my $tc ($tar->list_files()) { push @tarfiles, $TMPDIR."/".$tc }
+ push @jobfiles2, @tarfiles;
+ push @tempfilelist, @tarfiles;
+
+ chdir($cwd) or die_message("Konnte nicht in das Arbeitsverz. %s wechseln!",$cwd);
+ }
+ else {
+ push @jobfiles2, $filename;
+ }
+}
+$count_jobfiles=scalar @jobfiles2;
+
+
+$suffix = "";
+$i = 1;
+foreach $filename (@jobfiles2) {
+
+ # TMPLPD.20041102113805.QSYSPRT.EGSKEM02.719
+ # USER.20041102113805.NAME.PRINTER.ID
+ # ok ok ok ok ok
+ if ( $count_jobfiles > 1 && ($wasTar == 0) ) {
+ $suffix = sprintf ":%d", $i;
+ $i++;
+ }
+ if ($PassThrough) {
+ if ( $wasTar == 1 ) {
+ $destfile = basename($filename.$suffix);
+ }
+ else {
+ $destfile = $title.$suffix;
+ }
+ }
+ else {
+ $destfile = $user.".".$jahr.$monat.$tag.$hour.$min.$sec.".".$title.".".$realprinter.".".$job.$suffix;
+ }
+ $dest = $user_at_host.":".$destdir."/".$destfile;
+
+ $cmdln = $scpbin." ".$scpopt." ".$filename." ".$dest;
+
+ &debug_message( 1, "filename=".$filename."\n" );
+ if ( $debug > 1 ) {
+ my @vars = sort( keys(%ENV) );
+ foreach (@vars) {
+ &debug_message( 2, "\$ENV{".$_."}=".$ENV{$_}."\n" );
+ }
+ }
+ &debug_message( 0, "archiv ".$filename." ".$dest."\n" );
+
+ if ( $transmittprot eq "ftp" ) {
+
+ my $remfname;
+ my $remret;
+
+ &debug_message( 0, "ftp: archivserver=".$archivserver."\n" );
+ &debug_message( 0, "ftp: archivuser=".$archivuser."\n" );
+ my $ftp = Net::FTP->new($archivserver, Debug => $debug>=1?$debug-1:0, Port=>$archivserverport) ;
+ $status=0;
+ if (defined($ftp)) {
+ &debug_message( 1, "ftp: session is open\n" );
+
+ # zur Authentifikation wird /root/.netrc benutzt das backend selbst läuft als root!!!
+ # machine localhost login modftp password "XYZ"
+ # chmod 600 /root/.netrc
+
+ if ($ftp->login($archivuser) != 0) {
+ &debug_message( 1, "ftp: archivuser is logged in\n" );
+ $remret=$ftp->quot("site","namefmt 1"); # lange Dateinamen erlauben
+ &debug_message( 2, "ftp: quot site ret=%s\n",$remret );
+ if ($remret==2) {
+ &debug_message( 0, "ftp: quot site namefmt 1 ok\n" );
+ }
+ else {
+ &error_message( "ftp: quot site namefmt 1 failed\n" );
+ $status=1;
+ }
+ if ($ftp->cwd($destdir) == 0) { # Zielverz ext nicht
+ # Zielverz successive anlegen
+ foreach $p ( split(/\//, $destdir) ) {
+ if ($ftp->cwd($p) == 0) { # Teilverz. ext nicht
+ $ftp->mkdir($p);
+ &die_message("ftp: mkd/cwd %s failed\n",$p) if ( $ftp->cwd($p) == 0 )
+ }
+ }
+ }
+ &debug_message( 1, "ftp: cwd ok\n" );
+ $ftp->binary;
+ $remfname=$ftp->put($filename,$destfile);
+ if (length $remfname) {
+ &debug_message( 0, "ftp: put ".$filename." ".$remfname." ok\n" );
+ }
+ else {
+ &error_message( "ftp: put failed\n" );
+ $status=1;
+ }
+
+ # Nach der Uebertragung einer .fin Datei auf dem Zielserver noch ein Remote-CMD anschubsen
+ if ( $filename =~ m/\.fin/ && $destdir =~ m/stsfil/i ) {
+ $bbdest=$PRINTER;
+ $bbdest=~s/^[ZRP]//;
+ $remfname=$ftp->put($filename,$bbdest);
+ if (length $remfname) {
+ &debug_message( 0, "ftp: put ".$filename." ".$remfname." ok\n" );
+ }
+ else {
+ &error_message( "ftp: put failed\n" );
+ $status=1;
+ }
+ $remret=$ftp->quot("rcmd","CALL PGM(THSAPUTIL/STSFIL10) PARM('".$bbdest."')");
+ &debug_message( 0, "ftp: quot CALL ret=%s\n",$remret );
+ if ($remret==2) {
+ &debug_message( 0, "ftp: quot CALL PGM(THSAPUTIL/STSFIL10) PARM('".$bbdest."') ok\n" );
+ }
+ else {
+ &error_message( "ftp: quot CALL PGM(THSAPUTIL/STSFIL10) PARM('".$bbdest."') failed\n" );
+ $status=1;
+ }
+ }
+ }
+ else {
+ &error_message( "ftp: archivuser login failed\n" );
+ $status=1;
+ }
+ }
+ else {
+ &error_message( "ftp: session open failed\n" );
+ $status=1;
+ }
+ }
+ else {
+ if ( $> == 0 ) {
+ $cmdln = "su -c '".$cmdln."' lp";
+ }
+ &debug_message( 1, "cmdln=%s\n", $cmdln );
+ $status = system($cmdln);
+ }
+
+ if ( $status != 0 ) {
+ &error_message( "Fehler bei der \Übertragung zum Archiv: ".$dest." \[Fehlercode=".$status."\]\n" );
+ &send_error_and_exit(
+ $CUPS_BACKEND_FAILED,
+ "CUPS [Spool ".$job.":".$scheme."] Fehler: scp",
+ "Bei der Übertragung zum Archiv ging was schief!\n",
+ "Die Kommandozeile war:\n",
+ $cmdln."\n",
+ "Der Fehlercode lautet: ".$status."\n"
+ )
+ }
+ &warn_message( "Spool ".$job." erfolgreich archiviert nach ".$dest."\n" );
+
+ if ( $realprinter !~ m/$scheme/ ) {
+ $status=&execute_file_lp("localhost",$realprinter,$filename,"",$filename);
+ exit($status) if ($status!=0);
+ &warn_message( "Spool ".$job." erfolgreich gedruckt auf ".$realprinter."\n" );
+ &info_message( "Spool ".$job." erfolgreich archiviert (".$dest.") und gedruckt (".$realprinter.")\n" );
+ if ( $CUPS_SERVERADMIN && $JobMail ) {
+ &send_message(
+ "CUPS [Spool ".$job.":".$scheme."] archiviert und gedruckt",
+ "Spool ".$job." erfolgreich archiviert (".$dest.") und gedruckt (".$realprinter.").\n"
+ )
+ }
+ }
+ else {
+ &warn_message( "Spool ".$job." erfolgreich archiviert nach ".$dest."\n" );
+ if ( $CUPS_SERVERADMIN && $JobMail ) {
+ &send_message(
+ "CUPS [Spool ".$job.":".$scheme."] archiviert",
+ "Spool ".$job." erfolgreich archiviert (".$dest.").\n"
+ );
+ }
+ }
+}
+
+foreach (@tempfilelist) { unlink or &error_message( "Fehler beim löschen der temporären Files\n") };
+
+&warn_message( "Spool ".$job." fertig mit ret=".$CUPS_BACKEND_OK."\n" );
+
+# wenn Inhalt von $cyclecountfile >= 1
+# Mail alles wieder OK
+
+&send_message("CUPS [Spool ".$job.":".$scheme."] Störung behoben",
+ "Spool ".$job." erfolgreich verarbeitet.\n") if ($cyclecount>=1);
+
+unlink($cyclecountfile);
+
+exit($CUPS_BACKEND_OK);
+
--- /dev/null
+#!/usr/bin/perl -w
+# ______________________________________________________________________
+#
+# Projekt: modprint_server
+# Name: modpdf
+# Autor: mgoppold
+# Revision: $Revision: 187 $
+# letzte Änderung: $Date: 2012-12-18 20:12:21 +0100 (Di, 18. Dez 2012) $
+# durch: $Author: mgoppold $
+# Source: $HeadURL: svn+ssh://svnserver/svn/modprint_server/trunk/cups/backend/modpdf $
+# ______________________________________________________________________
+#
+# CUPS backend for printing to pdf
+#
+# perltidy -b -syn -i=3 -ple -bbs -bbc -bbb -bar -msc=3 -l=1000 -ndnl -nwls='.' -nwrs='.' FILE
+#
+# lpadmin -p MYPDFMULTI -v modpdf-test:// -i /usr/share/cups/model/Distiller.ppd -E
+# lp -d MYPDFMULTI raster.ps -o PassThrough=1 -o destination=mgoppold@tbz-pariv.de
+# lp -d MYPDFMULTI raster.ps -o PassThrough=1 -o destination=modarch@ardenne/mypdfs
+# lp -d MYPDFMULTI raster.ps -o PassThrough=1
+#
+# lpadmin -p MYPDFINCDIR -v modpdf-test://mypdfincdir -i /usr/share/cups/model/Distiller.ppd -E
+# lpadmin -p MYPDFUAH -v modpdf-test://modarch@esg-archiv/incomming/test -i /usr/share/cups/model/Distiller.ppd -E
+# lpadmin -p MYPDFMAIL -v modpdf-test://mgoppold@tbz-pariv.lan -i /usr/share/cups/model/Distiller.ppd -E
+
+use Carp;
+use File::Temp qw/ :mktemp /;
+use File::Basename;
+use Mail::Send;
+use Config::General;
+use Email::Address;
+use MIME::Words qw(encode_mimewords);
+use MIME::Lite;
+
+BEGIN { push @INC, ( ".", "bin", "lib", "../lib", "/usr/share/modprint_server/lib" ) }
+use ModPrint::Server;
+use ModPrint::Server qw ( $debug $scheme );
+
+#
+# -----------------------------------------------------------------------------
+#
+
+my ( $CUPS_SERVERROOT, $SOFTWARE );
+my ( $scheme, $URI, $realprinter, $PRINTER );
+my ( $cmdln, $status, @tempfilelist );
+my ( $jahr, $monat, $tag, $hour, $min, $sec );
+my ( $job, $user, $title, $copies, $options, $filename, $filename2 );
+my ( $destfile, $transmitt, $default_pdfhome );
+my ( $PPDFILE, $JobMail );
+my ( $fh, $filetyp, $TMPDIR );
+my ( @optionlist, $SpecialOutput );
+my ( %serverconfig, $CUPS_SERVERADMIN );
+my ( $msg, $line, $cline );
+my ( $scpbin, $scpopt, $unused1, $unused2, @emails, $user_at_host );
+my ($debug);
+
+#
+# -----------------------------------------------------------------------------
+#
+
+sub send_message() {
+ my $subject = shift;
+ if ($CUPS_SERVERADMIN) {
+ $msg = Mail::Send->new() || &error_message( "Fehler beim versenden der Fehlermail an %s\n", $CUPS_SERVERADMIN );
+ $msg->to($CUPS_SERVERADMIN);
+ $msg->subject($subject);
+ $fh = $msg->open;
+ print $fh @_;
+ $fh->close || &error_message( "Fehler beim versenden der Fehlermail an %s\n", $CUPS_SERVERADMIN );
+ }
+}
+
+sub cleanupexit() {
+ my $retcode = shift;
+ foreach (@tempfilelist) { unlink or error_message( "Fehler beim löschen der temporären Files\n") };
+ exit $retcode;
+}
+
+sub send_error_and_exit() {
+ my $retcode = shift;
+ my $subject = shift;
+ &send_message( $subject, @_ );
+ &warn_message( "fertig mit ret=".$retcode."\n" );
+ &cleanupexit($retcode);
+}
+
+#
+# -----------------------------------------------------------------------------
+#
+
+@tempfilelist = ();
+$debug = 1;
+
+# hier liegt Monat zw. 0 und 11
+( $sec, $min, $hour, $tag, $monat, $jahr ) = (localtime)[ 0, 1, 2, 3, 4, 5 ];
+$monat += 1;
+$jahr += 1900;
+$monat = sprintf( "%.2d", $monat );
+$tag = sprintf( "%.2d", $tag );
+$sec = sprintf( "%.2d", $sec );
+$min = sprintf( "%.2d", $min );
+$hour = sprintf( "%.2d", $hour );
+
+$_ = $0;
+SWITCH: {
+ $scheme = "modpdf", last SWITCH if /\/modpdf$/;
+ $scheme = "modpdf-test", last SWITCH if /\/modpdf-test$/;
+}
+
+if ( @ARGV == 0 ) {
+ print "direct ".$scheme." \"Unknown\" \"Printing to ".$scheme."\"\n";
+ print "file ".$scheme."://realprinter \"Unknown\" \"print to\"\n";
+ print "file ".$scheme."://user\@host/dir \"Unknown\" \"copy to\"\n";
+ print "file ".$scheme."://email\@example.de \"Unknown\" \"mail to\"\n";
+ print "direct ".$scheme.":// \"Unknown\" \"print to\"\n";
+ exit $CUPS_BACKEND_OK;
+}
+
+# in case of wrong number of arguments: print usage hint
+if ( @ARGV != 5 && @ARGV != 6 ) {
+ print "
+Usage: ".$scheme." job-id user title copies options [file]
+ example for device-URI: '".$scheme."://realprinter eq ARCHIV '
+ '".$scheme."://user\@host/dir eq modwork_tbz_p\@tbzwork/import'
+ '".$scheme."://email\@example.de eq modarch\@tbz-pariv.de'
+
+Install a printqueue with 'lpadmin -p <printer-name> -v ".$scheme."://<final_destination> -i /usr/share/cups/model/Distiller.ppd -E
+Option -o destination overwrites URI: lp -d MYPDF -o destination=modarch\@tbz-pariv.de file.pdf
+";
+ exit $CUPS_BACKEND_FAILED;
+}
+
+# Flush everything immediately.
+$| = 1;
+
+( $job, $user, $title, $copies, $options, $filename ) = @ARGV;
+
+$ModPrint::Server::debug = $debug;
+$ModPrint::Server::job = $job;
+$ModPrint::Server::scheme = $scheme;
+
+$SOFTWARE = $ENV{"SOFTWARE"} ? $ENV{"SOFTWARE"} : "CUPS/1.4.6";
+$TMPDIR = $ENV{"TMPDIR"} ? $ENV{"TMPDIR"} : "/tmp/";
+$CUPS_SERVERROOT = $ENV{"CUPS_SERVERROOT"};
+$PRINTER = $ENV{"PRINTER"};
+$PPDFILE = $ENV{"PPD"};
+$URI = $ENV{"DEVICE_URI"};
+$ENV{GS_OPTIONS} = "-sPAPERSIZE=a4 -I.";
+
+# %serverconfig = ParseConfig($CUPS_SERVERROOT."/cupsd.conf");
+# $CUPS_SERVERADMIN = $serverconfig{'ServerAdmin'};
+$CUPS_SERVERADMIN = "modarch\@localhost";
+$JobMail = 0;
+$transmitt = "lp";
+$scpbin = "/usr/bin/scp";
+$scpopt = "-oProtocol=2 -c blowfish -p -q -i ".$CUPS_SERVERROOT."/ssh.identity ";
+$user_at_host = "modarch\@localhost/incomming";
+@emails = ();
+
+&debug_message( 1, "job=%s\n", $job );
+&debug_message( 1, "user=%s\n", $user );
+&debug_message( 1, "title=%s\n", $title );
+&debug_message( 1, "copies=%s\n", $copies );
+&debug_message( 1, "options=%s\n", $options ? $options : "not set" );
+&debug_message( 1, "filename=%s\n", $filename ? $filename : "not set" );
+&debug_message( 1, "CUPS_SERVERADMIN=%s\n", $CUPS_SERVERADMIN ? $CUPS_SERVERADMIN : "not set" );
+
+$default_pdfhome = $ENV{"DEFAULT_PDFHOME"}?$ENV{"DEFAULT_PDFHOME"}:".";
+
+@optionlist = split( /\s/, $options );
+foreach $option (@optionlist) {
+ my ( $var, $value ) = split( /\s*=\s*/, $option, 2 );
+ &debug_message( 2, "options: > (%s,%s)\n", $var, $value );
+ $var =~ s/[ \.,;:*\-\+#~$"?&\/\\()\[\]{}]//g; # um gültige Var-Name zu erhalten
+ $value =~ s/[{}]//g; # die {} entfernen weil eine Substitution von
+ # ${VAR} nicht geht wohl aber $VAR
+ $value =~ s/\$(\w+)/${$1}/g; # Variablen auflösen
+ no strict 'refs';
+ &debug_message( 2, "options: >> (%s,%s)\n", $var, $value );
+ $$var = $value;
+ &debug_message( 2, "options: >>> (%s,%s)\n", $var, $value );
+}
+
+$user = $ENV{"USER"} if ( !$user );
+$user = "cups" if ( !$user );
+$user =~ tr/ .,;:*+#~$"?&\/\\()[]/_/;
+
+#
+# Im PassThrough Modus hat der "documentname" eine höhere Priorität als der "title"
+#
+if ($title) {
+ if ( !$PassThrough ) {
+ $title =~ s/[[:punct:]]+/_/g;
+ $title =~ s/[[:space:]]+/_/g;
+ if ( "$title" =~ /(stdin|Untitled)/ && $documentname ) {
+ $title = $documentname;
+ $title =~ s/[[:punct:]]+/_/g;
+ $title =~ s/[[:space:]]+/_/g;
+ }
+ else {
+ $title =~ s/_stdin_/$scheme/g;
+ }
+ }
+ else {
+ $title = $documentname if ($documentname);
+ }
+}
+else {
+ $title = "$scheme";
+ $title = $documentname if ($documentname);
+ $title =~ s/[[:punct:]]+/_/g;
+ $title =~ s/[[:space:]]+/_/g;
+}
+
+if ( !defined($filename) ) {
+ ( $fh, $filename ) = mkstemps( $TMPDIR."/".$title."_XXXXXX", ".prn" );
+ while (<STDIN>) {
+ print $fh $_;
+ }
+ close($fh);
+ push @tempfilelist, $filename;
+}
+
+( $unused1, $unused2, $realprinter, $savedir ) = split( /\//, $URI, 4 );
+&debug_message( 0, "realprinter=%s\n", $realprinter );
+if ( defined $destination ) {
+ ( $realprinter, $savedir ) = split( /\//, $destination, 4 );
+ &debug_message( 0, "new realprinter=%s\n", $realprinter );
+}
+
+if ( !defined $savedir ) {
+ $savedir = "";
+}
+
+$savedir = $default_pdfhome."/".$savedir;
+
+&debug_message( 0, "savedir=%s\n", $savedir );
+if ( $realprinter =~ /\@/ && ( length $savedir ) ) {
+ $user_at_host = $realprinter;
+ $transmitt = "scp";
+ &debug_message( 0, "user_at_host=%s\n", $user_at_host );
+}
+elsif ( $realprinter =~ /\@/ ) {
+ @emails = Email::Address->parse($realprinter);
+ $transmitt = "mail";
+ &debug_message( 0, "emails=%s\n", join( "|", @emails ) );
+}
+&debug_message( 0, "transmitt=%s\n", $transmitt );
+
+#
+# -----------------------------------------------------------------------------
+#
+
+open( PPD, "< ".$PPDFILE ) || do {
+ printf STDERR "ERROR: [Job %d:%s] Fehler beim Lesen des PPD-Files: %s\n", $job, $scheme, $PPDFILE;
+ &cleanupexit($CUPS_BACKEND_FAILED);
+};
+while (<PPD>) {
+ if (m!^\**DefaultJobMail:\s*\"*(.*)\"*$!) {
+ chomp;
+ $JobMail = 1 if ( $1 =~ /mailyes/ );
+ }
+}
+close PPD;
+
+#
+# -----------------------------------------------------------------------------
+#
+
+$filetyp = $ENV{"CONTENT_TYPE"};
+
+if ($PassThrough) {
+ if ( $title =~ /.pdf$/ ) {
+ $destfile = $title;
+ }
+ else {
+ $destfile = $title;
+ $destfile =~ s/.e*ps$/.pdf/i;
+ $destfile =~ s/.pcl$/.pdf/i;
+ $destfile =~ s/.([0-9][0-9]*)$/.$1.pdf/i;
+ }
+}
+else {
+ $destfile = $user.".".$jahr.$monat.$tag.$hour.$min.$sec.".".$title.".".$PRINTER.".".$job.".pdf";
+}
+
+if (
+ "$filetyp" =~ m/application\/postscript/i ||
+ "$filetyp" =~ m/application\/caps-postscript/i ||
+ "$filetyp" =~ m/application\/vnd.cups-raw/i ||
+ "$filetyp" =~ m/application\/vnd.hp-hpgl/i
+ ) {
+
+ &debug_message( 0, "filetyp=%s is OK\n", $filetyp );
+
+ $filename2 = $TMPDIR."/".$destfile;
+ push @tempfilelist, $filename2;
+
+ if ( "$filetyp" =~ m/application\/postscript/i ||
+ "$filetyp" =~ m/application\/caps-postscript/i ) {
+ $cmdln = "/usr/bin/gs -I. -dDisableFAPI -sDEVICE=pdfwrite -sOutputFile=".$filename2." -dNOPAUSE -DBATCH -dSAFER -dCompatibilityLevel=1.2 -f ".$filename;
+ }
+ if (
+ "$filetyp" =~ m/application\/vnd.hp-hpgl/i ||
+ "$filetyp" =~ m/application\/vnd.cups-raw/i
+ ) {
+ $cmdln = "/usr/bin/pcl6 -dDisableFAPI -sDEVICE=pdfwrite -sOutputFile=".$filename2." -dNOPAUSE -DBATCH ".$filename;
+ }
+
+ if ( $> == 0 ) { $cmdln = "su -c '".$cmdln."' lp"; }
+ &debug_message( 1, "cmdln=%s\n", $cmdln );
+ $status = system($cmdln);
+ if ( $status != 0 ) {
+ &error_message( "Fehler w\ährend der Konvertierung für Drucker PDF: ".$cmdln." \[Fehlercode=".$status."\]\n" );
+ &send_error_and_exit(
+ $CUPS_BACKEND_FAILED,
+ "CUPS [Spool ".$job.":".$scheme."] Fehler: Konvertierung",
+ "Fehler während der Konvertierung für Drucker ".$PRINTER." (".$realprinter.")\n",
+ "Die Kommandozeile war:\n",
+ $cmdln."\n",
+ "Der Fehlercode lautet: ".$status."\n"
+ );
+ }
+}
+elsif ( "$filetyp" =~ m/application\/pdf/i ) {
+
+ &debug_message( 0, "filetyp=%s is OK\n", $filetyp );
+ $filename2 = $filename;
+
+}
+else {
+ &error_message( "Unbekannter Typ: ".$filetyp."\n" );
+ &send_error_and_exit(
+ $CUPS_BACKEND_FAILED,
+ "CUPS [Spool ".$job.":".$scheme."] Fehler: unbekannter Typ",
+ "",
+ "Filetyp:",
+ $filetyp."\n",
+ ""
+ );
+}
+
+if ( $transmitt eq "scp" ) {
+
+ $cmdln = $scpbin." ".$scpopt." ".$filename2." ".$user_at_host.":".$savedir."/".$destfile;
+
+ if ( $> == 0 ) { $cmdln = "su -c '".$cmdln."' lp"; }
+ $status = system($cmdln);
+ if ( $status != 0 ) {
+ &error_message( "Fehler beim scp: ".$cmdln." \[Fehlercode=".$status."\]\n" );
+ &send_error_and_exit(
+ $CUPS_BACKEND_FAILED,
+ "CUPS [Spool ".$job.":".$scheme."] Fehler: scp",
+ "Beim scp auf den ".$PRINTER." ging was schief\!",
+ "Die Kommandozeile war:\n",
+ $cmdln."\n",
+ "Der Fehlercode lautet: ".$status."\n"
+ );
+ }
+ &info_message( $transmitt." ".$filename2." ".$user_at_host.":".$savedir."/".$destfile."\n" );
+}
+elsif ( $transmitt eq "mail" ) {
+ my $recopients;
+
+ foreach my $r (@emails) {
+ $recipents .= "," if ( length $recipents );
+ $recipents .= $$r[1];
+ }
+
+ $msg = MIME::Lite->new(
+ From => encode_mimewords($CUPS_SERVERADMIN),
+ To => encode_mimewords($recipents),
+ Subject => encode_mimewords('PDF vom Druckserver'),
+ Type => 'multipart/mixed'
+ ) || &error_message( "Fehler beim versenden der Mail an ".$recipents." (create)\n" );
+ $msg->attach(
+ Type => 'TEXT',
+ Data => "\n".
+ " Sehr geehrter Auftraggeber,\n\n".
+ " wir haben Ihren Druckjob ".$title." verarbeitet.\n".
+ " Im Anhang dieser Mail ist das entstandene ".$destfile." enthalten.\n\n".
+ " Mit freundlichen Grüßen\n".
+ " Ihre TBZ-PARIV GmbH\n\n".
+ " Diese Nachricht wurde automatisch generiert.\n"
+ ) || &error_message( "Fehler beim versenden der Mail an ".$recipents." (attach txt)\n" );
+ $msg->attach(
+ Type => 'application/pdf',
+ Path => $filename2,
+ Filename => $destfile,
+ Disposition => 'attachment'
+ ) || &error_message( "Fehler beim versenden der Mail an ".$recipents." (attach pdf)\n" );
+ $status=$msg->send || &error_message( "Fehler beim versenden der Mail an ".$recipents." (send)\n" );
+ &info_message( $transmitt." ".$filename2." ".$recipents."\n" );
+}
+else {
+ $status=&execute_file_lp("localhost",$realprinter,$destfile,"-o raw -o PassThrough=1",$filename2);
+}
+
+&info_message( "Spool ".$job." fertig mit ret=".$status."\n" );
+
+#
+# -----------------------------------------------------------------------------
+#
+
+if ( $CUPS_SERVERADMIN && $JobMail ) {
+ &send_message(
+ "CUPS [Spool ".$job.":".$scheme."] verarbeitet",
+ "Spool ".$job." erfolgreich verarbeitet (".$realprinter.").\n"
+ );
+}
+
+#
+# -----------------------------------------------------------------------------
+#
+&cleanupexit($CUPS_BACKEND_OK);
--- /dev/null
+#!/usr/bin/perl -w
+# $Id: modsave 72 2012-03-21 14:23:40Z fjunge $
+# $HeadURL: svn+ssh://svnserver/svn/modprint_server/trunk/cups/backend/modsave $
+#
+# CUPS backend for printing via CAPS
+#
+# Environment Variables:
+#
+# CHARSET - The character set used by the client for this print file
+# CONTENT_TYPE - The original document type, such as "application/postscript"
+# CUPS_DATADIR - The location of CUPS data files
+# CUPS_SERVERROOT - The location of CUPS configuration files
+# DEVICE_URI - The output device URI
+# LANG - The language used by the client for this print file
+# PATH - The execution path exported to the filter
+# PPD - The full filename of the printer's PPD file
+# PRINTER - The name of the printer queue
+# RIP_CACHE - The maximum amount of memory each filter should use
+# SOFTWARE - The name of the CUPS software, typically "CUPS/1.1"
+# TZ - The local timezone
+# USER - The name of the current user
+#
+# DEBUG: - a debug message
+# INFO: - an informational message
+# WARNING: - a warning message
+# ERROR: - an error message
+# PAGE: - a page accounting message
+# export DEVICE_URI=caps://WORK/TST
+# cat /etc/passwd | /usr/lib/cups/backend/caps 123 fjunge Test 1 ""
+#
+use File::Temp qw/ :mktemp /;
+
+
+my $CUPS_SERVERROOT = $ENV{"CUPS_SERVERROOT"};
+my $scheme = "caps";
+my $LOGFILE="/var/log/cups/modsave.log";
+my $CUPS_BACKEND_OK = 0;
+my $CUPS_BACKEND_FAILED = 1;
+my $CUPS_BACKEND_AUTH_REQUIRED = 2;
+my $CUPS_BACKEND_HOLD = 3;
+my $CUPS_BACKEND_STOP = 4;
+my $CUPS_BACKEND_CANCEL = 5;
+
+open(LOGFILE,">>$LOGFILE");
+
+if (@ARGV == 0) {
+ print "file $scheme \"Unknown\" \"Printing with SAVE\"\n";
+ close LOGFILE;
+ exit 0;
+}
+my $JOBNR=$ARGV[0];
+$PRINTER=$ENV{"PRINTER"};
+print LOGFILE "SAVE [$JOBNR]: start $PRINTER\n";
+
+# in case of wrong number of arguments: print usage hint
+if (@ARGV != 5 && @ARGV != 6) {
+ print "
+Usage: save job-id user title copies options [file]
+ example for device-URI: 'modsave://{dirname}'
+
+Install a printqueue with 'lpadmin -p <printer-name>
+-v modsave://{dirname} -E
+
+";
+ close LOGFILE;
+ exit 1;
+}
+
+
+if (defined ($ARGV[5])) {
+ $file = $ARGV[5];
+}
+else {
+ ($fh,$file) = mkstemps( "caps_XXXXXX", ".prn");
+ while (<STDIN>) {
+ print $fh $_ ;
+ }
+ close($fh);
+}
+
+
+$uri = $ENV{"DEVICE_URI"};
+my $sshto=$uri;
+$sshto =~ s/^.*:\/\///;
+
+print LOGFILE "SAVE [$JOBNR]: URI=$uri sshto=$sshto (serverroot=$CUPS_SERVERROOT)\n";
+my $ret=0;
+$ret=system ("scp \"${file}\" \"$sshto\" >> $LOGFILE 2>&1");
+if ( $ret == 0 ) {
+ print LOGFILE "SAVE [$JOBNR]: $file nach $sshto gespeichert\n";
+ print STDERR "INFO: $file nach $sshto gespeichert\n";
+ close LOGFILE;
+ exit $CUPS_BACKEND_OK;
+}
+else {
+ print LOGFILE "SAVE [$JOBNR]: Probleme beim scp von $file nach $sshto (ret=$ret)\n";
+ print STDERR "ERROR: [$JOBNR]: Probleme beim scp von $file nach $sshto (ret=$ret)\n";
+ close LOGFILE;
+ exit $CUPS_BACKEND_HOLD;
+}
--- /dev/null
+#!/usr/bin/perl -w
+# ______________________________________________________________________
+#
+# Projekt: modprint_server
+# Name: modzip
+# Autor: mgoppold
+# Revision: $Revision: 96 $
+# letzte Änderung: $Date: 2012-09-20 12:40:26 +0200 (Do, 20. Sep 2012) $
+# durch: $Author: mgoppold $
+# Source: $HeadURL: svn+ssh://svnserver/svn/modprint_server/trunk/cups/backend/modarch $
+# ______________________________________________________________________
+#
+# CUPS backend for zipping FILES and transmit via ftp
+#
+# perltidy -b -syn -i=3 -ple -bbs -bbc -bbb -bar -msc=3 -l=1000 -ndnl -nwls='.' -nwrs='.' FILE
+#
+
+use Carp;
+use File::Temp qw/ :mktemp /;
+use File::Basename;
+use Net::CUPS;
+use Data::Dumper;
+use IPC::Open3;
+use File::Type;
+
+use Archive::Tar;
+use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
+
+BEGIN { push @INC, ( ".", "bin", "lib", "../lib", "/usr/share/modprint_server/lib" ) }
+use ModPrint::Server;
+use ModPrint::Server qw ( $debug $scheme );
+
+my ( $CUPSVERSION, $SOFTWARE, $PRINTER, $PPD, $TMPDIR, $PassThrough );
+my ( $job, $user, $title, $copies, $options, $filename );
+my ( $scheme, $uri, $realprinter, $realserver, $default_realserver, $unused1, $unused2,$backendstatus );
+my ( @optionlist, @tempfilelist );
+my ( $debug, $fh, $pid, $cmd_exit_status, $errmsg );
+
+$debug = 2;
+@optionlist = ();
+@tempfilelist = ();
+$default_realserver = $ENV{"DEFAULT_REALSERVER"}?$ENV{"DEFAULT_REALSERVER"}:"localhost";
+
+$_ = $0;
+SWITCH: {
+ $scheme = "modzip", last SWITCH if /\/*modzip$/;
+ $scheme = "modzip-test", last SWITCH if /\/*modzip-test$/;
+}
+
+if ( @ARGV == 0 ) {
+ print "direct ".$scheme." \"Unknown\" \"modzip\"\n";
+ print "file ".$scheme."://realprinter \"Unknown\" \"zip and transmit via realprinter\"\n";
+ exit $CUPS_BACKEND_OK;
+}
+
+# in case of wrong number of arguments: print usage hint
+if ( @ARGV != 5 && @ARGV != 6 ) {
+ print "
+Usage: ".$scheme." job-id user title copies options [file]
+ example for device-URI: '".$scheme."://real_printer_name'
+
+Install a printqueue with lpadmin -p <printer-name>
+-v ".$scheme."://<real_printer_name> -E
+
+";
+ exit $CUPS_BACKEND_FAILED;
+}
+
+# Flush everything immediately.
+$| = 1;
+
+( $job, $user, $title, $copies, $options, $filename ) = @ARGV;
+
+
+$ModPrint::Server::debug = $debug;
+$ModPrint::Server::job = $job;
+$ModPrint::Server::scheme = $scheme;
+$backendstatus=$CUPS_BACKEND_OK;
+
+$SOFTWARE = $ENV{"SOFTWARE"} ? $ENV{"SOFTWARE"} : "CUPS/1.4.6";
+$TMPDIR = $ENV{"TMPDIR"} ? $ENV{"TMPDIR"} : "/tmp/";
+$PRINTER = $ENV{"PRINTER"};
+$PPD = $ENV{"PPD"};
+
+debug_message( 0, "job=%s\n", $job );
+debug_message( 0, "user=%s\n", $user );
+debug_message( 0, "title=%s\n", $title );
+debug_message( 0, "copies=%s\n", $copies );
+debug_message( 0, "options=%s\n", $options ? $options : "not set" );
+debug_message( 0, "filename=%s\n", $filename ? $filename : "not set" );
+debug_message( 0, "PRINTER=%s\n", $PRINTER ? $PRINTER : "not set" );
+
+# Wenn in den options schon Leerzeichen vorkommen:
+# options=document-name=Allonge\ 56235:\ ComSell\ GmbH job-uuid=urn:uuid:4eaa0aff-f2b8-348c-5449-4934aff0d4fa
+# kann optionlist nicht sauber trennen, deshalb werden die Leerzeichen schon hier durch _ ersetzt
+$options =~ s/\\ /_/g;
+@optionlist = split( /\s/, $options );
+foreach $option (@optionlist) {
+ my ( $var, $value ) = split( /\s*=\s*/, $option, 2 );
+ if ( !defined $value ) {
+
+ # ab cups>1.5 kann es Optionen ohne Wert geben
+ # [capspstopcl] options=finishings=3 number-up=1 OptionPostScript job-uuid=urn:uuid:110a4...
+ # [capspstopcl] options=finishings=3 number-up=1 noOptionPostScript job-uuid=urn:uuid:110a4...
+ if ( $var =~ /^no/ ) {
+ $var =~ s/^no//;
+ $value = 0;
+ }
+ else {
+ $value = 1;
+ }
+ }
+ debug_message( 3, "parse options ($var,$value)\n", $var, $value );
+
+ $var =~ s/[ \.,;:*\-\+#~$"?&\/\\()\[\]{}]//g; # um gültige Var-Name zu erhalten
+ $var = "Option_".$var;
+ $value =~ s/[{}]//g; # die {} entfernen weil eine Substitution von
+ # ${VAR} nicht geht wohl aber $VAR
+ $value =~ s/\$(\w+)/${$1}/g; # Variablen auflösen
+ no strict 'refs';
+ debug_message( 3, "parse options (%s,%s)\n", $var, $value );
+ $$var = $value;
+ debug_message( 2, "parse options (%s,%s)\n", $var, $$var );
+}
+
+#
+# Im PassThrough Modus hat der "documentname" eine höhere Priorität als der "title"
+#
+
+if ($title) {
+ if ( !$PassThrough ) {
+ $title =~ s/[[:punct:]]+/_/g;
+ $title =~ s/[[:space:]]+/_/g;
+ if ( "$title" =~ /(stdin|Untitled)/ && $documentname ) {
+ $title = $documentname;
+ $title =~ s/[[:punct:]]+/_/g;
+ $title =~ s/[[:space:]]+/_/g;
+ }
+ else {
+ $title =~ s/_stdin_/$scheme/g;
+ }
+ }
+ else {
+ $title = $documentname if ($documentname);
+ }
+}
+else {
+ $title = "$scheme";
+ $title = $documentname if ($documentname);
+ $title =~ s/[[:punct:]]+/_/g;
+ $title =~ s/[[:space:]]+/_/g;
+}
+
+# sicherstellen, dass wir mit einem File arbeiten können
+if ( !defined($filename) ) {
+ ( $fh, $filename ) = mkstemps( $TMPDIR."/".$job."_".$scheme."_XXXXXX", ".prn" );
+ while (<STDIN>) {
+ print $fh $_;
+ }
+ close($fh);
+ push @tempfilelist, $filename;
+ $workdir=$TMPDIR;
+}
+else {
+ $workdir=dirname($filename);
+}
+chdir($workdir) or die_message("Konnte nicht in das Sessionverz. %s wechseln!",$workdir);
+my $basefilename=basename($title,(".ps",".pcl",".pdf","_ps","_pcl","_pdf"));
+
+
+$uri = $ENV{"DEVICE_URI"};
+( $unused1, $unused2, $realprinter, $realserver ) = split( /\//, $uri, 4 );
+
+$realserver=$default_realserver if (! (defined $realserver && length $realserver));
+
+my $ft = File::Type->new();
+my $filetype=$ft->checktype_filename($filename);
+
+$title =~ s/_ps$/_pcl/ if ( "$filetype" !~ m/postscript/i );
+
+debug_message( 0, "filetyp %s\n", $filetype );
+debug_message( 0, "workdir %s \n", $workdir );
+debug_message( 0, "basefilename %s \n", $basefilename );
+debug_message( 0, "title %s \n", $title );
+debug_message( 0, "realprinter %s \n", $realprinter );
+debug_message( 0, "realserver %s \n", $realserver );
+
+my $zip = Archive::Zip->new();
+my $file_member = $zip->addFile( $filename, $title );
+$file_member->desiredCompressionLevel(COMPRESSION_LEVEL_FASTEST);
+
+unless ( $zip->writeToFileNamed($TMPDIR."/".$basefilename.'.zip') == AZ_OK ) {
+ die_message('Schreibfehler bei der Erstellung von %s\n',$basefilename.'.zip');
+}
+push @tempfilelist, $TMPDIR."/".$basefilename.".zip";
+
+open( WH, "> ".$TMPDIR."/".$basefilename."F.fin" ) or die_message("Kann Datei %s nicht schreiben!\n",$basefilename."F.fin");
+ print WH $basefilename.".zip\n";
+ print WH $basefilename."F.fin\n";
+close(WH);
+push @tempfilelist, $TMPDIR."/".$basefilename."F.fin";
+
+chdir($TMPDIR) or die_message("Konnte nicht in das TEMP. %s wechseln!",$TMPDIR);
+my $tar = Archive::Tar->new();
+$tar->add_files( $basefilename.".zip",$basefilename."F.fin" );
+$tar->write($TMPDIR."/".$basefilename.".tar");
+push @tempfilelist, $TMPDIR."/".$basefilename.".tar";
+
+
+$backendstatus=&execute_file_lp($realserver,$realprinter,$basefilename.".tar","-o raw -o PassThrough=1 -o Untar=1 ",$TMPDIR."/".$basefilename.".tar");
+
+foreach (@tempfilelist) { unlink or &die_message( "Fehler beim löschen der temporären Files\n") };
+
+&info_message( "Spool ".$job." fertig mit ret=".$backendstatus."\n" );
+
+exit($backendstatus);
--- /dev/null
+#!/bin/sh
+#
+# This script is intended to be used as a CUPS backend, to create
+# PDF file on-the-fly. Just create a printer using the device uri
+# pdf:/path/to/dir/. When printing to this printer, a PDF file
+# will be generated in the directory specified. The file name will
+# be either "<jobname>.pdf" or "unknown.pdf", depending wether the
+# jobname is empty or not.
+#
+# To use it, simply copy this script to your backend directory, and
+# create a printer with the correct URI. That's it.
+#
+# Copyright (C) Michael Goffioul (kdeprint <at> swing <dot> be) 2001
+#
+# 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 the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+LOGFILE=/tmp/pdf.log
+PDFBIN=`which ps2pdf`
+FILENAME=
+# this is borrowed from printpdf script for the filename
+PRINTTIME=`date +%b%d-%H%M%S`
+
+echo "Executable: $PDFBIN" > $LOGFILE
+echo "Arguments: |$1|$2|$3|$4|$5|$6|" >> $LOGFILE
+echo $# $PRINTTIME >> $LOGFILE
+
+# case of no argument, prints available URIs
+if [ $# -eq 0 ]; then
+ if [ ! -x "$PDFBIN" ]; then
+ exit 0
+ fi
+ echo "direct pdf \"Unknown\" \"PDF Writing\""
+ exit 0
+fi
+
+# case of wrong number of arguments
+if [ $# -ne 5 -a $# -ne 6 ]; then
+ echo "Usage: pdf job-id user title copies options [file]"
+ exit 1
+fi
+
+# get PDF directory from device URI, and check write status
+PDFDIR=${DEVICE_URI#pdf:}
+if [ ! -d "$PDFDIR" -o ! -w "$PDFDIR" ]; then
+ echo "ERROR: directory $PDFDIR not writable"
+ exit 1
+fi
+
+echo "PDF directory: $PDFDIR" >> $LOGFILE
+
+# generate output filename
+OUTPUTFILENAME=
+if [ "$3" = "" ]; then
+ OUTPUTFILENAME="$PDFDIR/unknown.pdf"
+else
+ # OUTPUTFILENAME="$PDFDIR/${3//[^[:alnum:]]/_}.pdf"
+ # I changed this to user name, and the printtime to track down who
+ # printed the PDF and when, samba printing just uses nobody
+
+ OUTPUTFILENAME="$PDFDIR/$2-$PRINTTIME.pdf"
+ echo "PDF file: $OUTPUTFILENAME placed in: $PDFDIR" >> $LOGFILE
+fi
+
+echo "Output file name: $OUTPUTFILENAME" >> $LOGFILE
+
+# run ghostscript
+if [ $# -eq 6 ]; then
+ $PDFBIN $6 "$OUTPUTFILENAME"
+#>& /dev/null
+else
+ $PDFBIN - "$OUTPUTFILENAME" >& /dev/null
+fi
+
+# modify ownership and permissions on the file
+# - world readable
+# - owns to user specified in argument
+chmod a+r "$OUTPUTFILENAME"
+if [ "$2" != "" ]; then
+ chown $2 "$OUTPUTFILENAME"
+fi
+
+exit 0
--- /dev/null
+###prüfen ob script syntaktisch richtig ist (im script)
+set -n
+###alle kommandos anzeigen, die ausgeführt werden (im script)
+set -x
+###wenn variable leer oder nicht existiert wird Wert darauf gesetzt
+${Variablenname:-Wert}
+###anzahl der zeichen in variable
+${#Variablenname}
+#Zufallszahl
+RAND=`od -d -N2 -An /dev/urandom`
+RAND=`cat /proc/sys/kernel/random/uuid | cut -c1-4 | od -d | head -1 | cut -d' ' -f2`
+
+###größe einer datei
+stat -c%s file
+###
+${parameter:-word} ... wenn parameter leer oder nicht existiert wird word substituiert sonst parameter
+${parameter:=word} ... wenn parameter leer oder nicht existiert ist parameter=word + substituiert
+${parameter:?word} ... wenn parameter leer oder nicht existiert dann substituiert word und exit
+${parameter:+word} ... wenn parameter existiert und nicht leer dann parameter=word + substituiert
+${variable:start:n} ... gibt Inhalt von start beginnend n Zeichen der Variablen zurück
+${variable:start} ... gibt Inhalt der Variablen ab start zurück
+${variable: -n} ... gibt die letzten n Zeichen der Variable zurück
+${variable%muster} ... Löscht kürzesten Teil der auf Muster passt, beginnend von hinten
+${variable%%muster} ... Löscht längsten Teil der auf Muster passt, beginnend von hinten
+${variable#muster} ... Löscht kürzesten Teil der auf Muster passt, beginnend von vorne
+${variable##muster} ... Löscht längsten Teil der auf Muster passt, beginnend von vorne
+${#variable} ... Länge der Variablen
+${variable/muster} ... durchsucht Variable von hinten und entfernt zutreffendes Muster
+${variable//muster} ... durchsucht Variable von vorne und entfernt zutreffendes Muster
+${var/mus/str} ... durchsucht Variable von hinten und ersetzt erstes zutreffendes Muster mit String
+${var//mus/str} ... durchsucht Variable von vorne und ersetzt alle zutreffenden Muster mit String
+$* ... identisch zu $@
+${#foo[@]} ... Anzahl der Elemente des Arrays foo
+${*:start:n} ... gibt n Elemente mit start beginnend des Arrays aus
+"$*" ... Ausgabe "$1 $2 $3"
+$@ ... Ausgabe der Positionsparameter ab $1
+"$@" ... Ausgabe "$1" "$2" "$3"
+$# ... Anzahl der übergebenen Positionsparameter ohne $0
+$? ... Rückgabewert des unmittelbar zuvor ausgeführten Befehls
+$$ ... PID der aktuellen Shell
+$! ... PID des letzen Hindergrund-Jobs
+$0 ... Name des aktuellen Befehls oder Scripts bei Funktionen: bash
+$_ ... absoluter Pfad des aktuellen Befehls oder Scripts
+###Ausgaben immer an der selben Stelle (kein Zeilenvorschub)
+set -- $(stty size) # Größe des Terminals besorgen
+ LINES=$1
+COLUMNS=$2
+
+Auf P steht die Pos, allerdings muß COLUMNS-xPos angegeben werden
+Auf N seht der Auszugebende Text
+
+echo -en "\\033[300C\\033[$[${P}]D${N}"
+###for Schleife von bis
+for i in `seq 1 10`;
+do
+ echo $i
+done
+###while Schleife von bis
+COUNTER=0
+while [ $COUNTER -lt 10 ]; do
+ echo The counter is $COUNTER
+ let COUNTER=COUNTER+1
+done
+###i++
+((i++))
+let i=i+1
+
--- /dev/null
+###anzeigen der liste verfügbarer Gateways
+batctl gwl
+###Gateway mode anzeigen lassen
+batctl gw_mode
+###
+batctl o
+
--- /dev/null
+Vision Clearance Engineer - Fensterputzer
+Waste Removal Engineer - Müllmann
+Non Profit Manager - Ehrenamtler
+Listbroker - sammelt schlicht und einfach Adressen
+Mystery Fair Visitor - gehen auf Messen und testen dort zum Beispiel die Freundlichkeit der Service-Mitarbeiter
+Facility Manager - Hausmeister
+Food Stylist - macht Fotos von Nahrungsmitteln für die Werbung
+Community Manager - ist für Kundenbindung übers Internet zuständig
+Price Scout - späht die Preise der Konkurrenz aus
+Domestic Engineer - Hausfrau
+Treasurer - sorgt dafür das im Unternehmen immer genug Geld da ist
+Content Manager - Online-Redakteur
+Knowledge Navigator - Lehrer
+Flueologist - Kaminkehrer, Schornsteinfeger
+Head of Verbal Communications - Sekretärin
+Petroleum Transfer Engineer - Tankwart
+Foot Health Gain Facilitator - Fußpfleger
+Cash Relation Officer - Bankier
+Environment Improvement Technician - Gebäudereiniger, Putzfrau
+Revenue Protection Officer - Fahrkartenkontolleur
+Technical Horticultural Maintenance Officer - Gärtner
+Space Consultant - Immobilienmakler
+Media Distribution Officer - Zeitungsausträger
+Dispatch Service Facilitator - Postler
+Education Centre Nourishment Production Assistant - Kantinen Angestellte
+Stock Replenishment Adviser - Regalauffüller
+Wastewater Treatment Officer - Klärwerker
+Crockery Cleansing Operative - Tellerwäscher
+Coin Facilitation Engineer - Mautkassierer
--- /dev/null
+Zwischen Ihren Anforderungen und meinem Profil sehe ich eine große Schnittmenge.
+
--- /dev/null
+###scannen nach geräten
+hcitool scan
+###ein neues Gerät pairen / pair device
+bluez-simple-agent hci# xx:xx:xx:xx:xx:xx
+###gepairtes Gerät entfernen / remove a paired device
+bluez-simple-agent hci# xx:xx:xx:xx:xx:xx remove
+###bei tastatur oder maus zum testen
+bluez-test-input connect xx:xx:xx:xx:xx:xx
+###verbinden von gerät mit mac 00:0A:3A:27:62:CF
+rfcomm connect 0 00:0A:3A:27:62:CF
+###gerät anpingen, ob es noch da ist
+l2ping <mac>
+l2ping 00:0A:3A:27:62:CF
+###Tastatur einrichten, bsp. Raspi
+#installieren der pakete auf raspi fall noch nicht da
+apt-get install bluez python-gobject
+bluez-simple-agent hci0 11:22:33:44:55:66
+bluez-test-input connect 11:22:33:44:55:66
+bluez-test-device trusted 11:22:33:44:55:66 yes
--- /dev/null
+#pass: doitrules
+#pass: h3xpr0g
+###codieren
+Edit Profile
+Passwort ist repxep
+###SP-Daten kopieren
+SP-DATEN-SGDAT nach \NSCEXPER\SGDAT
+###Motor der in meinem ist sollte der folgende sein
+M47D20TU2
+2,0 L (1995 cm³), 120 kW (163 PS), 340 Nm
+###tool32 wofür?
+mit Tool32 deutlich "tiefer" als mit INPA. Beispiele sind z.B. das man mit Tool32 in diversen SG die Fahrgestellnummer ändern kann, man kann den Wert der I-Stufe änden ohne zu flashen, man kann eine Störverriegelung der Standheizung aufheben und und und...
+###das sollte in der obd.ini im windows verzeichnis drin sein drin sein
+#entweder USB oder OBD je nach version testen
+[OBD]
+
+Port=Com1
+HARDWARE=USB
+###Fehlerspeicher löschen
+1. INPA öffnen
+
+2. Nun müssen wir den Wagen auswählen, bei dem der Fehlerspeicher gelöscht werden soll. Bei mir ist es die F8 Taste , der BMW Z4 Modellreihe E85
+
+3. Im nächsten Fenster wählen wir den obersten Eintrag “IDENT / read-clear error/info memory E85″
+
+4. Nun befinden wir uns im Fehlerspeicher Hauptmenü des BMW’s
+
+5. Mit F4 kommen wir in den Fehlerspeicher-Modus
+
+6. Hier kann mit F1 der Fehlerspeicher gelesen werden
+
+7. Mit F2 wird der Fehlerspeicher gelöscht
+
+Optional Informationsspeicher auslesen und löschen
+8. Mit F3 kann der Informationsspeicher ausgelesen werden
+
+9. Mit F4 wird der Info Speicher gelöschts
+###Service zurückstellen (BMW neu)
+
+- Schlüssel in das Zündschloß einstecken
+- Start/Stop Taste drücken (Wichtig: ohne die Kupplung oder das Bremspedal zu betätigen) und warten bis die Service-Meldung erlischt.
+- Sofort nachdem die Service-Meldung erloschen ist, drücke und halte die Reset-Taste des Tageskilometerzählers. Nach 2 Sekunden erscheint ein Warndreieck, nach weiteren 2-3 Sekunden eine Ölkanne.
+(Anmerkung: Wenn die Taste zu lange gehalten wird (~10 Sekunden), wird das Service-Menü übersprungen und es erscheint ein Menü mit den Einstellungen des Bussystems, wiederhole in diesem Fall den Vorgang ab Schritt 1.)
+- Nun befindest du Dich im Service-Menü. Benutze den Drehknopf um durch die verschiedenen Menüpunkte zu navigieren.
+- Sobald du den Menüpunkt hast den Du zurücksetzen möchtest drücke die Bordcomputertaste am Lenkstockschalter. Nun sollte die Meldung "Reset" im Display angezeigt werden. Drücke die Bordcomputertaste für etwa 3 Sekunden, daraufhin siehst Du eine Uhr deren Zeiger sich bewegen bis der Vorgang beendet ist.
+- Nun kannst Du entweder einen weiteren Menüpunkt anwählen oder das Menü mit einer Betätigung der Start/Stop Taste verlassen.
+
+Achtung: Der Punkt "Bremsbeläge" lässt sich nur zurücksetzen, wenn neue Bremsbelagfühler verbaut wurden. Die alten sind in jedem Fall zu ersetzen, da diese einen veränderbaren Widerstand haben und nicht "digital" arbeiten, wie bei älteren Baureihen.
+###Abkürzungen Steuergeräte und ihre Bedeutung
+* DME - Digital Motor Elektronik
+* DDE - Digitale Diesel Elektronik
+* SRS – Airbag
+* Sicherheits- Informationsmodul
+* EGS – Automatikgetriebe inkl. SMG
+* ABS - Antiblockiersystem
+* DSC - Dynamische Stabilitäts- Kontrolle
+* CAS –Car Access System
+* A/C - Klimaanlage
+* AIC/RLS – Regensensor
+* Active Front Steering Lenksystem
+* Auto Kommunikation Computer
+* Audi System Controller
+* Most CAN Gateway
+* BMBT - On-Board Monitor 16:9 / 4:3
+* DSP - Digitaler Sound Prozessor
+* EWS - Elektronische Wegfahrsperre
+* HKM - Heckklappenmodul
+* IKE - Kombiinstrument
+* LCM – Licht Schalt Zentrum
+* LEW – Lenkradwinkel Sensor
+* SZM – Schaltzentrum Mittelkonsole
+* LRA - Automatische Leuchtweitenregulierung
+* NAV - Navigation System inkl. CCC
+* Satellit Fahrzeugzentrum
+* PDC - Park Distance Control
+* RAD - Radio
+* RDC - Reifendruck Kontorelle
+* SES - Sprach Eingabe System
+* Zentrales Gatewaymodul
+* Zentrale Bedieneinheit
+* TEL - Auto Telefon
+* VID - Video Modul
+* ZKE - Zentralverriegelung
+* SH – Standheizgerät
+* SHD – Schiebehebedach
+* DWA – Diebstahlwarnanlage
+* Zentrales Informations- Display
+* Funktionszentrum
+###Steuergeräte auf Werkseinstellungen setzen
+Mache zuerst das Verzeichnis /Work total leer. Dann den Editor öffnen und eine leere Datei mit der Endung .MAN in dem Verzeichnis speichern. Dann die entsprechenden STG auslesen und die TRC's wie oben speichern.
+Ich wiederhole das für jedes STG neu.
+Wenn alles gesichert ist, dann eine leere .MAN über das ausgewählte STG jagen und die Werkseinstellung ist für das gewählte STG wieder hergestellt.
+###Die Codierung
+Im Arbeitsplatz in das Verzeichnis C:\NCSEXPER\WORK gehn da erstelt man zuerst eine neue datei FSW_PSW.MAN (so wies hier steht) diese einfach als text speichern.
+
+1. Das Diagnoste interface an den Laptop und den Diagnose-Port im Auto anschließen und den Zündschlüssel auf Zündungsstufe 2 stellen
+2. "NCS Expert" vom Desktop starten
+3. Im "NCS Expert": Datei -> Profil laden -> "Expertenmodus" auswählen -> Ok
+(danach Profil editieren wählen passwort repxet eingeben FSW/PSW anklicken hacken setzen bei FSW/PSW Trace und FSW/PSW Manipulation mit man OK klicken das danach Trace=ON angezeigt wird OK anklicken) oder hier downloaden und im ordner NCSEXPER PFL einfügen
+dann nicht mehr expertenmodus wählen sondern fisterprofile
+4. F1 drücken ("FG/ZCS/FA")
+5. F3 drücken ("ZCS aus SG")
+6. Die Baureihe des Autos auswählen
+(e46 z.b.)
+7. "AKMB" auswählen
+(bei FL Modellen AKMB bei VFL KMB)
+(Im normal fall ist es immer das erste was angezeigt wird zumindest bei FL Modellen)
+(Bei e90er Reihe ist es das CAS was ausgewählt weden muss)
+8. Wenn es zu keine Fehler kommt -> F6 drücken ("Zurück")
+9. F4 drücken ("SG bearbeiten")
+10. Das Steuergerät auswählen, in dem etwas bearbeitet werden soll
+z.B. für die Blinkerquittierung und auch andere Einstellungen das "GM5" auswählen
+11. F2 drücken("Job ändern")
+12. "Codierdaten lesen" auswählen -> Ok drücken
+13. F3 drücken ("Job ausführen")
+14. Nun wurde das Steuergerät ausgelesen und im Verzeichnis C:\NCSEXPER\WORK eine Datei FSW-PSW.TRC erstellt
+16. Die Datei FSW-PSW.TRC kopieren und im selben Verzeichnis wieder einfügen
+17. Die gerade eingefügte Datei umbenennen in FSW_PSW.MAN
+18. Die FSW_PSW.MAN mit dem Windows-Editor öffnen
+19. Hier müssen nun die Werte geändert werden, welche umcodiert werden sollen z.b. Beim öffnen 2mal blinken und beim schließen 1mal:
+dafür sucht ihr im GM5 und entfernt einfach das nicht_ vor dem aktiv
+DWA
+nicht_aktiv
+
+QUIT_OPT_SCHAERF
+nicht_aktiv
+
+QUIT_OPT_SCHAERF_KLAPPE
+nicht_aktiv
+
+QUIT_OPT_ENTSCH
+nicht_aktiv
+
+so das es so aussieht
+
+DWA
+aktiv
+
+QUIT_OPT_SCHAERF
+aktiv
+
+QUIT_OPT_SCHAERF_KLAPPE
+aktiv
+
+QUIT_OPT_ENTSCH
+aktiv
+
+20. Die geöffnete Datei speichern und schließen
+21. Nun "NCS Expert" wieder maximieren
+22. F2 drücken ("Job ändern")
+23. "SG codieren" auswählen -> Ok drücken
+24. F3 drücken ("Job ausführen")
+25. Das Steuergerät wurde nun mit den neuen Werten codiert
+So jetzt gaukelt ihr dem GM5 vor das es ein Diebstahlwarnanlage hat da nur so die Blinker beim öffnen und schließen vom Fzg. blinken ( wenn ihr zum :-) fahrt macht der das genauso)
+###Fahrzeugaufträge / Codieren Anleitung
+#von http://www.obdexpert.de/codieren/index.php?section=kat9
+Fahrzeugaufträge:
+
+Zuerst alle vorhandenen Steuergeräte einzeln mit NCS auslesen und die original Werte inkl. des Fahrzeugauftrags irgendwo separat abspeichern. Danach eine leere Datei FSW_PSW.MAN im Verzeichnis NCSEXPERT\WORK\ anlegen.
+
+- FA aus CAS oder LMA auslesen
+- F1 FG/ZCS/FA
+- F2 FA eingeben
+- Baureihe E60 eingeben
+- Fahrgestellnummer bestätigen
+- in der Merkmalliste entsprechenden Eintrag zum löschen markieren und auf der Tastatur DEL drücken oder oben einen FA hinzufügen
+- jetzt sollte das gelöschte Merkmal nicht mehr in der Liste erscheinen bzw. das neue Merkmal ganz unten stehen
+- Button OK drücken
+- F6 Zurück
+- F4 SG bearbeiten
+- CAS auswählen
+- F2 Job ändern
+- FA_WRITE auswählen und OK
+- F3 Job ausführen
+- F1 SG/SGET ändern
+- LMA auswählen
+- F2 Job ändern
+- FA_WRITE auswählen und OK
+- F3 Job ausführen
+- F1 SG/SGET ändern
+- zum FA passendes Steuergerät auswählen
+- F2 Job ändern
+- SG_CODIEREN auswählen und OK
+- F3 Job ausführen
+eventuell die 4 letzten Schritte wiederholen, falls noch mehr Steuergeräte von der Änderung betroffen sind.
+
+Wenn ihr euch unsicher seid, welche Steuergeräte von der Änderung betroffen sind, dann codiert einfach alle Steuergeräte.
+
+Die genauen Fahrzeugaufträge mit Beschreibung können mit dem Windows-Editor in folgender Datei eingesehen werden:
+
+NCSEXPERT\DATEN\E60\E60AT.000
+
+Aktive Ergaenzungszeilen mit E müssen mit -, Kundendienst-Ergaenzungszeilen mit K müssen mit + und SA-Zeilen unter W müssen mit $ geschrieben werden.
+
+also z.B.
+
+-A090 für die 90AH AGM Batterie
++MUEB für die Codierung der LCI FL Scheinwerfer und Rückleuchten mit den BMW Kabeladaptern
+$6FL für die USB Audio Schnittstelle
+
+Zusätzliche Zeichen im FA:
+
+Typschlüssel *
+Zeitkriterium #
+
+Folgende Merkmale sind im FA-Stream vorhanden, werden jedoch nicht überprüft:
+
+Lackcode (Farbcode) %
+Polstercode &
+ZusBau |
--- /dev/null
+###bootsplash bei openSUSE ändern
+#in
+vi /etc/sysconfig/bootsplash
+#THEME="THEMENNAME" setzen
+###initrd neu erzeugen
+mkinitrd oder mkinitrd -s 800x600
--- /dev/null
+###bridge einrichten
+brctl addbr br0
+###mehrere device an bridge binden (eth richtiges netzwerkinterface tap virtuelles)
+brctl addif br0 eth0
+brctl addif br0 tap0
+###keinem der beiden eine ip geben aber up müssen sie sein
+ifconfig eth0 up
+ifconfig tap0 up
+###bridge mit ip ausstatten, danach sollte rechner wieder über eth0
+###zu erreichen sein und auch tap z.b. aus emulation kann eine 172.17.6.0/24
+##ip haben und ist somit erreichbar
+ifconfig br0 172.17.6.20 up
--- /dev/null
+###kostenlose fachbücher von Galileo Computing
+http://www.galileocomputing.de/katalog/openbook
+###kostenlose Fachbücher von addison-wesley
+http://www.addison-wesley.de/main/main.asp?page=ebooks/booklist&reihe=OSLIB
--- /dev/null
+###verbinden mit buspirate
+screen /dev/ttyUSB0 115200 8N1
+###I/O header auf dem board
+GND +3,3
++5V ADC
+Vpu AUX1
+CLK MOSI
+CS MISO
+###
--- /dev/null
+###allen Nutzern rechte wie in /tmp, hinterher noch chmod 777
+chmod a+t /tmp
--- /dev/null
+###resize (seitenverhältnis wird beachtet)
+convert -resize 150x30 alt.png neu.png
+###resize (seitenverhältnis wird NICHT beachtet)
+convert -resize 150x30! alt.png neu.png
+###eine Farbe durch eine andere ersetzen (white -> black)
+convert test.jpg -fill black -opaque white new_test.jpg
+###aus Bild eine Kohlezeichnung machen (-charcoal ->härte des stifts)
+convert orginal_foto.jpg -charcoal 5 kohle_bild.jpg
+###animation erstellen
+convert -delay 10 *.jpg film.mng
+###zwei bilder nebeneinander nach i_horizontal.jpg
+convert +append i_left.jpg i_right.jpg i_horizontal.jpg
+###zwei bilder untereinander nach i_vertical.jpg
+convert -append i_top.jpg i_bottom.jpg i_vertical.jpg
+###montage von 4 breit, 5 runter von
+montage +frame +shadow +label -geometry 1188x645+0+0 -tile 4x5 in*.bmp out.bmp
+###rahmen um bild
+mogrify -bordercolor “#ff0000“ -border 1x1 bild.png
+###schärfen
+convert alt.png -sharpen 5 neu.png
+###aufhellen
+convert alt.png -sigmoidal-contrast 4,0% neu.png
+###graustufen
+convert alt.png -colorspace gray neu.png
+###rot kanal extrahieren (anderen analog)
+convert -channel R alt.png -separate neu.png
+###monochrome
+convert -channel R alt.png -separate neu.png
+###negativ
+convert alt.png -solarize 0% neu.png
+###strudel
+convert alt.png -swirl 90 neu.png
+###beschriften
+convert -font @d-worcti.ttf -pointsize 50 -pen white -draw "text 50,50 'Viele Hühner'" huehner.jpg huehner_schrift.jpg
+#resize IMG_2025.CR2 auf 800x600 und dann von pos. 0.0 800x480 ausschneiden
+convert IMG_2025.CR2 -resize 800x600 -crop 800x480+0+0 test.jpg
--- /dev/null
+###Erzeugen einer cpio-Datei, welche die Dateien des aktuellen Verzeichnisses enthält:
+ls | cpio -o > verzeichnis.cpio
+###Erzeugen einer cpio-Datei, welche die Dateien und Unterverzeichnisse des aktuellen Verzeichnisses enthält:
+find . -depth -print | cpio -o > verzeichnis.cpio
+###Wiederherstellen von Dateien aus einem cpio-Archiv:
+cpio -i < archiv.cpio
+###Auflisten der im Archiv enthaltenen Dateien, ohne diese zu extrahieren:
+cpio -it < archiv.cpio
+###Kopieren des aktuellen Verzeichnisses einschließlich aller Unterverzeichnisse nach /tmp/verzeichnis (entspricht in etwa cp -r * /tmp/verzeichnis):
+find . -print -depth | cpio -pd /tmp/verzeichnis
+###initrd erzeugen
+find | cpio -H newc -o | gzip > ../initrd.gz
+###entpacken initrd
+cat initrd.gz | gzip -d | cpio -i
--- /dev/null
+###Cluster Resource Manager
+
+###folgende Konfigurationsdateien müssen vorhanden sein
+#globale cluster-config
+/etc/ha.d/ha.cf
+#keys für authentication
+/etc/ha.d/authkeys
+###beispiel für autokeys-datei
+auth num
+num method secret
+num method secret
+num method secret
+#num muss eindeutig sein
+#method kann md5, sha1 oder crc sein
+###beispiel ha.cf
+autojoin none
+mcast bond0 239.0.0.43 694 1 0
+bcast eth2
+warntime 5
+deadtime 15
+initdead 60
+keepalive 2
+node alice
+node bob
+crm respawn
+###stoppen des hardbeat services
+#node in standby setzen, damit das cluster nicht denkt das es ein notfall ist
+hb_standby
+#hardbeat stoppen
+/etc/init.d/heartbeat stop
+###neuen knoten hinzufügen
+hb_addnode node
+###node löschen
+hb_delnode node
+###
+
+
+
--- /dev/null
+###wlan/bluetooth chip, funktioniert derzeit nicht
+#Broadcom AP6210
+modprobe bcmdhd
+###bluetooth aktivieren / firmware upload
+./brcm_patchram_plus -d --patchram /lib/firmware/ap6210/bcm20710a1.hcd --enable_hci --bd_addr 11:22:33:44:55:66 --no2bytes --tosleep 1000 /dev/ttyS1
+hcitool dev
+
--- /dev/null
+###mit cul verbinden
+screen /dev/ttyACM0
+###homematic sniffen
+X21
+Ar
+###
+
--- /dev/null
+###Webseite zu cups
+http://www.lug-kr.de/wiki/EigenesCupsBackend
+###übergebene argumente im cups
+argv[1] The job ID
+argv[2] The user printing the job
+argv[3] The job name/title
+argv[4] The number of copies to print
+argv[5] The options that were provided when the job was submitted
+argv[6] The file to print (first program only)
+###interne Variablen
+APPLE_LANGUAGE The Apple language identifier associated with the job (Mac OS X only).
+CHARSET The job character set, typically "utf-8".
+CLASS When a job is submitted to a printer class, contains the name of the destination printer class. Otherwise this environment variable will not be set.
+CONTENT_TYPE The MIME type associated with the file (e.g. application/postscript).
+CUPS_CACHEDIR The directory where cache files can be stored. Cache files can be used to retain information between jobs or files in a job.
+CUPS_DATADIR The directory where (read-only) CUPS data files can be found.
+CUPS_FILETYPE The type of file being printed: "job-sheet" for a banner page and "document" for a regular print file.
+CUPS_SERVERROOT The root directory of the server.
+DEVICE_URI The device-uri associated with the printer.
+FINAL_CONTENT_TYPE The MIME type associated with the printer (e.g. application/vnd.cups-postscript).
+LANG The language locale associated with the job.
+PPD The full pathname of the PostScript Printer Description (PPD) file for this printer.
+PRINTER The queue name of the class or printer.
+RIP_CACHE The recommended amount of memory to use for Raster Image Processors (RIPs).
+TMPDIR The directory where temporary files should be created.
+###Backends befinden sich meist unter
+/usr/lib/cups/backend/
+###Backend PEMSPRT205 nutzen und dann an Druckserver //EMSSV027:515/EMSPRT205 schicken
+lpadmin -p PEMSPRT205 -o printer-error-policy=retry-job -v lpd://EMSSV027:515/EMSPRT205 -E
+###einsatzfähige Backends anzeigen
+lpinfo -v
+###anlegen einer warteschlange
+lpadmin -p funprinter1000 -v parallel:/dev/lp0 -E -P /usr/share/cups/model/Postscript.ppd.gz
+###kontrolle was angelegt wurde
+lpstat -a funprinter1000 -p funprinter1000 -v funprinter1000
+#oder in /etc/cups/printers.conf
+cat /etc/cups/printers.conf
+###abfrage via web-frontend
+http://localhost:631/printers/funprinter1000
+###ändern der Warteschlange (Beschreibung, Standort)
+lpadmin -p funprinter1000 -D "ACME FunPrinter 1000" -L "2. floor: room 3"
+###anzeige der druckerspezifischen Optionen und deren Voreinstellungen in /etc/cups/ppd/funprinter1000.ppd
+lpoptions -p funprinter1000 -l
+###Warteschlangen löschen
+lpadmin -x funprinter1000
+###filter sind zu finden in
+/usr/lib/cups/filter/
+###druck wiederholen
+lp -i ISUDRUCK-159913 -H resume
+###druck abbrechen
+cancel ISUDRUCK-159913
+
+
+###
+lpadmin -p ISUDRUCK -v isu:// -m isu.ppd -D "Eingang für RDI-Drucke Einzeldruck" -E
+lpadmin -p ISUDRUCKE_1 -v isu:// -m isu.ppd -D "Eingang 1 für RDI-Drucke Einzeldruck" -E
+lpadmin -p ISUDRUCKE_2 -v isu:// -m isu.ppd -D "Eingang 2 für RDI-Drucke Einzeldruck" -E
+lpadmin -p ISUDRUCKE_3 -v isu:// -m isu.ppd -D "Eingang 3 für RDI-Drucke Einzeldruck" -E
+lpadmin -p ISUDRUCKE_4 -v isu:// -m isu.ppd -D "Eingang 4 für RDI-Drucke Einzeldruck" -E
+lpadmin -p ISUDRUCKE_1 -c ISUDRUCKE
+lpadmin -p ISUDRUCKE_2 -c ISUDRUCKE
+lpadmin -p ISUDRUCKE_3 -c ISUDRUCKE
+lpadmin -p ISUDRUCKE_4 -c ISUDRUCKE
+accept ISUDRUCKE
+cupsenable ISUDRUCKE
+
+lpadmin -p ISUDRUCKM_1 -v isu:// -m isu.ppd -D "Eingang 1 für RDI-Drucke Massendruck" -E
+lpadmin -p ISUDRUCKM_2 -v isu:// -m isu.ppd -D "Eingang 2 für RDI-Drucke Massendruck" -E
+lpadmin -p ISUDRUCKM_3 -v isu:// -m isu.ppd -D "Eingang 3 für RDI-Drucke Massendruck" -E
+lpadmin -p ISUDRUCKM_4 -v isu:// -m isu.ppd -D "Eingang 4 für RDI-Drucke Massendruck" -E
+lpadmin -p ISUDRUCKM_1 -c ISUDRUCKM
+lpadmin -p ISUDRUCKM_2 -c ISUDRUCKM
+lpadmin -p ISUDRUCKM_3 -c ISUDRUCKM
+lpadmin -p ISUDRUCKM_4 -c ISUDRUCKM
+accept ISUDRUCKM
+cupsenable ISUDRUCKM
+
+lpadmin -p PCOKTEIN -v lpd://IQ1/COKTEINF -m pxlmono.ppd -D "Conergos Test Einzeldruck" -E
+lpadmin -p PCOKTMAS -v lpd://IQ1/COKTMAS -D "Conergos Test Massendruck PCL gezippt per ftp" -E
+lpadmin -p PCOKTRDIZ -v lpd://IQ1/COKTMAS -D "Conergos Test Massendruck RDI gezippt per ftp" -E
+lpadmin -p PCOKTPDF -v modpdf://RCOKTPDF -m Distiller.ppd -D "Conergos Test PDF-Erstellung" -E
+lpadmin -p RCOKTPDF -v lpd://IQ1/COKTPDF -D "Conergos Test PDF-Ausgabe" -E
+
+
+### die ETO soll nicht nach dem Schema lpadmin -p P{FIRMA}T{PRN} -v lpd://IQ1/{FIRMA}T{PRN}F eingerichtet werden
+#### sondern lpadmin -p P{FIRMA}T{PRN} -v lpd://BB/{FIRMA}T{PRN}F also andrer HOST!!!
+#
+lpadmin -p COKEASYPROD -v modarch://modarch/thvsaptfr@localhost:CAPSPARC -m modarcha.ppd -o Output=prod -o Category=none -o Hierarchic=none -E
+#lpadmin -p COKEASYPROD -o Output-default=prod -o Category-default=none -o Hierarchic-default=none -E
+#
+lpadmin -p COKEASYTEST -v modarch://modarch/thvsaptfr@localhost:CAPSPARC -m modarcha.ppd -o Output=test -o Category=none -o Hierarchic=none -E
+#lpadmin -p COKEASYTEST -o Output-default=test -o Category-default=none -o Hierarchic-default=none -E
+#
+## Alle Drucker auf A4 setzten:
+lpstat -v | grep -v null | awk '{print $3}' | sed -e "s/://g" | while read P; do lpadmin -p $P -o PageSize-default=A4; echo -n "." ;done; echo
+#
+## Alle ISU-Drucker auf TestJobToWorkflow=no setzten:
+lpstat -v | grep ISUDRUCK | awk '{print $3}' | sed -e "s/://g" | while read P; do lpadmin -p $P -o TestJobToWorkflow-default=no; echo -n "." ;done; echo
+#
+## Alle File-Drucker auf Job-Retry setzten weil die ftp - Übertragung manschmal einen Timeout hat
+lpstat -v| grep FILE | awk '{print $3}' | sed -e "s/://g" | while read P; do lpadmin -p $P -o printer-error-policy=retry-job;echo -n "." ;done;echo
+#
+### FILEDrucker mit Inhalt PDF
+# lpadmin -x RGRZFILET1
+# lpadmin -x ZGRZFILET1
+# lpadmin -x PGRZFILET1
+# lpadmin -p RGRZFILET1 -v modarch://modarch/ftp:thvsaptfr@10.1.2.60:/thuega -D "Massendruck GRZ" -m modarcha.ppd -o SpecialOutput-default=stsfil -o Category-default=none -o Company-default=none -o Hierarchic-default=none -o Untar-default=untaryes -E
+# lpoptions -p RGRZFILET1 -o SpecialOutput=stsfil -o Category=none -o Company=none -o Hierarchic=none -o Untar=untaryes
+# lpadmin -p ZGRZFILET1 -v modzip://RGRZFILET1 -m pxlmono_caps.ppd -o OptionPostScript-default=True -o PageSize-default=A4 -E
+# lpoptions -p ZGRZFILET1 -o OptionPostScript=True -o PageSize=A4
+# lpadmin -p PGRZFILET1 -v modpdf://ZGRZFILET1 -m Distiller.ppd -o PageSize-default=A4 -E
+#
--- /dev/null
+Dbox Wohnzimmer\r
+\r
+DISEqC 1.1\r
+1 Thor/Intelsat 1.0 W\r
+2 Hotbird 13.0 E\r
+3 Astra 19.2 E\r
+4 Astra / Eurobird 1 28.2 E\r
+\r
--- /dev/null
+###sichern einer platte über netzwerk
+dd if=/dev/sda | ssh root@172.17.6.33 dd of=remotefile.img
+###enormer geschwindigkeitszuwachs beim lesen und schreiben
+dd if=/dev/sda of=remotefile.img bs=4096
+###sichern einer platte und zippen mit dd
+dd if=/dev/sda bs=4k | gzip -c | dd of=/media/disk/image_dd.gz
+###mbr sichern incl. partitionierung
+dd if=/de/sda of=/tmp/mbr.img bs=512 count=1
+###mbr ohne partitionierung
+dd if=/de/sda of=/tmp/mbr.img bs=446 count=1
--- /dev/null
+###Displaytest bei Dell
+d gedrÃckt halten und einschalten -> VollfarbflÃchen werden angezeigt
+###Diagnose bei Dell
+Fn und einschalten -> Diagnose wird gestartet
--- /dev/null
+###DHCP / dhcp - Server dhcpd
+#filename: /etc/dhcpd.conf
+default-lease-time 86400;
+max-lease-time 86400;
+
+subnet 192.168.0.0 netmask 255.255.255.0 {
+ range 192.168.0.2 192.168.0.250;
+ option subnet-mask 255.255.255.0;
+ option broadcast-address 192.168.0.255;
+ option routers 192.168.0.1;
+ option domain-name-servers 192.168.0.4,
+ 12.24.250.39, 12.24.250.40, 206.25.127.40;
+ option domain-name "chartermi.net";
+}
+
--- /dev/null
+http://www.zibri.org/2009/03/powerline-ethernet-fun-and-secrets.html
--- /dev/null
+###DNS Server
+#google
+8.8.8.8
+8.8.4.4
+2001:4860:4860::8888
+2001:4860:4860::8844
--- /dev/null
+###erstellen eines binary pakets
+#in verz müssen die dateien sein und
+#das DEBIAN verzeichnis mit den inhalten
+dpkg -b verz paketname.deb
+###entpaken eines DEB-Pakets
+ar xv hello_1.3-13.deb
+###installieren von paket
+dpkg -i paket
+###liste aller installierten Pakete
+dpkg -l
+dpkg --list
+###liste der dateien im paket ausgeben, wenn es installiert ist
+dpkg -L paket
+###liste der dateien im paket ausgeben
+dpkg -c paket
+dpkg --contents paket
+###Anzeigen der allgemeinen Informationen zu einem Paket
+dpkg -s paket
+###zu welchem packet gehört die datei
+dpkg -S /usr/bin/bash
+###löschen von paket, aber config da lassen
+dpkg -r paket
+###deb paket aus quellen erstellen
+#im entpakten verzeichnis machen
+dh_make -f ../source.tgz
+#danach
+dpkg-buildpackage
+###paket aus quellen erstellen
+dkms mkdeb -m sony-laptop-zseries -v 0.9np5
+###alle Pakete erneut installieren
+COLUMNS=200 dpkg -l | awk '/^[hi]i/{print $2}' | xargs apt-get -y --reinstall install
+###alle installierten Pakete suchen und nach /tmp/dpkg.log speichern
+dpkg --get-selections | grep "\binstall" | awk '{print $1}' > /tmp/dpkg.log
+###reinstallieren der Pakete aus /tmp/dpkg.log
+xargs -n1 apt-get --reinstall install -y < /tmp/dpkg.log
+###prüfen aller Pakete
+debsums -a
+###tastatur umstellen z.B. auf deutsch
+dpkg-reconfigure keyboard-configuration
+###hold package
+echo "package hold" | sudo dpkg --set-selections
+###unhold package
+echo "package install" | sudo dpkg --set-selections
+###alle Kernel entfernen, außer den aktuell benutzen
+dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs apt-get -y purge
--- /dev/null
+###beispiel config für drbd
+global {
+ usage-count yes;
+}
+common {
+ protocol C;
+}
+resource r0 {
+ on alice {
+ device /dev/drbd1;
+ disk /dev/sda7;
+ address 10.1.1.31:7789;
+ meta-disk internal;
+ }
+ on bob {
+ device /dev/drbd1;
+ disk /dev/sda7;
+ address 10.1.1.32:7789;
+ meta-disk internal;
+ }
+}
+###device metadaten erzeugen auf alice
+drbdadm create-md r0
+###verknüpft drbd0 mit phy. Festplatte (das muss auf beiden nodes gemacht werden) (das muss auf beiden nodes gemacht werden)
+drbdadm attach r0
+###device metadaten erzeugen
+drbdadm create-md resource
+###syncronisationsparameter setzen
+drbdadm syncer resource
+###verbinden
+drbdadm connect resource
+###hier sind die statusinfos im proc
+cat /proc/drbd
+###erstsyncronisation
+drbdadm -- --overwrite-data-of-peer primary resource
+###wenn splitbrain und bekannt ist welche node die richtigen daten hat
+#auf node mit schlechten daten
+drbdadm -- --discard-my-data connect all
+#auf node mit guten daten
+drbdadm connect all
+###
+
+
+
+
+###lvm mit drbd
+We have two partitions, named /dev/sda1, and /dev/sdb1, which we intend to use as Physical Volumes.
+Both of these PVs are to become part of a Volume Group named local.
+We want to create a 10-GiB Logical Volume in this VG, to be named r0.
+This LV will become the local backing device for our DRBD resource, also named r0, which corresponds to the device /dev/drbd0.
+This device will be the sole PV for another Volume Group, named replicated.
+This VG is to contain two more logical volumes named foo (4 GiB) and bar (6 GiB).
+In order to enable this configuration, follow these steps:
+
+1.
+ Set an appropriate filter option in your /etc/lvm/lvm.conf:
+
+ filter = ["a|sd.*|", "a|drbd.*|", "r|.*|"]
+
+ This filter expression accepts PV signatures found on any SCSI and DRBD devices, while rejecting (ignoring) all others.
+
+ After modifying the lvm.conf file, you must run the vgscan command so LVM discards its configuration cache and re-scans devices for PV signatures.
+2.
+ Now, you may initialize your two SCSI partitions as PVs:
+
+ pvcreate /dev/sda1
+ Physical volume "/dev/sda1" successfully created
+ pvcreate /dev/sdb1
+ Physical volume "/dev/sdb1" successfully created
+3.
+ The next step is creating your low-level VG named local, consisting of the two PVs you just initialized:
+
+ vgcreate local /dev/sda1 /dev/sda2
+ Volume group "local" successfully created
+4.
+ Now you may create your Logical Volume to be used as DRBD's backing device:
+
+ lvcreate --name r0 --size 10G local
+ Logical volume "r0" created
+5.
+ Repeat all steps, up to this point, on the peer node.
+6.
+ Then, edit your /etc/drbd.conf to create a new resource named r0:
+
+ resource r0 {
+ device /dev/drbd0;
+ disk /dev/local/r0;
+ meta-disk internal;
+ on host {
+ address address:port;
+ }
+ on host {
+ address address:port;
+ }
+ }
+
+ After you have created your new resource configuration, be sure to copy your drbd.conf contents to the peer node.
+7.
+ After this, initialize your resource as described in the section called “Enabling your resource for the first time” (on both nodes).
+8.
+ Then, promote your resource (on one node):
+
+ drbdadm primary r0
+9.
+ Now, on the node where you just promoted your resource, initialize your DRBD device as a new Physical Volume:
+
+ pvcreate /dev/drbd0
+ Physical volume "/dev/drbd0" successfully created
+10.
+ Create your VG named replicated, using the PV you just initialized, on the same node:
+
+ vgcreate replicated /dev/drbd0
+ Volume group "replicated" successfully created
+11.
+ Finally, create your new Logical Volumes within this newly-created VG:
+
+ lvcreate --name foo --size 4G replicated
+ Logical volume "foo" created
+ lvcreate --name bar --size 6G replicated
+ Logical volume "bar" created
+
+The Logical Volumes foo and bar will now be available as /dev/replicated/foo and /dev/replicated/bar on the local node.
+
+To make them available on the peer node, first issue the following sequence of commands on the local node:
+
+vgchange -a n replicated
+ 0 logical volume(s) in volume group "replicated" now active
+drbdadm secondary r0
+
+Then, issue these commands on the peer node:
+
+drbdadm primary r0
+vgchange -a y replicated
+ 2 logical volume(s) in volume group "replicated" now active
+
+After this, the block devices /dev/replicated/foo and /dev/replicated/bar will be available on the peer node.
+
+Of course, the process of transferring volume groups between peers and making the corresponding logical volumes available can be automated. The Heartbeat LVM resource agent is designed for exactly that purpose.
+
+
--- /dev/null
+#DVD-Titel mit DVD:RIP auslesen. VOB-Dateien werden erstellt.
+#Die VOB-Dateien zusammenfügen: cat *.vob > movie.vob
+#Demultiplexen: tcextract -i movie.vob -t vob -x mpeg2 > movie.m2v
+und danach: tcextract -i movie.vob -a 0 -x ac3 -t vob > movie.ac3
+#Verkleinern: tcrequant -i movie.m2v -o shrinked.m2v -f 1.5
+1.5 ist der Verkleinerungsfaktor (75%). Der Verkleinerungsfaktor lässt sich wie folgt berechnen:
+ Faktor = (video_size / (4700000000 - audio_size)) * 1.04
+#Multiplexen: mplex -f 8 -o final.mpg shrinked.m2v movie.ac3
+#Verzeichnisstruktur ertsellen: dvdauthor -o newdvd final.mpg
+#IFO-files erstellen: dvdauthor -o newdvd -T
+#Dateien brennen
+
--- /dev/null
+###32 bit grub-efi installieren
+apt-get install grub-efi-ia32-bin
+update-grub
+###32-bit UEFI in bootimage einbauen
+#bootia32.efi besorgen (https://github.com/jfwells/linux-asus-t100ta/blob/master/boot/bootia32.efi)
+#bootmedium erzeugen
+#cp bootia32.efi EFI/BOOT/
--- /dev/null
+#1-wire Temperatursensor http://www.gtkdb.de/index_18_1040.html
+#neuer Prozessor net-io http://www.gtkdb.de/index_18_1039.html
+###
+
--- /dev/null
+###dateien anhand der md5sum suchen und doppelte anzeigen
+sqlite3 ~/.gnome2/f-spot/photos.db "SELECT md5_sum FROM photos" |sort |uniq -c|sort |sed -e "s/ */ /" |cut -d" " -f 2 |sort |uniq -c
+###anzahl der bilder anzeigen, für die die md5sum bereits berechnet ist
+sqlite3 ~/.gnome2/f-spot/photos.db "SELECT count(*) FROM photos WHERE md5_sum IS not NULL AND md5_sum != ''"
+###kopie der datenbank als textdatei anleigen
+sqlite3 photos.db .dump > f-spot.dump
+###textdatei wieder in datenbank konvertieren
+sqlite3 photos.db < f-spot.dump
--- /dev/null
+###wenn komplett-image einer Platte gemacht wurde und man einzelne Partitionen benötigt
+fdisk -l -u imagefile
+###dann offset berechnen, je nach dem was fdisk anzeigt
+###loopdevice anlegen mit offset
+losetup -o $offset /dev/loop0 imagefile
+###mounten
+mount -t vfat /dev/loop0 /mnt/
--- /dev/null
+###Firmwaredownload
+http://www.gawisp.com/perry/chipset_firmware/Type_M/
+
+###testmode einschalten
+rechte up+down+organe Taste drücken
+###
--- /dev/null
+###aufnahme von /dev/video0, audio von /dev/dep ...
+/usr/bin/ffmpeg -ad /dev/dsp -vd /dev/video0 -s 640x480 -hq -r 30 -vcodec mpeg4 -acodec mp3 -b 300 -ab 128 ~/capture/$1.avi
--- /dev/null
+###Namesschema
+Prefix 1 ID Beschreibung
+ KG Kellergeschoß
+ EG Erdgeschoß
+ OG Obergeschoß
+ DG Dachgeschoß
+ GV Grundstück vorn
+ GH Grundstück hinten
+ NN Nicht definiert / spezifiziert
+
+Prefix 2 ID Beschreibung
+ bz Badezimmer
+ ez Esszimmer
+ fl Flur
+ ga Garage
+ hz Heizungskeller
+ k1 Kellerraum 1
+ k2 Kellerraum 2
+ k3 Kellerraum 3
+ ku Küche
+ kz Kinderzimmer
+ mz Mehrzweckraum
+ sr Serverraum
+ sz Schlafzimmer
+ wc WC
+ wz Wohnzimmer
+ xx Nicht definiert / spezifiziert
+
+Prefix 3 ID Beschreibung
+ BM Bewegungsmelder
+ DI Dimmer
+ DS Dämmerungssensor
+ FB Fernbedienung
+ GD Gadetektor
+ GZ Gaszähler
+ HS Handsender
+ HZ Heizungsventil
+ MS Master/Slave Steckdose
+ NE Network
+ RM Rauchmelder
+ RO Rollade
+ RP Repeater
+ SA Schaltaktor, Bsp. Hutschien Hauslicht
+ SD Steckdose
+ TF Temperatur- und Luftfeuchtesensor
+ TK Tür- und Fensterkontakt
+ WD Wasserdetektor
+ WE Wetterstation
+ WS Wandschalter
+ XX Nicht definiert / spezifiziert
+Postfix 1/2 ID Beschreibung
+ grp Gruppe
+ dum Dummy Device
+ log Loging
+ not Notify
+###Namensschema Erdgeschoss-WohnungLinks-Esszimmer-TürFensterKontakt-ganz links im Raum
+EG_WGL_EZ_TK_1
+###Beispiel TK aus Homematic in FHEM (https://forum.fhem.de/index.php/topic,51339.0.html)
+define EG_WGL_EZ_TK_1 HMCCUCHN EG_WGL_EZ_TK_1 readonly
+## Uns interessieren nur einige Datenpunkte
+attr EG_WGL_EZ_TK_1 ccureadingfilter (ERROR|LOWBAT|STATE)
+# Zeigt einen grünen/roten Punkt an
+attr EG_WGL_EZ_TK_1 devStateIcon closed:10px-kreis-gruen open:10px-kreis-rot
+attr EG_WGL_EZ_TK_1 event-on-change-reading .*
+# Werte der CCU in den Readings ersetzen
+attr EG_WGL_EZ_TK_1 substitute STATE!(0|false):closed,(1|true):open;;LOWBAT!(0|false):no,(1|true):yes
+
+
+#Codebeispiele http://fhemwiki.de/index.php/Category:Code_Snippets
+#HOWTO http://fhem.de/commandref.html#CUL
+#http://www.technolust.de/?p=89 Beispiel Steckdose/Handsender ...
+#http://blog.planet-rosemann.de/?p=20
+#http://www.fhemwiki.de/index.php/AVM_Fritz!Box Fritzbox 7390 fhem installation
+
+###AES Verschlüsselung einschalten/ausschalten
+#ein <kanal>080801
+#aus <kanal>080800
+###fhem.cfg Beispiel
+attr global autoload_undefined_devices 1
+attr global logfile /var/log/fhem/fhem-%Y-%m.log
+attr global modpath /usr/share/fhem
+attr global port 7072 global
+attr global statefile /var/log/fhem/fhem.save
+attr global verbose 3
+
+define CUL CUL /dev/ttyACM0@38400 0000
+attr CUL rfmode HomeMatic
+attr CUL hmProtocolEvents
+set CUL hmPairForSec 600
+
+define WEB FHEMWEB 8083 global
+define WEBS FHEMWEB 8084 global
+
+define autocreate autocreate
+attr autocreate autosave 1
+attr autocreate device_room %TYPE
+attr autocreate filelog /var/log/fhem/%NAME-%Y.log
+attr autocreate weblink 1
+attr autocreate weblink_co_Zuhause on ;; setstate watchdog_Handy_Nico_Abwesend defined");;\
+ fhem("set myMPD playfile hallo-nico.mp3");;\
+ }}
+
+# Nico_Zuhause auf off setzen nach 5 Minuten Abwesenheit
+define watchdog_Handy_Nico_Abwesend watchdog Handy_Nico:absent 00:05 Handy_Nico:present set Nico_Zuhause off
+attr watchdog_Handy_Nico_Abwesend regexp1WontReactivate 1
+room Plots
+###Mail bei Fenster auf/zu
+###http://fhemwiki.de/index.php/FHTTK:_Benachrichtigung_bei_offenem_Fenster
+#in99_marte.pm
+sub FHTTK_status {
+ my @fhttks = devspec2array("TYPE=CUL_FHTTK");
+ my @wopen = ();
+ foreach(@fhttks) {
+ my $fhttk_window = ReadingsVal($_, "Window", "nA");
+ push (@wopen,$_) if ($fhttk_window eq "Open" );
+ }
+ my $num_wopen = @wopen;
+ my $resultstring='';
+ if ( $num_wopen gt 0 ) {
+ $resultstring="folgende Fenster sind noch offen:\n\n";
+ foreach(@wopen) {
+ $resultstring.="- ".$_."\n";
+ Log 4, "FHTTK_status: ". $_. "noch offen";
+ }
+ } else {
+ $resultstring="alle Fenster sind derzeit geschlossen.";
+ }
+ return $resultstring;
+}
+#in die Config
+define n_Fenster notify .*:Window.*(Open|Closed) { \
+ my $window_state=ReadingsVal("@", "Window", "nA");;\
+ my $deftype=$defs{@}{TYPE};;\
+ return if ( $deftype ne "CUL_FHTTK" );;\
+ if ( $defs{@}{PREVSTATE} ne $window_state ) { \
+ my $fhttk_status=FHTTK_status;;\
+ my $subject="FHEM: Fenster @ ".$window_state;; \
+ fb_mail('xxx@@xxx.de',$subject,$fhttk_status);;\
+ Log 3, "@: Window ".$window_state;;\
+ }\
+}
+
+###minimale config für fhem
+ attr global logfile /tmp/fhem.log
+ attr global statefile /tmp/fhem.save
+ attr global verbose 3
+ attr global port 7072
+ attr global modpath /usr/share/fhem
+ define FHZ FHZ /dev/tts/USB0
+
+ define lamp FS20 8765 01
+###loglevel - log hochsetzen bei Problemem
+attr global verbose 5
+###CUL Devicename /dev/ttyACM*
+define CUL_0 CUL /dev/ttyACM0@9600 1234
+define CUL_1 CUL /dev/ttyUSB0@38400 0000 nanoCUL
+###CUL parameter per FHEM (http://www.computerhilfen.de/info/fhem-cul-kommandos-auflistung-der-befehle.html)
+#Firmware anzeigen
+get CUL1 raw V
+#CUL Bootloader-Modus aktivieren
+set CUL1 raw B01
+#Debug-Modus einschalten, um unbekannte Protokolle zu sehen
+set CUL1 raw X25
+#Debug-Modus ausschalten
+set CUL1 raw X21
+#LED am CUL ausschalten
+set CUL1 raw l00
+#LED am CUL einschalten (blinkt bei Senden/Empfangen)
+set CUL1 raw l01
+#LED am CUL einschalten (blinkt dauerhaft)
+set CUL1 raw l02
+#Einstellen der Frequenz, zum Beispiel 464 Mhz
+set CUL1 bWidth 464
+#Einstellen der Sendestärke (Standardwert ist hier x08 – sinnvoll sind hier die Werte x07 (+ 0db), x08 (+5 db) und x09 (+10 db))
+set CUL1 raw x09
+###Enigma2 Receiver
+define vu ENIGMA2 <IP-Receiver>
+###Gerät anlegen, hier SOMFY Rolladen und als neue Fernbedienung FHEM nutzen
+define rollladen1 SOMFY 000001
+#Programmtaste an original Fernbedieung 3 Sekunden drücken, Rollladen fährt kurz hoch und runter
+set rollladen1 prog
+# Rollladen fährt kurz hoch und runter, sollte sich jetzt steuern lassen über FHEM
+###Rollläden in Gruppe zusammenfassen
+define Rolllaeden structure room Schlafzimmer Kuechentuer Kuechenfenster Terrassenfenster Terrassentuer Arbeitszimmer
+###eventMap - andere Bezeichnungen für on/off
+attr Kuechenfenster,Kuechentuer,Terrassenfenster,Terrassentuer,Schlafzimmer eventMap on:schließen off:öffnen
+###umbenennen von Geräten
+rename old_name new_name
+###speichern der config
+save
+###lanPing, Gerät vorhanden oder nicht
+define lanGateWay1 PRESENCE lan-ping 192.168.178.21
+###das ganze per Bluetooth (http://www.computerhilfen.de/info/willkommen-zuhause-personenerkennung-mit-fhem.html)
+define Handy_Nico PRESENCE local-bluetooth C0:00:05:AB:88:2B 10 60
+# Dummy definieren als Zuhause-Erkennung
+define Nico_Zuhause dummy
+attr Nico_Zuhause devStateIcon on:HOME_Status.1 off:HOME_Status.3
+attr Nico_Zuhause eventMap 1
+attr Nico_Zuhause icon icoHouse
+
+# Nico_Zuhause auf on setzen bei Anwesenheit
+define Nico_Zuhause_Anwesend notify Handy_Nico:present { if (Value("Nico_Zuhause") ne "on") {
+
+
+
+# Dummy definieren als Zuhause-Erkennung
+define Nico_Zuhause dummy
+attr Nico_Zuhause devStateIcon on:HOME_Status.1 off:HOME_Status.3
+attr Nico_Zuhause eventMap 1
+attr Nico_Zuhause icon icoHouse
+
+# Nico_Zuhause auf on setzen bei Anwesenheit
+define Nico_Zuhause_Anwesend notify Handy_Nico:present { if (Value("Nico_Zuhause") ne "on") {
+###verbose/debugging
+attr global verbose 5
+###Auflistung aller Geräte
+list .*
+#mit Definitionen
+list .* DEF
+#mit Definition und beginnend mit wz
+list wz.* DEF
+###Bilderrahmen mittels FHEM (http://www.fhemwiki.de/wiki/Digitaler_Bilderrahmen)
+###CCU2 in FHEM einbinden
+define <name> HMCCU <hostname_or_IP>
+define d_ccu HMCCU 192.168.178.20
+# Alle CCU Geräte einlesen (passiert beim define automatisch)
+get d_ccu devicelist
+# CCU Variable abholen und als Reading speichern
+get d_ccu vars Anwesenheit
+# Alle CCU Variablen abholen und als Reading speichern
+get d_ccu vars .*
+# Alle Kanäle und Datenpunkte eines CCU Geräts anzeigen (THERMOSTAT_WZ = Device-Name in CCU)
+get d_ccu deviceinfo THERMOSTAT_WZ
+# Datenpunkt lesen und als Reading speichern (THERMOSTAT-1 = Channel-Name in CCU)
+get d_ccu datapoint THERMOSTAT-1.TEMPERATURE
+# Alle / einige Datenpunkte eines Kanals lesen
+get d_ccu channel LEQ1234567:1
+get d_ccu channel BidCos-RF.LEQ1234567:1
+get d_ccu channel LEQ1234567:2.RSSI.* LEQ1234567:0.^UNREACH$
+get d_ccu channel THERMOSTAT-1
+# Pumpe mit State-Channel = 1
+define d_Pumpe HMCCUDEV LEQ1234567 1
+# Attribut statevals sorgt dafür, dass man den Gerätestatus ohne devstate setzten kann
+attr d_Pumpe statevals on:true,off:false
+# Gelesene Werte ersetzen (get Befehle liefern true/false, RPC server liefert 0/1)
+attr d_Pumpe substitute true:on,false:off,1:on,0:off
+# Pumpe einschalten (2 Varianten, 1. Variante funktioniert wg. Attribut statevals)
+set d_Pumpe on
+set d_Pumpe devstate on
+# TF-Haus-1 ist der Kanalname in der CCU, Device ist readonly (Sensor)
+define d_tuer HMCCUCHN TF-Haus-1 readonly
+# Gelesen Werte ersetzen (get Befehle liefern true/false, RPC server liefert 0/1)
+attr d_tuer substitute true:open,false:closed,1:open,0:closed
+###alle infos über hm-gerät stern
+get d_ccu deviceinfo Stern
+###rpcserver starten
+attr d_ccu rpcserver on
+###Device der CCU definieren
+define EZLampe HMCCUDEV Stern 1
+### Attribut statevals sorgt dafür, dass man den Gerätestatus ohne devstate setzten kann
+attr EZLampe statevals on:true,off:false
+###Gelesene Werte ersetzen (get Befehle liefern true/false, RPC server liefert 0/1)
+attr EZLampe substitute true:on,false:off,1:on,0:off
+###Lampe einschalten (2 Varianten, 1. Variante funktioniert wg. Attribut statevals)
+set EZLampe on
+set EZLampe devstate on
+###status von Homematic Device EZLampe erneuern
+get EZLampe update State
+###alles anzeigen Lassen
+list EZLampe
+###Update aller Devices (stresst die ccu)
+get d_ccu update .* State
+###Beispiel: Ein Wandthermostat hat im Kanal 2 einen Datenpunkt SET_TEMPERATURE, mit dem die Zieltemperatur gesetzt wird. Die Einstellung soll mit einem Slider in 1 Grad Schritten zwischen 10 und 25 Grad erfolgen
+attr mydev controldatapoint 2.SET_TEMPERATURE
+attr mydev webCmd control
+attr mydev widgetOverride control:slider,10,1,25
+###alle Ereignisse in aktueller Telnetsitzung anzeigen lassen
+inform timer
+#ausschalten
+inform off
+###Gerät in Raum einordnen
+attr <gerät> room <raum>
+###Gerät in bestimmte Gruppe
+attr KuechenLicht group Licht
+###Statusicons für Gerät anlegen (http://www.meintechblog.de/2015/04/5-tipps-um-fhem-schoener-zu-machen/)
+attr Wz.Seitenfenster devStateIcon open:fts_window_1w_open@red tilted:fts_window_1w_tilt@red closed:fts_window_1w@green
+###Raum in der Webansicht verstecken
+attr WEB hiddenroom Unsorted
+###Raum in der Phoneansicht vertecken
+attr WEBphone hiddenroom FBDECT,Plots,Unsorted
+###alias für Geräte
+attr FBDECT_16 alias Stehlampe
+###WifiLight (Rot an, Rot aus, Rot an, Rot aus, Rot an und fade auf Violett)
+set KuechenLicht HSV 0,100,100 1
+set KuechenLicht HSV 0,100,0 1 q
+set KuechenLicht HSV 0,100,100 1 q
+set KuechenLicht HSV 0,100,0 1 q
+set KuechenLicht HSV 0,100,100 1 q
+set KuechenLicht HSV 300,100,50 10 q
+#als notify
+define test notify test:on {fhem "set Lampe HSV 0,100,100 1"; fhem "set Lampe HSV 0,100,0 1 q"; ..usw... }
+#starten
+trigger test on
+###Sonnenuntergang
+set KuechenLicht HSV 60,0,100; set KuechenLicht HSV 60,70,100 60 q; set KuechenLicht HSV 0,50,80 360 q; set KuechenLicht HSV 200,50,50 600 q; set KuechenLicht HSV 240,100,20 600 q; set KuechenLicht HSV 240,100,0 900 q
+###eventmap und andere nützlichen Dinge
+define Markise SOMFY 000003
+attr Markise IODev CUL433
+attr Markise devStateIcon auf:fts_shutter_10 ab:fts_shutter_100 stop:fts_shutter_50
+attr Markise enc-key A5
+attr Markise eventMap on:ab off:auf
+attr Markise group Rolladen
+attr Markise icon scene_terrace
+attr Markise rolling-code 0025
+attr Markise room EG
+attr Markise webCmd auf:ab:stop
+###autosave jede Stunde
+define fhem_save_at at *+01:00 save
+###alle 3 Stunden statefile schreiben
+define AutoSave at +*03:00:00 { WriteStatefile() }
+###nanoCUL Absturz bei SOMFY verhindern
+#raw Yr2 (2 Wiederholungen)
+#bei jedem Rollladen "repetition" setzen
+###CUL Frequenzen und andere Sachen setzen
+#433er: CUL433 ccconf => freq:433.920MHz bWidth:325KHz rAmpl:42dB sens:4dB
+#868er: CUL868 ccconf => freq:868.300MHz bWidth:101KHz rAmpl:33dB sens:8dB
+set cul freq 433.920
+###Colorpicker für rgb Lampen im Webinterface einschalten
+attr KuechenLicht webCmd RGB
+attr KuechenLicht widgetOverride RGB:colorpicker,RGB
+###Iconfabe auf den entsprechenden Wert setzen
+attr KuechenLicht devStateIcon {Color_devStateIcon(ReadingsVal($name,"RGB","000000"))}
+###notify events wenn was passiert (n_mySchalter1_on - notify für mySchalter an -> myLampe1 on
+define n_mySchalter1_on notify mySchalter1:on set myLampe1 on
+###Event für aus
+define n_mySchalter1_off notify mySchalter1:off set myLampe1 off
+###event abhängig von $EVENT
+define n_mySchalter1 notify mySchalter1 set myLampe1 $EVENT
+###Presens von Rechnern per lanping
+define pi_Esszimmer PRESENCE lan-ping 192.168.178.49
+###Adresse bei lanping ändern
+modify pi_Esszimmer lan-ping 192.168.178.55
+###somfy device anlegen
+define FB_R2 SOMFY 000002
+###alle 2 Sekunden go-my beim Rolladen MK_2_tx senden um passenden rollcode zu finden
+define somfy_sent_mk2 at +*00:00:02 set MK_2_tx go-my;
+###logfile anlegen für somfy FHEMduino_SomfyR_31FB00 und das ganze als text
+define <name> FileLog <logfile> <devie>
+define FileLog_FHEMduino_SomfyR_31FB00 FileLog ./log/FHEMduino_SomfyR_31FB00-%Y.log FHEMduino_SomfyR_31FB00
+attr FileLog_FHEMduino_SomfyR_31FB00 logtype text
+###somfy geräte verbinden - FB und FHEM
+attr FHEMduino_SomfyR_D19A2F rawDevice 123456
+define markise SOMFY 123456 A0 0001
+###dynamische icons für die Rollläden
+attr R_.* devStateIcon open:fts_garage_door_10@green down:fts_garage_door_100@black 100:fts_garage_door_100 closed:fts_garage_door_100 9\d.*:fts_garage_door_90 8\d.*:fts_garage_door_80 7\d.*:fts_garage_door_70 6\d.*:fts_garage_door_60 5\d.*:fts_garage_door_50 4\d.*:fts_garage_door_40 3\d.*:fts_garage_door_30 2\d.*:fts_garage_door_20 1\d.*:fts_garage_door_10 0\d.*:fts_garage_door_10
+###Calender (Sachsen_Ferien) anlegen der alle 86400 (24h) aktualiesiert wird
+define Sachsen_Ferien Calendar ical url http://www.schulferien.org/iCal/Ferien/icals/Ferien_Sachsen_2016.ics 86400
+#dummy anlegen ob ferien sind oder nicht, der sich das aus dem kalender rausholt
+define Ferien dummy
+define Sachsen_Ferien.notify notify Sachsen_Ferien { fhem "set Ferien ". (ReadingsVal("Sachsen_Ferien", "modeStart", "") =~ "schulferien" ? 1: 0) }
+#je nachdem rollo hoch oder nicht
+define RolloHoch at *07:00 { if ( !(Value("Ferien")) ) { fhem("set Rollo hoch");; } }
+###Zeitsteuerung (http://www.fhemwiki.de/wiki/At)
+define <name> at <timespec|datespec> <command>
+#lampe1 um 7 an
+define morgens at *7:00:00 set lampe1 on
+#alle zwei Stunden und 2 Minuten "lamp" einschalten
+define MeineAktion at +*02:02:00 set lamp on
+#in zwei Stunden und 2 Minuten "lamp" einschalten
+define MeineAktion at +02:02:00 set lamp on
+###Zeitsteuerung mit at
+define a1 at 17:00:00 set lamp on # fhem command
+define a2 at 17:00:00 { Log 1, "Teatime" } # Perl command
+define a3 at 17:00:00 "/bin/echo "Teatime" > /dev/console" # shell command
+define a4 at *17:00:00 set lamp on # every day
+# relative ones
+define a5 at +00:00:10 set lamp on # switch on in 10 seconds
+define a6 at +00:00:02 set lamp on-for-timer 1 # Blink once in 2 seconds
+define a7 at +*{3}00:00:02 set lamp on-for-timer 1 # Blink 3 times
+# Blink 3 times if the piri sends a command
+define n1 notify piri:on.* define a8 at +*{3}00:00:02 set lamp on-for-timer 1
+# Switch the lamp on from sunset to 11 PM
+define a9 at +*{sunset_rel()} set lamp on
+define a10 at *23:00:00 set lamp off
+# More elegant version, works for sunset > 23:00 too
+define a11 at +*{sunset_rel()} set lamp on-till 23:00
+# Only do this on weekend
+define a12 at +*{sunset_rel()} { fhem("set lamp on-till 23:00") if($we) }
+# Switch lamp1 and lamp2 on from 7:00 till 10 minutes after sunrise
+define a13 at *07:00 set lamp1,lamp2 on-till {sunrise(+600)}
+# Switch the lamp off 2 minutes after sunrise each day
+define a14 at *{sunrise(+120)} set lamp on
+# Switch lamp1 on at sunset, not before 18:00 and not after 21:00
+define a15 at *{sunset(0,"18:00","21:00")} set lamp1 on
+###Ereignissteuerung {perl expression} "shellcmd" plain->fhem
+define b3lampV1 notify btn3 set lamp $EVENT
+define b3lampV2 notify btn3 { fhem "set lamp $EVENT" }
+define b3lampV3 notify btn3 "/usr/local/bin/setlamp "$EVENT""
+define b3lampV3 notify btn3 set lamp1 $EVENT;;set lamp2 $EVENT
+define wzMessLg notify wz:measured.* "/usr/local/bin/logfht $NAME "$EVENT""
+define LogUndef notify global:UNDEFINED.* "send-me-mail.sh "$EVENT""
+###backup von fhem als tar.gz anlegen, wird in /opt/fhem/backup abgelegt
+backup
+###Temperatursensor Batterietausch hinterlegen
+setreading <name> <reading> <value>
+setreading tempsensor Batteriewechsel 13.12.2014
+###auflistung für alle Batteriewechsel
+list .* Batteriewechsel
+###JeeLink definieren
+define JeeLink JeeLink /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A501ZEAG-if00-port0@57600
+###JeeLink in Gruppe CUL
+attr JeeLink group CUL
+###
+#dummy anlegen für Temperatur
+define AussenTemp dummy
+#alle 5 Minuten aus device T_Terrasse das reading Temp_Terrasse-1.TEMPERATURE herausholen
+define at_AussenTemp at +*00:05:00 {my $d= ReadingsVal(T_Terrasse,Temp_Terrasse-1.TEMPERATURE,0);;fhem("set AussenTemp $d")}
+#logfile anlegen
+define FileLog_AussenTemp FileLog ./log/AussenTemp-%Y-%m-%d.log AussenTemp
+attr FileLog_AussenTemp logtype text
+###nur wenn sich das reading geändert hat ins logfile schreiben
+attr AussenTemp event-on-change-reading state
+#aber mindestens alle 15 Minuten einen Wert
+attr AussenTemp event-min-interval state:900
+###nach Stromausfall Kühlschrank einschalten
+define not_KuehlschrankAutoStart notify global:INITIALIZED set Kuehlschrank on
+###Wettervorhersage einrichten
+define MeinWetter Weather 12831893 3600 de
+attr MeinWetter room Wettervorhersage
+define FileLog_MeinWetter FileLog ./log/meinwetter-%Y-%m.log MeinWetter
+attr FileLog_MeinWetter logtype text
+attr FileLog_MeinWetter room Wettervorhersage
+define weblink_meinwetter weblink htmlCode {WeatherAsHtml("MeinWetter",7)}
+attr weblink_meinwetter room Wettervorhersage
+###Unwetterkarte
+define Unwetter_12345 UWZ DE 12345 3600
+attr Unwetter_12345 room NeuTest
+define Unwetter_12345_Detailiert weblink htmlCode {UWZAsHtml("Unwetter_12345")}
+attr Unwetter_12345_Detailiert room NeuTest,Wetter
+define UnwetterKarte12345 weblink htmlCode {UWZAsHtmlKarteLand("Unwetter_12345","1234567890")}
+attr UnwetterKarte12345 alias 1234567890
+attr UnwetterKarte12345 room NeuTest,Wetter
+#im Frontend mit Titel anzeigen
+define Unwetter_12345_Detailiert weblink htmlCode {"Das ist der Titel: <br>"UWZAsHtml("Unwetter_12345")}
+###eigene readings erstellen, CustomReadings
+define myReadings CustomReadings
+attr myReadings interval 2
+attr myReadings readingDefinitions kernel:qx(uname -r 2>&1)
+###Licht einschalten, wenn es dunkel ist und Fernseher läuft
+define Licht_an_1 at *{sunset("REAL")} {if (Value ("TV") eq "present"){fhem ("set Licht on")}}
+define Licht_an_2 notify TV:present {if (!isday("REAL")) {fhem ("set Licht on")}}
+###Floorplan, sieht gut aus
+http://www.meintechblog.de/2016/02/howto-fhem-floorplan-per-rpi2-touchscreen-steuern/#more-10537
+###Koordinaten (Wittgensdorf, Grüner Weg 20) setzen, für sunset, isday ...
+attr global latitude 50.8763034
+attr global longitude 12.834976
+###raum umbennen
+attr room=Diagramm room Diagramme
+###perl code für readings
+{ReadingsVal ("DEFINITIONS-NAME", "Vorlauf-Soll", "")}
+###stateFormat Formatierung mittels Perlcode
+attr <devicename> stateFormat {sprintf ("%.2f °C",ReadingsVal ("T_Terrasse","Temp_Terrasse-1.TEMPERATURE", ""))}
+###sortieren der Räume bzw. Links im Webinterface
+attr WEB sortRooms Esszimmer Küche Arbeitszimmer Schlafzimmer Bad Wohnzimmer Keller Treppenhaus Terrasse Licht Wetterbericht
+###icons für Räume
+attr WEB roomIcons Wohnzimmer:scene_livingroom Küche:scene_cooking Bad:scene_bathroom Esszimmer:scene_dinner Schlafzimmer:scene_sleeping Arbeitszimmer:scene_office Terrasse:scene_terrace Treppenhaus:scene_stairs Keller:control_building_2_s_kg Licht:FS20.off Diagramme:time_graph Wetterbericht:weather_cloudy_light
+###Bewegungsmelder, Filelog erzeugen
--- /dev/null
+#!/bin/sh
+PHONEID=$2
+PHONEBOOKID=255
+PHONEBOOKTYPE=1
+IP=fritz.box
+
+PASSWD=PASSWORT_DER_FRITZBOX
+
+TMPFILE=$1
+CURL=$(which curl)
+
+login(){
+# neues Loginverfahren seit xx.04.76
+ eval "$($CURL -s "http://$IP/cgi-bin/webcm" -d "getpage=../html/login_sid.xml" -d "sid=$cgisid" | sed -n 's,.*<\(Challenge\|iswriteaccess\|SID\)>\([^<]*\).*,\1=\2;,p')"
+ if [ "$iswriteaccess" = 0 ] && [ "$SID" = "0000000000000000" -o -z "$SID" ]; then
+ chksum="$(echo -n "$Challenge-$PASSWD" | sed -e 's,.,&\n,g' | tr '\n' '\0' | md5sum)"
+ eval "$($CURL -s "http://$IP/cgi-bin/webcm" -d "getpage=../html/login_sid.xml" -d "login:command/response=$Challenge-${chksum%% *}" | sed -n 's,.*<SID>\(.*\)</SID>.*,SID=\1,p')"
+ cgisid="$SID"
+ echo -n "$cgisid" >/tmp/sid
+ fi
+}
+
+change(){
+ echo "CHANGE $cgisid"
+ $CURL -o /dev/null \
+ -F "sid=$cgisid" \
+ -F "PhonebookId=$PHONEBOOKID" \
+ -F "PhonebookType=$PHONEBOOKTYPE" \
+ -F "PhonebookEntryId=$PHONEID" \
+ -F "PhonebookPictureFile=@$TMPFILE" \
+ http://$IP/cgi-bin/firmwarecfg
+}
+
+echo "login ...."
+login
+echo "change ...."
+change
+
--- /dev/null
+#!/bin/sh
+LASTTEMP=-2.1
+LASTHYGRO=88
+LASTWIND=3.0
+convert -pointsize 8 -weight Bold -font Helvetica -fill blue -draw "text 65,40 \"Temp: $LASTTEMP\"" -draw "text 65,60 \"Feuchte: $LASTHYGRO \"" -draw "text 65,80 \"Wind: $LASTWIND \"" fhem120.jpg fritzergebnis.jpg
+./fritzfonpic.sh fritzergebnis.jpg 610
+./fritzfonpic.sh fritzergebnis.jpg 611
--- /dev/null
+Achtung: Dieses Skript ist so angelegt, dass es direkt in die FHEM Konfigurationsdatei „fhem.cfg“ kopiert werden kann – daher ist der „\“ am Ende der Zeile und die doppelten „;;“ wichtig. Kopiert man das Skript über die Web-Oberfläche in eine Definition, muss man den Backslash „\“ weglassen und darf eine Zeile nur mit einem „;“ abschließen.
+
+Dieses Skript wird mit einem „define“ Befehl jeden Morgen um 08:00 Uhr gestartet und erzeugt dann eine Zufallszahl zwischen 1 und 15. In der Woche werden die Rolläden dann zwischen 08:01:01 und 08:15:15 Uhr hochgefahren, am Wochenende erst zwischen 10:01:01 und 10:15:15 Uhr.
+
+define morgens_Schlafzimmer_Rollaeden at *08:00:00 {\
+ if (!$we) {\
+ my $Zufallszahl = int(rand(15) +1 );;\
+ my $Uhr = "08:".$Zufallszahl.":".$Zufallszahl;;\
+ fhem("define morgens_Schlafzimmer_Rollaeden_auf1 at *".$Uhr." { fhem('set SZ_ROLLADEN on') }");;\
+ }else{\
+ my $Zufallszahl = int(rand(15) +1 );;\
+ my $Uhr = "10:".$Zufallszahl.":".$Zufallszahl;;\
+ fhem("define morgens_Arbeitszimmer_Rollaeden_auf1 at *".$Uhr." { fhem('set SZ_ROLLADEN on') }");;\
+ }\
+}
--- /dev/null
+###dateien (png) größer 1700k
+find -type f -size +1700k -name \*.png
--- /dev/null
+###WEB-Seiten zum Thema Sicherheit/Firewall links
+Mit den Protokollhelferlein der Paketfilter lassen sich in
+NAT-Umgebungen hübsche Spielchen treiben. Siehe u.a.:
+http://groups.google.com/groups?selm=5323.13182.1106115945@news.jors.net
+http://www.bedatec.de/ftpnat/
+http://www.enyo.de/fw/security/java-firewall/
+http://groups.google.com/groups?selm=87br3weqso.fsf@mid.deneb.enyo.de
+http://www.ulm.ccc.de/PersonalFirewalls
+###limitiere Verbindungsversuche pro Minute auf 5
+iptables -A INPUT -i eth0 -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name DEFAULT --rsource
+iptables -A INPUT -i eth0 -p tcp -m tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 5 --name DEFAULT --rsource -j DROP
+###log scans
+iptables -A FORWARD -p tcp --tcp-flags ALL SYN,FIN -j LOG --log-prefix " SYNFINSCAN "
+iptables -A FORWARD -p tcp --tcp-flags ALL FIN -j LOG --log-prefix " FINSCAN "
+iptables -A FORWARD -p tcp --tcp-flags ALL NONE -j LOG --log-prefix " NULLSCAN "
+iptables -A FORWARD -p tcp --tcp-flags ALL FIN,PSH,URG -j LOG --log-prefix " XMAS "
+iptables -A FORWARD -i eth0 -p tcp --tcp-flags ALL SYN,ACK -m state --state NEW -j LOG --log-prefix " SPOOF_FALLOUT "
+iptables -A FORWARD -i eth0 -p tcp --tcp-flags ALL SYN,ACK -m state --state NEW -j REJECT --reject-with icmp-host-unreachable
+#noch mehr
+
+# Stealth Scans etc. DROPpen
+# Keine Flags gesetzt
+iptables -A INPUT -p tcp --tcp-flags ALL NONE -j MY_DROP
+iptables -A FORWARD -p tcp --tcp-flags ALL NONE -j MY_DROP
+
+# SYN und FIN gesetzt
+iptables -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j MY_DROP
+iptables -A FORWARD -p tcp --tcp-flags SYN,FIN SYN,FIN -j MY_DROP
+
+# SYN und RST gleichzeitig gesetzt
+iptables -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j MY_DROP
+iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN,RST -j MY_DROP
+
+# FIN und RST gleichzeitig gesetzt
+iptables -A INPUT -p tcp --tcp-flags FIN,RST FIN,RST -j MY_DROP
+iptables -A FORWARD -p tcp --tcp-flags FIN,RST FIN,RST -j MY_DROP
+
+# FIN ohne ACK
+iptables -A INPUT -p tcp --tcp-flags ACK,FIN FIN -j MY_DROP
+iptables -A FORWARD -p tcp --tcp-flags ACK,FIN FIN -j MY_DROP
+
+# PSH ohne ACK
+iptables -A INPUT -p tcp --tcp-flags ACK,PSH PSH -j MY_DROP
+iptables -A FORWARD -p tcp --tcp-flags ACK,PSH PSH -j MY_DROP
+
+# URG ohne ACK
+iptables -A INPUT -p tcp --tcp-flags ACK,URG URG -j MY_DROP
+iptables -A FORWARD -p tcp --tcp-flags ACK,URG URG -j MY_DROP
+
+###VPN zu JOErICH
+iptables -I POSTROUTING -t nat -o tap0 -d 192.168.111.0/24 -j MASQUERADE
+route add -net 192.168.111.0 netmask 255.255.255.0 dev tap0
+
+###modem auslesen am wan per http oder telnet (linksys)
+ip addr add 169.254.1.3/24 dev vlan1 brd +
+iptables -I POSTROUTING -t nat -o vlan1 -d 169.254.1.0/24 -j MASQUERADE
+
+###eine minifirewall (man koennte das auch ohne die eigene chain machen)
+# Insert connection-tracking modules (not needed if built into kernel).
+ insmod ip_conntrack
+ insmod ip_conntrack_ftp
+
+# Create chain which blocks new connections, except if coming from inside.
+ iptables -N block
+ iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
+ iptables -A block -m state --state NEW -i ! ppp0 -j ACCEPT
+ iptables -A block -j DROP
+
+# Jump to that chain from INPUT and FORWARD chains.
+ iptables -A INPUT -j block
+ iptables -A FORWARD -j block
+
+###eine minifirewall (ohne chains, nur ausgehende verbindungen)
+ INC_DEV="Netzwerkkarte wo Internet her kommt Bsp.: ppp0"
+ iptables -P INPUT DROP
+ iptables -P OUTPUT DROP
+ iptables -P FORWARD DROP
+
+ iptables -I -m state --state ESTABLISHED,RELATED -j ACCEPT
+ iptables -I -m state --state NEW -i ! $INC_DEV -j ACCEPT
+
+###packetweg im kernel (linux)
+ _____
+Incoming / \ Outgoing
+ -->[Routing ]--->|FORWARD|------->
+ [Decision] \_____/ ^
+ | |
+ v ____
+ ___ / \
+ / \ |OUTPUT|
+ |INPUT| \____/
+ \___/ ^
+ | |
+ ----> Local Process ----
+
+###generell zum NAT
+DNAT in PREROUTING,
+SNAT in POSTROUTING -> dann klappts auch mit dem Routing
+###Masquerade/NAT out ppp0
+iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
+
+###verbieten von NEW und INVALID / Disallow NEW and INVALID incoming or forwarded packets from ppp0.
+iptables -A INPUT -i ppp0 -m state --state NEW,INVALID -j DROP
+iptables -A FORWARD -i ppp0 0 -m state --state NEW,INVALID -j DROP
+
+###IP forwarding anschalten
+echo "1">/proc/sys/net/ipv4/ip_forward
+###IP forwarding ausschalten
+echo "0">/proc/sys/net/ipv4/ip_forward
+
+###masquerading
+This is what most people want. If you have a dynamically allocated IP PPP dialup (if you don't know, you do have one), you simply want to tell your box that all packets coming from your internal network should be made to look like they are coming from the PPP dialup box.
+
+ # Load the NAT module (this pulls in all the others).
+ modprobe iptable_nat
+
+ # In the NAT table (-t nat), Append a rule (-A) after routing
+ # (POSTROUTING) for all packets going out ppp0 (-o ppp0) which says to
+ # MASQUERADE the connection (-j MASQUERADE).
+ iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
+
+ # Turn on IP forwarding
+ echo 1 > /proc/sys/net/ipv4/ip_forward
+
+This is a much more niche userbase, so I didn't worry about backwards compatibility as much. You can simply use `iptables -t nat' to do port forwarding. So for example, in Linux 2.2 you might have done:
+
+ # Linux 2.2
+ # Forward TCP packets going to port 8080 on 1.2.3.4 to 192.168.1.1's port 80
+ ipmasqadm portfw -a -P tcp -L 1.2.3.4 8080 -R 192.168.1.1 80
+
+Now you would do:
+
+ # Linux 2.4
+ # Append a rule pre-routing (-A PREROUTING) to the NAT table (-t nat) that
+ # TCP packets (-p tcp) going to 1.2.3.4 (-d 1.2.3.4) port 8080 (--dport 8080)
+ # have their destination mapped (-j DNAT) to 192.168.1.1, port 80
+ # (--to 192.168.1.1:80).
+ iptables -A PREROUTING -t nat -p tcp -d 1.2.3.4 --dport 8080 -j DNAT --to 192.168.1.1:80
+
+If you want this rule to alter local connections as well (i.e., even on the NAT box itself, trying to telnet to 1.2.3.4's port 8080 will get you to 192.168.1.1's port 80), you can insert the same rule in the OUTPUT chain (which is for local outgoing packets):
+
+ # Linux 2.4
+ iptables -A OUTPUT -t nat -p tcp -d 1.2.3.4 --dport 8080 -j DNAT --to 192.168.1.1:80
+
+###NAT packete im kernel
+
+ _____ _____
+ / \ / \
+ PREROUTING -->[Routing ]----------------->POSTROUTING----->
+ \D-NAT/ [Decision] \S-NAT/
+ | ^
+ | __|__
+ | / \
+ | | OUTPUT|
+ | \D-NAT/
+ | ^
+ | |
+ --------> Local Process ------
+
+
+###Source NAT / SNAT
+You want to do Source NAT; change the source address of connections to something different. This is done in the POSTROUTING chain, just before it is finally sent out; this is an important detail, since it means that anything else on the Linux box itself (routing, packet filtering) will see the packet unchanged. It also means that the `-o' (outgoing interface) option can be used.
+
+Source NAT is specified using `-j SNAT', and the `--to-source' option specifies an IP address, a range of IP addresses, and an optional port or range of ports (for UDP and TCP protocols only).
+
+ ## Change source addresses to 1.2.3.4.
+ # iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 1.2.3.4
+
+ ## Change source addresses to 1.2.3.4, 1.2.3.5 or 1.2.3.6
+ # iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 1.2.3.4-1.2.3.6
+
+ ## Change source addresses to 1.2.3.4, ports 1-1023
+ # iptables -t nat -A POSTROUTING -p tcp -o eth0 -j SNAT --to 1.2.3.4:1-1023
+
+Masquerading
+
+There is a specialized case of Source NAT called masquerading: it should only be used for dynamically-assigned IP addresses, such as standard dialups (for static IP addresses, use SNAT above).
+
+You don't need to put in the source address explicitly with masquerading: it will use the source address of the interface the packet is going out from. But more importantly, if the link goes down, the connections (which are now lost anyway) are forgotten, meaning fewer glitches when connection comes back up with a new IP address.
+
+ ## Masquerade everything out ppp0.
+ # iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
+
+
+###Destination NAT / DNAT / Portforwarding
+This is done in the PREROUTING chain, just as the packet comes in; this means that anything else on the Linux box itself (routing, packet filtering) will see the packet going to its `real' destination. It also means that the `-i' (incoming interface) option can be used.
+
+To alter the destination of locally-generated packets, the OUTPUT chain can be used, but this is more unusual.
+
+Destination NAT is specified using `-j DNAT', and the `--to-destination' option specifies an IP address, a range of IP addresses, and an optional port or range of ports (for UDP and TCP protocols only).
+
+ ## Change destination addresses to 5.6.7.8
+ # iptables -t nat -A PREROUTING -i eth1 -j DNAT --to 5.6.7.8
+
+ ## Change destination addresses to 5.6.7.8, 5.6.7.9 or 5.6.7.10.
+ # iptables -t nat -A PREROUTING -i eth1 -j DNAT --to 5.6.7.8-5.6.7.10
+
+ ## Change destination addresses of web traffic to 5.6.7.8, port 8080.
+ # iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth1 -j DNAT --to 5.6.7.8:8080
+
+ ## Redirect local packets to 1.2.3.4 to loopback.
+ # iptables -t nat -A OUTPUT -d 1.2.3.4 -j DNAT --to 127.0.0.1
+
+###Redirection / redirect
+There is a specialized case of Destination NAT called redirection: it is a simple convenience which is exactly equivalent to doing DNAT to the address of the incoming interface.
+
+ ## Send incoming port-80 web traffic to our squid (transparent) proxy
+ iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
+
+
+Configuring a Stateful Linux Firewall with IPTables / NetFilter
+
+Tony Perrie
+
+January 9, 2002
+
+Linux Packet Filtering Implementations
+
+ * 1st Generation - Alan Cox's port of BSD UNIX's ipfw to Linux 1.1
+ * 2nd Generation - Jos Vos and others added the ipfwadm tool in Linux 2.0.
+ * 3rd Generation - Rusty Russel and Michael Neuling made significant changes to ipfw, and ipchains was released in Linux 2.2.
+ * 4th Generation - Rusty Russel and others implemented a modular packet filter/mangler infrastructure called NetFilter for Linux 2.4.
+
+Routing Packets with SNAT
+
+ * Source Network Address Translation enables you to get access to an external network (usually the Internet) from behind the firewall.
+ * Enable Packet Forwarding
+ o echo 1 > /proc/sys/net/ipv4/ip_forward
+ o Allows kernel-level IP Forwarding
+ o Disabled by default in most distros
+ o service network restart resets ip_forward to 0 (unless you've h4x0red /etc/init.d/network)
+ * Enable Masquerading
+ o Dynamic IP: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
+ o Static IP: iptables -t nat -A POSTROUTING -o eth0 -j SNAT -to 24.0.0.0
+ o This allows machines to masquerade from behind the firewall.
+
+Default Policies / Output Port Blocking
+
+ * Default Policies
+ o iptables -P INPUT DROP
+ + This is a highly recommended as default.
+ + Basically drop everything unless told otherwise
+ o iptables -P OUTPUT ACCEPT
+ + Some suggest to default OUTPUT to DROP
+ + It's not really necessary though.
+ o iptables -P FORWARD ACCEPT
+ o This is needed for NAT / MASQUERADING
+ * Output Port Blocking
+ o Be careful blocking output ports. Blocking port 80 doesn't only stop hackers, it also stops IE, Netscape, Galeon, from accessing most web servers.
+ o iptables -A OUTPUT -o eth0 -p tcp -dport 31337 -j DROP
+ o iptables -A OUTPUT -o eth0 -p tcp -sport 31337 -j DROP
+
+Output Port Blocking / External Port Blocking
+
+ * Output Port Blocking Continued
+ o Ports to block: 31337 , 31335, 27444, 27665, 20034 NetBus, 9704, 137-139 (smb), 1433, 2049, 5432, 5999, 6063, 5900-5910 (vnc)
+ * External Port Blocking
+ o Reject Ident Requests (ircers will probably want to accept ident)
+ o iptables -A FORWARD -i eth0 -p tcp -dport 113 -j REJECT
+ o iptables -A OUTPUT -o eth0 -p tcp -dport 113 -j REJECT
+ o Allow Nortel IPSEC Rekey Packets (IBM VPN)
+ o iptables -A FORWARD -i eth0 -p tcp -dport 500 -j ALLOW
+ o iptables -A OUTPUT -o eth0 -p tcp -dport 500 -j ALLOW
+
+Drop Bogus Packets / Log & Limit Suspicious Traffic
+
+ * Drop Bogus Packets
+ o RESERVED_NET="0.0.0.0/8 1.0.0.0/8 2.0.0.0/8 5.0.0.0/8 7.0.0.0/8 ... "
+
+ for NET in $RESERVED_NET; do
+ iptables -A FORWARD -d $NET -j DROP
+ done
+
+ * Log Suspicious Packets
+ o Create a new chain called CHECK_FLAGS
+ o iptables -N CHECK_FLAGS
+ o iptables -A CHECK_FLAGS -p tcp -tcp-flags ALL FIN,URG,PSH -m limit -limit 5/minute -j LOG -log-level 6 -log-prefix "NMAP-XMAS:"
+ o iptables -A CHECK_FLAGS -p tcp -tcp-flags ALL FIN,URG,PSH -j DROP
+
+Jump to a Custom Chain / Define Stateful Rules
+
+ * Jump to a Custom Chain
+ o iptables -A INPUT -i eth0 -j CHECK_FLAGS
+ o iptables -A FORWARD -i eth0 -j CHECK_FLAGS
+ * Define Stateful Rules
+ o iptables -A OUTPUT -m state -state INVALID -j DROP
+ o iptables -A OUTPUT -m state -state RELATED, ESTABLISHED -j ACCEPT
+ o iptables -A OUTPUT -i ! eth0 -m state -state NEW -j ACCEPT
+ o ACCEPT packets whose input interface is anything but the external interface.
+
+Blocking ICMP / Port Forwarding with DNAT
+
+ * Port Forwarding
+ o Port Forwarding an IPSEC client/server on 500 using protocol 17 (needed for VPN access)
+ o iptables -t nat -A PREROUTING -i eth0 -p 17 -dport 500 -j DNAT -to 192.168.0.2:500
+ o Port Forwarding WWW on Port 80
+ o iptables -t nat -A PREROUTING -i eth0 -p tcp -dport 80 -j DNAT -to 192.168.0.2:80
+ o forwarded packets back
+ o iptables -t nat -A POSTROUTING -o eth0 -p tcp -j SNAT -to IP_OF_FORWARDING_PC
+ * Blocking ICMP
+ o Using Default DROP for input blocks ICMP (Ping)
+ o iptables -A OUTPUT -i eth0 -p icmp -icmp-type 8 -j DROP
+ o iptables -A FORWARD -i eth0 -p icmp -icmp-type 8 -j DROP
+ o iptables -A OUTPUT -i eth0 -p icmp -icmp-type 8 -j ACCEPT
+
+ToS Packet Mangling / MAC Addresses as Filtering Criteria
+
+ * ToS Packet Mangling
+ o Allows for Type-Of-Service Parameters to be set per protocol
+ o iptables -t mangle -A FORWARD -p tcp -dport 22 -j TOS -set-tos 16
+ o iptables -t mangle -A FORWARD -p tcp -dport 80 -j TOS -set-tos 8
+ * MAC Addresses as Filtering Criteria
+ o iptables -A FORWARD -m state -state NEW -m mac -mac-source 00:C7:8F:72:14 -j ACCEPT
+ o Allows a known MAC Address to be forwarded
+
+IBM-Rochester Nortel VPN Access
+
+ ## OPENS NORTEL EXTERNAL PORT 500
+ iptables -A OUTPUT -i eth0 -p tcp --dport 500 -j ACCEPT
+ iptables -A FORWARD -i eth0 -p tcp --dport 500 -j ACCEPT
+ ## PORT FORWARD FOR IPSEC "REKEYING"
+ iptables -t nat -A PREROUTING -i eth0 -p 17 --dport 500 -j DNAT --to 192.168.0.2:500
+
+ * Assumes 192.168.0.2 is the computer you are running the VPN client, and eth0 is external
+
+###DHCP / dhcp - Server dhcpd
+#filename: /etc/dhcpd.conf
+default-lease-time 86400;
+max-lease-time 86400;
+
+subnet 192.168.0.0 netmask 255.255.255.0 {
+ range 192.168.0.2 192.168.0.250;
+ option subnet-mask 255.255.255.0;
+ option broadcast-address 192.168.0.255;
+ option routers 192.168.0.1;
+ option domain-name-servers 192.168.0.4,
+ 12.24.250.39, 12.24.250.40, 206.25.127.40;
+ option domain-name "chartermi.net";
+}
+###ICMP die genutzt werden sollten
+ICMP-Nachrichten des Typs 0, 3, 4, 8, 11 und 12
--- /dev/null
+###filerecovery utility, Dateiwiderherstellung
+foremost -t jpg,jpeg -i datenimage.img -o /recovery/foremost
--- /dev/null
+###Auflösungen Framebuffer herausfinden
+hwinfo --framebuffer
--- /dev/null
+###account
+#user: person-mhoellein
+#pass: LxkAymrACzrg2HHfjmD89hYf
+
+#node bernsdorfer str. die internet macht
+74:ea:3a:be:20:24 40-183
+#meine nodes
+40-72 64:70:02:3A:9B:CE
+40-74 66:70:02:3A:B9:79 schlafzimmer
+40-75 66:70:02:AE:79:97 wohnzimmer
+40-79 5ghz A0:F3:C1:78:0C:7F / 2.4 ghza2:f3:c1:78:0c:80 arbeitszimmer
+40-186 A0:F3:C1:66:BB:00
+###macs die ich rein bekomme
+40-127 de:9f:db:90:27:b4
--- /dev/null
+config 'mesh' 'bat0'
+ option 'interfaces' 'mesh'
+ option 'aggregated_ogms'
+ option 'ap_isolation'
+ option 'bonding'
+ option 'fragmentation'
+ option 'gw_bandwidth'
+ option 'gw_mode'
+ option 'gw_sel_class'
+ option 'log_level'
+ option 'orig_interval'
+ option 'vis_mode'
+ option 'bridge_loop_avoidance'
+
+# yet another batX instance
+# config 'mesh' 'bat5'
+# option 'interfaces' 'second_mesh'
--- /dev/null
+package dhcp
+
+config 'mesh' 'bat0'
+ option 'interfaces' 'mesh'
+config dhcp 'lan'
+ option interface 'lan'
+ option ignore '1'
+
+config dhcp 'wan'
+ option interface 'wan'
+ option ignore '1'
+
+config dnsmasq
+ option nonegcache '1'
+ option authoritative '1'
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/etc/resolv.conf.auto'
+ option domain 'routers.chemnitz.freifunk.net'
+
--- /dev/null
+package network
+
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config interface 'lan'
+ option ifname 'eth1 wlan0'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '10.8.40.72'
+ option netmask '255.255.248.0'
+
+config interface 'wan'
+ option ifname 'eth0'
+ option proto 'dhcp'
+
+config switch
+ option name 'switch0'
+ option reset '1'
+ option enable_vlan '1'
+
+config switch_vlan
+ option device 'switch0'
+ option vlan '1'
+ option ports '0 1 2 3 4'
--- /dev/null
+config system
+ option hostname 'node-40-72'
+ option timezone 'CET-1CEST,M3.5.0,M10.5.0/3'
+
+config timeserver 'ntp'
+ list server 'de.pool.ntp.org'
+ option enable_server '0'
+
+config led 'led_wan'
+ option name 'WAN'
+ option sysfs 'tp-link:green:wan'
+ option trigger 'netdev'
+ option dev 'eth0'
+ option mode 'link tx rx'
+
+config led 'led_lan1'
+ option name 'LAN1'
+ option sysfs 'tp-link:green:lan1'
+ option trigger 'switch0'
+ option port_mask '0x04'
+
+config led 'led_lan2'
+ option name 'LAN2'
+ option sysfs 'tp-link:green:lan2'
+ option trigger 'switch0'
+ option port_mask '0x08'
+
+config led 'led_lan3'
+ option name 'LAN3'
+ option sysfs 'tp-link:green:lan3'
+ option trigger 'switch0'
+ option port_mask '0x10'
+config led 'led_lan4'
+ option name 'LAN4'
+ option sysfs 'tp-link:green:lan4'
+ option trigger 'switch0'
+ option port_mask '0x02'
+
+config led 'led_wlan'
+ option name 'WLAN'
+ option sysfs 'tp-link:green:wlan'
+ option trigger 'phy0tpt'
--- /dev/null
+config wifi-device 'radio0'
+ option type 'mac80211'
+ option channel '11'
+ option macaddr '64:70:02:3a:9b:ce'
+ option hwmode '11ng'
+ option htmode 'HT20'
+ list ht_capab 'LDPC'
+ list ht_capab 'SHORT-GI-20'
+ list ht_capab 'SHORT-GI-40'
+ list ht_capab 'TX-STBC'
+ list ht_capab 'RX-STBC1'
+ list ht_capab 'DSSS_CCK-40'
+ option disabled '0'
+
+config wifi-iface
+ option device 'radio0'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'chemnitz.freifunk.net'
+ option encryption 'none'
+
+config wifi-iface
+ option device 'radio0'
+ option networt 'batmesh'
+ option mode 'adhoc'
+ option ssid 'peer.chemnitz.freifunk.net'
+ option bssid '02:ff:c0:00:00:00'
+ option encryption 'none'
+
--- /dev/null
+#!/bin/bash
+
+# PLEASE KEEP VERSION INFORMATION UPDATED IN CASE YOU MAKE CHANGES TO THIS SCRIPT
+VERSION="20130322"
+
+CONFDIR="/etc"
+UPDATESRV="http://firmware.chemnitz.freifunk.net/autoupdate/attitude_adjustment/STABLE"
+STATSRV="http://api.routers.chemnitz.freifunk.net/update.php"
+
+## Configuration and inputs
+read_config() {
+ source $CONFDIR/ffc.conf
+ if [ "$REMOVEME" == "1" ]; then
+ echo "Dieser Router ist noch nicht konfiguriert."
+ echo "Bitte >> /usr/sbin/ffc firstboot << starten, um das Setup zu beginnen."
+ exit 2
+ fi
+}
+
+## Setup
+setup_firstboot() {
+ source $CONFDIR/ffc.conf
+ if [ "$REMOVEME" != "1" ]; then
+ echo "! DIESER ROUTER IST BEREITS KONFIGURIERT !"; echo ""
+ fi
+
+ # Gather all values needed for setup
+ echo "Willkommen zum Freifunk Chemnitz Router-Setup!"; echo ""
+ echo "Hilfe zu den Konfigurations-Flags gibt es unter:"
+ echo "http://www.chemnitz.freifunk.net/static-howto-setup"; echo ""
+ for key in "${SETUP[@]}"; do
+ eval val="\${$key[0]}"
+ echo -n "$key [$val]: "; read ans
+ ans=${ans:-$val}
+ sed -e "s/^$key=.*/$key=\"$ans\"/g" -i $CONFDIR/ffc.conf
+ done
+
+ # Remove firstboot entry and perform configuration reload
+ sed -e "/^REMOVEME/d" -i $CONFDIR/ffc.conf
+ source $CONFDIR/ffc.conf
+
+ echo ""; echo "---"; cat $CONFDIR/ffc.conf; echo "---"; echo ""
+
+ # VTUN
+ echo -n "VTUN: "
+ if [ "$WANIF" ] && [ "$VTUNPSK" ]; then
+ sed -e "s/WANIF/$WANIF/g" -e "s/VTUNIF/$VTUNIF/g" -e "s/IPV4_1/$IPV4_1/g" -e "s/IPV4_2/$IPV4_2/g" -e "s/VTUNPSK/$VTUNPSK/g" -i $CONFDIR/vtund.conf
+ echo "OK"
+ else
+ echo "disabled"
+ fi
+
+ # 5GHz
+ echo -n "5GHz: "
+ if [ "$WLANAP5GHZ" ] || [ "$WLANMESH5GHZ" ]; then
+ echo "OK"
+ else
+ echo "disabled"
+ fi
+
+ # UCI
+ echo -n "UCI: "
+ uci import -m dhcp < $CONFDIR/ffc.uci.dhcp
+ uci import -m wireless < $CONFDIR/ffc.uci.wireless
+ uci set system.hostname="node-$IPV4_1-$IPV4_2"
+ uci set system.timezone="CET-1CEST,M3.5.0,M10.5.0/3"
+ uci commit
+ echo "OK";
+}
+
+setup_autostart() {
+ setup_mesh
+ if [ "$WANIF" ] && [ "$VTUNPSK" ]; then
+ vtund -p -t 30 node-${IPV4_1}-${IPV4_2} uplink-vtun.routers.chemnitz.freifunk.net
+ fi
+
+ # Overwrite any maintenance or pre-configured network settings
+ ip addr flush dev $BRIDGEIF
+ ip addr add 10.8.${IPV4_1}.${IPV4_2}/21 brd 10.8.47.255 dev $BRIDGEIF
+ ip -6 addr add 2001:470:7b1d:ff::${IPV4_1}:${IPV4_2}/64 dev $BRIDGEIF
+ ip route add 10.8.0.0/16 via 10.8.47.254 dev $BRIDGEIF
+ ip link set up dev $BRIDGEIF
+ setup_firewall
+
+ if [ -f "/tmp/ffc.selfupdate.conf" ]; then
+ source /tmp/ffc.selfupdate.conf
+ if [ "$POSTPONED" == "1" ]; then
+ ip route add default via 10.8.47.254 dev $BRIDGEIF
+ echo "nameserver 10.8.6.6" > /etc/resolv.conf
+ setup_selfupdate
+ fi
+ fi
+}
+
+setup_mesh() {
+ read_config
+ ip link set up mtu 1528 multicast on dev $WLANMESH
+ batctl interface add $WLANMESH
+ if [ "$WLANMESH5GHZ" ]; then
+ ip link set up mtu 1528 multicast on dev $WLANMESH5GHZ
+ batctl interface add $WLANMESH5GHZ
+ fi
+ brctl addif $BRIDGEIF $BATMANIF
+ ip link set up dev $BATMANIF address 00:ff:c0:00:${IPV4_1}:${IPV4_2}
+}
+
+setup_vtun() {
+ read_config
+ ip link set up mtu 1528 multicast on dev $VTUNIF
+ batctl interface add $VTUNIF
+ batctl bridge_loop_avoidance 1
+ brctl addif $BRIDGEIF $BATMANIF
+ ip link set up dev $BATMANIF address 00:ff:c0:00:${IPV4_1}:${IPV4_2}
+}
+
+setup_firewall() {
+ read_config
+ if [ -x "/usr/sbin/ffc-firewall-local" ]; then
+ /usr/sbin/ffc-firewall-local
+ fi
+}
+
+setup_selfupdate() {
+ # Routers without native internet connection will have no default gateway yet
+ # to connect to the update server since the mesh has not yet been set up.
+ # We have to postpone all operations until the router is fully configured by autostart.
+ if [ ! "$(ip route show | grep default)" ]; then
+ echo "Keine Internetverbindung"
+ echo "POSTPONED=1" > /tmp/ffc.selfupdate.conf
+ exit 1
+ fi
+
+ wget -q -O /tmp/ffc "$UPDATESRV/ffc"
+ if [ $? -gt 0 ] && [ $(wc -c /tmp/ffc | awk '{print $1}') -lt 1000 ]; then
+ echo "Verbindung fehlgeschlagen"
+ exit 2
+ fi
+ chmod +x /tmp/ffc
+ /bin/bash -n /tmp/ffc
+ if [ $? -gt 0 ]; then
+ echo "Syntax-Check fehlgeschlagen"
+ exit 2
+ fi
+ mv /tmp/ffc /usr/sbin/ffc
+}
+
+statistics() {
+ read_config
+ STATURL="$STATSRV?apikey=$APIKEY&version=$VERSION&type=statistics"
+
+ # Network traffic
+ DATA="/sys/class/net/$BATMANIF/statistics"
+ if [ -d "$DATA" ]; then
+ VAL1=$(cat $DATA/rx_bytes)
+ VAL2=$(cat $DATA/tx_bytes)
+ STATURL="$STATURL&traffic=$VAL1;$VAL2"
+ unset VAL1 VAL2
+ fi
+
+ # Wired clients
+ DATA="" # TODO
+ if [ "$DATA" ]; then
+ VAL1=""
+ STATURL="$STATURL&clients_wired=$VAL1"
+ unset VAL1
+ fi
+
+ # Wireless clients 2.4GHz
+ DATA=$(iw dev $WLANAP station dump)
+ if [ "$DATA" ]; then
+ VAL1=$(echo "$DATA" | grep -e "^Station" | awk '{print $2}' | tr '\n' ';')
+ STATURL="$STATURL&clients_24ghz=$VAL1"
+ unset VAL1
+ fi
+
+ # Wireless clients 5GHz
+ if [ "$WLANAP5GHZ" ]; then
+ DATA=$(iw dev $WLANAP5GHZ station dump)
+ if [ "$DATA" ]; then
+ VAL1=$(echo "$DATA" | grep -e "^Station" | awk '{print $2}' | tr '\n' ';')
+ STATURL="$STATURL&clients_5ghz=$VAL1"
+ unset VAL1
+ fi
+ fi
+
+ wget -q -O /dev/null "$STATURL"
+}
+
+# This function will be called once in a minute by crond
+cron_sched() {
+ # Export statistics
+ statistics
+}
+
+## Main function
+case $1 in
+ autostart) setup_autostart ;;
+ firstboot) setup_firstboot ;;
+ selfupdate) setup_selfupdate ;;
+ statistics) statistics ;;
+ cron-scheduler) cron_sched ;;
+ setup-mesh) setup_mesh ;;
+ setup-vtun) setup_vtun ;;
+ setup-firewall) setup_firewall ;;
+ *) echo "Usage: autostart | firstboot | selfupdate | statistics | cron-scheduler | setup-mesh | setup-vtun | setup-firewall" ;;
+esac
+
+exit 1
--- /dev/null
+SETUP=("IPV4_1" "IPV4_2" "BRIDGEIF" "WANIF" "WLANAP" "WLANMESH" "WLANAP5GHZ" "WLANMESH5GHZ" "BATMANIF" "VTUNIF" "VTUNPSK" "APIKEY")
+
+BATMANIF="bat0"
+BRIDGEIF="br-lan"
+IPV4_1="40"
+IPV4_2="72"
+WANIF="eth1"
+WLANAP="wlan0"
+WLANAP5GHZ=""
+WLANMESH="wlan0-1"
+WLANMESH5GHZ=""
+VTUNIF="vtun0"
+VTUNPSK="bfe79d1e9743a"
+APIKEY="a2d37164fd32895b9015411abc3d7a46589b71d6"
--- /dev/null
+package dhcp
+
+config dnsmasq
+ option nonegcache '1'
+ option authoritative '1'
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/etc/resolv.conf.auto'
+ option domain routers.chemnitz.freifunk.net
+
+config dhcp 'wan'
+ option interface 'wan'
+ option ignore '1'
--- /dev/null
+package wireless
+
+config wifi-device 'radio0'
+ option channel '11'
+ option hwmode '11ng'
+ option disabled '0'
+
+config wifi-iface
+ option device 'radio0'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'chemnitz.freifunk.net'
+ option encryption 'none'
+
+config wifi-iface
+ option device 'radio0'
+ option networt 'batmesh'
+ option mode 'adhoc'
+ option ssid 'peer.chemnitz.freifunk.net'
+ option bssid '02:ff:c0:00:00:00'
+ option encryption 'none'
+
+config wifi-device 'radio1'
+ option channel '36'
+ option hwmode '11na'
+ option disabled '0'
+
+config wifi-iface
+ option device 'radio1'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'chemnitz.freifunk.net'
+ option encryption 'none'
+
+config wifi-iface
+ option device 'radio1'
+ option network 'batmesh'
+ option mode 'adhoc'
+ option ssid 'peer.chemnitz.freifunk.net'
+ option bssid '02:ff:c0:00:00:00'
+ option encryption 'none'
--- /dev/null
+search routers.chemnitz.freifunk.net
+nameserver 127.0.0.1
--- /dev/null
+nameserver 8.8.8.8
+nameserver 8.8.4.4
+search routers.chemnitz.freifunk.net
\ No newline at end of file
--- /dev/null
+options {
+ port 5000;
+ bindaddr {
+ iface eth1;
+ };
+
+ syslog daemon;
+}
+
+default {
+ compress yes;
+ encrypt no;
+ keepalive yes;
+ type ether;
+ proto tcp;
+ device vtun0;
+
+ up {
+ program /usr/sbin/ffc "setup-vtun";
+ };
+}
+
+node-40-72 {
+ passwd bfe79d1e9743a;
+}
--- /dev/null
+###platten immer mit gleichem namen, in autorun.sh im root
+#begin script
+#!/bin/sh
+pfad=$(echo "$0" | sed "s/\/autorun.sh//")
+mount | grep "/var/media/ftp/disk" >> /dev/null
+mounted=$?
+if [ "$mounted" ]
+ then umount "/var/media/ftp/disk/"
+fi
+mkdir /var/media/ftp/disk/
+echo "disk - $(date)" >> /tmp/mounttimes
+mount -o bind $pfad /var/media/ftp/disk/
+#end schript
+#oder als links
+#begin script
+#!/bin/sh
+pfad=$(echo "$0" | sed "s/\/autorun.sh//")
+echo "disk - $(date)" >> /tmp/mounttimes
+ln -s -f $pfad /var/media/ftp/disk/
+#end script
+#oder so
+#begin script
+#!/bin/sh
+log=log_automount.txt
+date > $log
+mount >> $log
+echo --------------found---------------- >> $log
+#folgende Zeilen anpassen (die 5 ggf ersetzen):
+mount |grep 5 | tail -n1 >> $log
+mountpoint=`mount |grep -E 'uStor05|uStor15' | tail -n1 | cut -d " " -f 3`
+
+echo mountpoint is $mountpoint >> $log
+ln -s -f $mountpoint
+#end script
+###samba (experten einstellungen)
+[global]
+ log level = 3
+ log file = /var/media/ftp/uStor11/samba_%m.log
+ unix charset = UTF-8
+###hosts
+192.168.1.103 00:50:9C:31:98:3E lan dbox
+###USB-automount
+mount -o bind /var/tmp/flash/storage/storage /etc/hotplug/storage
+mount -o bind /var/tmp/flash/storage/run_mount /etc/hotplug/run_mount
+###matrixtunnel
+- mittels openssl (auf kompi) einen selbstsigniertes zertifikat + hostkey generieren:
+ openssl genrsa -out host.key 2048
+ openssl req -new -nodes -key host.key -out host.csr
+ openssl x509 -req -days 365 -in host.csr -signkey host.key -out host.cert
+- host.key und host.cert auf den router kopieren
+- matrixtunnel auf router starten:
+ matrixtunnel -A host.cert -p host.key -d 443 -r 80
+- mit einem browser https://meinrouter/ aufrufen
+oder so
+#beginScript
+#!/bin/bash
+
+# Paßwortgeschützten Server Key erzeugen
+openssl genrsa -des3 -out server.key 1024
+
+# Ungeschützte Version extrahieren (der SSL-Server kann ja nicht
+# vor der Benutzung selbst ein Paßwort eingeben)
+openssl rsa -in server.key -out server.key.unsecure
+
+# Certificate Signing Request (CSR) mit persönlichen Daten erzeugen
+openssl req -new -key server.key -out server.csr
+
+# Ein Jahr gültiges, selbst signiertes Zertifikat anfordern
+openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
+
+# CSR wird nicht mehr benötigt
+rm server.csr
+
+# Schlüssel + Zertifikat (in dieser Reihenfolge!)
+# in einer Datei zusammenführen
+cat server.key.unsecure server.crt > stunnel-key.pem
+#endScript
+
+
+###unbedingt machen auf dem stick_root, sonst gehts nicht
+mknod my_ext2_target_dir/dev/console c 5 1
+###user anlegen, gehen dann auch bei ftp
+adduser -h /var/media/ftp user03
+adduser: /var/media/ftp: File exists
+Changing password for user03
+New password:
+Bad password: similar to username
+Retype password:
+Password for user03 changed by root
+dann noch verzeichnisrechte setzen
+###in debug oder rc.custom
+/etc/hotplug/storage add 002 /proc/bus/usb/001/005 0 0 0
+/etc/hotplug/storage add 002 /proc/bus/usb/001/004 0 0 0
+/bin/sleep 5
+/usr/sbin/matrixtunnel -A /var/media/ftp/uStor21/host.cert -p /var/media/ftp/uStor21/host.key -d 443 -r 81
+/bin/sleep 2
+/bin/echo "abi:x:1001:1:Linux User,,,:/var/media/ftp/uStor11/abi:/bin/sh" >> /etc/passwd
+/bin/echo "marco:x:1002:1:Linux User,,,:/var/media/ftp/uStor11/marco:/bin/sh" >> /etc/passwd
+/bin/echo "thomas:x:1003:1:Linux User,,,:/var/media/ftp/uStor11/thomas/:/bin/sh" >> /etc/passwd
+
+###reboot per telefon
+reboot der Box #990*15901590*
+telefon neustart #96*5*
+telnet an #96*7*
+telnet aus #96*8*
+uptime #96*9*
+
+###
+ * distclean: Löscht alle Dateien, die evtl. durch den make-Prozeß erstellt werden. Nach distclean sollten nur noch die Dateien übrig sein, die man am Anfang heruntergeladen hat (dist wie distribution). In manchen Fällen kann es sein, daß Dateien, die automatisch erstellt werden können, für deren Erstellung aber seltene Toos oder viel Zeit gebraucht wird, Bestandteil der Distribution sind und daher mit distclean nicht gelöscht werden. Insbesondere wird mit distclean normalerweise auch die Konfiguration gelöscht, da diese ja auch nicht Bestandteil der Distribution ist.
+ * dirclean: Bei Freetz werden damit die ausgepackten Verzeichnisse der Pakete gelöscht, also insbesondere die Verzeichnisse unter source und packages.
+ * clean: Damit werden normalerweise die Dateien gelöscht, die durch den Build-Prozeß erstellt werden, also Programme, Libraries und Object-Dateien, aber nicht die Konfiguration.
+##
+1. Aufräumen:
+
+ * make clean
+ ...
+
+ * make <Paket>-clean (Quelle):
+ räumt das spezifizierte Paket <Paket> auf
+ Z.B. räumt make mc-clean das Paket "Midnight Commander" (mc) auf.
+ Was ist der Unterschied zwischen make <Paket>-clean und make <Paket>-dirclean, oder gibt es das nicht?
+
+ * make common-clean (Quelle):
+ ...
+
+ * make common-dirclean (Quelle):
+ ...
+
+ * make common-distclean (Quelle):
+ ...
+
+ * make dirclean (Quelle):
+ ...
+
+ * make distclean (Quelle):
+ ...
+
+ * make config-clean-deps (Quelle):
+ Wenn bei make menuconfig Pakete abgewählt wurden, sind ggfs. noch Shared Libraries ausgewählt, die nicht mehr benötigt werden (dies kann menuconfig nicht automatisch erkennen). Diese kann man dann manuell unter 'Advanced Options'!'Shared Libraries' abwählen - die benötigten lassen sich nicht deaktivieren. Alternativ kann man dies automatisch mittels make config-clean-deps erledigen lassen.
+
+ * make kernel-dirclean (Quelle):
+ löscht den aktuell entpackten Source Tree des Kernels, um von komplett sauberen Kernel Sourcen zu kompilieren - Alternative(?):
+
+ * make kernel-clean (Quelle):
+ siehe make kernel-dirclean
+
+ * make kernel-toolchain-dirclean
+ * make target-toolchain-dirclean (Quelle):
+ löscht die Toolchain -
+ Aber was ist der Unterschied zwischen kernel-toolchain-dirclean und target-toolchain-dirclean?
+
+
+2. Vorbereitungen:
+
+ * make world (Quelle):
+ Vorraussetzung ist eine Toolchain (siehe Cross-Compiler / Toolchain erstellen). Sollten jemals Probleme mit nicht vorhandenen Verzeichnissen auftauchen, so kann ein make world Abhilfe schaffen. In der Regel sollte das aber nicht nötig sein.
+ Ist das noch aktuell?
+
+ * make kernel-toolchain (Quelle):
+ kompiliert den Kernel und auch für das target (Fritzbox)
+ Aus historischen Gründen wurde die Bezeichnung als kernel-toolchain belassen, obwohl damit wie gesagt nicht nur der Kernel gebaut wird, sondern auch Pakete (s.u.).
+
+ * make target-toolchain (Quelle):
+ kompiliert die Pakete für das target (Fritzbox)
+
+ * make kernel-menuconfig (Quelle):
+ Die Konfiguration des Kernels wird danach wieder nach ./make/linux/Config.<kernel-ref> zurückgespeichert.
+ Ist das noch aktuell?
+
+ * make kernel-precompiled (Quelle):
+ Damit werden der Kernel und die Kernel Module kompiliert.
+ Ist das noch aktuell?
+
+ * make menuconfig (Quelle): Zum Konfigurieren von Freetz kommt das Programm conf/mconf zum Einsatz, welches dem ein oder anderen vielleicht von der Konfiguration des Linux Kernels bekannt ist. Die ncurses Variante mconf kann mit dem Kommando make menuconfig aufgerufen werden.
+ Eine Hilfe zu den einzelnen Punkten kann übrigens direkt in menuconfig durch Eingabe von "?" aufgerufen werden.
+##
+
+
+###USB-automount
+mount -o bind /var/tmp/flash/storage/storage /etc/hotplug/storage
+mount -o bind /var/tmp/flash/storage/run_mount /etc/hotplug/run_mount
+
+###rc.customs
+/etc/hotplug/storage add 002 /proc/bus/usb/001/003 0 0 0
+
+###downgrade mod
+sed "s/{CONFIG_VERSION_MAJOR}.*/{CONFIG_VERSION_MAJOR}.01.01/1" /etc/version > /var/tmp/version
+chmod +x /var/tmp/version
+mount -o bind /var/tmp/version /etc/version
+
+####portforwarding auf die box selbst per original menü
+#begin scrip
+pr=`find /var/html/ -name portrule.js`
+sed 's/return g_mldIpAdr0000/return null/' $pr > /var/tmp/portrule.js
+mount -o bind /var/tmp/portrule.js $pr
+
+cat > /var/tmp/unhiderules << 'EOF'
+#! /bin/sh
+
+# Die VOIP-Regel "ausblenden"
+EXCLUDE="0\.0\.0\.0\:5060"
+
+#PW extrahieren
+local PWD=$(/bin/allcfgconv -C ar7 -c -o - | sed -ne '/^webui[[:space:]]*{/,/^}/{
+/=/{s/[[:space:]]*=[[:space:]]*/=/;s/^[[:space:]]*//;p}
+}' | grep '^password=' | cut -d '"' -f2)
+ ret=$?
+ if [ $ret != 0 ]; then
+ echo "ERROR: Unhide_local_PFWD (exit code $ret)" >&2
+ exit $ret
+ fi
+#oder für voip password
+allcfgconv -C voip -c -o /var/tmp/voip.cfg
+
+# 0.0.0.0:xx 0.0.0.0:yy ersetzen durch 0.0.0.0:xx 127.0.0.1:yy
+cat /var/flash/ar7.cfg | sed "/dslifaces/,/} {/ {/forward/,/}/ {/$EXCLUDE/! s/\(.*0\.0\.0\.0.*\)\(0\.0\.0\.0\)\(.*\)/\1127\.0\.0\.1\3/}}" > /var/tmp/tmpar7.cfg
+cat /var/tmp/tmpar7.cfg > /var/flash/ar7.cfg
+
+# Die "neuen" Regeln einlesen lassen, so dass sie per GUI erreichbar sind (die 0.0.0.0-er Regeln sind nicht "ansprechbar":
+killall -9 ctlmgr && sleep 1 && /usr/bin/ctlmgr
+sleep 5
+
+# ... und nun das Aendern auf 0.0.0.0 per GUI "emulieren"
+#
+TESTSTRING="127.0.0.1"
+NEUEIP="0.0.0.0"
+# Die Rules finden ...
+rules="`wget -q -O - "http://127.0.0.1/cgi-bin/webcm?getpage=..%2Fhtml%2Fde%2Fmenus%2Fmenu2.html&errorpage=..%2Fhtml%2Fde%2Fmenus%2Fmenu2.html&var%3Alang=de&var%3Apagename=portfw&var%3Amenu=internet&var%3Apagemaster=" | grep -v $EXCLUDE |grep -A 6 $TESTSTRING | grep "uiDoEdit" | sed "s/.*uiDoEdit('\(.*\)').*/\1/"`"
+
+if [ "$rules" != "" ]; then
+ # ... POST_DATA String "basteln"
+ PDATA="getpage=/usr/www/all/html/query.txt&login:command/password=$pw&id=uiPostForm&name=uiPostForm&var:pagename=portrule&var:menu=internet"
+ for myrule in `echo "$rules" | tr '\n' ' '`; do
+ PDATA="${PDATA}&var:rule=${myrule}&var:isnew=0&var:isexp=0&forwardrules:settings/${myrule}/fwip=$NEUEIP"
+ done
+ echo -n "$PDATA" | REQUEST_METHOD="POST" REMOTE_ADDR="127.0.0.1" CONTENT_TYPE="application/x-www-form-urlencoded" CONTENT_LENGTH=${#PDATA} /usr/www/html/cgi-bin/webcm > /dev/null
+fi
+# ... fertig
+EOF
+sh /var/tmp/unhiderules
+#end script
+###Fehler: no gettext support in C library
+rm make/config.cache && make
+###sane geht nicht
+dll-preload.c sollte so aussehen:
+static struct backend preloaded_backends[] = {
+{ 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}
+};
+###Faxen per linux
+Standardmäßig wird versucht, sich mit dem Host 'fritz.box' zu verbinden. IP-Adresse und Port lassen sich über Environment Variablen festlegen:
+
+export FB_REMOTE_CAPI_IP=192.168.178.1
+export FB_REMOTE_CAPI_PORT=5031
+
+Weitere Einstellungen:
+
+export FB_REMOTE_CAPI_DEBUG=X (Debug-Ausgabe. 0=nichts, 3=alles)
+export FB_REMOTE_CAPI_TCP=1 (Remote-CAPI an=1, aus=0)
+export FB_REMOTE_CAPI_DEV=1 (Device-CAPI an=1, aus=0)
+
+Mithilfe von capiinfo kann man nun prüfen, ob alles funktioniert. capiinfo befindet sich ebenfalls im libcapi20_fb Paket.
+Troubleshooting
+
+# ./capiinfo
+Number of Controllers : 0
+could not register - (0x1009)
+
+ 1.
+ Ist der Capi-over-TCP auf der Fritz!Box eingeschaltet (an: #96*3*, aus: #96*2*)?
+ 2.
+ Ist die IP-Adresse und der Port korrekt? Es wird standardmäßig versucht, sich mit fritz.box:5031 zu verbinden.
+ 3.
+ Sind die Softlinks unter /usr/lib korrekt?
+ 4.
+ ldd capiinfo eingeben und prüfen, ob libcapi20.so.3 auch auf /usr/lib/libcapi20.so.3 zeigt.
+
+Faxen mit capifax
+
+Für das Faxen unter Linux wird ein SoftDSP benötigt, da die CAPI der Fritz!Box kein T.30 Modem zur Verfügung stellt. Es sind daher folgende Libraries notwending:
+
+ *
+ libtiff-3.8.2
+ *
+ spandsp-0.0.5_pre4
+
+capifax selbst besteht aus der Anwendung 'capifax' und der Library 'libcapifax.so'. Der Hilfe-Text zu capifax sieht folgendermaßen aus:
+
+usage: capifax [OPTIONS]
+OPTIONS:
+ -send [tiff_file] [controller] [msn] [target_no]
+ -receive [path] [controller] [msn]
+ -rate [2400|4800|9600|14400]
+ -ident "+00 00 0000000"
+ -header "My Name"
+ -ecm [on|off]
+ -loglevel [0-3]
+
+Faxe versenden (Ctrl. 1, externer ISDN):
+
+capifax -send /home/maz/mytiff.tiff 1 12345 20354321
+
+Faxe empfangen (Ctrl. 4, Analog):
+
+capifax -receive /home/maz 4 12345
+###Zeit stellen per Telefon
+#83*hhmmddmmyyyy
+###Passwörter in Plain ausgeben aus ar7.cfg
+allcfgconv -C ar7 -c -o -
+###Sicherheitsstufe konfigurieren
+# with x being one of the following values:
+# 0 : no restrictions
+# 1 : only configuration files without shell commands might be edited
+# 2 : no configuration files might be edited
+echo x > /tmp/flash/security
+modsave
+###Character Device erstellen
+Der ds-mod benutzt auch ein solches character devices, welches Dateien mit Hilfe eines Tiny Flash Filesystems (TFFS) dauerhaft und veränderbar im Flash abspeichert, um die Konfiguration zu sichern. Vorraussetzung ist eine Minor Nummer, die von keinem anderen character device in /var/flash/ verwendet wird (der ds-mod benutzt die Minor 0x3c), die Major Nummer kann aus /proc/devices ausgelesen werden:
+
+mknod /var/flash/<dateiname> c <major> <minor>
+
+Da dieses character device in der Ramdisk unter /var/ erzeugt wurde, muss dieser Befehl jedesmal beim Neustart ausgeführt werden. Der Inhalt bleibt aber erhalten. Zum Bearbeiten solcher character devices niemals vi verwenden! Dafür gibt es das Wrapper-Skript nvi.
+
+ACHTUNG: Die Flash Partition des TFFS ist sehr klein und nicht geeignet Dateien > 10-30 KB aufzunehmen (je nach Größe der anderen Dateien).
+
+Der aktuelle Füllstand kann wie folgt ausgelesen werden:
+
+echo 'cleanup' > /proc/tffs
+echo 'info' > /proc/tffs
+cat /proc/tffs | grep '^fill='
+###Gast WLAN aufspannen mit der Fritzbox (soll nicht immer funktionieren)
+#Hiermit wird auf dem Basisgerät wifi0 eine zweite WLAN-Schnittstelle als AP eingerichtet
+wlanconfig ath1 create wlandev wifi0 wlanmode ap
+#Hier ist wichtig, den gleichen Kanal wie an der Hauptschnittstelle anzugeben, sonst sendet ath1 nicht.
+iwconfig ath1 essid "GAST" channel 48 #hier absturz wenn freq
+#Konfiguration der IP-Adresse
+#Jetzt lässt sich ein Client bereits zum offen funkenden Gastnetz verbinden.
+#Dazu ist dem Client manuell eine IP-Adresse aus dem Gast-IP-Bereich zuzuweisen,
+#z. B. 192.168.179.101 und die für ath1 eingestellte IP als Default-Gateway einzustellen.
+#Dann kann die Standard-Adresse der Fritz!Box als DNS-Server genommen werden und schon
+#hat man Internet-Zugang über die Box.
+ifconfig ath1 192.168.179.1 netmask 255.255.255.0 up
+#Mit einem Editor in der Kopie sind die Werte bei "interface" und "bss" von ath0 in ath1
+#zu ändern und anschließend eine zweite hostapd-Instanz zu starten.
+cp /var/tmp/hostapd_topology-ath0 /var/tmp/hostapd_topology-ath1
+hostapd -B /var/tmp/hostapd_topology-ath1
+###komilieren von neuen paketen
+wget http://code.ximeta.com/dev/current/o....mipsel.tar.gz
+tar xzf ndas-1.1-10.mipsel.tar.gz
+export PATH=$PATH:/home/userid/ds26-15.2/toolchain/kernel/bin::/home/userid/ds26-15.2/toolchain/target/bin
+export NDAS_KERNEL_PATH=/home/userid/ds26-15.2/source/ref-8mb_26-04.33/kernel/linux
+export NDAS_KERNEL_VERSION=2.6.13.1
+export NDAS_KERNEL_ARCH=mips
+export NDAS_CROSS_COMPILE=mipsel-unkown-linux-gnu-
+export NDAS_CROSS_COMPILE_UM=mipsel-linux-
+export NDAS_EXTRA_CFLAGS="-mlong-calls -DNDAS_SIGPENDING_OLD"
+make ARCH=mips CC=mipsel-unknown-linux-gnu-gcc
+###privoxy user.action
+{{alias}}
++crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
+-crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
+ allow-all-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies}
+ allow-popups = -filter{all-popups} -filter{unsolicited-popups}
++block-as-image = +block{Blocked image request.} +handle-as-image
+-block-as-image = -block
+fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -prevent-compression
+shop = -crunch-all-cookies allow-popups
+myfilters = +filter{html-annoyances} +filter{js-annoyances} +filter{all-popups}\
+ +filter{webbugs} +filter{banners-by-size}
+allow-ads = -block -filter{banners-by-size} -filter{banners-by-link}
+{ allow-all-cookies }
+{ -filter{all-popups} }
+.banking.example.com
+{ -filter }
+stupid-server.example.com/
+{ +block{Nasty ads.} }
+www.example.com/nasty-ads/sponsor.gif
+{ +block-as-image }
+{ fragile }
+{ allow-ads }
+{ +set-image-blocker{blank} }
+###compiling für fritzbox
+wget http://code.ximeta.com/dev/current/o....mipsel.tar.gz
+tar xzf ndas-1.1-10.mipsel.tar.gz
+export PATH=$PATH:/home/userid/ds26-15.2/toolchain/kernel/bin::/home/userid/ds26-15.2/toolchain/target/bin
+export NDAS_KERNEL_PATH=/home/userid/ds26-15.2/source/ref-8mb_26-04.33/kernel/linux
+export NDAS_KERNEL_VERSION=2.6.13.1
+export NDAS_KERNEL_ARCH=mips
+export NDAS_CROSS_COMPILE=mipsel-unkown-linux-gnu-
+export NDAS_CROSS_COMPILE_UM=mipsel-linux-
+export NDAS_EXTRA_CFLAGS="-mlong-calls -DNDAS_SIGPENDING_OLD"
+make ARCH=mips CC=mipsel-unknown-linux-gnu-gcc
+###Faxdrucker einrichten unter Linux, ppd in ppd verzeichnis, backend in backend
+lpadmin -p faxprinter -v capifax:// -i /usr/share/cups/model/capifax.ppd -E
+###Seriennummer der unterschiedlichen Versionen der 7270 (zweiter block)
+293 - HWRev 122 (8MB/7270_V1) - AVM-Branding
+294 - HWRev 122 (8MB/7270_V1) - 1und1-Branding
+304 - HWRev 139 (16MB/7270_V2) - AVM-Branding
+305 - HWRev 139 (16MB/7270_V2) - 1und1-Branding
+xxx - HWRev 145 (16MB/7270_V3) - ???-Branding - 7270_V3
+307 - HWRev 139 (16MB/7270_V2) - AVME-Branding Internationale-Version?
+310 - HWRev 139 (16MB/7270_V2) - AVME-Branding A-/CH-Version?
+###vlan
+#http://www.ip-phone-forum.de/showthread.php?t=212727&highlight=vconfig
+###Fritzbox IP Adresse
+169.254.1.1
--- /dev/null
+###platten immer mit gleichem namen, in autorun.sh im root
+#begin script
+#!/bin/sh
+pfad=$(echo "$0" | sed "s/\/autorun.sh//")
+mount | grep "/var/media/ftp/disk" >> /dev/null
+mounted=$?
+if [ "$mounted" ]
+ then umount "/var/media/ftp/disk/"
+fi
+mkdir /var/media/ftp/disk/
+echo "disk - $(date)" >> /tmp/mounttimes
+mount -o bind $pfad /var/media/ftp/disk/
+#end schript
+#oder als links
+#begin script
+#!/bin/sh
+pfad=$(echo "$0" | sed "s/\/autorun.sh//")
+echo "disk - $(date)" >> /tmp/mounttimes
+ln -s -f $pfad /var/media/ftp/disk/
+#end script
+#oder so
+#begin script
+#!/bin/sh
+log=log_automount.txt
+date > $log
+mount >> $log
+echo --------------found---------------- >> $log
+#folgende Zeilen anpassen (die 5 ggf ersetzen):
+mount |grep 5 | tail -n1 >> $log
+mountpoint=`mount |grep -E 'uStor05|uStor15' | tail -n1 | cut -d " " -f 3`
+
+echo mountpoint is $mountpoint >> $log
+ln -s -f $mountpoint
+#end script
+###samba (experten einstellungen)
+[global]
+ log level = 3
+ log file = /var/media/ftp/uStor11/samba_%m.log
+ unix charset = UTF-8
+###hosts
+192.168.1.103 00:50:9C:31:98:3E lan dbox
+###USB-automount
+mount -o bind /var/tmp/flash/storage/storage /etc/hotplug/storage
+mount -o bind /var/tmp/flash/storage/run_mount /etc/hotplug/run_mount
+###matrixtunnel
+- mittels openssl (auf kompi) einen selbstsigniertes zertifikat + hostkey generieren:
+ openssl genrsa -out host.key 2048
+ openssl req -new -nodes -key host.key -out host.csr
+ openssl x509 -req -days 365 -in host.csr -signkey host.key -out host.cert
+- host.key und host.cert auf den router kopieren
+- matrixtunnel auf router starten:
+ matrixtunnel -A host.cert -p host.key -d 443 -r 80
+- mit einem browser https://meinrouter/ aufrufen
+oder so
+#beginScript
+#!/bin/bash
+
+# Paßwortgeschützten Server Key erzeugen
+openssl genrsa -des3 -out server.key 1024
+
+# Ungeschützte Version extrahieren (der SSL-Server kann ja nicht
+# vor der Benutzung selbst ein Paßwort eingeben)
+openssl rsa -in server.key -out server.key.unsecure
+
+# Certificate Signing Request (CSR) mit persönlichen Daten erzeugen
+openssl req -new -key server.key -out server.csr
+
+# Ein Jahr gültiges, selbst signiertes Zertifikat anfordern
+openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
+
+# CSR wird nicht mehr benötigt
+rm server.csr
+
+# Schlüssel + Zertifikat (in dieser Reihenfolge!)
+# in einer Datei zusammenführen
+cat server.key.unsecure server.crt > stunnel-key.pem
+#endScript
+
+
+###unbedingt machen auf dem stick_root, sonst gehts nicht
+mknod my_ext2_target_dir/dev/console c 5 1
+###user anlegen, gehen dann auch bei ftp
+adduser -h /var/media/ftp user03
+adduser: /var/media/ftp: File exists
+Changing password for user03
+New password:
+Bad password: similar to username
+Retype password:
+Password for user03 changed by root
+dann noch verzeichnisrechte setzen
+###in debug oder rc.custom
+/etc/hotplug/storage add 002 /proc/bus/usb/001/005 0 0 0
+/etc/hotplug/storage add 002 /proc/bus/usb/001/004 0 0 0
+/bin/sleep 5
+/usr/sbin/matrixtunnel -A /var/media/ftp/uStor21/host.cert -p /var/media/ftp/uStor21/host.key -d 443 -r 81
+/bin/sleep 2
+/bin/echo "abi:x:1001:1:Linux User,,,:/var/media/ftp/uStor11/abi:/bin/sh" >> /etc/passwd
+/bin/echo "marco:x:1002:1:Linux User,,,:/var/media/ftp/uStor11/marco:/bin/sh" >> /etc/passwd
+/bin/echo "thomas:x:1003:1:Linux User,,,:/var/media/ftp/uStor11/thomas/:/bin/sh" >> /etc/passwd
+
+###reboot per telefon
+reboot der Box #990*15901590*
+telefon neustart #96*5*
+telnet an #96*7*
+telnet aus #96*8*
+uptime #96*9*
+
+###
+ * distclean: Löscht alle Dateien, die evtl. durch den make-Prozeß erstellt werden. Nach distclean sollten nur noch die Dateien übrig sein, die man am Anfang heruntergeladen hat (dist wie distribution). In manchen Fällen kann es sein, daß Dateien, die automatisch erstellt werden können, für deren Erstellung aber seltene Toos oder viel Zeit gebraucht wird, Bestandteil der Distribution sind und daher mit distclean nicht gelöscht werden. Insbesondere wird mit distclean normalerweise auch die Konfiguration gelöscht, da diese ja auch nicht Bestandteil der Distribution ist.
+ * dirclean: Bei Freetz werden damit die ausgepackten Verzeichnisse der Pakete gelöscht, also insbesondere die Verzeichnisse unter source und packages.
+ * clean: Damit werden normalerweise die Dateien gelöscht, die durch den Build-Prozeß erstellt werden, also Programme, Libraries und Object-Dateien, aber nicht die Konfiguration.
+##
+1. Aufräumen:
+
+ * make clean
+ ...
+
+ * make <Paket>-clean (Quelle):
+ räumt das spezifizierte Paket <Paket> auf
+ Z.B. räumt make mc-clean das Paket "Midnight Commander" (mc) auf.
+ Was ist der Unterschied zwischen make <Paket>-clean und make <Paket>-dirclean, oder gibt es das nicht?
+
+ * make common-clean (Quelle):
+ ...
+
+ * make common-dirclean (Quelle):
+ ...
+
+ * make common-distclean (Quelle):
+ ...
+
+ * make dirclean (Quelle):
+ ...
+
+ * make distclean (Quelle):
+ ...
+
+ * make config-clean-deps (Quelle):
+ Wenn bei make menuconfig Pakete abgewählt wurden, sind ggfs. noch Shared Libraries ausgewählt, die nicht mehr benötigt werden (dies kann menuconfig nicht automatisch erkennen). Diese kann man dann manuell unter 'Advanced Options'!'Shared Libraries' abwählen - die benötigten lassen sich nicht deaktivieren. Alternativ kann man dies automatisch mittels make config-clean-deps erledigen lassen.
+
+ * make kernel-dirclean (Quelle):
+ löscht den aktuell entpackten Source Tree des Kernels, um von komplett sauberen Kernel Sourcen zu kompilieren - Alternative(?):
+
+ * make kernel-clean (Quelle):
+ siehe make kernel-dirclean
+
+ * make kernel-toolchain-dirclean
+ * make target-toolchain-dirclean (Quelle):
+ löscht die Toolchain -
+ Aber was ist der Unterschied zwischen kernel-toolchain-dirclean und target-toolchain-dirclean?
+
+
+2. Vorbereitungen:
+
+ * make world (Quelle):
+ Vorraussetzung ist eine Toolchain (siehe Cross-Compiler / Toolchain erstellen). Sollten jemals Probleme mit nicht vorhandenen Verzeichnissen auftauchen, so kann ein make world Abhilfe schaffen. In der Regel sollte das aber nicht nötig sein.
+ Ist das noch aktuell?
+
+ * make kernel-toolchain (Quelle):
+ kompiliert den Kernel und auch für das target (Fritzbox)
+ Aus historischen Gründen wurde die Bezeichnung als kernel-toolchain belassen, obwohl damit wie gesagt nicht nur der Kernel gebaut wird, sondern auch Pakete (s.u.).
+
+ * make target-toolchain (Quelle):
+ kompiliert die Pakete für das target (Fritzbox)
+
+ * make kernel-menuconfig (Quelle):
+ Die Konfiguration des Kernels wird danach wieder nach ./make/linux/Config.<kernel-ref> zurückgespeichert.
+ Ist das noch aktuell?
+
+ * make kernel-precompiled (Quelle):
+ Damit werden der Kernel und die Kernel Module kompiliert.
+ Ist das noch aktuell?
+
+ * make menuconfig (Quelle): Zum Konfigurieren von Freetz kommt das Programm conf/mconf zum Einsatz, welches dem ein oder anderen vielleicht von der Konfiguration des Linux Kernels bekannt ist. Die ncurses Variante mconf kann mit dem Kommando make menuconfig aufgerufen werden.
+ Eine Hilfe zu den einzelnen Punkten kann übrigens direkt in menuconfig durch Eingabe von "?" aufgerufen werden.
+##
+
+
+###USB-automount
+mount -o bind /var/tmp/flash/storage/storage /etc/hotplug/storage
+mount -o bind /var/tmp/flash/storage/run_mount /etc/hotplug/run_mount
+
+###rc.customs
+/etc/hotplug/storage add 002 /proc/bus/usb/001/003 0 0 0
+
+###downgrade mod
+sed "s/{CONFIG_VERSION_MAJOR}.*/{CONFIG_VERSION_MAJOR}.01.01/1" /etc/version > /var/tmp/version
+chmod +x /var/tmp/version
+mount -o bind /var/tmp/version /etc/version
+
+####portforwarding auf die box selbst per original menü
+#begin scrip
+pr=`find /var/html/ -name portrule.js`
+sed 's/return g_mldIpAdr0000/return null/' $pr > /var/tmp/portrule.js
+mount -o bind /var/tmp/portrule.js $pr
+
+cat > /var/tmp/unhiderules << 'EOF'
+#! /bin/sh
+
+# Die VOIP-Regel "ausblenden"
+EXCLUDE="0\.0\.0\.0\:5060"
+
+#PW extrahieren
+local PWD=$(/bin/allcfgconv -C ar7 -c -o - | sed -ne '/^webui[[:space:]]*{/,/^}/{
+/=/{s/[[:space:]]*=[[:space:]]*/=/;s/^[[:space:]]*//;p}
+}' | grep '^password=' | cut -d '"' -f2)
+ ret=$?
+ if [ $ret != 0 ]; then
+ echo "ERROR: Unhide_local_PFWD (exit code $ret)" >&2
+ exit $ret
+ fi
+
+# 0.0.0.0:xx 0.0.0.0:yy ersetzen durch 0.0.0.0:xx 127.0.0.1:yy
+cat /var/flash/ar7.cfg | sed "/dslifaces/,/} {/ {/forward/,/}/ {/$EXCLUDE/! s/\(.*0\.0\.0\.0.*\)\(0\.0\.0\.0\)\(.*\)/\1127\.0\.0\.1\3/}}" > /var/tmp/tmpar7.cfg
+cat /var/tmp/tmpar7.cfg > /var/flash/ar7.cfg
+
+# Die "neuen" Regeln einlesen lassen, so dass sie per GUI erreichbar sind (die 0.0.0.0-er Regeln sind nicht "ansprechbar":
+killall -9 ctlmgr && sleep 1 && /usr/bin/ctlmgr
+sleep 5
+
+# ... und nun das Aendern auf 0.0.0.0 per GUI "emulieren"
+#
+TESTSTRING="127.0.0.1"
+NEUEIP="0.0.0.0"
+# Die Rules finden ...
+rules="`wget -q -O - "http://127.0.0.1/cgi-bin/webcm?getpage=..%2Fhtml%2Fde%2Fmenus%2Fmenu2.html&errorpage=..%2Fhtml%2Fde%2Fmenus%2Fmenu2.html&var%3Alang=de&var%3Apagename=portfw&var%3Amenu=internet&var%3Apagemaster=" | grep -v $EXCLUDE |grep -A 6 $TESTSTRING | grep "uiDoEdit" | sed "s/.*uiDoEdit('\(.*\)').*/\1/"`"
+
+if [ "$rules" != "" ]; then
+ # ... POST_DATA String "basteln"
+ PDATA="getpage=/usr/www/all/html/query.txt&login:command/password=$pw&id=uiPostForm&name=uiPostForm&var:pagename=portrule&var:menu=internet"
+ for myrule in `echo "$rules" | tr '\n' ' '`; do
+ PDATA="${PDATA}&var:rule=${myrule}&var:isnew=0&var:isexp=0&forwardrules:settings/${myrule}/fwip=$NEUEIP"
+ done
+ echo -n "$PDATA" | REQUEST_METHOD="POST" REMOTE_ADDR="127.0.0.1" CONTENT_TYPE="application/x-www-form-urlencoded" CONTENT_LENGTH=${#PDATA} /usr/www/html/cgi-bin/webcm > /dev/null
+fi
+# ... fertig
+EOF
+sh /var/tmp/unhiderules
+#end script
+###Fehler: no gettext support in C library
+rm make/config.cache && make
+###sane geht nicht
+dll-preload.c sollte so aussehen:
+static struct backend preloaded_backends[] = {
+{ 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}
+};
+###Faxen per linux
+Standardmäßig wird versucht, sich mit dem Host 'fritz.box' zu verbinden. IP-Adresse und Port lassen sich über Environment Variablen festlegen:
+
+export FB_REMOTE_CAPI_IP=192.168.178.1
+export FB_REMOTE_CAPI_PORT=5031
+
+Weitere Einstellungen:
+
+export FB_REMOTE_CAPI_DEBUG=X (Debug-Ausgabe. 0=nichts, 3=alles)
+export FB_REMOTE_CAPI_TCP=1 (Remote-CAPI an=1, aus=0)
+export FB_REMOTE_CAPI_DEV=1 (Device-CAPI an=1, aus=0)
+
+Mithilfe von capiinfo kann man nun prüfen, ob alles funktioniert. capiinfo befindet sich ebenfalls im libcapi20_fb Paket.
+Troubleshooting
+
+# ./capiinfo
+Number of Controllers : 0
+could not register - (0x1009)
+
+ 1.
+ Ist der Capi-over-TCP auf der Fritz!Box eingeschaltet (an: #96*3*, aus: #96*2*)?
+ 2.
+ Ist die IP-Adresse und der Port korrekt? Es wird standardmäßig versucht, sich mit fritz.box:5031 zu verbinden.
+ 3.
+ Sind die Softlinks unter /usr/lib korrekt?
+ 4.
+ ldd capiinfo eingeben und prüfen, ob libcapi20.so.3 auch auf /usr/lib/libcapi20.so.3 zeigt.
+
+Faxen mit capifax
+
+Für das Faxen unter Linux wird ein SoftDSP benötigt, da die CAPI der Fritz!Box kein T.30 Modem zur Verfügung stellt. Es sind daher folgende Libraries notwending:
+
+ *
+ libtiff-3.8.2
+ *
+ spandsp-0.0.5_pre4
+
+capifax selbst besteht aus der Anwendung 'capifax' und der Library 'libcapifax.so'. Der Hilfe-Text zu capifax sieht folgendermaßen aus:
+
+usage: capifax [OPTIONS]
+OPTIONS:
+ -send [tiff_file] [controller] [msn] [target_no]
+ -receive [path] [controller] [msn]
+ -rate [2400|4800|9600|14400]
+ -ident "+00 00 0000000"
+ -header "My Name"
+ -ecm [on|off]
+ -loglevel [0-3]
+
+Faxe versenden (Ctrl. 1, externer ISDN):
+
+capifax -send /home/maz/mytiff.tiff 1 12345 20354321
+
+Faxe empfangen (Ctrl. 4, Analog):
+
+capifax -receive /home/maz 4 12345
--- /dev/null
+###beispiel einer fstab
+/dev/disk/by-id/scsi-SATA_ST3250310AS_6RY6LCN7-part2 / xfs defaults 1 1
+/dev/disk/by-id/scsi-SATA_ST3250310AS_6RY6LCN7-part3 /home xfs defaults 1 2
+/dev/disk/by-id/scsi-SATA_ST3250310AS_6RY6LCN7-part1 swap swap defaults 0 0
+proc /proc proc defaults 0 0
+sysfs /sys sysfs noauto 0 0
+debugfs /sys/kernel/debug debugfs noauto 0 0
+usbfs /proc/bus/usb usbfs noauto 0 0
+devpts /dev/pts devpts mode=0620,gid=5 0 0
+/openSUSE/DVD/openSUSE103-1.img /openSUSE/DVD/DVD1 iso9660 ro,loop 0 0
+/openSUSE/DVD/openSUSE103-2.img /openSUSE/DVD/DVD2 iso9660 ro,loop 0 0
+#
+homeserver:/home /net/homeserver nfs rw,nosuid,nodev,hard,intr,addr=172.17.6.25 0 0
+
--- /dev/null
+###Verbindung zu Server
+ftp server
+###User angeben, wenn verbunden
+user mhoellein
+###Kommandos
+dir Anschauen des aktuellen Verzeichnisses
+cd Verzeichnis wechseln
+get eine Datei holen
+mget mehrere Dateien unter Verwendung der Jokerzeichen * und ? holen
+ascii ASCII-Modus zur Übertragung von Textdateien
+binary Binarymodus zur Übertragung ausführbarer Programme
+bye Abbau der Verbindung
+close Schließen der Verbindung zum FTP-Server. Dabei wird FTP nicht verlassen.
+delete Löschen von ferne_Datei auf dem FTP-server
+lcd Wechseln des Verzeichnisses auf dem lokalen Rechner
+mdelete Löschen von mehreren Dateien auf dem FTP-Server. Metazeichen (*, ? usw.) sind erlaubt.
+put Kopieren einer Datei des lokalen Rechners zum FTP-Server
+mput Wie Kommando put, aber mehrere Dateien können angegeben werden. Metazeichen (*, ? usw.) sind erlaubt.
--- /dev/null
+###aus Quelltextdatei eine Objektdatei erzeugen
+gcc -c source1.c
+gcc -c source2.c
+###Linken der Objektdateien zu einem ausführbaren Programm
+gcc -o program source1.o source2.o
+###
+
--- /dev/null
+###Tonwerte ausrichten
+Schritt eins in dem Drei-Punkte-Programm für frischere Bilder besteht darin, die Tonwerte neu auszurichten: Öffnen Sie Ihre Aufnahme in Gimp und duplizieren Sie im Ebenen-Reiter die Hintergrundebene. So wirken die folgenden Änderungen nur auf die oben im Ebenenstapel liegende Kopie des Hintergrunds und Sie haben immer einen Vergleich zum Original.
+
+Rufen Sie nun die Tonwerteinstellungen auf und betrachten Sie das Histogramm. Hat es links und/oder rechts keine Erhebungen oder stark abgeflachte Werte, tun Sie Folgendes: Ziehen Sie den jeweils äußeren kleinen Pfeil, der sich unterhalb des Histogramms befindet, vorsichtig so weit hinein, bis die ersten Werte ansteigen. Betrachten Sie stets das Ergebnis im Hintergrund. Sie sehen, dass sich die Farben intensivieren. Ist das Bild nun insgesamt etwas zu dunkel, verschieben Sie den mittleren Pfeil für die Gammawerte etwas nach links; dadurch hellen Sie die Mittelwerte auf.
+
+Öffnen Sie erneut den Dialog "Werte", erkennen Sie, dass das Histogramm Streifen hat - es ist zerrissen. Da Gimp mit acht Bit pro Kanal arbeitet, mussten sich die verbleibenden Tonwerte auf die gesamte ursprüngliche Strecke neu verteilen und die Bereiche dazwischen können nicht automatisch aufgefüllt werden. In der Praxis heißt das, dass Sie die beschriebene Art der Wertekorrektur bei ein und demselben Foto nicht zu oft durchführen sollten. Wenn Sie mit dem Ergebnis nicht zufrieden sind, machen Sie also besser die vorherige Korrektur mit Strg-Z rückgängig, um anschließend bei zurückgesetzten Tonwerten von vorne zu beginnen.
+###Kontrast
+Als Nächstes gilt es, die Kontraste zu erhöhen. Automatisch geht das über "Farben/Helligkeit/Kontrast". Bessere Ergebnisse erzielen Sie jedoch, wenn Sie sich manuell an den optimalen Kontrast herantasten. Stärkere Kontraste erhalten Sie, indem Sie den Unterschied zwischen dem Weiß- und den Schwarzpunkt erhöhen.Um das zu erreichen, verwenden Sie das Kurvenwerkzeug, das sich im Menü "Farben" unter dem Eintrag "Kurven" befindet. Neben den "Werten" gehört dieses Werkzeug zu den wichtigsten in der Bildbearbeitung. Im Hintergrund des Kurven-Dialogs sehen Sie zur besseren Orientierung das Histogramm abgebildet. Indem Sie mit der Maus auf die diagonal verlaufende Linie klicken, setzen Sie Ankerpunkte, mit deren Hilfe Sie die Linie biegen und damit die Tonwerte zueinander verändern können.
+
+Im rechten oberen Bereich bearbeiten Sie die hellen, in der Mitte die grauen Teile des Bildes und links unten die Schatten. Ziehen Sie die Linie hinauf, erhöhen Sie die Helligkeit, hinunter verstärken Sie die Schatten. Verformen Sie die Linie zu einer leichten S-Kurve, erhöhen Sie den Kontrast. Dabei ist es wichtig, die automatische Vorschau im Bildfenster im Blick zu behalten, um kein übertriebenes Ergebnis zu erhalten.
+
+Das Kurven-Werkzeug ist hocheffizient und komplex gleichermaßen. Gehen Sie damit sehr vorsichtig um! Schon kleinste Bewegungen wirken sich recht deutlich aus. Ist das Bild nach der Erhöhung des Kontrasts zu dunkel, setzen Sie in der Mitte der Kurve einen Anker und ziehen sie ein wenig nach oben - damit hellen Sie die Mitten auf.
+###Schärfen
+Nun kommt der letzte Schritt, das Nachschärfen. Bitte führen Sie das Schärfen grundsätzlich immer erst am Schluss durch. Stellen Sie sicher, dass Sie das Bild im Bildfenster bei einer 1:1-Ansicht sehen. Werfen Sie dazu einen Blick auf die Statusleiste und stellen Sie dort gegebenenfalls über das Drop-down-Menü den Zoom-Faktor 100 Prozent ein.Das Schärfen ist immer ein diffiziles Unterfangen: Schärft man zu schwach, bleibt das Ergebnis unscharf. Schärft man zu stark, besteht die Gefahr, dass sich unschöne Halos - also helle Lichtkränzchen an den Kanten - bilden. Es gibt zwei Tricks, mit denen Sie Ihre Aufnahmen genau richtig schärfen.
+
+Duplizieren Sie zunächst die oberste Ebene, um ein Original der ungeschärften Version zu behalten. Öffnen Sie anschließend über das Menü "Filter/Verbessern" den Dialog zum "Unscharf Maskieren". Dieser Filter schärft entlang von Kanten. Was als Kante gilt, legen Sie mit dem Regler "Schwellwert" fest. Je kleiner der Schwellwert, desto eher werden benachbarte Pixel als Kante gewertet und geschärft und umso stärker wirkt der Filter. Der Radius bestimmt den Umfang der Kontrasterhöhung entlang der Kanten. Je höher der Wert, desto stärker der Filter. Mit "Menge" bestimmten Sie die Stärke des gesamten Filters.
+
+Sein verwirrender Name hat übrigens, wie auch viele andere Funktionen der digitalen Bildbearbeitung, seinen Ursprung in der analogen Fotografie: Damals hat man ein unscharfes Negativ über das Original gelegt und anhand der Unterschiede in der Helligkeit die Kanten festgelegt. Entlang der Kanten wurden die Schatten und Lichter verstärkt und dadurch der Kontrast erhöht. Stellen Sie im "Unscharf Maskieren"-Dialog eine etwas zu starke Schärfung ein, etwa mit einem Radius von 14, einer Menge von 0,84 und dem Schwellwert 0 und kontrollieren Sie das Ergebnis im Vorschaubereich. Hier dürfen ruhig dort und da Halos auftreten. Nun stellen Sie im Reiter "Ebenen" den Modus der oberen, geschärften Ebene auf "Wert" und reduzieren ihre Deckkraft über den Schieberegler. Damit justieren Sie die Schärfe ganz exakt und bringen so die Halos zum Verschwinden. Im letzten Schritt vereinen Sie das Original und die geschärfte Ebene über das Kontextmenü der obersten Ebene. Wählen Sie dort "Nach unten vereinen".
+###Schärfen noch besser
+Diese Technik zum Schärfen lässt sich durch einen weiteren Trick noch verfeinern. Dabei schärft man nur in einem Kanal des Bildes, dem Helligkeitskanal. Sie packen damit das Übel sozusagen an der Wurzel, weil Sie genau dort schärfen, wo die Helligkeitsunterschiede am deutlichsten vorhanden sind.Üblicherweise liegt ein Bild in RGB-Farben vor - die Farben setzen sich also aus den Kanälen Rot, Grün und Blau zusammen. Die Kanäle sehen Sie in Gimp, indem Sie im rechten Dock - dort wo sich der Ebenen-Dialog befindet - auf die zweite Lasche klicken, um den Kanäle-Dialog in den Vordergrund zu rücken. Gimp bietet die Umwandlung in zahlreiche weitere Farbräume, darunter auch HSV an. Dabei steht H für Hue (Farbton), S für Saturation (Sättigung) und V für Value (Helligkeitswert).
+
+Bevor Sie beginnen, duplizieren Sie zunächst die Hintergrundebene, dadurch haben Sie später einen Vergleich mit dem Original. Die Profifotografen schärfen nur im Helligkeitskanal. Um das Bild in seine farbigen Bestandteile zu teilen, wählen Sie im Menü "Farben/Komponenten/Zerlegen" und aktivieren im folgenden Dialog die Auswahl "HSV".
+
+Gimp teilt das Bild dann in die drei Kanäle und legt automatisch eine neue Datei mit einer Graustufen-Darstellung des neuen Farbraums an. Im Ebenen-Fenster sehen Sie die einzelnen Kanäle des HSV-Models. Blenden Sie nun durch Klick auf das Auge im Ebenen-Dialog alle bis auf die Ebene "Wert" aus und stellen Sie sicher, dass sie markiert ist. Zum Schärfen dieser Ebene rufen Sie - wie oben beschrieben - den Filter "Unscharf Maskieren" auf. Wenn Sie nur im Helligkeitskanal arbeiten, können Sie es ruhig ein wenig mit dem Schärfen übertreiben; es dürfen sogar leichte Farbkränze hervortreten. Bestätigen Sie den Filter mit einem Klick auf Ok. Zum Überführen der Ebenen in die ursprüngliche Datei wählen Sie "Farben/Komponenten/Wieder zusammenfügen".Ist die Schärfung zu stark, kehren Sie zurück in die noch geöffnete HSV-Datei, machen hier den letzten Schritt mit Strg-Z rückgängig und öffnen erneut den Filter "Unscharf Maskieren". Experimentieren Sie mit dem Filter weiter und fügen Sie dann das Bild wieder zusammen. Bitte betrachten Sie das Schärfen-Ergebnis stets bei einem Zoom-Faktor von 100 bis maximal 150 Prozent, denn andere Stufen zeigen das Resultat falsch an, vor allem krumme Zoom-Stufen, wie zum Beispiel 75,95 Prozent.
+###
--- /dev/null
+###git auschecken bzw. clonene
+git clone http://gittoclone.de
+###update
+git pull
--- /dev/null
+###Karten ändern
+###Höhelinien einfügen
+gmt-f 5,25 -m HOEHE -jo gmapsupp.img Topo\ D\ SRTM/*.img
+###
+
--- /dev/null
+###Schlüssel erstellen
+gpg --gen-key
+###Mailadressen zu Schlüssel hinzufügen
+bash$ gpg --list-secret-keys
+/home/test/.gnupg/secring.gpg
+------------------------------
+sec 1024D/12C03930 2003-04-02 Test Benutzer <test@existiert.nicht>
+ssb 2048g/6A253071 2003-04-02
+asgard$ gpg --edit-key 12C03930
+Befehl> help
+Befehl> adduid
+[...]
+Befehl> save
+###Schlüssel an Key-Server schicken
+gpg --keyserver <keyserver> --send-key <Ihre_Key_ID>
+###Widerruf-Zertifikat erstellen
+gpg --output revcert.asc --gen-revoke <Ihre_Key_ID>
+###Signieren von Schlüsseln
+gpg --sign-key <Key_ID>
+gpg --default-key <zu_verwendender_Schlüssel> --sign-key <Key_ID>
+###öffentlichen Schlüssel importieren
+gpg --import public_key.txt
+###editieren eines Schlüssels
+gpg --edit-key [UID]
+###datei verschlüsseln (secret.blubb) (armor damit output ascii ist)
+gpg --recipient "Mario Höllein" --encrypt --armor secret.blubb
+###datei entschlüsseln
+gpg --recipient "Simon Hecht" --decrypt secret.blubb.gpg > secret_encrypted_gpg.blubb
+gpg --recipient "Simon Hecht" --decrypt secret.blubb.asc > secret_encrypted_asc.blubb
--- /dev/null
+###kml zu gpx, vereinfachen des tracks auf 50 Punkte
+gpsbabel -r -t -i kml -f <infile>.kml -x simplify,count=50 -o gpx -c ISO-8859-1 -F <outfile>
+###aus gpx eine Route mit Waypoints machen, als gdb
+gpsbabel -i gpx -f test.gpx -x transform,wpt=trk -o gdb -F te.gdb
+###übertragen aufs garmin
+gpsbabel -r -t -i gpx -f <infile>.gpx -o garmin -F usb:
+###
+gpsbabel -r -t -i gpx -f Tour3.gpx -x simplify,count=500 -o garmin -F usb:
+###route erzeugen, vereinfachen und dann gleich auf gps
+gpsbabel -r -t -i gpx -f Tour3.gpx -x simplify,count=250 -x transform,rte=trk -o garmin -F usb:
+###track erzeugen, vereinfachen und dann gleich aufs gps
+gpsbabel -r -t -i gpx -f Tour3.gpx -x simplify,count=250 -x transform,wpt=trk -o garmin -F usb:
+~
+~
+~
+~
+~
+~
--- /dev/null
+###nur dateien wo tofind drin ist
+grep -l tofind *
+###alles was in datei ist und in daten wird nicht mit nach neu geschrieben
+grep -v -f datei daten > neu
+###findet $DATA2 in datei in Spalte 76
+grep -E "^(\^[^^]*\^,){76}\^0*${DATA2}\^" datei
+###sucht nach Nummer 3100032 oder 3100034 in allen modscan_ama*.dat Dateine recursiv - schneller als find
+grep -RE '310003(2|4)' --include \*modscan_ama\*.dat
+###mehrere ergebnisse von grep in skript weiterverarbeiten
+IFS=$(echo -en "\n\b")
+foo=($(grep regex file.csv))
+length=`echo "${#foo[@]}"`
+length=`expr $length - 1`
+for i in `seq 0 $length`;
+do
+ ${foo[$i]}
+ #mache deine Sachen mit dem Zeuch
+done
+###
--- /dev/null
+###
+growisofs -use-the-force-luke=notray -use-the-force-luke=4gms -dvd-compat -speed=2 -use-the-force-luke=tracksize:3358607 -use-the-force-luke=tty -Z /dev/sr0=/home/mhoellein/dvd.img
+###brennt ein ISO9660 mit Joliet und Rock-Ridge Erweiterung auf DVD oder Bluray
+growisofs -Z /dev/dvd -R -J /some/files
+###anhängen von weiteren Dateien an gleiche DVD oder Bluray
+growisofs -M /dev/dvd -R -J /more/files
+###finalisieren der DVD oder Bluray
+growisofs -M /dev/dvd=/dev/zero
--- /dev/null
+###grub hintergrundbild ändern
+#bild back.jpg 800x600
+pfad="wo gearbeitet wird /home/mhoellein oder ..."
+bild="pfad incl. bild"
+mkdir -p ${pfad}/cpio
+mkdir -p ${pfad}/cpio/work
+cd ${pfad}/cpio/work
+cp /boot/message .
+cpio -idv < message
+mv message ../message-old
+cp ${bild} back.jpg
+ls | cpio -ov > ../message
+cd ..
+su
+cp message /boot/message
+exit
+rm -Rf work
+###menüeinträge ändern
+vi /boot/grub/menu.lst
+###Framebuffer Auflösungen
+Farbtiefe
+ 640x480 800x600 1024x768 1280x1024 1600x1200
+256 (8bit) 0x301 0x303 0x305 0x307 0x31C
+32000 (15bit) 0x310 0x313 0x316 0x319 0x31D
+65000 (16bit) 0x311 0x314 0x317 0x31A 0x31E
+16.7(24bit) 0x312 0x315 0x318 0x31B 0x31F
--- /dev/null
+###alles anzeigen lassen
+lshal
--- /dev/null
+###Geräte und mac adressen
+vu eth0 00:1D:EC:05:90:CF 192.168.178.25
+homeserver eth0 00:15:C5:70:A5:02 192.168.178.24
+alienware wlan0 A0:88:B4:53:D6:38 192.168.178.27
+alienware eth0 5c:26:0a:61:39:e5
+homematic eth0 00:1A:22:00:9F:DD 192.168.178.28
+cam_flur wlan0 00:E0:4C:AE:C5:4E 192.168.178.29
+cam_stube wlan0 00:12:7B:54:F3:2C 192.168.178.30
+cam_schlafzimmer eth0 00:EA:21:62:1B:16 192.168.178.41
+cam_schlafzimmer wlan0 00:EA:21:62:1B:16 192.168.178.41
+bluray eth0 50:85:69:65:65:80 192.168.178.32
+bob eth0 B8:27:EB:15:55:AB 192.168.178.62
+nexus4 wlan0 10:68:3F:4D:98:8C 192.168.178.23
+nexus5 wlan0 BC:F5:AC:F7:DB:11 192.168.178.20
+nexus7-susi wlan0 30:85:A9:DE:33:1F 192.168.178.21
+nexus7-mario wlan0 50:46:5D:7B:38:A5 192.168.178.26
+nexus10 wlan0 08:D4:2B:18:76:C2 192.168.178.22
+onkyo eth0 00:09:B0:C9:18:4E 192.168.178.33
+tv eth0 E8:5B:5B:21:43:1E 192.168.178.31
+archos wlan0
+defy wlan0
+xbmc-ug wlan0 00:e0:4c:00:21:67 192.168.178.27
+xbmc-ug eth0 B8:27:EB:C7:31:0C 192.168.178.37
+xbmc-og eth0 B8:27:EB:81:F4:7D 192.168.178.39
+xbmc-og wlan0 00:1F:1F:AC:63:EB 192.168.178.53
+switch-stube lan 2C:36:F8:4B:66:4E 192.168.178.253
+cubietruck lan 02:99:0a:82:93:e6 192.168.178.35
+cubietruck wlan0 00:90:4c:11:22:33
+vaio wlan0 00:24:2B:ED:53:0E 192.168.178.34
+vaio eth0 00:1D:BA:BB:30:97
+
+
+#Grüner Weg
+MAC:IP:Schnittstelle:DNS:TYP:SEC.ID:ORT:
+00:1A:22:05:C8:9B 192.168.178.20 eth0 ccu2 CCU2
+00:1A:22:05:FE:A9 192.168.178.21 eth0 langateway Langateway
+00:1A:22:05:FF:95 192.168.178.45 eth0 langateway2 Langateway
+00:01:C0:18:AC:CE 192.168.178.25 eth0 homeserver Mintbox2
+F4:06:8D:47:40:A5 dlan internet DLAN-Adapter Esszimmer Vitriene dLAN 500 duo
+F4:06:8D:83:DE:90 192.168.178.32 dlan Esszimmer DLAN-Adapter Sec.ID NBRO-XZEG-YTLO-QLVI überall mal
+F4:06:8D:83:DE:8C 192.168.178.35 dlan Schlafzimmer DLAN-Adapter Sec.ID MLPA-YBNF-RRDS-AZLG Schlafzimmer dLAN 500 WiFi
+F4:06:8D:7A:56:C8 192.168.178.34 dlan Marlies DLAN-Adapter Sec.ID Marlies Wohnzimmer
+F4:06:8D:83:DE:8A 192.168.178.35 dlan
+F4:06:8D:7D:4A:9C 192.168.178.30 dlan Arbeitszimmer DLAN-Adapter Sec.ID ISPZ-KHIT-YLBZ-DYQS Arbeitszimmer dLAN 500 AV Wireless+
+F4:06:8D:4C:0E:9F dlan EinliegerWohnung DLAN-Adapter Sec.ID QCNF-EWGD-UCLT-SPQL Einlieger Wohnung dLAN 500 duo
+A0:F8:95:F5:CA:34 192.168.178.50 wlan tel-Marlies Wiko Telefon
+AC:CF:23:9E:2A:4C 192.168.178.52 wlan milight Milight-Bridge Esszimmer Vitriene
+54:E4:BD:15:B3:92 192.168.178.61 wlan orbsmart-schlafzimmer Orbsmart Schlafzimmer
+ 192.168.178.55 wlan0 raspberrypi Raspberry Pi
+B8:27:EB:15:55:AB 192.168.178.62 eth0 raspberrypi Raspberry Pi
+BC:05:43:2B:06:50 192.168.178.12 Fritz.Box Esszimmer
+C8:0E:14:28:2B:C5 192.168.178.2 Fritz.Box Wohnzimmer
+CE:05:43:2B:06:55 Fritz.Box7390 2.4GHz
+CE:05:43:12:57:31 Fritz.Box7390 5.0GHz
+C8:0E:14:28:2B:C8 Fritz.Box7490 5.0GHz
+C8:0E:14:28:2B:C7 Fritz.Box7490 2.4GHz
+BC:05:43:12:57:31
+
+78:F8:82:6D:70:D9 192.168.178.11 wlan tel-mario Nexus5x überall
+78:F8:82:B7:49:EB 192.168.178.101 wlan tel-susi Nexus5x
+
+D4:40:F0:1E:6D:7F Speedport Hybrid LAN
+D4:40:F0:1E:6D:80 Speedport Hybrid WAN
+D4:40:F0:1E:6D:83 Speedport Hybrid WLAN
+
+
+
--- /dev/null
+#http://www.homematic-inside.de/
+###Telnet einschalten
+system.Exec("/usr/sbin/inetd");
+###verstecktes Analysemenü
+http://[CCU-IP]/tools/devconfig.cgi?sid=[Session-ID]
+#oder immer per Menü
+CP_DEVCONFIG=1 in /etc/config
+###
+###wiederbeleben per tftp
+dhcp.conf
+host homematic {
+ hardware ethernet 00:1a:22:xx:xx:xx;
+ fixed-address 192.168.0.11;
+ filename "linux-2.6.uImage";
+ server-name "192.168.0.10";
+ next-server 192.168.0.10;
+}
+
+inetd.conf
+tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp
+
+mkdir /tmp/cramfs
+mount -t cramfs -o loop boot_cramfs /tmp/cramfs
+
+
+Re: Firmware neu flashen?
+
+Beitragvon dirch » 27.10.2008, 15:52
+Achtung: Diese Vorgehensweise ist nicht ganz trivial und sollte daher nur von Leuten durchgefuehrt werden die genau wissen was sie tun. Im schlimmsten Falle koennt ihr die Firmware auf der Zentrale so zerstoeren dass sie zum Hersteller eingeschickt werden muss! Ich uebernehme natuerlich keine Garantie fuer das oben geschriebene bzw. fuer alle Schaeden die ihr mit Hilfe dieser Anleitung an euren Zentralen verursacht.
+
+So, auf nen standard Debian/*buntu sind folgende Pakete noetig um die CCU uebers Netz zu booten, zumindest habe ich sie hier benutzt. Die Konfiguration von anderen Daemons oder unterschiedlichen Versionen mag abweichen.
+
+
+- openbsd-inetd (0.20050402-6)
+- dhcp3-server (3.0.4-13)
+- tftpd (0.17-15)
+- nfs-kernel-server (1.0.10-6+etch.1)
+
+
+IP der Zentrale: 192.168.0.11
+IP des linux Servers: 192.168.0.10
+(alle weiteren Beschreibungen und Konfig-Auszuege beziehen sich auf diese IP Adressen. Natuerlich koennen auch andere verwendet werden!)
+
+dhcpd ist eingerichtet fuer 192.168.0.0/24
+
+Datei: /etc/dhcp3/dhcpd.conf
+
+Code: Alles auswählen
+ host homematic {
+ hardware ethernet 00:1a:22:xx:xx:xx;
+ fixed-address 192.168.0.11;
+ filename "linux-2.6.uImage";
+ server-name "192.168.0.10";
+ next-server 192.168.0.10;
+ }
+
+
+
+
+Datei: /etc/inetd.conf
+
+Code: Alles auswählen
+ tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp
+
+
+
+
+Aktuelle Firmware (z.B hm-ccu-firmware-1.300.img) entpacken. Entweder mit winrar oder in .tar.gz umbenennen.
+Das dort enthaltene boot_cramfs mounten:
+
+Code: Alles auswählen
+ mkdir /tmp/cramfs
+ mount -t cramfs -o loop boot_cramfs /tmp/cramfs
+
+
+und uImage ins TFTP verzeichnis kopieren
+
+Code: Alles auswählen
+ cp /tmp/cramfs/uImage /srv/tftp/linux-2.6.uImage
+ chmod +r /srv/tftp/linux-2.6.uImage
+
+
+Verzeichnis fuers NFS-root anlegen
+
+Code: Alles auswählen
+ mkdir /nfsroot_hss
+ tar -xzf /tmp/root_fs.tar.gz -C /nfsroot_hss
+
+
+
+Datei: /etc/exports
+
+Code: Alles auswählen
+ /nfsroot_hss 192.168.0.11(rw,sync,no_root_squash)
+
+
+Dienste neu starten:
+
+Code: Alles auswählen
+ /etc/init.d/nfs-kernel-server restart
+ /etc/init.d/inetd restart
+ /etc/init.d/dhcp3-server restart
+
+#fstab muss nur angepasst werden!
+none /proc proc defaults 0 0
+#/dev/mtdblock1 /boot cramfs defaults,noatime 0 0
+/dev/mtdblock2 / yaffs defaults,noauto,ro,noatime 0 0
+/dev/mtdblock3 /usr/local yaffs defaults,rw,noatime 0 0
+tempfs /var tmpfs defaults,size=32m 0 0
+devpts /dev/pts devpts defaults 0 0
+
+in
+
+none /proc proc defaults 0 0
+#/dev/mtdblock1 /boot cramfs defaults,noatime 0 0
+/nfsroot_hss / yaffs defaults,noauto,ro,noatime 0 0
+tempfs /var tmpfs defaults,size=32m 0 0
+devpts /dev/pts devpts defaults 0 0
+
+
+
+Bevor ihr die Box nun uebers Netz bootet solltet ihr noch die Eintraege in /nfsroot_hss/etc/fstab anschauen und korrigieren, ggf. moechtet ihr auch noch das script in /nfsroot_hss/etc/rc anpassen.
+
+Nun zum booten selber, resettet die box (ueber den kleinen reset knopf und haltet dann SOFORT alle 3 fronttasten fuer ca. 5 sekunden gedrueckt. Nun sollte die box erst einen bootp/dhcp request, dann einen TFTP request und zuletzt eine NFS Verbindung in den logs (z.b. /var/log/daemon.log) sehen:
+
+Das eigentliche aufspielen oder neu flaschen der Software ist damit noch nicht geschehen, bislang wurde die Firmware der Zentrale weder geloescht noch sonst irgendwie veraendert.
+
+Um so eine neue Software aufzuspielen solltet ihr (sofern nicht schon vorhanden) telnet ins nfsroot installieren um euch auf der box anmelden zu koennen. Ein Beispiel wie das flashen funktioniert koennt ihr euch im update_script (aus http://www.homematic.com/firmware/hm-cc ... 300.tar.gz ) anschauen.
+
+Ich hoffe das die Beschreibung irgendwem einmal hilft, mir hat es auf jeden Fall schon das Einschicken an den Hersteller erspart
+###Signalstärke aller Sender anzeigen
+#einloggen wegen der Session id, hier sid=@4W4X9HQhUS@ dann URL aufrufen
+http://ip-ccu/tools/devconfig.cgi?sid=@4W4X9HQhUS@
+#oder alternativ in /etc/config/tweaks anlegen mit
+CP_DEVCONFIG=1
+###
--- /dev/null
+var i = dom.GetObject("NAME DES GEWERKES");
+string itemID;
+foreach(itemID, i.EnumUsedIDs())
+{
+ var item = dom.GetObject(itemID);
+ if (item.IsTypeOf(OT_CHANNEL))
+ {
+ var device = dom.GetObject(item.Device());
+ if ((device.HssType().Find("HM-LC-Sw") >= 0) && (item.State())) { item.State(0); }
+ if ((device.HssType().Find("HM-LC-Dim") >= 0) && (item.State())) { item.State(0.00); }
+ }
+}
--- /dev/null
+#!/bin/bash
+# http://www.lxccu.com/manuals:manual-ccu2-backup
+# Homematic CCU Backup Script fuer crontab
+# Erstellt am 13.03.11 von Danny B.
+# Angepasst am 05.08.14 von PaulG4H
+
+# Parameter
+backupdir="/home/backup/"
+host="192.168.216.28"
+user="backup"
+password="XXXYYYZZZ"
+
+# Voraussetzung: Nutzer hinzufügen, Passwort setzen, Typ Administrator
+#
+# crontab Zeile alle 2 Stunden prüfen ob das letzte Backup älter als 2 Tage
+# ist, dann Backup; es werden max 5 Backups aufgehoben:
+# 0 0-23/2 * * * mario [ -z "$(find /home/backup/ -name homematic-ccu2\* -mtime -2)" ] && ping -q -n -c 1 -W 1 192.168.216.28 > /dev/null 2>&1 && bin/backup-ccu2.bash && find /home/backup/ -name homematic-ccu2\* | sort -r | sed -e "1,5d" | xargs -r rm -f ; true
+
+############### Es sind keine weiteren Anpassung ab hier Notwendig
+
+SCRIPTNAME=${0##*/}
+
+[ -d run ] && cd run
+
+run=$SCRIPTNAME.lastrun
+
+# Homematic Login
+wget --post-data '{"method":"Session.login","params":{"username":"'$user'","password":"'$password'"}}' http://$host/api/homematic.cgi -O hm.login.response -q >$run 2>&1
+
+# Login-Pruefung
+loginerror=`cat hm.login.response|cut -d "," -f3|awk '{print $2}'`
+if [ "$loginerror" != "null}" ]; then
+ echo "Fehler beim Homematic-Login !"|tee -a $run
+ cat hm.login.response|grep message|cut -d '"' -f4|tee -a $run
+ exit 1
+fi
+sessionid=`cat hm.login.response|cut -d "," -f2|awk '{print $2}'|cut -d '"' -f2`
+
+# Backupdatei herunterladen
+wget "http://$host/config/cp_security.cgi?sid=@$sessionid@&action=create_backup" -O $backupdir/homematic-ccu2-$host-$(date +%Y%m%d).tar.sbk -q >>$run 2>&1
+
+# Homematic Logout
+wget --post-data '{"method":"Session.logout","params":{"_session_id_":"'$sessionid'"}}' http://$host/api/homematic.cgi -O hm.logout.response -q >>$run 2>&1
+
+# temp. Dateien loeschen
+rm hm.login.response hm.logout.response >>$run 2>&1
--- /dev/null
+var myAssembly = dom.GetObject("Batterie betrieben");
+string itemID;
+string text = "";
+integer counter = 0;
+
+foreach(itemID, myAssembly.EnumUsedIDs()) {
+ var item = dom.GetObject(itemID);
+ var device =
+ dom.GetObject(item.Device());
+ var interface = dom.GetObject(item.Interface());
+
+ string interface_name = interface.Name();
+ string device_address = device.Address();
+
+ device_address = device_address.StrValueByIndex(":", 0);
+
+ string channel_name = interface_name # "." # device_address # ":0.LOWBAT";
+ var channel = dom.GetObject(channel_name);
+
+
+ if ( (channel.State() == true) && (channel.Value() == true) ) {
+ if ( counter == 0 ) {
+ text = item.Name();
+ } else {
+ text = text # ", " #
+ item.Name();
+ }
+ }
+ counter = counter + 1;
+}
+
+if ( text != "" ) {
+ string stdout;
+ string stderr;
+ var batmeldung = system.Date("%d.%m.%Y %H:%M:%S") + " - Komponenten " + text + " melden niedrigen Batteriestand!";
+ var WarnRep = dom.GetObject("WarnReport");
+ WarnRep.Variable(batmeldung); system.Exec("/etc/config/addons/email/email 03", &stdout, &stderr);
+}
--- /dev/null
+ boolean firstWindow = true;
+
+ string textReplace = "Fenster ";
+ integer textReplaceLength = textReplace.Length();
+
+ string i;
+ string list = "";
+
+ var sec=dom.GetObject("Fenster_Tueren");
+ string lastWindow = " unknown ";
+ integer numberOfOpenWindows = 0;
+ foreach(i,sec.EnumUsedIDs())
+ {
+ var item=dom.GetObject(i);
+ if(item.IsTypeOf(OT_CHANNEL))
+ {
+ var dev=dom.GetObject(item.Device());
+ if((dev.HssType()=="HM-Sec-SCo") || (dev.HssType()=="HM-Sec-SC-2"))
+ {
+ var state=item.DPByHssDP("STATE");
+ if(state.Value())
+ {
+ numberOfOpenWindows=numberOfOpenWindows+1;
+ lastWindow = i;
+ }
+ }
+ }
+ }
+
+ if (numberOfOpenWindows > 1)
+ {
+ list="Die Fenster ";
+ }
+ else
+ {
+ list="Das Fenster ";
+ }
+ sec=dom.GetObject("Fenster_Tueren");
+ foreach(i,sec.EnumUsedIDs())
+ {
+ var item=dom.GetObject(i);
+ if(item.IsTypeOf(OT_CHANNEL))
+ {
+ var dev=dom.GetObject(item.Device());
+ if((dev.HssType()=="HM-Sec-SCo") || (dev.HssType()=="HM-Sec-SC-2"))
+ {
+ var state=item.DPByHssDP("STATE");
+ if(state.Value())
+ {
+ string itemName = dev.Name().ToString();
+ ! entferne den textReplace
+ if(itemName.Length() >= textReplaceLength)
+ {
+ itemName = itemName.Substr(textReplaceLength, itemName.Length() - textReplaceLength);
+ }
+
+ if (firstWindow == false)
+ {
+ if (i == lastWindow)
+ {
+ list=list+" und ";
+ }
+ else
+ {
+ list=list+", ";
+ }
+ }
+ else
+ {
+ firstWindow = false;
+ }
+ list=list+itemName;
+ }
+ }
+ }
+ }
+
+ if (numberOfOpenWindows > 1)
+ {
+ list=list+" sind noch offen ...";
+ }
+ else
+ {
+ list=list+" ist noch offen ...";
+ }
--- /dev/null
+string itemID;
+string address;
+object aldp_obj;
+string channel;
+var x;
+
+foreach(itemID, dom.GetObject(ID_DEVICES).EnumUsedIDs()) {
+ address = dom.GetObject(itemID).Address();
+ aldp_obj = dom.GetObject("AL-" # address # ":0.UNREACH");
+ if (aldp_obj) {
+ if (aldp_obj.Value()) {
+ foreach (channel, dom.GetObject(itemID).Channels().EnumUsedIDs()) {
+ x = dom.GetObject(channel).State();
+ }
+ }
+ }
+}
--- /dev/null
+HMCompanion V0.14\r
+=================\r
+Geschrieben von Oliver Wagner <owagner@vapor.com>\r
+\r
+1. Was ist HMCompanion?\r
+-----------------------\r
+HMCompanion ist eine Middleware, welche ich gebaut habe, um mein Homematic-System via CCU besser\r
+in meine Hausautomation integrieren zu können. Es handelt sich um einen Server-Prozess, der\r
+auf der einen Seite mit der CCU kommuniziert und auf anderen Seite mittels einfacher \r
+TCP-Textkommandos ansteuerbar ist. Dies ermöglicht eine sehr einfache Integration in\r
+PHP, Bash-Scripte etc. Desweiteren arbeitet HMCompanion auch als sehr effizienter Cache\r
+für den Status aller Channel auf der CCU, so daß z.B. für Visualisierung auf diese\r
+Daten ohne Verzögerung zugegriffen werden kann.\r
+\r
+HMCompanion ist in Java geschrieben und funktioniert auf jeder Plattform mit mindestens\r
+einer Java-1.5-JRE (also NICHT direkt auf der CCU selbst)\r
+\r
+\r
+2. Grobe Struktur der CCU-Software\r
+-----------------------------------\r
+Um die Funktionsweise von HMCompanion zu verstehen, ist es sinnvoll, einen groben Überblick\r
+über die Struktur der CCU-Software zu haben.\r
+\r
+Die CCU-Software besteht aus mehreren Schichten:\r
+\r
+Auf der untersten Ebene liegen drei Daemon-Prozesse, welche die Kommunikation mit den \r
+Hardwarekomponenten vornehmen:\r
+\r
+rfd -- mit den BidCoS-Funk-Komponenten (direkt oder über HM-CFG-LAN) (Port 2001)\r
+hs485d -- mit den HomeMatic-Wired-Komponenten (Port 2000)\r
+pfmd -- mit der Hardware der CCU selbst (Port 2002)\r
+\r
+Diese Prozesse besitzen jeweils eine xmlrpc-Schnittstelle, über welche sie angesteuert werden\r
+können und über welche Ereignisse (z.B. Status-Änderungen) gemeldet werden. Auf dieser Ebene existieren\r
+Geräte und Kanäle nur als Adressen.\r
+\r
+ +--------+\r
+ | WebUI |\r
+ +--------+\r
+ | JSON-RPC\r
+ +---------+\r
+ |Webserver|\r
+ +---------+\r
+ | HMScript (und xmlrpc) \r
+ +--------+\r
+ |ReGa HSS|\r
+ +--------+\r
+ / xml | \\r
+ / rpc | \\r
++---+ +-------+ +----+\r
+|rfd| |hs485d | |pfmd|\r
++---| +-------+ +----+\r
+ | (TCP/IP)\r
++----------+\r
+|HM-CFG-LAN|\r
++----------+\r
+\r
+Über diesen Prozessen liegt die von EQ-3 als "Logikschicht" bezeichnete Ebene (ReGa, von "Residential Gateway").\r
+Diese managt die Konfiguration der Hardwarekomponenten, führt WebUI-Programme aus, handhabt die Abarbeitung \r
+von HMScript und ähnliches. Auf dieser Ebene werden auch die Namen und Bezeichnungen der Geräte verwaltet\r
+(in der "homematic.regadom"-Datenbank).\r
+\r
+Diese Logikschicht wiederum besitzt zwei Schnittstellen: Zum einen die Möglichkeit, über eine TCL-Bibliothek\r
+HMScript-Befehle auszuführen zu lassen, zum anderen ist über einen Webserver damit ein JSON-RPC-API\r
+realisiert, welches wiederum von der WebUI verwendet wird. Das WebUI wiederum ist eine browserseitige\r
+AJAX-Applikation, welche die Daten der ReGa visualisiert und die ReGa (via JSON-RPC) ansteuert. \r
+\r
+Die JSON-API-Befehle kann man mittels http://homematic-ip/api/homematic.cgi einsehen. Wer telnet-Zugang auf\r
+die CCU hat, kann den TCL-Quelltext der einzelnen über das API verfügbaren Methoden im Verzeichnis /www/api/methods\r
+einsehen. Diese lassen auch interessante Rückschlüsse auf interne HMScript- und xmlrpc-Aufrufe zu.\r
+\r
+Eine Dokumentation der XML-RPC-Schnittstelle findet sich unter http://www.homematic.com/index.php?id=156\r
+\r
+\r
+3. Kommunikation HMCompanion und CCU\r
+------------------------------------\r
+HMCompanion kommuniziert auf zwei Ebenen mit der CCU:\r
+\r
+a) Es benutzt xmlrpc, um direkt Befehle an rfd, hs485 und pfmd zu schicken.\r
+a.1) Es meldet sich mittels des xmlrpc-Befehls "init" als zusätzliche Logikschicht an den Daemonen an, um \r
+von diesen über Ereignisse informiert zu werden. Dies macht die Installation von tcpdump o.ä. auf der CCU \r
+selbst unnötig.\r
+\r
+Die xmlrpc-Kommunikation geht über die entsprechenden Schnittstellen der drei Serverdienste. Es wird das\r
+proprietäre binärkodierte Format der CCU-Komponenten verwendet.\r
+\r
+b) Es benutzt HMScript, um von der CCU eine Liste aller Geräte mit Namen zu erhalten, damit diese dann\r
+mittels GET, SET etc. per Namen angesprochen werden können. \r
+\r
+HMScript wird mittels eines HTTP POST an die URL http://<homematic>:8181/tclrega.exe ausgeführt.\r
+\r
+\r
+4. Benutzung von HMCompanion\r
+----------------------------\r
+HMCompanion wird mit folgendem Befehl gestartet:\r
+\r
+java -jar hmcompanion.jar <ip oder hostname der CCU> -server <optionaler Port, ansonsten 6770> <optionales password>\r
+\r
+HMCompanion registriert sich dann zuerst per xmlrpc-API bei den drei Daemon-Prozessen, um Events zu erhalten,\r
+fordert danach per HMScript die ReGa-Geräteliste an und wartet dann auf TCP-Verbindungen zum\r
+angegebenen Port. \r
+\r
+Zum Beispiel mittels \r
+\r
+ telnet localhost 6770\r
+ \r
+kann man sich dann mit dem HMCompanion verbinden und Befehle abschicken. Mittels "HELP" erhält man\r
+eine Auflistung aller verfügbaren Befehle. Ein Beispiel: Aktuellen Status eines Channel-Attributes abrufen:\r
+\r
+GET Wetterstation\r
+\r
+Attribut setzen:\r
+\r
+SET "Licht Kellerflur" STATE on\r
+\r
+Bei SET/GET können jeweils sowohl die BidCoS-Adressen der Channel als auch die im WebUI zugewiesene\r
+Namen verwendet werden. Bei Set/SetParam können auch Wildcards verwendet werden, z.B.\r
+\r
+SET "*Licht*" STATE on\r
+\r
+setzt alle Komponenten mit Namen, die "Licht" enthalten, auf ein. Das Auslesen von Attributen von\r
+mehreren Geräten ist mittels des Befehls "MGET" möglich.\r
+\r
+Da in den xmlrpc-Requests die Datentypen der Parameter eine Rolle spielen, rät HMCompanion anhand des\r
+Formats:\r
+\r
+ on/true, off/false -> Boolean\r
+ Integer-Zahl (nur 0-9) -> Integer\r
+ Dezimalzahl (d.h. mit Dezimalpunkt) -> Dezimalzahl\r
+ alles andere -> String\r
+ \r
+Dies bedeutet, dass man Parameter, die als Dezimalzahl erwartet werden (z.B. LEVEL), immer auch als\r
+Dezimalzahl übergeben muss, also "0.0" statt "0" und "1.0" statt "1", ansonsten wird der Request vom\r
+jeweiligen Daemon ignoriert.\r
+\r
+HMCompanion speichert den aktuellen Stand aller Channel-Attribute beim Beenden in der Datei "hmc.cache"\r
+und lädt diesen beim Start wieder. Dies dient insbesondere für Geräte, die nur alle 24h o.ä. ein Update\r
+schicken.\r
+\r
+Wird HMCompanion auf einem Server-System betrieben, macht es Sinn, die Speicherzuteilung der JavaVM\r
+mittels "-Xmx64M" auf 64MB zu beschränken:\r
+\r
+ java -Xmx64M -jar hmcompanion.jar <ip oder hostname der CCU> -server\r
+\r
+\r
+5. History\r
+----------\r
+V0.2 - erste funktionale Version\r
+\r
+V0.3 - verwendet XMLRPC-BIN auch für eingehende Requests, kein Apache ws-xmlrpc mehr nötig\r
+ - Dump-Format für strukturierte Antworten verbessert\r
+ - Serialization-Fehler beim Cache-Schreiben behoben\r
+ - Neues Kommando "CGET", um alle Attribute eines Kanals in einem für Cacti lesbarem Format\r
+ auszugeben\r
+\r
+V0.4 - SET funktioniert nun auch wieder mit reinen BidCoS-Adressen anstatt nur mit ReGa-Namen\r
+ - neuer Befehl "SETPARAM", um einen einzelnen Konfigurationsparameter via der xmlrpc-Methode\r
+ "putParamset" zu setzen. Beispiel z.B. zum Setzen eines Temperaturreglers auf Automatik:\r
+ SETPARAM GEQ00xxxxx:2 MASTER MODE_TEMPERATUR_REGULATOR 1\r
+\r
+V0.5 - SET und SETPARAM akzeptieren nun Wildcards (*) für Channelnamen. Heissen z.B. alle\r
+ Thermostat-Steuerkanäle "Thermostat <Raum> 1", kann man mit\r
+ SETPARAM "Thermostat * 1" MASTER MODE_TEMPERATUR_REGULATOR 1\r
+ alle gleichzeitig auf Modus "Auto" setzen.\r
+\r
+V0.6 - Watchdog: Wird nun mehr als 180s kein Callback empfangen, werden die init-Requests erneut\r
+ geschickt (z.B. nach einem Reboot der CCU)\r
+ - Neuer Befehl "HMSet <variable> <wert>" als Shortcut zum Setzen einer HMScript-Variable\r
+ - Neuer Befehl "HMGet <variable1> <variable2...>" als Shortcut zum Lesen einer HMScript-Variable\r
+ - Neuer Befehl "HMRun <programm1> <programm2...>" als Shortcut zum Starten von HMScript-Programmen\r
+\r
+V0.7 - Mittels "HMGet -timestamp variable" (Textform) oder "HMGet -timestampts variable" (Sekunden seit 1970)\r
+ kann nur die Last-Modification-Timestamp einer Variable abgefragt werden\r
+ - "HMSet" benutzt nun .State(v) statt .Variable(v), damit eventuelle Events auf den Systemvariablen ausgelöst werden\r
+ - Neues Kommando MGET um ein Attribut von einer Menge von Geräten abzufragen, z.B. "MGET PIR* motion". \r
+ Das Ausgabeformat ist "Gerätename:Wert"\r
+\r
+V0.8 - Hinweis auf "undokumentierte Schnittstellen" entfernt, da nun durch EQ-3 offengelegt\r
+ - Beim Beenden von HMC wird nun ein de-init an die xmlrpc-Server geschickt\r
+ - Neuer Befehl "STATS" um Statistiken über von den xmlrpc-Servern erhaltene Nachrichten im Cacti-Format zu bekommen\r
+ - QUIT hat nun eine Option "-exit", mit der HMC beendet werden kann\r
+ \r
+V0.9 - Clientverbindungen setzen nun SO_KEEPALIVE\r
+ - REQ unterstützt nun auch die Angabe von Arrays und Strukturen mit der [ Array ] bzw. { key1 value1 key2 value2 }\r
+ Notation\r
+ - GUI-Betriebsmodus zum Setzen der Interface/Roaming-Parameter (einfach ohne Parameter staten)\r
+ \r
+V0.10 - GUI-Modus: Button zum schnellen Refresh der RSSI-Informationen hinzugefügt\r
+ - GUI-Modus: Schnittstellen werden nun in der CCU-Reihenfolge angezeigt, mit dem Default-Interface zuerst\r
+ \r
+V0.11 - GUI-Modus: Buttons zum Setzen aller Devices auf Roaming Off, auf Default == Interface mit dem besten RSSI-Wert\r
+ und Roaming On für alle Fernbedienungen\r
+ \r
+V0.12 - Synchronisationsproblem beim Request-Handling konnte dazu führen, das mehrere schnell hintereinander\r
+ abgesendete "SET" (o.ä.)-Befehle zu einem Deadlock führten\r
+ - Server-Sockets werden nun alle mit SO_REUSEADDR generiert, um schnellen Neustart möglich zu machen\r
+ \r
+V0.13 - Client-Verbindungen benutzen nun unabhängig vom Systemzeichensatz immer UTF-8\r
+ \r
+V0.14 - Optionales Authentifizerungstoken für Client-Verbindungen: Wird HMC mit "homematicip -server 6770 <password>" gestartet,\r
+ werden weitere Befehle nur nach Authentifizerung mit "AUTH <password>" angenommen.\r
+ \r
+
\ No newline at end of file
--- /dev/null
+Alles im Gewerk "Gewerkename" wird abgeschaltet
+var myAssembly = dom.GetObject("Gewerkename");
+string itemID;
+foreach(itemID, myAssembly.EnumUsedIDs()) {
+ var item = dom.GetObject(itemID);
+ if (item.IsTypeOf(OT_CHANNEL)) {
+ var device = dom.GetObject(item.Device());
+ if (device.HssType() == "HM-LC-Sw1-Pl") { item.State(0); }
+ if (device.HssType() == "HM-LC-Sw1-FM") { item.State(0); }
+ if (device.HssType() == "HM-LC-Sw2-FM") { item.State(0); }
+ if (device.HssType() == "HM-LC-Sw1-PB-FM") { item.State(0); }
+ if (device.HssType() == "HM-LC-Sw2-PB-FM") { item.State(0); }
+ if (device.HssType() == "HM-LC-Dim1L-Pl") { item.State(0.00); }
+ if (device.HssType() == "HM-LC-Dim1L-CV") {item.State(0.00); }
+ }
+}
+
--- /dev/null
+string itemID;
+string address;
+object aldp_obj;
+
+foreach(itemID, dom.GetObject(ID_DEVICES).EnumUsedIDs()) {
+ address = dom.GetObject(itemID).Address();
+ aldp_obj = dom.GetObject("AL-" # address # ":0.STICKY_UNREACH");
+ if (aldp_obj) {
+ if (aldp_obj.Value()) {
+ aldp_obj.AlReceipt();
+ }
+ }
+}
--- /dev/null
+! ### Homatic-Statusanzeige HM-Dis-WM55 ####
+! ### Stausanzeige 2 , Vers. 1.0;
+! ### Anzeige der Zysternen Füllstand, Zysternen Filter stand, Außentemperatur, Status der Türen, Fenster und Lichter
+
+!! Universalprogramm zum Füllen
+!! (c) DrTob
+!! optimized by thkl
+!! changed by wortmann30
+!! Seitenzähler von Brufi
+
+!! Das Script holt sich jetzt die Seriennummer des Displays selbst aus der Auslösebedinung des Programms
+
+! Farben
+! 0x80 weiß
+! 0x81 rot
+! 0x82 orange
+! 0x83 gelb
+! 0x84 gruen
+! 0x85 blau
+
+! Symbole
+! 0x80 AUS
+! 0x81 EIN
+! 0x82 OFFEN
+! 0x83 geschlossen
+! 0x84 fehler
+! 0x85 alles ok
+! 0x86 information
+! 0x87 neue nachricht
+! 0x88 servicemeldung
+! 0x89 Signal grün
+! 0x8A Signal gelb
+! 0x8B Signal rot
+
+! Zugriff auf vordefinierte Texte
+!
+! 0x80 Text 0 (Kanal 1 Text Zeile 1)
+! 0x81 Text 1 (Kanal 1 Text Zeile 2)
+! 0x82 Text 2 (Kanal 2 Text Zeile 3)
+! 0x83 Text 3 (Kanal 2 Text Zeile 4)
+! 0x84 Text 4 (Kanal 3 Text Zeile 5)
+! 0x85 Text 5 (Kanal 3 Text Zeile 6)
+! 0x86 Text 6 (Kanal 4 Text Zeile 7)
+! 0x87 Text 7 (Kanal 4 Text Zeile 8)
+! 0x88 Text 8 (Kanal 5 Text Zeile 9)
+! 0x89 Text 9 (Kanal 5 Text Zeile 10)
+! 0x8A Text 10 (Kanal 6 Text Zeile 11)
+! 0x8B Text 11 (Kanal 6 Text Zeile 12)
+! 0x8C Text 12 (Kanal 7 Text Zeile 13)
+! 0x8D Text 13 (Kanal 7 Text Zeile 14)
+! 0x8E Text 14 (Kanal 8 Text Zeile 15)
+! 0x8F Text 15 (Kanal 8 Text Zeile 16)
+! 0x90 Text 16 (Kanal 9 Text Zeile 17)
+! 0x91 Text 17 (Kanal 9 Text Zeile 18)
+! 0x92 Text 18 (Kanal 10 Text Zeile 19)
+! 0x93 Text 19 (Kanal 10 Text Zeile 20)
+
+string zeile1 = "";
+string color1 = "0x80";
+string icon1 = "";
+
+string zeile2 = "";
+string color2 = "0x80";
+string icon2 = "";
+
+string zeile3 = "";
+string color3 = "0x80";
+string icon3 = "";
+
+string zeile4 = "";
+string color4 = "0x80";
+string icon4 = "";
+
+string zeile5 = "";
+string color5 = "0x80";
+string icon5 = "";
+
+string zeile6 = "";
+string color6 = "0x80";
+string icon6 = "";
+
+! ####### wie viele Seiten auf dem Display sollen durchlaufen werden? ###########
+
+integer seitenzahl = 4;
+
+! ###############################################################
+
+! ####################### Zähler entsprechend der Anzahl Tastendrücke verändern #################
+
+
+integer obj = dom.GetObject("seitenzaehler01"); ! ######## rausholen
+
+integer xyz = obj.State();
+
+
+if (xyz == seitenzahl) {
+ obj.Variable(1);
+}
+else {
+ xyz = xyz + 1; ! ######## incrementieren
+ obj.Variable(xyz); ! ######### reinschreiben
+}
+
+! ################################################################################################
+
+
+
+
+! --------- Anfang Ermitteln der Systemzustände und Zuweisung zu den einzelnen Zeilen -------------
+
+! ### Systemvariable seitenzaehler01 holen ###
+
+var seitenZaehler = dom.GetObject("seitenzaehler01");
+
+
+! ###################### Seite 1 ######################
+
+
+if (seitenZaehler.State()==1){
+
+
+! ### Schlafmodus an oder aus? ####
+
+var oSysvar = dom.GetObject("Schlafmodus");
+if (oSysvar.State()==1){
+
+zeile1 = "";
+color1 = "0x80";
+icon1 = "";
+zeile2 = "Schlafen:";
+color2 = "0x80";
+icon2 = "";
+zeile3 = "";
+color3="0x80";
+icon3 = "";
+zeile4 = "ange-";
+color4="0x81";
+icon4 = "";
+zeile5 = "schaltet";
+color5 = "0x81";
+icon5 = "";
+zeile6 = "";
+color6 = "0x80";
+icon6 = "";
+}
+else
+{
+
+zeile1 = "";
+color1 = "0x80";
+icon1 = "";
+zeile2 = "Schlafen:";
+color2 = "0x80";
+icon2 = "";
+zeile3 = "";
+color3="0x80";
+icon3 = "";
+zeile4 = "ausge-";
+color4 = "0x84";
+icon4 = "";
+zeile5 = "schaltet";
+color5 = "0x84";
+icon5 = "";
+zeile6 = "";
+color6 = "0x80";
+icon6 = "";
+}
+}
+! ###################### Seite 2 ######################
+
+
+if (seitenZaehler.State()==2){
+
+! ### Wecker 6 Uhr ####
+
+var oSysvar = dom.GetObject("wecker6Uhr");
+if (oSysvar.State()==2){
+
+zeile1 = "";
+color1 = "0x80";
+icon1 = "";
+zeile2 = "Wecker:";
+color2 = "0x80";
+icon2 = "";
+zeile3 = "";
+color3="0x80";
+icon3 = "";
+zeile4 = "6 Uhr";
+color4="0x85";
+icon4 = "";
+zeile5 = "einge-";
+color5 = "0x81";
+icon5 = "";
+zeile6 = "schaltet";
+color6 = "0x81";
+icon6 = "";
+}
+else
+{
+
+zeile1 = "";
+color1 = "0x80";
+icon1 = "";
+zeile2 = "Wecker:";
+color2 = "0x80";
+icon2 = "";
+zeile3 = "";
+color3="0x80";
+icon3 = "";
+zeile4 = "6 Uhr";
+color4="0x85";
+icon4 = "";
+zeile5 = "ausge-";
+color5 = "0x84";
+icon5 = "";
+zeile6 = "schaltet";
+color6 = "0x84";
+icon6 = "";
+}
+}
+
+! ###################### Seite 3 ######################
+
+
+if (seitenZaehler.State()==3){
+
+! ### Wecker 8 Uhr ####
+
+var oSysvar = dom.GetObject("wecker8Uhr");
+if (oSysvar.State()==2){
+
+zeile1 = "";
+color1 = "0x80";
+icon1 = "";
+zeile2 = "Wecker:";
+color2 = "0x80";
+icon2 = "";
+zeile3 = "";
+color3="0x80";
+icon3 = "";
+zeile4 = "8 Uhr";
+color4="0x85";
+icon4 = "";
+zeile5 = "einge-";
+color5 = "0x81";
+icon5 = "";
+zeile6 = "schaltet";
+color6 = "0x81";
+icon6 = "";
+}
+else
+{
+
+zeile1 = "";
+color1 = "0x80";
+icon1 = "";
+zeile2 = "Wecker:";
+color2 = "0x80";
+icon2 = "";
+zeile3 = "";
+color3="0x80";
+icon3 = "";
+zeile4 = "8 Uhr";
+color4="0x85";
+icon4 = "";
+zeile5 = "ausge-";
+color5 = "0x84";
+icon5 = "";
+zeile6 = "schaltet";
+color6 = "0x84";
+icon6 = "";
+}
+}
+
+! ###################### Seite 4 ######################
+
+
+if (seitenZaehler.State()==4){
+
+! ### Übersicht ####
+
+zeile1 = "Übersicht:";
+color1 = "0x80";
+icon1 = "";
+
+! #### Zeile 2 und 3 - Alle Fenster zu? Wie viele sind offen? #######
+! # Gewerk mit dem Namen Fenster wird gezählt
+
+var obj = dom.GetObject("Fenster");
+ string itemID;
+ var cntopen=0;
+ foreach(itemID, obj.EnumUsedIDs()) {
+ var item = dom.GetObject(itemID);
+ if(item.IsTypeOf(OT_CHANNEL))
+ {
+ var state=item.DPByHssDP("STATE");
+ if(state.Value()<>0)
+ {
+ cntopen=cntopen+1;
+ }
+ }
+}
+
+if (cntopen>0) {
+ zeile2 = cntopen # " Fenster";
+ color2 = "0x81";
+ icon2 = "";
+ zeile3 = "offen";
+ color3 = "0x81";
+ icon3 = "";
+}
+
+else {
+ zeile2 = "Fenster zu";
+ color2 = "0x84";
+ icon2 = "";
+}
+
+! #### Zeile 4 und 5 Temperatur/Luftfeuchte Bad
+
+
+var akttemp = dom.GetObject("BidCos-RF.XYZ1234567:1.TEMPERATURE").Value();
+akttemp = akttemp.ToString(1);
+
+zeile4 = "Bad:";
+ color4 = "0x80";
+ icon4 = "";
+ zeile5 = ""#akttemp#" C";
+ color5 = "0x80";
+ icon5 = "";
+
+
+! #### Zeile 6 Luftfeuchte
+
+var channel=dom.GetObject("Wetter_Temperatur");
+var temp = channel.Value();
+if (temp > -10.0)
+{ temp = temp.ToString(1);
+ zeile6 = "Außen: "#temp#" C";
+ color6 = "0x80";
+}
+else
+{ temp = temp.ToString(1);
+ zeile6 = "Außen: "#temp#" C";
+}
+color6 = "0x80";
+icon6 = "";
+
+
+
+
+
+}
+
+! ###################### Seite 5 ######################
+
+
+
+if (seitenZaehler.State()==5){
+
+
+! ### Platz für weiere Seiten...
+
+
+}
+
+
+
+! --------- Ende Ermitteln der Systemzustände und Zuweisung zu den einzelnen Zeilen -------------
+
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! System Routine do not change anything below !
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+string splitter="|";
+string msgBuffer = zeile1 # splitter # color1 # splitter # icon1 # "\t";
+msgBuffer = msgBuffer # zeile2 # splitter # color2 # splitter # icon2 # "\t";
+msgBuffer = msgBuffer # zeile3 # splitter # color3 # splitter # icon3 # "\t";
+msgBuffer = msgBuffer # zeile4 # splitter # color4 # splitter # icon4 # "\t";
+msgBuffer = msgBuffer # zeile5 # splitter # color5 # splitter # icon5 # "\t";
+msgBuffer = msgBuffer # zeile6 # splitter # color6 # splitter # icon6;
+
+string substitutions = "A,0x41\tB,0x42\tC,0x43\tD,0x44\tE,0x45\tF,0x46\tG,0x47\tH,0x48\tI,0x49\tJ,0x4A\tK,0x4B\tL,0x4C\tM,0x4D\tN,0x4E\tO,0x4F\tP,0x50\tQ,0x51\tR,0x52\tS,0x53\tT,0x54\tU,0x55\tV,0x56\tW,0x57\tX,0x58\tY,0x59\tZ,0x5A";
+substitutions = substitutions # "\ta,0x61\tb,0x62\tc,0x63\td,0x64\te,0x65\tf,0x66\tg,0x67\th,0x68\ti,0x69\tj,0x6A\tk,0x6B\tl,0x6C\tm,0x6D\tn,0x6E\to,0x6F\tp,0x70\tq,0x71\tr,0x72\ts,0x73\tt,0x74\tu,0x75\tv,0x76\tw,0x77\tx,0x78\ty,0x79\tz,0x7A";
+substitutions = substitutions # "\t0,0x30\t1,0x31\t2,0x32\t3,0x33\t4,0x34\t5,0x35\t6,0x36\t7,0x37\t8,0x38\t9,0x39\t ,0x20\t!,0x21\t\",0x22\t%,0x25\t&,0x26\t=,0x27\t(,0x28\t),0x29\t*,0x2A\t+,0x2B\t,,0x2C\t-,0x2D\t.,0x2E\t/,0x2F";
+substitutions = substitutions # "\tÄ,0x5B\tÖ,0x23\tÜ,0x24\tä,0x7B\tö,0x7C\tü,0x7D\tß,0x5F\t:,0x3A\t;,0x3B\t@,0x40\t>,0x3E";
+
+string bufferLine;
+string substEntry;
+integer i;
+string char;
+string line;
+string icon;
+
+string command = "0x02";
+foreach(bufferLine, msgBuffer) {
+ line = bufferLine.StrValueByIndex(splitter, 0);
+ icon = bufferLine.StrValueByIndex(splitter, 2);
+ if ((line <> "") || (icon <> "")) {
+ command = command # ",0x12";
+ if ((line.Substr(0,2) == "0x") && (line.Length() == 4)) {
+ command = command # "," # line;
+ i = 12;
+ }
+ else {
+ i = 0;
+ }
+ while ((i < line.Length()) && (i < 12)) {
+ char = line.Substr(i, 1);
+ foreach(substEntry, substitutions){
+ if (char == substEntry.Substr(0,1)){command = command # substEntry.Substr(1,5);}
+ }
+ i = i + 1;
+ }
+ command = command # ",0x11," # bufferLine.StrValueByIndex(splitter, 1);
+ if (icon <> "") {
+ command = command # ",0x13," # icon;
+ }
+ }
+ command = command # ",0x0A";
+}
+command = command # ",0x03";
+
+dom.GetObject("BidCos-RF." # dom.GetObject("$src$").Name().StrValueByIndex(".",1) # ".SUBMIT").State(command);
+
+! ##### FERTIG #####
--- /dev/null
+Name;Serial
+Leistungsmesser;KEQ0967529
+Außentermometer;IEQ0404373
+G;LEQ1281842
+Bewegungsmelder;IEQ0403020
+Bewegungsmelder;IEQ0403115
+;MEQ0723481
+;MEQ0723536
+;MEQ1511239
+
+Serial;
+IEQ0022180;Rauchmelder
+IEQ0073222;Zwischenstecker Schaltaktor Schwibbogen Esszimmer
+IEQ0204812;mag. Fenstersensor Kellertür
+IEQ0379540;Zwischenstecker Schaltaktor Schwibbogen 1
+IEQ0402876;Bewegungsmelder Susi Esszimmer
+IEQ0403020;Bewegungsmelder Keller
+IEQ0403115;Bewegungsmelder Flur Keller
+IEQ0404373;Temperatursensor Außen
+JEQ0036584;Schwibbogen Wohnzimmer Zwischenstecker
+JEQ0036838;Lampe Esszimmer Zwischenstecker
+JEQ0055766;Schwibbogen Küche Susi Zwischenstecker
+KEQ0967529;Leistungsmesser Zwischenstecker
+KEQ1063946;Keymatic
+KEQ1064575;
+LEQ1281842;Außenbewegungsmelder
+MEQ0179649;Statusdisplay Haustür
+MEQ0179654;Statusdisplay 2
+MEQ0593287
+MEQ0593353
+MEQ0593392
+MEQ0720337;opt. Fenstersensor Fenster Treppenhaus
+MEQ0720388;opt. Fenstersensor Fenster Küche Susi Seite
+MEQ0720393
+MEQ0720576;opt. Fenstersensor Terrassentür Marlies
+MEQ0720579
+MEQ0720862;opt. Fenstersensor Susi Küche hinten
+MEQ0723481;opt. Fenstersensor Terrassentür Esszimmer
+MEQ0723536
+MEQ0723538
+MEQ0723615
+MEQ0753178;opt. Fenstersensor Küche Marlies
+MEQ0753190;opt. Fenstersensor Fenster Wohnzimmer Terrasse Marlies
+MEQ0753191
+MEQ0753192
+MEQ0755999;Schaltaktor Unterputz einfach Ambilight
+MEQ1511239;Hutschienenaktor Hauslicht
+
+MEQ0460679;RF-LAN Gateway Wohnung
+MEQ0461000;RF-LAN Gateway Marlies
+MEQ0461672;CCU2
--- /dev/null
+###hostapd konfiguration testen
+hostapd -dd /etc/hostapd/hostapd.conf
+###
+
--- /dev/null
+# Nur fuer den Bridge-Betrieb, fuer AP auskommentieren
+bridge=br0
+
+# Schnittstelle und Treiber
+interface=wlan0
+driver=iwl4965
+
+# WLAN-Konfiguration
+ssid=RaspberryAPi
+channel=1
+
+# ESSID sichtbar
+ignore_broadcast_ssid=0
+
+# Ländereinstellungen
+country_code=DE
+ieee80211d=1
+
+# Übertragungsmodus
+hw_mode=g
+
+# Optionale Einstellungen
+# supported_rates=10 20 55 110 60 90 120 180 240 360 480 540
+
+# Draft-N Modus aktivieren / optional nur für entsprechende Karten
+ieee80211n=1
+
+# wmm-Funktionalität (fuer draft-n)
+wmm_enabled=1
+
+# Übertragungsmodus / Bandbreite 40MHz / siehe iw list
+# ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40]
+
+# Beacons
+beacon_int=100
+dtim_period=2
+
+# MAC-Authentifizierung
+macaddr_acl=0
+
+# max. Anzahl der Clients
+max_num_sta=20
+# Größe der Datenpakete/Begrenzung
+rts_threshold=2347
+fragm_threshold=2346
+
+# hostapd Log Einstellungen
+logger_syslog=-1
+logger_syslog_level=2
+logger_stdout=-1
+logger_stdout_level=2
+
+# temporäre Konfigurationsdateien
+dump_file=/tmp/hostapd.dump
+ctrl_interface=/var/run/hostapd
+ctrl_interface_group=0
+
+# Authentifizierungsoptionen
+auth_algs=3
+
+# Verschlüsselung / hier rein WPA2
+wpa=2
+rsn_preauth=1
+rsn_preauth_interfaces=wlan0
+wpa_key_mgmt=WPA-PSK
+rsn_pairwise=CCMP
+
+# Schlüsselintervalle / Standardkonfiguration
+wpa_group_rekey=600
+wpa_ptk_rekey=600
+wpa_gmk_rekey=86400
+
+# Zugangsschlüssel (PSK) / hier in Klartext (ASCII)
+wpa_passphrase=SicheresWLANpa$$w0r7!!
--- /dev/null
+#!/bin/bash
+## Instant WLAN Access-Point
+## elektronenblitz63 ubuntuusers.de 2012
+## published under GPL v3
+##
+## Version 1.6.0 vom 31.Januar 2012
+# Bridged-Modus möglich
+# kleinere Fehler beseitigt
+# Ausgaben verbessert
+#
+## Version 1.5.2 vom 12.November 2011
+# voreingestellte freie DNS geändert
+# Restart des Network-Managers erst bei -stop
+# entferne iptables-Filter bei -stop
+##
+## Beispielkonfiguration der dnsmasq.conf
+##
+# # DHCP-Server dnsmasq aktiv für Interface
+#
+# interface=wlan0
+
+## DHCP-Server dnsmasq nicht aktiv für Interface
+#
+# no-dhcp-interface=eth0
+
+# # IP-Adressbereich / Lease-Time
+# dhcp-range=192.168.3.20,192.168.3.25,infinite
+#
+## Ende Beispielkonfiguration dnsmasq.conf
+
+## freie Variablen
+
+## Konfiguration der Ethernet-Schnittstelle
+## LAN statisch (Standard ist automatisch über DHCP) / Startoption [-f]
+laniface=eth0
+laddress=192.168.178.6
+lbroadcast=192.168.178.255
+lnetmask=255.255.255.0
+lgateway=192.168.178.1
+lmacaddress=00:12:79:c0:49:ae
+#
+## Konfiguration der WLAN-Schnittstelle
+## WLAN statisch
+wlaniface=wlan0
+waddress=192.168.3.1
+wbroadcast=192.168.3.255
+wnetmask=255.255.255.0
+iptablemask=192.168.0.0/24
+
+### manuelle DNS (drei DNS Einträge, 1xDomain und 1xSearch sind möglich)
+# Beispiel
+# dns="nameserver 192.168.178.1 nameserver 192.168.178.1 nameserver 192.168.178.1 domain fritz.box search fritz.box"
+dns="nameserver 8.8.4.4 nameserver 8.8.8.8 nameserver 213.73.91.35"
+
+## dnsmasq-base Konfiguration
+# DHCP-Adresspool umfasst x-Adressen
+ipaddresses=10
+
+# Basisadresse DHCP-Adresspool (WLAN-IP + X)
+wlanbaseip=1
+
+# Lease-Time
+leasetime=infinite
+
+## MAC-Adresse (optional) (Startoption [-m])
+lmacaddress=00:12:79:c0:49:ae
+
+## Pause vor LAN-Verbindungstest
+pause=4
+
+## Proxyserver (squid)
+proxy="squid"
+
+## Proxy Server auf Port x (squid 3128 / tinyproxy 3128 / polipo 8123)
+proxyport=3128
+
+## Bridge-Konfiguration
+## vor Ubuntu 11.x - /usr/sbin/brctl
+## ab Ubuntu 11.x - /sbin/brctl
+br_util=/sbin/brctl
+bridge0=br0
+brdelay=5
+brstp=0
+
+## Steuerung Dienste
+## alt
+# hostapdrestart="/etc/init.d/hostapd"
+## neu
+hostapdservice="service hostapd"
+
+## Ende freie Variablen
+##
+# Skript
+#
+pingout=""
+
+## aut. Adressberechnung DHCP-Range für dnsmasq
+## gemäß Vorgabe WLAN-Schnittstelle
+ipaddresses=$[$ipaddresses+$wlanbaseip]
+ baseendaddr="`echo $waddress | tr -s . " " | awk {'print $4'}`"
+ basestartaddr="`echo $waddress | tr -s . " " | awk {'print $1,$2,$3'} | tr -s " " .`"
+ endaddr="$basestartaddr""."$[$startaddr+$ipaddresses]
+ startaddr="$basestartaddr""."$[$baseendaddr+$wlanbaseip]
+
+pingout=""
+A=1
+B=0
+D=0
+P=0
+Br=0
+
+if [ "$1" = "-h" ]; then
+echo Verwendung: instant_AP.sh [-start] [-restart] [-stop] [-D] [-d] [-f] [-m] [-h] [-B]
+echo Syntax:
+echo "sudo ./instant_AP.sh wie [-d] startet mit Standardparametern (DHCP)"
+echo "sudo ./instant_AP.sh -f statische LAN-Konfiguration"
+echo "sudo ./instant_AP.sh -f -m statische LAN-Konfiguration, MAC-Änderung"
+echo "sudo ./instant_AP.sh -D verwendet dnsmasq.conf und nicht dnsmasq-base"
+echo "sudo ./instant_AP.sh -start -f statische LAN-Konfiguration"
+echo "sudo ./instant_AP.sh -restart -f statische LAN-Konfiguration"
+echo "sudo ./instant_AP.sh -B Bridged-Modus ohne DHCP-Server. Dynamische und Statische Schnittstellenparameter werden ignoriert"
+echo "sudo ./instant_AP.sh -stop beendet den AP"
+echo "Ende"
+ exit
+fi
+
+while getopts ":DdfmhPB" OPTION ; do
+ case $OPTION in
+ D) echo "vewende dnsmasq.conf und nicht dnsmasq-base"; D=1;;
+ d) echo "konfiguriere LAN über DHCP"; A=1;;
+ f) echo "konfiguriere LAN statisch"; A=2;;
+ m) echo "MAC-Change LAN ein"; B=1;;
+ P) echo "Portumleitung für Proxy-Server Port" $proxyport "aktiviert"; P=1;;
+ B) echo "Bridge-Modus aktiviert"; Br=1;;
+ esac
+ done
+
+echo "starte gewählte Konfiguration ..."
+ sleep 2
+
+if [ "$Br" = "1" ]; then A=3
+ echo "Bridge-Mode aktiviert - Sonstige Parameter für Schnittstelleneinstellungen werden ignoriert"
+ fi
+
+if [ "$1" != "-start" ]; then
+ echo "stoppe alle Dienste, und Verbindungen, lösche Itables-Filter ..."
+
+# Konfiguration löschen
+/sbin/iptables -F
+ /sbin/iptables -X
+ /sbin/iptables -t nat -F
+
+defgw="`route -n | grep UG | awk {'print $2'}`"
+ /sbin/route del default gw $defgw $laniface
+ echo '' | tee /etc/resolv.conf
+
+$hostapdservice stop
+ /sbin/ifconfig $wlaniface down
+ sleep 1
+ /sbin/iwconfig $wlaniface mode managed
+ sleep 1
+ /sbin/ifconfig $laniface down
+ sleep 1
+ /usr/bin/killall dnsmasq
+ /sbin/sysctl -w net.ipv4.ip_forward=0
+ /sbin/modprobe -rfv iptable_nat ipt_MASQUERADE xt_conntrack iptable_filter
+
+## Bridge löschen
+/sbin/ifconfig $bridge0 down
+ sleep 1
+ $br_util delif $bridge0 $laniface
+ $br_util delif $bridge0 $wlaniface
+ $br_util delbr $bridge0
+
+if [ "$1" = "-stop" ]; then
+ echo
+ echo "reaktiviere Network-Manager."
+ service network-manager start
+ service network-manager restart
+echo "WLAN Access-Point Konfiguration beendet."
+ exit
+ fi
+ fi
+
+## MAC-Adresse abgleichen
+if [ "$B" = "1" ]; then
+ currentmac="`ifconfig $laniface | grep Adresse | awk {'print $6'}`"
+ echo Schnittstelle $laniface, MAC-Adresse: $currentmac
+ echo Vorgabe: $lmacaddress
+
+ if [ "$currentmac" = "$lmacaddress" ]; then
+ echo Übereinstimmende MAC-Adresse
+else
+ /sbin/ifconfig $laniface down
+ /sbin/ip link set dev $laniface addr $lmacaddress
+
+currentmac="`ifconfig $laniface | grep Adresse | awk {'print $6'}`"
+ echo versuche MAC-Adresse zu ändern ...
+ echo Schnittstelle $laniface, MAC-Adresse: $currentmac
+
+if [ "$currentmac" = "$lmacaddress" ]; then
+ echo Änderung der MAC-Adresse erfolgreich!
+ else
+ echo Änderung der MAC-Adresse nicht erfolgreich!
+echo fahre fort ...
+fi
+ fi
+ fi
+
+# Grundkonfiguration
+echo beende Network-Manager
+ service network-manager stop
+ echo "starte alle Dienste, und Verbindungen ..."
+
+# LAN aut.m über DHCP nur wenn kein Bridged-Mode gewählt
+if [ "$Br" = "0" ] & [ "$A" = "1" ]; then
+ echo "starte automatische LAN-Verbindung ..."
+ /sbin/dhclient $laniface
+fi
+
+# LAN statisch nur wenn kein Bridged-Mode gewählt
+if [ "$Br" = "0" ] & [ "$A" = "2" ]; then
+ echo "starte statische LAN-konfiguration ..."
+ /sbin/ifconfig $laniface down
+ sleep 2
+ /sbin/ifconfig $laniface $laddress broadcast $lbroadcast netmask $lnetmask
+ sleep 2
+ echo
+
+echo setze Gateway und Route ...
+ /sbin/route add default gw $lgateway $laniface
+ sleep 1
+ echo
+
+echo setze DNS
+echo '# erzeugt durch instant_AdHoc.sh' | tee /etc/resolv.conf
+ echo $dns | awk {'print $1,$2'} | tee -a /etc/resolv.conf
+ echo $dns | awk {'print $3,$4'} | tee -a /etc/resolv.conf
+ echo $dns | awk {'print $5,$6'} | tee -a /etc/resolv.conf
+ echo $dns | awk {'print $7,$8'} | tee -a /etc/resolv.conf
+ echo $dns | awk {'print $9,$10'} | tee -a /etc/resolv.conf
+ fi
+ sleep $pause
+
+## Vorbereitung Bridge
+if [ "$Br" = "1" ]; then
+
+## vorhandene Schnittstellenkonfiguration löschen
+/sbin/ifconfig $wlaniface down
+ sleep 1
+ /sbin/ifconfig $wlaniface up
+ sleep 1
+ /sbin/ifconfig $wlaniface 0.0.0.0
+ sleep 1
+ /sbin/ifconfig $laniface down
+ sleep 1
+ /sbin/ifconfig $laniface up
+ sleep 1
+
+## Bridge anlegen
+ $br_util addbr $bridge0
+ $br_util addif $bridge0 $laniface
+ $br_util stp $bridge0 $brstp
+ $br_util setfd $bridge0 $brdelay
+ sleep 2
+
+## Dienste steuern
+service dnsmasq stop
+ echo "fordere IP-Adresse für Bridge an ..."
+ /sbin/dhclient $bridge0
+ $hostapdservice restart
+ $br_util addif $bridge0 $wlaniface
+else
+
+## ohne Bridge-Mode
+## WLAN-Schnittstelle statisch konfigurieren
+echo "WLAN-Schnittstelle initialisieren ..."
+ /sbin/ifconfig $laniface up
+ sleep 1
+ /sbin/ifconfig $wlaniface $waddress broadcast $wbroadcast netmask $wnetmask
+ $hostapdservice restart
+ echo
+echo "starte IP-Forward, Masquerading und NAT"
+/sbin/iptables -A FORWARD -o $laniface -i $wlaniface -s $iptablemask -m conntrack --ctstate NEW -j ACCEPT
+ /sbin/iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
+ /sbin/iptables -t nat -A POSTROUTING -o $laniface -j MASQUERADE
+ /sbin/sysctl -w net.ipv4.ip_forward=1
+fi
+
+## dnsmasq-base starten
+echo
+ echo starte dnsmasq-base
+if [ "$D" = "0" ]; then
+ echo DHCP-Range dnsmasq-base - Startadresse: $startaddr Endadresse: $endaddr
+ /usr/sbin/dnsmasq -i $wlaniface -I $laniface -F $startaddr,$endaddr,$leasetime
+ echo
+else
+
+## dnsmasq neu starten
+echo "verwende dnsmasq.conf"
+ /etc/init.d/dnsmasq restart
+ echo fertig ...
+fi
+
+## Portumleitung für Squid Proxyserver
+if [ "$P" = "1" ]; then
+ /sbin/iptables -t nat -A PREROUTING -i $wlaniface -p tcp --dport 80 -j REDIRECT --to-port $proxyport
+
+## optional Port 443 HTTPS
+# /sbin/iptables -t nat -A PREROUTING -i $wlaniface -p tcp --dport 443 -j REDIRECT --to-port $proxyport
+
+ echo "Port 80 (HTTP) " $wlaniface "auf Port $proxyport umgeleitet ("$proxy "Proxyserver)"
+ echo "Starte" $proxy "Proxyserver ..."
+ sleep 2
+
+if [ "$proxy" != "squid" ]; then
+ /etc/init.d/$proxy restart
+ else
+ service squid start -n
+ fi
+fi
+
+## Ausgabe der aktuellen Konfiguration
+ echo "DNS-Konfiguration"
+ cat /etc/resolv.conf
+ echo
+ /sbin/route -n
+ echo
+
+if [ "$Br" = "1" ]; then
+ echo "Konfiguration Bridge:"
+ $br_util show
+ echo
+ /sbin/ifconfig $bridge0 | egrep 'Link|inet Adresse'
+ echo
+fi
+ echo "Konfiguration LAN:"
+ /sbin/ifconfig $laniface | egrep 'Link|inet Adresse'
+ echo
+ echo "Konfiguration WLAN:"
+ /sbin/ifconfig $wlaniface | egrep 'Link|inet Adresse'
+ echo
+ /sbin/iwconfig $wlaniface | egrep 'IEEE|Power|Mode'
+ echo
+ /sbin/iwconfig mon.$wlaniface
+
+exit 0
+
--- /dev/null
+###font cache vergrößern / Increase font cache
+To increase the font cache, speeding up font rendering at the cost of a bit of memory:
+HKLM\SYSTEM\GDI\GLYPHCACHE\limit = 16384 (DWORD decimal)
+To change it back to the default:
+HKLM\SYSTEM\GDI\GLYPHCACHE\limit = 8192 (DWORD decimal)
+You can set the value to pretty much anything you like
+###filesystem cache / Enable FileSystem cache
+To enable the FileSystem cache, speeding up overall performance at the risk of the cache not being written on a sudden reset:
+HKLM\System\StorageManager\FATFS\EnableCache = 1 (DWORD decimal)
+To disable again:
+HKLM\System\StorageManager\FATFS\EnableCache = 0 (DWORD decimal)
+Note that by default, the cache size is zero, and you will see no effect. See "Increase FileSystem cache" to incease the cache size
+Increase FileSystem cache
+To increase the file system cache:
+HKLM\System\StorageManager\FATFS\CacheSize = 4096 (DWORD decimal)
+To return the file system cache to zero:
+HKLM\System\StorageManager\FATFS\CacheSize = 0 (DWORD decimal)
+You can set the value to pretty much anything you like
+###filesystem filter cache / Increase FileSystem filter cache
+To enable the file system filter cache, speeding up overall performance with file mangement:
+HKLM\System\StorageManager\Filters\fsreplxfilt\Rep lStoreCacheSize = 4096 (DWORD decimal)
+To return the file system filter cache to zero:
+HKLM\System\StorageManager\Filters\fsreplxfilt\Rep lStoreCacheSize = 0 (DWORD decimal)
+You can set the value to pretty much anything you like
+###Kameramodien hinzufügen
+###Burst
+Mobile Device\HKEY_LOCAL_MACHINE\Software\HTC\Camera\P6
+set "Enable" on "1"
+###Sports
+Mobile Device\HKEY_LOCAL_MACHINE\Software\HTC\Camera\P8
+set "Enable" on "1"
+###Video Share
+Mobile Device\HKEY_LOCAL_MACHINE\Software\HTC\Camera\P9
+set "Enable" on "1"
+###GPS Photo
+Mobile Device\HKEY_LOCAL_MACHINE\Software\HTC\Camera\P10
+set "Enable" on "1"
+###vier spalten in Programme und Settings
+HKLM\Software\Microsoft\Shell\IconConfig\HorizontalIconSpacing = 112 (DWORD Decimal)
+HKLM\Software\Microsoft\Shell\IconConfig\VerticalIconSpacing = 115 (DWORD Decimal)
+HKLM\Software\Microsoft\Shell\IconConfig\IconTitleFontSize = 6 (DWORD Decimal)
+###hardreset / hard reset
+VOLUME UP und VOLUME DOWN drücken und power -> VOLUME UP und VOLUME DOWN gedrückt halten -> DISPLAY HR -> VU+VD loslassen, VU drücken -> HR
+###Alben in TouchFlow
+Verzeichnis mit Musik einfach auf Speicherkarte
+Bild mit in dem Verzeichnis als folder.jpg speichern (max. größe 1024x768)
--- /dev/null
+###Vesa Modien der Graka rausfinden
+hwinfo --framebuffer
--- /dev/null
+###Einrichtung fritz.box hinter hybrid so das es funktionieren sollte
+http://blog.qyz.de/index.php?/archives/1-FRITZ!Box-hinter-Speedport-Hybrid-fuer-Telefonie-Telekom-ALL-IP-nutzen.html
+###algemeine infos
+https://telekomhilft.telekom.de/t5/Telefonie-Internet/Fritzbox-hinter-dem-SP-Hybrid-Erfahrungen/td-p/1307741/page/216
--- /dev/null
+DL 020 D = 74 LS 20 = Dual 4-Input NAND Gate
+DL 030 D = 74 LS 30 = 8-Input NAND Gate
+DL 257 D = 74 LS 257 = 3-STATE Quad 2-Data Selectors/Multiplexers
+
+
+
+Schieberegister 74xx595, 74xx165
--- /dev/null
+###Fahrplätze
+bei der Autobahn, bei Röhrsdorf in Richtung Hof
+
+###ersatzteile
+Ersatzteile sind die gleichen wie beim Rex-X (außer Querlenker)
+###sprit
+Ich bleibe bei 16% Reicht vollkommen. Alles höhere belastet nur unnötig den Motor
+###Kerzen
+Du benötigst eine Kerze mit kurzem Gewinde
+###Leerlaufgemisch einstellen
+Die Leerlaufgemisch-Schraube befindet sich unter der Stange, welche Vergaser mir Servo verbindet.
+###Wasserdichtigkeit der Servos und Empfänger
+"Wet Protect" von Graupner einsprühen
+###
+Lager für die Kupplung: 8x5x2,5 -> 4 Stück ohne Flansch oder 2 mit Flansch
+###
--- /dev/null
+###Befehle Versenden mittels Weboberfläche geht nicht
+service icinga stop
+dpkg-statoverride --update --add nagios nagios 751 /var/lib/icinga/
+dpkg-statoverride --update --add nagios www-data 2710 /var/lib/icinga/rw/
+service icinga start
+### DISK CRITICAL - /home/name/.gvfs is not accessible beheben
+#in /etc/nagios-plugins/config/disk.cfg folgendes bei check_disk und check_all_disks hinzufügen
+-A -i '.gvfs'
+# 'check_disk' command definition
+define command{
+ command_name check_disk
+ command_line /usr/lib/nagios/plugins/check_disk -w '$ARG1$' -c '$ARG2$' -p '$ARG3$' -A -i '.gvfs'
+ }
--- /dev/null
+###ICMP Typen
+Typ | Mitteilung | Familie | RFC
+----+-------------------------+-----------------+-----
+ 0 | Echo Reply | Query (Reply) | 792
+ 3 | Destination unreachable | Error | 1122
+ 4 | Source Quench | Error | 792
+ 5 | Redirect | Error | 792
+ 8 | Echo Request | Query (Request) | 792
+ 9 | Router Advertisement | Query (Reply) | 1256
+ 10 | Router Soliciation | Query (Request) | 1256
+ 11 | Timer Exceeded | Error | 1122
+ 12 | Parameter Problem | Error | 792
+ 13 | Timestamp Request | Query (Request) | 792
+ 14 | Timestamp Reply | Query (Reply) | 792
+ 17 | Address Mask Request | Query (Request) | 950
+ 18 | Address Mask Reply | Query (Reply) | 950
+###Message Code
+Code | Bedeutung
+-----+-----------------------
+ 0 | Network Unreachable
+ 1 | Host Unreachable
+ 2 | Protocol Unreachable
+ 3 | Port Unreachable
+ 4 | Fragmentation required but DF Bit is Set
+ 5 | Source Route Failed
+ 6 | Destination Network Unknown
+ 7 | Destination Host Unknown
+ 8 | Source Host Isolated (obsolete)
+ 9 | Destination Network Administratively Prohibited (obsolete)
+ 10 | Destination Host Administratively Prohibited (obsolete)
+ 11 | Destination Network Unreachable for Type-of-Service
+ 12 | Destination Host Unreachable for Type-of-Service
+ 13 | Communication Administratively Pohibited
+ 14 | Host Precedence Violation
+ 15 | Precedence Cutoff in Effect
+###ping ipv6 mtu=1336 keine Fragmentierung erlauben 4 pings
+ping6 -M do -s 1336 -c 4 www.t-online.de
+
--- /dev/null
+###imap Sitzung
+S: * OK IMAP4rev1 Service Ready
+C: a001 login mrc secret
+S: a001 OK LOGIN completed
+C: a002 select inbox
+S: * 18 EXISTS
+S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
+S: * 2 RECENT
+S: * OK [UNSEEN 17] Message 17 is the first unseen message
+S: * OK [UIDVALIDITY 3857529045] UIDs valid
+S: a002 OK [READ-WRITE] SELECT completed
+C: a003 fetch 12 full
+S: * 12 FETCH (FLAGS (\Seen) INTERNALDATE "17-Jul-1996 02:44:25 -0700"
+ RFC822.SIZE 4286 ENVELOPE ("Wed, 17 Jul 1996 02:23:25 -0700 (PDT)"
+ "IMAP4rev1 WG mtg summary and minutes"
+ (("Terry Gray" NIL "gray" "cac.washington.edu"))
+ (("Terry Gray" NIL "gray" "cac.washington.edu"))
+ (("Terry Gray" NIL "gray" "cac.washington.edu"))
+ ((NIL NIL "imap" "cac.washington.edu"))
+ ((NIL NIL "minutes" "CNRI.Reston.VA.US")
+ ("John Klensin" NIL "KLENSIN" "MIT.EDU")) NIL NIL
+ "<B27397-0100000@cac.washington.edu>")
+ BODY ("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 3028
+ 92))
+S: a003 OK FETCH completed
+C: a004 fetch 12 body[header]
+S: * 12 FETCH (BODY[HEADER] {342}
+S: Date: Wed, 17 Jul 1996 02:23:25 -0700 (PDT)
+S: From: Terry Gray <gray@cac.washington.edu>
+S: Subject: IMAP4rev1 WG mtg summary and minutes
+S: To: imap@cac.washington.edu
+S: cc: minutes@CNRI.Reston.VA.US, John Klensin <KLENSIN@MIT.EDU>
+S: Message-Id: <B27397-0100000@cac.washington.edu>
+S: MIME-Version: 1.0
+S: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
+S:
+S: )
+S: a004 OK FETCH completed
+C: a005 store 12 +flags \deleted
+S: * 12 FETCH (FLAGS (\Seen \Deleted))
+S: a005 OK +FLAGS completed
+C: a006 logout
+S: * BYE IMAP4rev1 server terminating connection
+S: a006 OK LOGOUT completed
+###auth umschalten
+###login
+a login user pass/hash
+###
--- /dev/null
+###ports die listen sind
+lsof -i -P |awk '/LISTEN/ {print $1"/"$3"/"$8}' | sort -u
+
+###aufgebaute verbindungen
+lsof -i -P |awk '/ESTABLISHED/ {print $1"/"$3"/"$8}' | sort -u
+
+###überwachung mit watch
+#alle 5 sekunden wird uptime gemacht
+watch -n 5 uptime postel
--- /dev/null
+###module in initrd hinzufügen
+vi /etc/sysconfig/kernel
+bei INITRD_MODULES hinzufügen und dann mkinitrd rufen
+###bootsplash auflösung ändern in initrd
+mkinitrd -s 1024x768
+
--- /dev/null
+###Tunneling Traffic via DNS
+###on server
+./iodined -fP test 10.0.0.1 test.asdf
+###on client
+./iodine -fP test 192.168.0.1 test.asdf
--- /dev/null
+#!/bin/bash
+
+# are we root?
+if ! [ $UID == 0 ] ; then
+ echo "IODINE SETUP: use 'sudo $0'";
+ exit 0;
+fi;
+
+#$1 says whether we use clearcode or stoynov.com
+if [ -z $1 ] ; then
+ echo 'IODINE SETUP: first param must be 1(i.clearcode.org) or 2(i.stoynov.com)';
+ exit 0;
+fi;
+
+if [ $1 == 1 ] ; then
+ endpoint_domain='i.clearcode.org'
+ endpoint_net='192.168.14.0/24'
+ endpoint_gw='192.168.14.1'
+fi;
+
+if [ $1 == 2 ] ; then
+ endpoint_domain='j.stoynov.com'
+ endpoint_net='192.168.15.0/24'
+ endpoint_gw='192.168.15.1'
+fi;
+
+# get the first dns from resolv.conf and use it.
+abused_nameserver=`cat /etc/resolv.conf | grep nameserver | head -1 | awk '{print $2}'`
+abused_nameserver=8.8.4.4
+echo ">>>>>>>>>>>>>>>>>>>USING DNS: $abused_nameserver"
+
+# kill iodine if any and remove old routes
+killall iodine
+route delete 8.8.8.8 > /dev/null
+route delete 8.8.4.4 > /dev/null
+
+# get the default gateway for iodine
+default_gateway=`netstat -rn | grep default | awk '{print $2}'`
+
+#when I die, restore the default gateway, use trap to get Ctrl+C
+function disconnect() {
+ # kill the process with id coming as a parameter
+ kill -9 $1;
+ route add default $default_gateway;
+}
+#disconnect and exit
+function cleanup() {
+ disconnect $(pgrep iodine);
+ exit 0;
+}
+trap "cleanup" SIGINT
+
+#dns query types
+dns_query_types="TXT CNAME NULL"
+
+function connect() {
+ # start iodine (possible dns types are CNAME, TXT, NULL), -F puts a pid file with the processId inside
+ iodine_output=$(./iodine -T CNAME -r -P "peshev sucks" -F /var/run/iodine.pid $abused_nameserver $endpoint_domain 2>&1 | tee /dev/tty)
+
+ #remote_net from iodine_output
+ remote_net=$(echo $iodine_output | grep -o "Adding route [0-9\.]*/[0-9]\{1,2\} to [0-9\.]*" | awk '{print $3}')
+
+ #remote_net is something like 192.168.15.2/27 and should be 192.168.15.0/27
+ remote_net=$(./ipcalc -nb $remote_net | grep Network | awk '{ print $2}')
+
+ #tunX_ip (tunX_ip) from iodine_output
+ tunX_ip=$(echo $iodine_output | grep -o "Adding route [0-9\.]*/[0-9]\{1,2\} to [0-9\.]*" | awk '{print $5}')
+
+ #remote_gateway (gateway on iodine) from iodine_output
+ remote_gateway=$(echo $iodine_output | grep -o "Server tunnel IP is [0-9\.]*" | awk '{print $5}')
+
+ # route to nameserver to be abused
+ route add -host $abused_nameserver $default_gateway
+ # route to remote network via tunX_ip (necessary because my mac sucks)
+ route add -net $remote_net $tunX_ip
+ # change default gateway from system default to iodine
+ route delete default
+ route add default $remote_gateway
+
+ # time to download 100kb file in seconds (1.34). We remove the dot for easy comparison (1.34 -> 134)
+ echo TESTING SPEED;
+ t=$( { time -p curl -s ftp://speedtest:speedtest@ftp.otenet.gr/test100k.db; } 2>&1 )
+ seconds=$(echo $t | awk '{ print $2;}' | tr -d . );
+ echo SECONDS: $seconds;
+}
+connect;
+
+echo 'READY...READY...READY...READY...READY...'
+
+while true; do sleep 10000; done;
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+start_instance () {
+local section="$1"
+config_get address "$section" 'address'
+config_get password "$section" 'password'
+config_get tunnelip "$section" 'tunnelip'
+config_get tld "$section" 'tld'
+
+service_start /usr/sbin/iodined -l "$address" -c -s -P "$password" $tunnelip "$tld" &
+sleep 1
+ifconfig dns0 $tunnelip netmask 255.255.255.0
+}
+
+start() {
+config_load 'iodined'
+config_foreach start_instance 'iodined'
+}
+
+stop() {
+service_stop /usr/sbin/iodined
+}
--- /dev/null
+###IPv6 test im Internet
+http://test-ipv6.com/
+###ipv6 ausschalten
+echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
+###ipv6 dauerhaft ausschalten
+echo "net.ipv6.conf.all.disable_ipv6 = 1" > /etc/sysctl.d/01-disable-ipv6.conf
+###route adden
+ip route add table local broadcast 10.107.0.0 dev wlan0 proto kernel scope link src 192.168.210.79
+ip route add 10.107.1.55 via 192.168.210.1 src 192.168.210.79
+###ip addr show / anzeigen interfaces mit dazugehörigen ip´s
+ip addr show
+###alle routen anzeigen
+ip addr show
+###ip adressen setzen auf ein interface und dann anzeigen
+ip addr add 10.8.1.10/24 broadcast 10.8.1.255 dev eth0
+ip addr add 10.8.2.10/24 broadcast 10.8.2.255 dev eth0
+ip addr add 10.1.2.3/24 dev eth0
+ip addr show eth0
+###routing policy database (rpdb) anzeigen
+ip rule show
+###SourceRouting
+ #SourceRouting Tabelle erstellen
+ echo 100 SourceRouting >> /etc/iproute2/rt_tables
+ #ip 192.168.100.100 eintragen
+ ip rule add from 192.168.100.100 table SourceRouting
+ #zur sicherheit noch mal anschauen
+ ip rule show
+ #hier das routing für die in SourceRouting Tabelle stehende eintragen
+ ip route add default via 192.168.1.254 dev eth0 table SourceRouting
+###Generelle 2-Wege-Routen, multipath route
+ #routing über 2 verschieden Provider
+ #Provider 1 132.230.129.1
+ #Provider 2 80.168.20.125
+ #Routing Tabellen Route1 und Route2 anlegen
+ echo 100 Route1 >> /etc/iproute2/rt_tables
+ echo 100 Route2 >> /etc/iproute2/rt_tables
+ #jetzt die einzelnen netze oder ip über die routen
+ ip route add 132.230.129.0/28 dev eth0 src 132.230.129.1 table Route1
+ ip route add default via 132.230.129.15 table Route1
+ ip route add 80.168.20.0/25 dev eth1 src 80.168.20.125 table Route2
+ ip route add default via 80.168.20.126 table Route2
+ #die routing rules legen fest, welche Tabelle für welche IP herangezogen wird
+ ip rule add from 132.230.129.1 table Route1
+ ip rule add from 80.168.20.125 table Route2
+ #Main Routing Tabelle für das lokale Routing in beide Netzwerke konfigurieren
+ ip route add 132.230.129.0/28 dev eth1 src 132.230.129.1
+ ip route add 80.168.20.0/25 dev eth2 src 80.168.20.125
+ #default route für "main" Routing Table setzen, weight 1 ist die Verteilung - hier gleichmäßig
+ ip route add default scope global nexthop via 132.230.129.14 dev eth1 weight 1 nexthop via 80.168.20.126 dev eth2 weight 1
+ #so kann man es machen, wenn man es als backup route machen will
+ #erst mal alle routen löschen
+ ip -4 addr flush label "eth0"
+ #default setzen (kernel nimmt immer die route mit der kleinsten metric)
+ ip route add default via 132.230.129.14 dev eth0 metric 1
+ #falls oben nicht geht, dann nimm die
+ ip route add default via 80.168.20.126 dev eth0 metric 5
+###multipath route last verteilen auf zwei interface
+ip route add default scope global nexthop dev ppp0 nexthop dev ppp1
+###dienste basiertes routing (hier ssh)
+ #ssh pakete markieren mit 1
+ iptables -A OUTPUT -i eth0 -t mangle -p tcp --dport 22 -j MARK --set-Mark 1
+ #ssh routing Tabelle erstellen
+ echo 200 ssh >> /etc/iproute2/rt_tables
+ #fw Markierung eintragen in Tabelle
+ ip rule add fwmark 1 table ssh
+ #wo die ssh packete langeschickt werden sollen
+ ip route add default via 192.168.1.254 dev eth0 table ssh
+###tabelle local anzeigen
+ip route show table local
+###alle anzeigen
+ip route show table all
+###alle gecachten routen anzeigen
+ip route show cache all
+###nat einer ip
+ip route add nat 205.254.211.17 via 192.168.100.17
+###nat eines teil netzes
+ip route add nat 205.254.211.32/29 via 192.168.100.32
+###löschen einer route
+ip route del 10.38.0.0/16 via 192.168.100.1 dev eth3
+###ändern defaul route
+ip route change default via 192.168.99.113 dev eth0
+###alle aus tabelle main löschen
+ip route flush table main
+###alle 10.38er routen löschen
+ip route flush 10.38.0.0/16
--- /dev/null
+###netzmonitor einschalten
+*3001#12345#*
--- /dev/null
+###was passiert auf den wlan0-1 interface gerade
+iw dev wlan0-1 station dump
+###statistik für station mit mac
+iw dev wlan1 station get <peer-MAC-address>
+###monitor interface erstellen
+iw dev wlan0 interface add fish0 type monitor flags none
+###delete / löschen eines interfaces
+iw dev fish0 del
+###regulator domain ändern
+#alpha2 ist der countrycode
+#bei FR sind 20dBm möglich
+#bei US sind 27dBm möglich, erlaubt sind bis 1 Watt in den USA
+#erst FR dann US sonst geht 27dBm nicht!
+iw reg set alpha2
+###txpower Sendeleistung ändern
+iw dev wlan0 set txpower fixed 2000
+###scannen
+iw dev wlan0 scan
+###bei events was anzeigen
+iw event
+###
--- /dev/null
+###Paketieren mir jar
+jar cvfe firststeps.jar de.kompf.tutor.Hello -C bin .
+###remote debug mit eclipse
+Um die VM ordnungsgemäß im Debug-Modus zu starten, benötigen wir 4 Parameter:
+
+Parameter Bedeutung/Funktion/Zweck
+-Xdebug Startet in Debugging-Modus
+-Xnoagent Deaktiviert den Support fürm Old Jave Debugger (oldjdb)
+-Djava.compiler=NONE "-D" setzt verschiedene Parameter. java.compiler=NONE bedeutet, dass der JIT-Compiler deaktiviert wird.
+-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=6754 "-Xrunjdwp" setzt die eigendlichen Debugging-Parameter. transport liegt die Verbindungsart fest. server sagt, dass er als Server auf Verbindungen warten soll. suspend sagt, dass er mit der Ausführung warten soll, bis ein Debugger verbindet. (In diesen Fall soll er NICHT warten.) address legt den Port fest, auf dem auf eine Verbindung gewartet werden soll.
+
+Bsp.:
+java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=6754 -jar rdbdemo.jar
+
+Nun müssen wir als Erstes die Debug-Konfiguration in Eclipse öffnen:
+
+Hier Doppelklick auf "Remote Java Application":
+
+Daraufhin legt Eclipse automatisch eine Konfiguration für das momentan ausgewählte Projekt an. Hier müssen nur noch wenige Einstellungen getroffen werden. Wir müssen lediglich den Hostname/IP des Hosts, auf dem die Anwendung im Debug-Modus läuft und den Port anpassen.
+
+Nun können wir unsere eingerichtete Konfiguration starten:
+
+Damit lässt sich die Anwendung remote genauso wie lokal debuggen. Inkl. Threads pausieren, Breakpoints, Variablenzugriff, zeilenweises abarbeiten und was es sonst noch so alles gibt.
+
+###
+###tempdir, temporäres Verzeichnis
+System.getProperty("java.io.tmpdir")
--- /dev/null
+###data rate 8.842 kbps
+2r
+###version ausgeben
+v
+###m bestimmt welche data rates der toggle mod verwendet (default 3), m ist bitcodiert
+1: 17.241 kbps
+2: 9.579 kbps
+4: 8.842 kbps
+3m -> wechselt zwischen 17.241 kbps und 9.579 kbps
+5m -> wechselt zwischen 17.241 kbps und 8.842 kbps
+7m -> wechselt zwischen allen drei data rates
+###commands
+<n>a - activity LED (0=off, 1=on)" "\n"
+<n>c - TX data rate (0: 17.241 kbps, 1: 9.579 kbps, 2: 8.842 kbps)" "\n"
+<n>d - DEBUG mode (0=suppress TX and bad packets)" "\n"
+<n>h - height above sea level (m)" "\n"
+<nnnnnn>f - frequency (5 kHz steps e.g. 868315)" "\n"
+<n>m - toggle mode (1: 17.241 kbps, 2: 9.579 kbps, 4: 8.842 kbps)" "\n"
+<n>p - show raw payload data (0=off, 1=on, 2=only undecoded)" "\n"
+<n>r - data rate (0: 17.241 kbps, 1: 9.579 kbps, 2: 8.842 kbps)" "\n"
+<id,b,b,b,...>s - send the bytes ti the address id" "\n"
+<n>t - toggle data rate intervall (0=no toggle, >0=seconds)" "\n"
+<n>v - version and configuration report" "\n"
+<n>x - used for tests" "\n"
+<n>y - Relay (0=no relay, 1=Relay received packets)" "\n"
+<n>z - 1 = display analyzed frame data instead of normal data" "\n"
+
--- /dev/null
+###Taggen von Hausnummern
+addr:city Chemnitz
+addr:country DE
+addr:housenumber 6
+addr:postcode 09131
+addr:street Orthstraße
--- /dev/null
+###dhcp einrichten
+dhcpd.conf
+
+subnet 172.17.6.0 netmask 255.255.255.0 {
+ range 172.17.6.80 172.17.6.90;
+ default-lease-time 14400;
+ max-lease-time 172800;
+}
+group {
+ #tftpserver
+ next-server 172.17.6.31;
+ #bootimage
+ filename "pxelinux.0"
+
+ host test { hardware ethernet 00:00:00:00:00:00:00; }
+ #weitere hostst genauso
+}
+
+###tftpserver entweder per xinitd oder so starten
+protokoll udp
+wait yes
+user root
+server /usr/sbin/in.tftpd
+#optionen für tftpd
+args -s /srv/tftpboot -r blksize
+
+
+###erzeugen bootimage
+cp -a boot/loader/linux boot/loader/initrd boot/loader/message boot/loader/memtest /srv/tftpboot
+cp -a /usr/share/syslinux/pxelinux.0 /srv/tftpboot
+cp -a boot/loader/isolinux.cfg /srv/tftpboot/pxelinux.cfg/default
+
+vi /srv/tftpboot/pxelinux.cfg/default
+###alles mit gfxboot, readinfo, framebuffer entfernen
+
+###append Zeile hinzufügen
+insmod=e100
+netdevice=eth0
+install=nfs://172.17.6.31/usr/local/dist/SUSE
+append initrd=initrd ramdisk_size=65536 insmod=e100 install=nfs://172.17.6.31/usr/local/dist/SUSE
+
+
--- /dev/null
+###
+ssl start_tls
+nss_map_attribute uniqueMember member
+pam_filter objectclass=posixAccount
+nss_base_passwd dc=tbz-pariv,dc=lan
+nss_base_shadow dc=tbz-pariv,dc=lan
+nss_base_group dc=tbz-pariv,dc=lan
+host ldap
+base dc=tbz-pariv,dc=lan
+ldap_version 3
+###anzeige aller Nutzer wie passwd
+ldapsearch -x -b 'dc=tbz-pariv,dc=lan'
+###
+ldapsearch -x -b dc=tbz,dc=lan "objectclass=phonebook"
+###
+ldapadd -x -D cn=Administrator,dc=tbz,dc=lan -W -f user.ldif
+###
+ldapsearch -x -b 'dc=tbz,dc=lan' "(objectClass=inetOrgPerson)"
+###
+ldapsearch -x -W -D 'cn=Administrator,dc=tbz,dc=lan' -b "" -s base -H ldap://localhost "cn=hein"
+###
+LDAP ist ein Protokoll der Anwendungsschicht (Applicationlayer) nach dem für TCP verwendeten DoD-Vier-Schichten-Modell und arbeitet mittels genau spezifizierter Zugriffs-Prozesse:
+
+ bind: Mit der bind-Direktive vermittelt man dem Directory-Server über eine dn, wer den Zugriff durchführen möchte (entweder anonym, per Passwort-Authentifizierung oder anders)
+ baseDN: Die BaseDN definiert, wo im Verzeichnisbaum abwärts die Suche nach bestimmten Objekten gestartet werden soll. Diese Suche kann festgelegt werden auf eine Suche über
+ genau dieses Objekt (base)
+ dieses Objekt und alles darunter (sub)
+ eine Ebene unterhalb des BaseDNs (one)
+
+Ansonsten gelten die notwendigen Such-Spezifikationen wie Suchoperator (Beispiel (&(mail=joe*)(ou=People))), Server-Benennung (zum Beispiel ldap.acme.com) oder Port-Benennung.
+
+Beispiel für eine LDAP-Suchanfrage durch ein einfaches Kommandozeilenprogramm:
+
+ldapsearch -h ldap.acme.com -p 389 -s sub -D "cn=Directory Manager,o=acme" -W -b "ou=personen,o=acme" "(&(mail=joe*)(c=germany))" mail
+
+Erklärung: Das Kommandozeilenprogramm kontaktiert über LDAP den Directory-Server ldap.acme.com (Port 389) und meldet sich über den Account des Directory Managers an diesem System an. Die Anfrage zielt auf alle Benutzereinträge (unterhalb des Zweiges ou=personen,o=acme) und sucht nach Personen aus Deutschland, deren Mailadresse mit joe beginnt ((&(mail=joe*)(c=germany))). Werden Personen gefunden, die auf diesen Filter passen, so wird deren Mailadresse zurückgegeben (mail).
+
+ldapsearch -h ldap.acme.com -p 389 -s sub -D "cn=Directory Manager,o=acme" -W -b "ou=personen,o=acme" "(&(mail=joe*)(c=germany))" mail
+###
+
--- /dev/null
+###link zu java-Datei:Zeilennummer
+(%F:%L)
+###Ausgabe @Zeilennummer
+@%L
+
--- /dev/null
+###luks einrichten (schnell-script)
+#!/bin/sh
+#read -p "Key für firma vorhanden? (j/n) " -n 1 jn
+#case $jn in
+# j) echo " gut";
+# ;;
+# n) echo
+# echo erstelle neuen Key für Firma!;
+# read -p "Firmenkürzel eingeben (z.B. erw): " ant
+# dd if=/dev/urandom of=/tmp/key.bin bs=4k count=1
+# base64 /tmp/key.bin > /tmp/key.${ant}
+# rm -rf /tmp/key.bin
+# echo "neuer Key für $ant erstellt in /tmp/key.${ant}"
+# ;;
+# *) echo
+# echo "keine Ahnung!";
+# echo "und Tschüss";
+# exit
+# ;;
+#esac
+#
+#read -p "Platte verschlüsseln? (j/n) " -n 1 ant
+#case $ant in
+# j) echo " schön, los gehts";
+# ;;
+# n) echo " schade, schluß";
+# exit
+# ;;
+# *) echo
+# echo "keine Ahnung!";
+# echo "und Tschüss";
+# exit
+# ;;
+#esac
+#
+#echo "Devices:"
+#fdisk -l | egrep "^(Platte|Disk) /"
+#read -p "device eingeben (Bsp.: /dev/sdb): " device
+#fdisk $device <<EOF
+#d
+#
+#n
+#
+#p
+#
+#1
+#
+#
+#
+#wq
+#
+#EOF
+#echo ""
+#echo "Passphrase muss nicht sicher sein, wird gleich wieder gelöscht!!!"
+#echo ""
+#cryptsetup luksFormat --cipher aes-cbc-essiv:sha256 ${device}1
+#echo "versuche verschlüsselte Platte zu laden..."
+#cryptsetup luksOpen ${device}1 luksformatxxx
+#sleep 3
+#read -p "Label für Platte eingeben: " label
+#echo "erstelle Filesystem (xfs) mit Label ${label} ..."
+#mkfs.xfs -f -L $label /dev/mapper/luksformatxxx
+#sleep 2
+#echo "schließe verschlüsselte Platte"
+#cryptsetup luksClose /dev/mapper/luksformatxxx
+#if [ -s /var/lib/backup/etc/key.master ]; then
+# master=/var/lib/backup/etc/key.master
+# echo "benutze $master als Master Key"
+#else
+# read -p "Master Key angeben (z.B. /tmp/key.master): " master
+#fi
+#cryptsetup luksAddKey ${device}1 $master
+#echo "lösche Passphrase..."
+#cryptsetup luksDelKey ${device}1 0 --key-file $master
+#if [ -n $(ls -1 /var/lib/backup/etc/key.???) ]; then
+# firma=$(ls -1 /var/lib/backup/etc/key.???)
+# echo "benutze $firma als Firmen Key"
+#else
+# read -p "Firmen Key angeben (z.B. /tmp/key.firma): " firma
+#fi
+#cryptsetup luksAddKey ${device}1 $firma --key-file $master
+#echo "fertig..."
+#echo ""
+#read -p "Prüfung durchführen? (j/n) " -n 1 jn
+#case $jn in
+# j) echo
+# echo Master Key wird geprüft
+# cryptsetup luksOpen ${device}1 crypt --key-file $master
+# cryptsetup luksClose crypt
+# echo Firmen Key wird geprüft
+# cryptsetup luksOpen ${device}1 crypt --key-file $firma
+# cryptsetup luksClose crypt
+# ;;
+#
+# n) exit ;;
+# *) exit ;;
+#esac
+###partition verschlüsseln
+cryptsetup luksFormat --cipher aes-cbc-essiv:sha256 /dev/sdb1
+###partition bekannt machen, transparente verschlüsselung an
+cryptsetup luksOpen /dev/sdb1 luksformatxxx
+####partiotion mit fs formatieren
+mkfs.xfs -f -L Montag /dev/mapper/luksformatxxx
+###partition aushängen
+cryptsetup luksClose /dev/mapper/luksformatxxx
+###key hinzufügen
+cryptsetup luksAddKey /dev/sdb1 /tmp/key.master
+###öffnen mit keyfile
+cryptsetup luksOpen /dev/sdb1 sdb1_crypt --key-file /tmp/key.master
+###passphrase löschen
+cryptsetup luksDelKey /dev/sdb1 0 --key-file /tmp/key.master
+###luks platte laden nach NAME mit keyfile key.file
+cryptsetup luksOpen /dev/sdb1 NAME --key-file /home/mhoellein/key.file
+###luks platte entladen
+cryptsetup luksClose NAME
+###luks status
+cryptsetup status NAME
+###verschlüsselte Platte mounten
+mount /dev/mapper/NAME /mnt
+###script fürs entschlüsseln
+#!/bin/sh
+#modprobe usb-storage 1>&2
+#sleep 5
+#mkdir /usb 1&>2
+#mount -t ext2 /dev/disk/by-uuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /usb 1&>2
+#sleep 5
+#cat /usb/root.key
+#umount /usb 1&>2
+###crypttab
+# target name|source device|key file|options
+# root /dev/vg1/vol1 none luks,retry=1,cipher=aes-cbc-essiv:sha256,keyscript=/path/to/keyscript
+###/etc/initramfs-tools/modules alle eintragen was benötigt wird
+aes-x86_64
+dm-crypt
+dm-mod
+sha256
+sd_mod
+usb_storage
+usb-storage
+ehci_hcd
+ohci_hcd
+#danach
+update-initramfs -u
+###fstab anpassen
+/dev/mapper/home /home ext3 realtime 0 2
--- /dev/null
+###erstellt /etc/lvmtab und /etc/lvmtab.d
+vgscan -v
+###
+vgchange -a y
+###anlegen der physical volumes (hier zwei)
+#platten müssen id 8e haben, lvm
+pvcreate /dev/hdb5
+pvcreate /dev/hdb6
+###volume group einrichten, danach gibt es /dev/volg1
+vgcreate volg1 /dev/hdb5 /dev/hdb6
+###anlegen der "partition" im volume group (hier 1000MB, name logv1) /dev/volg1/logv1
+lvcreate -n logv1 -L 1000M volg1
+###dateisystem erzeugen, bsp. und dann verwenden
+mkfs -t ext2 /dev/volg1/logv1
+###logisches volume vergrössern
+lvextend -L 1300M /dev/volg1/logv1
+###logisches volume verkleinern
+lvreduce -L-800M /dev/volg1/logv1
+###volumen group vergrösser (fügt /dev/hdb7 zu volg1 hinzu)
+vgextend volg1 /dev/hdb7
+###anzeige der größe einer volume group
+vgdisplay /dev/volg1
+###anzeigen ob phy. medium in volume group daten enthält
+pvdisplay -v /dev/hdb7
+###/dev/hdb7 aus volume group rausnehmen (muss leer sein)
+vgreduce volg1 /dev/hdb7
+###lvm beenden
+vgchange -a n
+###alle daten von /dev/hdb6 auf alle anderen verteilen, damit man es raus nehmen kann (muss genug platz sein auf den anderen)
+pvmove -v /dev/hdb6
+###moven auf bestimmtes volume
+pvmove -v /dev/hdb6 /dev/hdb7
+###umbenennen von vg
+vgrename /dev/volg1 /dev/volgroup1
+###umbenennen von lv
+lvrename /dev/volgroup1/logv1 /dev/volgroup1/logvol1
+###legt snapshot mysnap an (/dev/volg1/mysnap), der solange gültig ist, bis 500M unterschiedlich sind zum normalen volume
+lvcreate -L 500M --snapshot -n mysnap /dev/volg1/logv1
+###umzug einer vg auf einen anderen rechner
+#dateisysteme aushängen
+unmount /mnt/design/
+#vg als inaktiv markieren
+vgchange -an design
+#exportieren der vg
+vgexport design
+#jetz platten in neuen rechner rein und dann
+pvscan
+#dann importieren der vg
+vgimport design
+#aktivieren der vg
+vgchange -ay design
+#dateisystem mounten
+mount /dev/design/ /mnt/design/
+###
--- /dev/null
+hame a2
+eth0 9C:41:7C:4D:A8:78
+wlan0
+ifb0 1E:1D:EA:9A:41:DB
+ifb1 42:29:AC:F8:5C:50
+
+3040
+wlan0: F8:1A:67:4D:6E:D1
+wlan0-1: F8:1A:67:4D:6E:D2
+eth0: F8:1A:67:4D:6E:D3
--- /dev/null
+###
+mail -S sendcharsets=iso-8859-15 -S encoding=8bit -S from='Mario Höllein<mhoellein@tbz-pariv.lan>' -s "env äöüß iso" -s "modscan_ama $1 Anzahl Dateien: $3" $MAIL_TO < /dev/null
--- /dev/null
+###Regel ist wie folgt aufgebaut
+Target [ weitere Targets] :[:] [ Vorbedingungen] [; Kommandos]
+[ <tab> Kommandos ]
+[ <tab> Kommandos ]
+ ...
+#z.B.
+hello:
+ @echo hello world
+diskfree:; df -h
+###
+
+###Automatische Variablen
+$@ Der Name des Target.
+$% Der Member-Name, falls das Target sich in einem Archiv befindet.
+$< Der Name der ersten (oder einzigen) Vorbedingung.
+$? Leerzeichen-getrennte Liste all derer Dateien aus der Vorbedingung, die neuer als das Target sind.
+$^
+$+ Leerzeichen-getrennte Liste aller Vorbedingungen. Bei $^ sind zusätzlich die Doppelten entfernt.
+$* Der Stamm des Dateinamens, auf den die implizite Regel zugetroffen hatte.
+$(@D)
+$(@F) Verzeichnis und Dateiname von $@
+$(*D)
+$(*F) Verzeichnis und Dateiname von $*
+$(%D)
+$(%F) Verzeichnis und Dateiname von $%
+$(<D)
+$(<F) Verzeichnis und Dateiname von $<
+$(^D)
+$(^F) Verzeichnis und Dateiname von $^
+$(+D)
+$(+F) Verzeichnis und Dateiname von $+
+$(?D)
+$(?F) Verzeichnis und Dateiname von $?
+###Eingebaute Funktionen
+$(subst from,to,text) - Ersetze from durch to im text.
+$(patsubst pattern,replacement,text) - Ersetze im text alle Wörter, die pattern enthalten, durch replacement.
+$(strip string) - Entferne alle überflüssigen Whitespaces aus string.
+$(findstring find,text) - Suche nach find im text.
+$(filter pattern...,text) - Lösche alle Wörter aus text, auf die keines der pattern zutrifft.
+$(filter-out pattern...,text) - Lösche alle Wörter aus text, auf die eines der pattern zutrifft.
+$(sort list) - Gibt die list in sortierter Reihenfolge zurück, ohne Doppelte.
+$(dir names...) - Gibt das Verzeichnis aller übergebenen names zurück.
+$(notdir names...) - Gibt den reinen Dateinamen aller übergebenen names zurück.
+$(suffix names...) - Gibt die Dateiendung (ab dem letzen Punkt) aller übergebenen names zurück.
+$(basename names...) - Gibt den Stamm (Dateiname ohne Endung) aller übergebenen names zurück.
+$(addsuffix suffix,names...) - Hänge suffix an alle übergebenen names an.
+$(addprefix prefix,names...) - Hänge den prefix vor alle übergebenen names.
+$(join list1,list2) - Verbinde die beiden Wortlisten
+$(word n,text) - Liefert das n-te Wort aus dem text.
+$(words text) - Gibt die Zahl der Wörter in text zurück.
+$(wordlist s,e,text) - Liefert den Text vom s-ten bis zum e-ten Wort.
+$(firstword names...) - Liefert das erste Wort von names.
+$(wildcard pattern...) - Gibt eine Liste aller Dateien zurück, die eine gewöhnliche Shell auf das pattern matchen würde.
+$(error text...) - Erzeugt einen fatalen Fehler mit Hinweis text. Dabei beendet sich make.
+$(warning text...) - Zeigt eine Warnung mit Hinweis text an.
+$(shell command) - Fürt den command in der Shell aus und gibt seine Ausgabe zurück.
+$(origin variable) - Liefert einen Text zurück, aus dem hervorgeht, wie die Variable variable definiert worden war.
+$(foreach var,words,text) - Evaluate text with var bound to each word in words, and concatenate the results.
+$(call var,param,...) - Führe den Inhalt der Variablen var wie eine Funktion aus. Innerhalb der Funktion kann man mit $(1),$(2) auf die Parameter zugreifen.
--- /dev/null
+###starten
+msfconsole
+###module suchen
+search modul
+###modul nutzen
+use auxiliary/scanner/http/http_login
+###modulparameter anzeigen
+help
+###
--- /dev/null
+###URLS
+http://wiki.openstreetmap.org/wiki/DE:All_in_one_Garmin_Map
+#fertige Karten
+http://wiki.openstreetmap.org/wiki/DE:All_in_one_Garmin_Map
+###beispielen für mkgmap
+mkgmap --style-file=../styles/masterstyle --description='Openstreetmap' --country-name=germany --country-abbr=DE --family-id=3 --product-id=45 --series-name='master-edition' --family-name=OSM --area-name=DE --latin1 --lower-case --mapname=63240345 --draw-priority=10 --add-pois-to-areas --road-name-pois --net --route --gmapsupp ../tiles/*.osm.gz /voller_Pfad_zu_typ/.../styles/master.TYP
+mkgmap --style-file=../styles/addresslayer_style --description='Adressen' --country-name=germany --country-abbr=DE --family-id=4 --product-id=40 --series-name='master-edition' --family-name=ADRESSEN --area-name=DE --latin1 --lower-case --mapname=63240430 --draw-priority=20 --add-pois-to-areas --transparent --gmapsupp ../tiles/*.osm.gz /voller_Pfad_zu_typ/.../styles/addr.TYP
+mkgmap --style-file=../styles/fixme_layer_style --description='Fixme_Layer' --country-name=germany --country-abbr=DE --family-id=2 --product-id=33 --series-name='master-edition' --family-name=FIXME --area-name=DE --latin1 --lower-case --mapname=63240225 --draw-priority=30 --transparent --gmapsupp ../tiles/*.osm.gz /voller_Pfad_zu_typ/.../styles/fixme.TYP
+mkgmap --style-file=../styles/fixme_layer_style --description='Openstreetbugs' --country-name=germany --country-abbr=DE --family-id=2 --product-id=33 --series-name='master-edition' --family-name=OSB --area-name=DE --latin1 --lower-case --mapname=63240125 --draw-priority=31 --transparent --gmapsupp ../raw_data/bugs_germany.osm
+###Daten von OpenStreetMap Server laden
+wget http://www.informationfreeway.org/api/0.5/*[bbox=-3.5,51.5,-1.0,53.5] -O data.osm
+###Garmin map image daraus erzeugen
+mkgmap [options] data.osm
+###wenn osm file zu groß, gehts nicht mit mkgmap dann splitten
+splitter file.osm und hinterher mkgmap -c template.args
+###Adressen bei mkgmap
+--location-autofill verwenden bei osm daten,
+--index
+###aktiviert lock to road feature für nutzung im gps
+--net
+###mehrer img in option file zu einem (aufbau beispielfile)
+gmapsupp
+
+input-file: 63243936.img
+input-file: 63247525.img
+input-file: 63253506.img
+input-file: 63364845.img
+input-file: 63364846.img
+#dann
+mkgmap -c file
+###sollte eigentlich Kartennamen auf Deutschland setzen
+--description='Deutschland'
+###stellt radwege dar die nicht an strassen verlaufen
+--make-cycleways
+###stellt alle radwege dar, auch die direkt an strassen sind
+--make-all-cycleways
+
+und natuerlich mdr branch zum erstellen verwenden. Das ist alles. Rest ist ident zu normaler Kartenerstellung.
+
+Wenn du schon fertige .img hast adaptier einfach den folgenden Command:
+
+mkgmap.jar --index --latin1 --description=%abr%_%date% --country-abbr=%abr% --country-name=%country% --mapname=%mapid%0000 --family-id=%mapid% --product-id=1 --series-name=%abr%_%date% --family-name=%abr%_%date% --tdbfile --overview-mapname=mapset %mapid%0*.img
+
+(wobei du natuerlich die variable %abr% nicht benutzen brauchst). Zurzeit gehen alle geofabrik Europa Extracts bis auf alps und germany.
+###TYP-File in gmapsupp integrieren
+mkgmap --family-id=42 --gmapsupp *.img teddy.TYP
+###Kachelnummerberechnung
+Number = ((int)((lat + 90) / ksize) + (int)((lon + 180) / ksize) * (int)(180 / ksize)) + 63240001
+###erstellen der Karte vom Pitztal
+mkgmap --description="Pitztal" --mapname=18976534 --country-name="Pitztal" --country-abbr="AT" --latin1 --add-pois-to-areas --road-name-pois --copyright-message="Mario" --make-opposite-cycleways --make-cycleways --family-name="Marios Karten" --series-name="Marios Karten" --overview-mapname="Pitztal" --series-name="series_%date%" --area-name="Pitztal" --region-name="Pitztal" --region-abbr="AT" --copyright-message="created by Mario" --gmapsupp 6324*.osm
--- /dev/null
+###boot cd mit msdos erzeugen (FLOPPY.IMG ist z.B ein image von bootdisk.com)
+mkisofs -r -b FLOPPY.IMG -c boot.cat -o /tmp/bootcd.iso FLOPPY.IMG
--- /dev/null
+###mounten
+mount /dev/sda /mnt
+###remount rw
+mount -o remount,rw /mnt
+###remount ro
+mount -o remount,ro
+
--- /dev/null
+##Music Player Daemon - server-side application for playing music
+#
+MPD
+###http://www.tlanfer.de/2015/08/13/multiroom-audio-using-mpd-pulseaudio-and-bluetooth/
+I installed MPD and created the configuration files for each room in ~/.config/mpd:
+
+% touch kitchen.{conf,database,log,pid}
+
+Set up everything needed in the conf file. Make sure the files, especially the pid file, are unique for each configuration. Change the paths to music and playlists to your needs
+
+music_directory "/media/virtual/Music/mp3"
+playlist_directory "/media/virtual/Music/playlist"
+db_file "~/.config/mpd/kitchen.database"
+log_file "~/.config/mpd/kitchen.log"
+pid_file "~/.config/mpd/kitchen.pid"
+
+port "6600"
+
+audio_output {
+ type "pulse"
+ name "Kitchen"
+ sink "bluez_sink.A0_E9_DB_51_3B_C5"
+}
+
+Every instance of MPD has its own database. If you dont want this, see the Archwiki: Music Player Daemon – Satellite_setup.
+
+The I created a special parameterized systemd unit in ~/.config/systemd/user/mpd@.service to run multiple MPDs with a custom configuration each
+
+Description=Music Player Daemon
+After=network.target sound.target
+
+[Service]
+ExecStart=/usr/bin/mpd --no-daemon %h/.config/mpd/%I.conf
+
+[Install]
+WantedBy=default.target
+
+Then, have systemd reload config files, enable an instance of this configuration and start it
+
+% systemctl --user daemon-reload
+% systemctl --user enable mpd@kitchen
+% systemctl --user start mpd@kitchen
+
+You should now be able to play music using mpd to your bluetooth speakers. Use any MPD client to test this.
+###https://wiki.archlinux.org/index.php/Music_Player_Daemon
--- /dev/null
+###Datenbank Dump erzeugen von Datenbank tine20
+mysqldump -h localhost -p tine20 > ~/tine20_db_dump
+###Datenbank aus dump wiederherstellen
+mysql -u root -p < japomen_20090220_1106.sql
+###alle vorhanden Datenbanken anzeigen
+show databases;
+###anlegen einer neuen Datenbank
+create database datenbank_name;
+###zur Datenbank datenbank_name wechseln
+use datenbank_name;
+###tabellen der datenbank anzeigen
+show tables;
+###Spaltennamen der Tabelle users anzeigen
+show columns from users;
+###Tabelleneigenschaften anzeigen
+show table status;
+###Tabelle anlegen
+create table tablename (name VARCHAR(20), besitzer VARCHAR(20),gattung VARCHAR(20), geburtstag DATE, todestag DATE);
+###update einer zeile
+update tabellenname set spalte=wert where spalte='irgendwas';
+###Zeile löschen
+DELETE FROM tabelle WHERE bedingung;
+###neuen localen Nutzer anlegen ohne Passwort der auf alles Zugriff hat
+GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
+###Passwort für Nutzer monty setzen
+set password for 'monty'@'localhost' = password('secretpass');
+###auto update aus
+alter table klima_new change time time TIMESTAMP not NULL DEFAULT CURRENT_TIMESTAMP
+###doppelte einträge in time Spalte entfernen
+select * from klima where position='Terrasse' group by time;
+###Tabelle umbenennen
+alter table klima_new rename klima;
+###anzeigen der eigenschaften der Tabellenspalten
+SHOW FIELDS FROM tbl_name;
+###Datentyp einer Spalte ändern
+ALTER TABLE tbl_name MODIFY column3 varchar(50);
+###eine Spalte einer Tabelle löschen
+ALTER TABLE tbl_name DROP COLUMN column3;
+###Tabelle löschen
+DROP TABLE tbl_name;
+###neuen Nutzer anlegen
+CREATE USER 'neuer_benutzer'@localhost IDENTIFIED BY "pass";
--- /dev/null
+###netcat daten übers netz per netcat
+#sender
+echo t |netcat server port
+#empfänger
+netcat -p port -l
+###
+
--- /dev/null
+###debug einschalten
+RPC debugging:
+ echo 2048 > /proc/sys/sunrpc/rpc_debug
+ grep . /proc/net/rpc/*/content
+ ls -l /proc/fs/nfsd
+ cat /proc/fs/nfs/exports
+NFS debugging:
+ # turn on linux nfs debug
+ echo 1 > /proc/sys/sunrpc/nfs_debug
+ # turn off linux nfs debug
+ echo 0 > /proc/sys/sunrpc/nfs_debug
--- /dev/null
+###Portscan von 192.168.0.1, Port 80
+nmap -p 80 192.168.0.1
+###Portscan von 192.168.0.1, 192.168.0.2, 192.168.0.3 mit Ports 80, 81, 82
+nmap -p 80,81,82 192.168.0.1,2,3
+namp -p 80-82 192.168.0.1-3
+###192.168.0.0/24 Port 80 scannen
+nmap -p 80 "192.168.0.*"
+###Standartscan von Host 192.168.0.1 Ports 1-1024
+nmap 192.168.0.1
+###Ping Scan
+nmap -sP 192.168.0.1-100
+nmap -sL 192.168.0.1-100
+###TCP Scan
+nmap -sT 192.168.0.1
+nmap -sR 192.168.0.1
+###SYN Scan
+nmap -sS 192.168.0.1
+###Fingerprint -O (versucht BS zu ermitteln)
+nmap -sT -O 192.168.0.1
+###
+nmap -sVC -O -T4 host
+###using nmap to map your network with zenmap
+nmap -T4 -A -v -PE -PA21,23,25,69,80,135,137,138,139,443,515,631,5432 172.17.6.0-254
--- /dev/null
+###nutzer anlegen / homebereich anlegen / ssh-key erzeugen
+MYUSER=modarch
+MYGROUP=modarch
+MYUID=21
+MYGID=23
+MYUSERHOME=/home/$MYUSER
+
+groupadd -g $MYGID $MYGROUP
+useradd -u $MYUID -g $MYGROUP -s /bin/bash -c "modarch system account" $MYUSER
+usermod -G $MYGROUP $MYUSER
+usermod -G $MYGROUP wwwrun
+usermod -G trusted $MYUSER
+
+echo "Passwort für $MYUSER vergeben ..."
+passwd $MYUSER
+mkdir -p $MYUSERHOME
+chown $MYUSER: $MYUSERHOME
+
+sudo -u $MYUSER ssh-keygen -t rsa # mit 3xEnter
--- /dev/null
+###Über und Untertakten der Nvidia Grafikkarte
+/etc/X11/xorg.conf
+Section “Screen”
+Identifier “Screen0″
+…
+add this string
+Option “Coolbits” “1″
+###
--- /dev/null
+###Multicard SMS Konfiguration
+#sms auf Gerät wo es eingegeben wird
+*125#
+#SMS immer auf Gerät was auch Anfrufe empfängt
+*125*0#
+#auf Karte 1
+*125*1#
+#legt dir die SMS auf Karte 2
+*125*2#
+###Multicard MMS Konfigurieren
+#MMS immer auf Gerät was auch Anfrufe empfängt
+*126*0#
+#legt dir die MMS auf Karte 1
+*126*1#
+###Die Codes für O2 Multicard auf einen Blick
+*120#
+###Die Übersicht Ihrer aktiven SIM-Karten
+*121#
+###Info, welche Ihrer SIM-Karten Anrufe zuerst empfängt
+*122#
+###Zuweisung Anrufe für aktuelles Gerät
+*123#
+###Weiterleitungsprioritäten für Anrufe setzen (Ziffer ist Priorität)
+*123*Ziffer#
+###Multicard Standarteinstellung wieder herstellen
+*128#
+###LBS Konfiguration
+#auf Gerät was Anrufe erhält
+*127#
+#auf Karte 1
+*127*1#
+
--- /dev/null
+###CA erzeugen
+#Die Gültigkeit setzen wir mit 10 Jahren bewusst sehr hoch an.
+#Läuft die CA aus, so werden nämlich auch alle damit signierten Serverzertifikate ungültig.
+#Die CA enthält einen geheimen Schlüssel, welcher automatisch erzeugt und in der
+#Datei cakey.pem abgelegt wird. Das CA-Zertifikat wird nach cacert.pem geschrieben.
+#Der folgende Befehl erzeugt das einen Schlüssel für das Zertifikat mit einer Länge von 2048 Bit
+openssl req -new -x509 -newkey rsa:2048 -keyout cakey.pem -out cacert.pem -days 3650
+#Wer den geheimen Schlüssel der CA kennt, kann damit beliebige Serverzertifikate signieren.
+#Deshalb wird diese Schlüsseldatei nicht im Klartext auf der Festplatte abgelegt,
+#sondern mit einer Passphrase verschlüsselt. Diese Passphrase benötigen Sie immer dann,
+#wenn Sie mit der CA neue Zertifikate ausstellen wollen:
+Enter PEM pass phrase: geheimes_Passwort
+Verifying - Enter PEM pass phrase: geheimes_Passwort
+#Nun werden Sie gebeten, Daten einzugeben, welche die CA identifizieren.
+#Diese werden dem Client angezeigt, wenn er aufgefordert wird, das Zertifikat
+#zu akzeptieren oder abzulehnen. Der Code für Deutschland ist DE.
+#Wenn Sie ein Feld leerlassen möchten, so geben Sie einen Punkt ein.
+#Ansonsten wird der in eckigen Klammern stehende Defaultwert eingetragen:
+-----
+You are about to be asked to enter information that will be incorporated
+into your certificate request.
+What you are about to enter is what is called a Distinguished Name or a DN.
+There are quite a few fields but you can leave some blank
+For some fields there will be a default value,
+If you enter '.', the field will be left blank.
+-----
+Country Name (2 letter code) [AU]: DE
+State or Province Name (full name) [Some-State]:Sachsen
+Locality Name (eg, city) []:Chemnitz
+Organization Name (eg, company) [Internet Widgits Pty Ltd]:Hinz und Kunz AG
+Organizational Unit Name (eg, section) []:.
+#Das Feld Common Name (CN) ist hier der offizielle Name der Zertifizierungsstelle.
+#Für Ihre eigene CA können Sie einfach Ihren eigenen Namen eintragen:
+Common Name (eg, YOUR name) []: Mario Höllein
+Email Address []: mhoellein@hoellein.at
+#Fertig. Folgende zwei Dateien sind entstanden:
+root@linux# ll
+insgesamt 9
+drwxr-xr-x 2 root root 112 2006-04-30 12:08 .
+drwx------ 12 root root 600 2006-04-30 11:54 ..
+-rw-r--r-- 1 root root 1212 2006-04-30 12:08 cacert.pem
+-rw-r--r-- 1 root root 963 2006-04-30 12:08 cakey.pem
+#Vorsichtshalber sollten Sie die Rechte so setzen, dass die Schlüsseldatei nur für root lesbar ist:
+#Sie können nun ausprobieren, ob sie den Schlüssel mit der Passphrase wieder öffnen können:
+root@linux# openssl rsa -in cakey.pem -noout -text
+Enter pass phrase for cakey.pem: wrzlprmpft
+Private-Key: (1024 bit)
+modulus:
+ 00:d5:a5:37:51:e9:d9:fa:e3:97:e7:46:b2:88:1a:
+ b5:46:80:47:76:14:ae:2b:8b:3e:35:5c:ab:15:84:
+ 53:d9:63:2e:7f:08:4b:ec:77:db:02:45:f8:c7:46:
+ 58:cd:2d:f9:29:4d:96:3d:d8:6c:5d:9f:79:8a:04:
+ cf:b7:3a:89:da:a9:63:9f:44:b3:83:cf:0d:70:7d:
+ ...
+###Schlüssel für das Serverzertifikat erzeugen
+#Nachdem wir nun eine eigene CA haben, kann diese nun endlich für unseren Server
+#ein Zertifikat herausgeben. Dazu erzeugen wir zunächst einen 2048 Bit langen RSA Schlüssel,
+#der mit AES 128 verschlüsselt auf der Platte abgelegt wird (ja wirklich, auch hier wieder ein verschlüsselter Schlüssel).
+#Die Passphrase muss diesmal nicht sonderlich geheim sein, da wir sie ohnehin im Anschluss wieder entfernen werden.
+#OpenSSL lässt allerdings keine leere Phrase zu:
+root@linux# openssl genrsa -out serverkey.pem -aes128 2048 -days 3650
+Generating RSA private key, 2048 bit long modulus
+....+++
+.......................................+++
+e is 65537 (0x10001)
+Enter pass phrase for serverkey.pem: jaja
+Verifying - Enter pass phrase for serverkey.pem: jaja
+#So. Nun entfernen wir die Passphrase wieder. Warum?
+#Der Serverdienst (Apache, Cyrus, etc.) muss schließlich in der Lage sein, den Schlüssel ohne Ihr Zutun zu lesen.
+#Oder wollen Sie bei jedem Booten des Servers ein Passwort eingeben müssen?
+root@linux# openssl rsa -in serverkey.pem -out serverkey.pem
+Enter pass phrase for serverkey.pem: jaja
+writing RSA key
+###Certificate Signing Request erzeugen
+#Der nächste Schritt zum eigenen Zertifikat ist ein CSR. Dies muss dann nur noch von der CA signiert werden.
+#Hier sind wieder Angaben analog zum Erstellen der CA nötig, was oft Verwirrung stiftet.
+#Die allgemeinen Daten kann man ggfl. gleich wie oben eingeben:
+root@linux# openssl req -new -key serverkey.pem -out req.pem -nodes
+You are about to be asked to enter information that will be incorporated
+into your certificate request.
+What you are about to enter is what is called a Distinguished Name or a DN.
+There are quite a few fields but you can leave some blank
+For some fields there will be a default value,
+If you enter '.', the field will be left blank.
+-----
+Country Name (2 letter code) [AU]: DE
+State or Province Name (full name) [Some-State]:Sachsen
+Locality Name (eg, city) []:Chemnitz
+Organization Name (eg, company) [Internet Widgits Pty Ltd]:Hinz und Kunz AG
+Organizational Unit Name (eg, section) []:.
+#ACHTUNG, jetzt kommt das Wichtige:
+#Beim Serverzertifikat ist der Common Name von entscheidender Bedeutung. Hier muss der DNS-Name stehen,
+#unter dem der Client den Server anspricht! Wird das Zertifikat für eine HTTPS-Verbindung zu www.hoellein.at
+#verwendet, so muss der Common Name eben genau www.hoellein.at heißen. Anderfalls wird der Browser das
+#Zertifikat nicht akzeptieren, da er davon ausgehen muss, auf dem falschen Server gelandet zu sein.
+Common Name (eg, YOUR name) []: www.hoellein.at
+Email Address []: mario@hoellein.at
+#Weitere Optionen kann man einfach leer lassen:
+A challenge password []:
+An optional company name []:
+#Mittlerweile tummeln sich schon vier Dateien in unserem Verzeichnis:
+root@linux# ll
+insgesamt 17
+drwxr-xr-x 2 root root 168 2006-04-30 12:29 .
+drwx------ 12 root root 600 2006-04-30 11:54 ..
+-rw-r--r-- 1 root root 1212 2006-04-30 12:08 cacert.pem
+-rw------- 1 root root 963 2006-04-30 12:08 cakey.pem
+-rw-r--r-- 1 root root 1017 2006-04-30 12:29 req.pem
+-rw-r--r-- 1 root root 1679 2006-04-30 12:21 serverkey.pem
+###OpenSSL-Konfiguration anpassen
+#Leider kann man bei OpenSSL nicht alle Daten als Kommandozeilenargumente übergeben.
+#Einige Einstellungen muss man lästigerweise in der Datei /etc/ssl/openssl.cnf ändern,
+#bevor man signieren kann. Öffnen Sie diese Datei und passen Sie folgende Zeilen in der
+Sektion [ CA_default ] an:
+dir = . # Where everything is kept
+new_certs_dir = $dir # default place for new certs
+private_key = $dir/cakey.pem # The private key
+RANDFILE = $dir/.rand # private random number file
+default_days = 3650 # how long to certify for
+#Das Feld default_days ist auf 365 Tage voreingestellt und gibt die Gültigkeit des Zertifikates an.
+#Abgelaufene Zertifikate sind im Übrigen ein sehr häufiges Problem. Wenn es soweit ist, kennt sich
+#damit nämlich schon lange keiner mehr aus. Deswegen können Sie wie im Beispiel angegeben die
+#Lebensdauer z.B. auf 10 Jahre heraufsetzen.
+#Wenn Sie beim Serverzertifikat keinen Bundesstaat angegeben haben,
+#benötigen Sie noch folgende Änderung unter [ policy_match ]:
+stateOrProvinceName = optional
+#Nun muss man noch einige Dateien anlegen:
+root@linux# echo 01 > serial
+root@linux# touch index.txt
+###Serverzertifikat signieren
+#Kommen wir zum feierlichen Abschluss: Unsere CA signiert nun das Zertifikat:
+root@linux# openssl ca -in req.pem -notext -out servercert.pem -config ./openssl.cnf
+Enter pass phrase for ./cakey.pem: wrzlprmpft
+
+...
+
+Certificate is to be certified until Apr 27 10:45:36 2016 GMT (3650 days)
+Sign the certificate? [y/n]: y
+
+
+1 out of 1 certificate requests certified, commit? [y/n] y
+Write out database with 1 new entries
+Data Base Updated
+###Zertifikate installieren
+#Wohin sie die Zertifikate installieren, hängt natürlich vom jeweiligen Serverdienst ab.
+#Was allen gemeinsam ist: Sie benötigen nur die Dateien cacert.pem, servercert.pem und serverkey.pem.
+#Die Datei cakey.pem wird nicht benötigt. Sie sollte am besten auch nicht auf dem Server liegen
+#sondern an einer sicheren Stelle auf einem anderen Rechner.
+
+###überprüfen einer signierten nachricht
+openssl dgst -sha1 -verify pubkey.pem -signature foo-1.23.tar.gz.sha1 foo-1.23.tar.gz
+###extract infos vom zertifikat
+openssl x509 -text -in cert.pem
+###wer hat das zertifikat herausgegeben, who issued the cert?
+openssl x509 -noout -in cert.pem -issuer
+###zu wem wurde es herausgegeben, to whom was it issued?
+openssl x509 -noout -in cert.pem -subject
+###zeitraum der gültigkeit, for what dates is it valid?
+openssl x509 -noout -in cert.pem -dates
+###the above, all at once
+openssl x509 -noout -in cert.pem -issuer -subject -dates
+###hashwert des zertifikats, what is its hash value?
+openssl x509 -noout -in cert.pem -hash
+###what is its MD5 fingerprint?
+openssl x509 -noout -in cert.pem -fingerprint
+###public key extrahieren
+openssl x509 -text -in cert.pem -pubkey
+###konvertieren von PEM nach DER
+openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER
+###konvertiert ein Zertifikat in einen Zertifikatrequest
+openssl x509 -x509toreq -in cert.pem -out req.pem -signkey key.pem
+###konvertiert einen zertifikatsrequest in ein selbst unterschriebenes zertifikat
+openssl x509 -req -in careq.pem -extfile openssl.cnf -extensions v3_ca -signkey key.pem -out cacert.pem
+###Sign a certificate request using the CA certificate above and add user certificate extensions
+openssl x509 -req -in req.pem -extfile openssl.cnf -extensions v3_usr -CA cacert.pem -CAkey key.pem -CAcreateserial
+###Set a certificate to be trusted for SSL client use and change set its alias to "Mario's Class 1 CA"
+openssl x509 -in cert.pem -addtrust clientAuth -setalias "Mario's Class 1 CA" -out trust.pem
+###base64 codieren von datei test.txt nach test_b64.txt (nutzt impliziet -e)
+openssl enc -base64 -in test.txt -out test_b64.txt
+###decoden von test_b64.txt nach test.txt (base64)
+openssl enc -d -base64 -in test_b64.txt
+###
--- /dev/null
+###openswan starten
+ipsec setup start
+###openswan stoppen
+ipsec setup stop
+###openswan status (tunnel aktiv oder nicht)
+ipsec setup status
+###verbindung vpn hinzufügen (conn vpn)
+ipsec auto --add vpn
+###verbindung vpn entfernen (conn vpn)
+ipsec auto --delete vpn
+###tunnel vpn aufbauen
+ipsec auto --up vpn
+ipsec auto --verbose --up vpn
+###tunnel vpn abbauen
+ipsec auto --down vpn
+###hilfe
+ipsec --help
+###hilfe für setup
+ipsec setup --help
+###hilfe für auto
+ipsec auto --help
+###wack
+ipsec whack --debug-crypt
+ipsec whack --debug-all
+###hilfe für wack
+ipsec whack --help
+
+###beispielconf für cisco concentrator (hier gew)
+###beispielconf für checkpoint vpn (köln)
+# /etc/ipsec.conf - Openswan IPsec configuration file
+# RCSID $Id: ipsec.conf.in,v 1.15.2.6 2006/10/19 03:49:46 paul Exp $
+
+# This file: /usr/share/doc/packages/openswan/ipsec.conf-sample
+#
+# Manual: ipsec.conf.5
+
+
+version 2.0 # conforms to second version of ipsec.conf specification
+
+# basic configuration
+config setup
+ interfaces="ipsec0=eth0"
+ #interfaces=%defaultroute
+ # plutodebug / klipsdebug = "all", "none" or a combation from below:
+ klipsdebug="none"
+ plutodebug="none"
+ # "raw crypt parsing emitting control klips pfkey natt x509 private"
+ # eg: plutodebug="control parsing"
+ #
+ # ONLY enable plutodebug=all or klipsdebug=all if you are a developer !!
+ #
+ # NAT-TRAVERSAL support, see README.NAT-Traversal
+ #nat_traversal=yes
+ # virtual_private=%v4:10..0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
+ #
+ # Certificate Revocation List handling:
+ #crlcheckinterval=600
+ #strictcrlpolicy=yes
+ #
+ # Change rp_filter setting? (default is 0, disabled)
+ # See also setting in the /etc/sysctl.conf file!
+ #rp_filter=%unchanged
+ #
+ # Workaround to setup all tunnels immediately, since the new default
+ # of "plutowait=no" causes "Resource temporarily unavailable" errors
+ # for the first connect attempt over each tunnel, that is delayed to
+ # be established later / on demand.
+ # With "plutowait=yes" plutio waits for each negotiation attempt
+ # that is part of startup to finish, before proceeding with the next.
+ #plutowait=yes
+ #
+ # enable this if you see "failed to find any available worker"
+ #nhelpers=0
+
+conn halb
+ leftsubnet=10.102.0.0/16
+ also=common
+ auto=start
+conn egs
+ leftsubnet=10.114.0.0/16
+ also=common
+ auto=start
+
+conn guf
+ leftsubnet=10.118.0.0/16
+ also=common
+ auto=start
+
+conn esm
+ leftsubnet=10.115.0.0/16
+ also=common
+ auto=start
+
+conn evk
+ leftsubnet=10.113.0.0/16
+ also=common
+ auto=start
+
+conn lkw
+ leftsubnet=10.111.0.0/16
+ also=common
+ auto=start
+
+conn thv
+ leftsubnet=10.100.0.0/16
+ also=common
+ auto=start
+
+conn swan
+ leftsubnet=10.120.0.0/16
+ also=common
+ auto=start
+
+conn erw
+ leftsubnet=10.110.0.0/16
+ also=common
+ auto=start
+
+conn common
+ #das sollte alles stimmen
+ type=tunnel
+ #ext ip cpfw
+ left=212.184.19.93
+ #ext ip tbz
+ leftnexthop=194.113.71.71
+ #vpn client
+ #right=172.17.1.7
+ right=10.130.4.1
+ #nächster rechner
+ rightnexthop=10.130.4.2
+ #wir nutzen ike
+ keyexchange=ike
+ ########
+ #das sollte die Renegotioate IKE sein
+ ikelifetime=1440m
+ #das sollte phase1 3des sha1 dh2 sein
+ ike=3des-sha1-modp1024
+ #wir nutzen esp
+ auth=esp
+ #wir nutzen PSK aus /etc/ipsec.secret
+ authby=secret
+ #perfect forward secrecy
+ pfs=yes
+ #3des sha1 dh2 für esp
+ esp=3des-sha1-1024
+ #das sollte die Renegotiate Ipsec sein
+ keylife=3600s
+ #kein aggressive mode (ist immer an)
+ aggrmode=no
+ #test
+ pfsgroup=modp1024
+ #leftsubnet=10.102.0.0/16
+ rightsubnet=10.130.4.0/24
+# auto=start
+#Disable Opportunistic Encryption
+include /etc/ipsec.d/examples/no_oe.conf
+
+###ipsec.secrets (tbz)
+#10.130.4.1 212.184.19.93: PSK "WMrcPncRz3HW"
+#172.17.1.7 212.184.19.93: PSK "WMrcPncRz3HW"
+212.184.19.93 172.17.1.7: PSK "WMrcPncRz3HW"
+212.184.19.93 10.130.4.1: PSK "WMrcPncRz3HW"
+80.228.110.21 10.130.4.1: PSK "superdau"
+@sslvpn 80.228.110.21: PSK "superdau"
+#@sslvpn 80.228.110.21 : PSK "superdau"
+
+###
--- /dev/null
+###Key erzeugen für neuen Nutzer bei TBZ
+#in Arbeitsverzeichnis wechseln
+cd /media/SAVE/vpn/openVPN/createUserKey
+#conf exportieren
+export OPENSSL_CONF=/media/SAVE/vpn/openVPN/createUserKey/openssl_tbzvpn.cnf
+#neuen key mit request erzeugen
+openssl req -nodes -new -keyout Sven.key -out Sven.csr
+#client key signieren
+openssl ca -out Sven.crt -in Sven.csr
+
+
+###Openvpn mit einem verteiltem (static key) Schlüssel betreiben
+# Preshared Key erzeugen
+openvpn --genkey --secret static.key
+# server.conf erstellen
+dev tun
+ifconfig 10.8.0.1 10.8.0.2
+secret static.key
+# client.conf erstellen
+remote myremote.mydomain
+dev tun
+ifconfig 10.8.0.2 10.8.0.1
+secret static.key
+###openvpn beispiel config tbz server
+port 1194
+proto udp
+mode server
+tls-server
+dev tap
+ca /etc/ssl/vpn/keys/ca.crt
+key /etc/ssl/vpn/keys/server.key
+cert /etc/ssl/vpn/keys/server.crt
+dh /etc/ssl/vpn/keys/dh2048.pem
+ifconfig 192.168.156.1 255.255.255.0
+ifconfig-pool 192.168.156.10 192.168.156.50
+push "route-gateway 192.168.156.1"
+push "route 172.17.6.0 255.255.255.0 192.168.156.1"
+;push redirect-gateway
+link-mtu 1400
+mssfix
+keepalive 10 120
+auth SHA1
+cipher AES-256-CBC
+user nobody
+group nobody
+persist-key
+persist-tun
+comp-lzo
+verb 3
+
+###openvpn beispiel config tbz client
+client
+dev tap
+proto udp
+remote ww2.tbz-pariv.de 1194
+resolv-retry infinite
+nobind
+persist-key
+persist-tun
+ca ca.crt
+cert ${name}.crt
+key ${name}.key
+ns-cert-type server
+comp-lzo
+verb 3
+cipher AES-256-CBC
+auth SHA1
+
+###openvpn beispiel init scrip tbz
+#!/bin/sh
+. /etc/rc.status
+
+### BEGIN INIT INFO
+# Provides: openvpn
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Description: Start the openvpn daemon
+### END INIT INFO
+
+openvpn=""
+openvpn_locations="/usr/sbin/openvpn /usr/local/sbin/openvpn"
+for location in $openvpn_locations
+do
+ if [ -f "$location" ]
+ then
+ openvpn=$location
+ fi
+done
+
+# openvpn directory
+work=/etc/openvpn
+
+# Lockfile
+lock="/var/lock/subsys/openvpn"
+
+# PID directory
+piddir="/var/run/openvpn"
+
+# openvpn da
+if ! [ -f $openvpn ]
+then
+ echo "openvpn binary not found"
+ exit 0
+fi
+rc_reset
+case "$1" in
+ start)
+ echo -n $"Starting openvpn: "
+ /sbin/modprobe tun >/dev/null 2>&1
+ if [ ! -d $piddir ]; then
+ mkdir -p $piddir
+ fi
+
+ if [ -f $lock ]; then
+ for pidf in `/bin/ls $piddir/*.pid 2>/dev/null`; do
+ if [ -s $pidf ]; then
+ kill `cat $pidf` >/dev/null 2>&1
+ fi
+ rm -f $pidf
+ done
+ rm -f $lock
+ sleep 2
+ fi
+ rm -f $piddir/*.pid
+ cd $work
+ c=${work}/server.conf
+ startproc $openvpn --daemon --writepid $piddir/openvpn.pid --config $c --cd $work
+ touch $lock
+ rc_status -v
+ ;;
+ stop)
+ echo -n $"Shutting down openvpn: "
+ for pidf in `/bin/ls $piddir/*.pid 2>/dev/null`; do
+ if [ -s $pidf ]; then
+ kill `cat $pidf` >/dev/null 2>&1
+ fi
+ rm -f $pidf
+ done
+ rm -f $lock
+ rc_status -v
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ status)
+ if [ -f $lock ]; then
+ for pidf in `/bin/ls $piddir/*.pid 2>/dev/null`; do
+ if [ -s $pidf ]; then
+ kill -USR2 `cat $pidf` >/dev/null 2>&1
+ fi
+ done
+ echo "Status written to /var/log/messages"
+ echo -n $"openvpn: "
+ rc_status -v
+ else
+ echo -n $"openvpn: service not started"
+ checkproc $openvpn
+ rc_status -v
+ exit
+ fi
+ ;;
+ *)
+ echo "Usage: openvpn {start|stop|restart|status}"
+ exit 1
+ ;;
+
+esac
+exit 0
+
+###
+Filename Needed By Purpose Secret
+ca.crt server + all clients Root CA certificate NO
+ca.key key signing machine only Root CA key YES
+dh{n}.pem server only Diffie Hellman parameters NO
+server.crt server only Server Certificate NO
+server.key server only Server Key YES
+client1.crt client1 only Client1 Certificate NO
+client1.key client1 only Client1 Key YES
+client2.crt client2 only Client2 Certificate NO
+client2.key client2 only Client2 Key YES
+
+
+/usr/share/doc/packages/openvpn
+
+###root zertifikat erstellen und openssl.conf anpassen, damit die auf das aktuelle root-zert. zeigt
+#Bsp.:
+openssl req -nodes -new -x509 -keyout tmp-ca.key -out tmp-ca.crt
+
+###Diffie Hellman Parameter file erzeugen, für tls-server, wollen wir ja
+###2048 ist sicherer aber auch ein bissl langsamer
+#Bsp.:
+openssl dhparam -out dh1024.pem 1024
+
+###client zert. erzeugen
+openssl req -nodes -new -keyout mycert.key -out mycert.csr
+
+###dann dieses client zert. auf dem server signieren
+openssl ca -out mycert.crt -in mycert.csr
+###dann mycert.crt zurück zum client kopieren und nutzen
+
+
+###anschauen der crl (Certificate Revocation List) als ascii
+openssl crl -in crl.pem -noout -text
+
+###openssl.cnf anpassen
+* default_days (spezifiziert wie lange das Zertifikat gültig sein soll, 3650 sind 10 Jahre)
+* dir (falls ihr ein anderes Verzeichnis nehmen wollt)
+* certificate (zu my-ca.crt)
+* private_key (zu my-ca.key)
+* default_bits (zu 2048 für mehr Sicherheit)
+###ca erstellen
+openssl req -nodes -new -x509 -keyout my-ca.key -out my-ca.crt -days 3650
+
+###server/client certs
+openssl req -nodes -new -keyout server.key -out server.csr
+openssl ca -out server.crt -in server.csr
+openssl req -nodes -new -keyout client.key -out client.csr
+openssl ca -out client.crt -in client.csr
+
+###dh-key
+openssl dhparam -out dh2048.pem 2048
+
+###iptables
+iptables -t filter -A INPUT --protocol udp --dport 5000 -j ACCEPT -i eth1 # eth1 ist das Interface an dem der AP hängt
+iptables -t filter -A INPUT -j REJECT -i eth1
+
+ # easy-rsa parameter settings
+
+ # NOTE: If you installed from an RPM,
+ # don't edit this file in place in
+ # /usr/share/openvpn/easy-rsa --
+ # instead, you should copy the whole
+ # easy-rsa directory to another location
+ # (such as /etc/openvpn) so that your
+ # edits will not be wiped out by a future
+ # OpenVPN package upgrade.
+
+ # This variable should point to
+ # the top level of the easy-rsa
+ # tree.
+ export D=`pwd`
+
+ # This variable should point to
+ # the openssl.cnf file included
+ # with easy-rsa.
+ export KEY_CONFIG=$D/openssl.cnf
+
+ # Edit this variable to point to
+ # your soon-to-be-created key
+ # directory.
+ #
+ # WARNING: clean-all will do
+ # a rm -rf on this directory
+ # so make sure you define
+ # it correctly!
+ export KEY_DIR=$D/keys
+
+ # Issue rm -rf warning
+ echo NOTE: when you run ./clean-all, I will be doing a rm -rf on $KEY_DIR
+
+ # Increase this to 2048 if you
+ # are paranoid. This will slow
+ # down TLS negotiation performance
+ # as well as the one-time DH parms
+ # generation process.
+ export KEY_SIZE=1024
+
+ # These are the default values for fields
+ # which will be placed in the certificate.
+ # Don't leave any of these fields blank.
+ export KEY_COUNTRY=KG
+ export KEY_PROVINCE=NA
+ export KEY_CITY=BISHKEK
+ export KEY_ORG="OpenVPN-TEST"
+ export KEY_EMAIL="
+ me@myhost.mydomainThis e-mail address is being protected from spambots, you need JavaScript enabled to view it
+ "
+
+easy-rsa/clean-all
+
+ #!/bin/sh
+
+ #
+ # Initialize the $KEY_DIR directory.
+ # Note that this script does a
+ # rm -rf on $KEY_DIR so be careful!
+ #
+
+ d=$KEY_DIR
+
+ if test $d; then
+ rm -rf $d
+ mkdir $d && \
+ chmod go-rwx $d && \
+ touch $d/index.txt && \
+ echo 01 >$d/serial
+ else
+ echo you must define KEY_DIR
+ fi
+
+easy-rsa/build-dh
+
+ #!/bin/sh
+
+ #
+ # Build Diffie-Hellman parameters for the server side
+ # of an SSL/TLS connection.
+ #
+
+ if test $KEY_DIR; then
+ openssl dhparam -out ${KEY_DIR}/dh${KEY_SIZE}.pem ${KEY_SIZE}
+ else
+ echo you must define KEY_DIR
+ fi
+
+easy-rsa/build-ca
+
+ #!/bin/sh
+
+ #
+ # Build a root certificate
+ #
+
+ if test $KEY_DIR; then
+ cd $KEY_DIR && \
+ openssl req -days 3650 -nodes -new -x509 -keyout ca.key -out ca.crt -config $KEY_CONFIG && \
+ chmod 0600 ca.key
+ else
+ echo you must define KEY_DIR
+ fi
+
+easy-rsa/build-inter
+
+ #!/bin/sh
+
+ #
+ # Make an intermediate CA certificate/private key pair using a locally generated
+ # root certificate.
+ #
+
+ if test $# -ne 1; then
+ echo "usage: build-inter <name>";
+ exit 1
+ fi
+
+ if test $KEY_DIR; then
+ cd $KEY_DIR && \
+ openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \
+ openssl ca -extensions v3_ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG
+ else
+ echo you must define KEY_DIR
+ fi
+
+easy-rsa/build-key
+
+ #!/bin/sh
+
+ #
+ # Make a certificate/private key pair using a locally generated
+ # root certificate.
+ #
+
+ if test $# -ne 1; then
+ echo "usage: build-key <name>";
+ exit 1
+ fi
+
+ if test $KEY_DIR; then
+ cd $KEY_DIR && \
+ openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \
+ openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \
+ chmod 0600 $1.key
+ else
+ echo you must define KEY_DIR
+ fi
+
+easy-rsa/build-key-pass
+
+ #!/bin/sh
+
+ #
+ # Similar to build-key, but protect the private key
+ # with a password.
+ #
+
+ if test $# -ne 1; then
+ echo "usage: build-key-pass <name>";
+ exit 1
+ fi
+
+ if test $KEY_DIR; then
+ cd $KEY_DIR && \
+ openssl req -days 3650 -new -keyout $1.key -out $1.csr -config $KEY_CONFIG && \
+ openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG && \
+ chmod 0600 $1.key
+ else
+ echo you must define KEY_DIR
+ fi
+
+easy-rsa/build-req
+
+ #!/bin/sh
+
+ #
+ # Build a certificate signing request and private key. Use this
+ # when your root certificate and key is not available locally.
+ #
+
+ if test $# -ne 1; then
+ echo "usage: build-req <name>";
+ exit 1
+ fi
+
+ if test $KEY_DIR; then
+ cd $KEY_DIR && \
+ openssl req -days 3650 -nodes -new -keyout $1.key -out $1.csr -config $KEY_CONFIG
+ else
+ echo you must define KEY_DIR
+ fi
+
+easy-rsa/build-req-pass
+
+ #!/bin/sh
+
+ #
+ # Like build-req, but protect your private key
+ # with a password.
+ #
+
+ if test $# -ne 1; then
+ echo "usage: build-req-pass <name>";
+ exit 1
+ fi
+
+ if test $KEY_DIR; then
+ cd $KEY_DIR && \
+ openssl req -days 3650 -new -keyout $1.key -out $1.csr -config $KEY_CONFIG
+ else
+ echo you must define KEY_DIR
+ fi
+
+easy-rsa/sign-req
+
+ #!/bin/sh
+
+ #
+ # Sign a certificate signing request (a .csr file)
+ # with a local root certificate and key.
+ #
+
+ if test $# -ne 1; then
+ echo "usage: sign-req <name>";
+ exit 1
+ fi
+
+ if test $KEY_DIR; then
+ cd $KEY_DIR && \
+ openssl ca -days 3650 -out $1.crt -in $1.csr -config $KEY_CONFIG
+ else
+ echo you must define KEY_DIR
+ fi
+
+
+###Zertifikate sperren
+Aus OpenVPN Wiki
+Wechseln zu: Navigation, Suche
+
+In Firmen ist es häufig nötig, erstellte Zertifikate wieder einzuziehen, z.B. wenn ein Notebook geklaut wurde oder wenn ein Mitarbeiter geht.
+
+Um sich das Leben einfacher zu machen, gibt es eine CRL (Certificate Revocation List), die überprüft ob ein Zertifikat noch gültig ist. Dabei holt sie sich in Periodischen Abständen ihre Informationen aus der index.txt. Ich mache es absichtlich etwas ausführlicher, um auch Einsteigern, das Leben zu erleichtern.
+
+
+Wir kopieren uns zuerst die openssl.cnf in ein Arbeitsverzeichnis, wer Probleme mit dem Auffinden hat benutzt 'find'.
+
+
+Erstellen eines Arbeitsverzeichnises zwecks Übersichtlichkeit
+
+mkdir /opt/sslcnf
+
+
+Suchen der openssl.cnf (bei mir /etc/ssl/ )
+
+find / -name openssl.cnf
+
+
+Kopieren ins Arbeitsverzeichnis
+
+cp /etc/ssl/openssl.cnf /opt/sslcnf/
+
+
+Damit Openssl auch weiß, welche Konfig wir nun verwenden:
+
+export OPENSSL_CONF=/opt/sslcnf/openssl.cnf
+
+Kleiner Nachtrag: Linux hat die Angewohntheit bei neuen Shells den neuen eintrag einfach rauszukicken. Wer sichergehen will, dass immer die OPENSSL_CONF verwendet wird, wechselt nach /etc und legt eine profile.local an in die er dann den "export ..." Befehl hineinschreibt.
+
+Überprüfung, ob OPENSSL_CONF richtig gesettz wurde
+
+env | grep OPENSSL_CONF
+
+
+Nun erstellen wir uns eine index.txt und serial, falls noch nicht geschehen (sollte aber jeder haben, wenn man sich ans OpenVPN Tutorial gehalten hat)
+
+ovpn:/opt/sslcnf # touch index.txt
+
+ovpn:/opt/sslcnf # touch serial && echo 01 >> serial
+
+Die Serial wird mit jedem erstellten Zertifikat hochgezählt, wir beginnen bei 1 Smile
+
+Dannach gehts weiter mit ein paar Anpassungen der openssl.cnf, dabei gehe ich aber nur auf die Grundlegenden Einstellungen für unsere CRL ein
+
+dir = /opt/sslcnf # Die Variable für unser AV
+certs = /pfad zu certs # Wo liegen unsere Certs?
+crl_dir = $dir/crl # Da liegt unsere crl
+database = $dir/index.txt # Unsere index.txt
+#unique_subject = no # Set to 'no' to allow creation of
+ # several ctificates with same subject.
+new_certs_dir = $dir/newcerts # default place for new certs.
+
+certificate = /pfad zur vpn-ca # unser stammzertifikat
+serial = $dir/serial # unsere serial datei
+#crlnumber = $dir/crlnumber # the current crl number
+ # must be commented out to leave a V1 CR
+L
+crl = $dir/crl.pem # die CRL Datei
+private_key = $dir/private/cakey.pem# unser privater Key
+RANDFILE = $dir/private/.rand # private random number file
+
+
+Wollen wir schon ein Zertifikat verbieten, dann machen wir das mit dem Befehl:
+
+ovpn:/opt/sslcnf # openssl ca -revoke /opt/openvpn/certs/client1_cert.pem
+
+
+Daraufhin ein paar Meldungen und die Bitte, das Passwort für unseren cakey einzugeben:
+
+Using configuration from /opt/openssl.cnf
+5194:error:0E06D06C:configuration file routines:NCONF_get_string:no value:conf_lib.c:329:group=CA_default name=unique_subject
+Enter pass phrase for /opt/openvpn/certs/vpn-cakey.pem:
+DEBUG[load_index]: unique_subject = "yes"
+Adding Entry with serial number 03 to DB for /C=DE/ST=Some-State/L=munic/O=bea/CN=04
+Revoking Certificate 03.
+Data Base Updated
+
+
+Daraufhin wird die index.txt automatisch erweitert:
+
+R 160515125947Z 060531105703Z 03 unknown /C=DE/ST=Some-State/L=munic/O=bea/CN=04
+
+Das R steht für Revoked, V für Valid und E für Expired.
+
+Nachdem dies geschehen ist, erstellen wir uns die CRL. Mit -crlhours 1 geben wir an, wie oft diese aktualisiert wird (jede Stunde..)
+
+ovpn:/opt/sslcnf # openssl ca -gencrl -crlhours 1 -out crl.pem
+
+
+Da man mit 'less crl.pem' nur kryptisches gekürzel erhält sehen wir uns die Datei mit folgedem Befehl an:
+
+openssl crl -in crl.pem -noout -text
+
+
+Das ganze sollte dann ungefähr so aussehen:
+
+Certificate Revocation List (CRL):
+ Version 1 (0x0)
+ Signature Algorithm: md5WithRSAEncryption
+ Issuer: /C=DE/L=munic/O=bea/CN=02
+ Last Update: May 31 09:29:18 2006 GMT
+ Next Update: Jun 30 09:29:18 2006 GMT
+Revoked Certificates:
+ Serial Number: 03
+ Revocation Date: May 31 08:16:21 2006 GMT
+ Signature Algorithm: md5WithRSAEncryption
+ 12:e3:03:df:55:a0:5b:37:93:8a:48:43:00:c3:fc:b4:e8:fd:
+ e3:f9:c0:29:2e:da:b6:a8:ef:d1:f0:6b:a9:5b:b6:9c:d9:4c:
+ df:a1:87:e6:cd:f0:5d:cd:58:25:41:eb:9a:a2:73:ce:41:ae:
+ 1c:82:c5:ba:f6:6b:b8:7a:7b:b8:49:82:cc:63:32:d7:9e:4d:
+ 88:46:86:11:4c:82:1c:58:b8:b7:ad:1a:ca:4c:af:fd:dd:8a:
+ c1:c3:7f:2d:46:da:24:2c:59:6e:4e:c9:16:a3:79:27:95:82:
+ dc:7d:44:b3:95:38:0f:71:bf:6f:e3:66:d8:1e:3b:d6:27:14:
+ 94:75:39:51:51:b8:c8:19:9c:8e:22:8b:b7:f0:19:0f:bd:db:
+ 05:24:db:23:e8:25:6a:28:ca:38:cc:ea:3a:ea:0a:c0:51:04:
+ 5f:df:ad:63:58:ca:be:c9:01:2d:e4:40:7a:ba:15:30:04:c5:
+ 1a:e9:7a:cc:2c:05:39:5b:86:46:0a:87:f5:17:15:5e:78:64:
+ 98:6d:25:93:11:39:e5:a7:43:e6:db:f0:21:30:4d:8f:34:e2:
+ 8c:d6:22:c5:68:d9:f6:6a:c9:b7:6f:5c:b0:0b:a5:5e:75:00:
+ af:65:70:60:8f:05:8e:95:03:10:75:05:06:6d:60:1f:69:1b:
+ 12:68:12:c1
+
+
+Als letztes sagen wir unserem VPN Server noch, dass wir mit einer CRL Liste arbeiten, die er sich doch bitte ansehen soll. Dazu fügen wir folgende Zeile in die VPN-Konfig
+
+crl-verify /opt/sslcnf/crl.pem
+
+
+Wenn wir nun mit dem revoke-befehl (siehe oben) Zertifikate aussperren, wird diese in einer Stunde in unsere CRL eingetragen. Wer nicht warten will, erstellt sich nach dem revoke eine neue CRL mit gleichem Namen, die alte wird überschrieben.
+
+Sollte aus Versehen ein Zertifikat gesperrt werden, löscht man den entsprechenden Eintrag aus der index.txt, wartet auf die nächste Aktualisierung oder erstellt die CRL neu.
+############
+
+############
+Erstellen von Zertifikaten auf dem Server
+
+Wir melden uns zuerst mit Putty [7] an unseren Server an. Bevor wir mit der Schlüsselerstellung anfangen, noch ein Hinweis. Es wird bei der Erstellung der Schlüssel auch eine Abfrage gestartet, wo Land, Stadt, Benutzer E-Mail usw. eingegeben werden müssen.
+Dafür kann man immer die gleiche Bezeichnung nehmen mit einer Ausnahme --> der CommonName muss immer verschieden sein.
+
+So nun geht?s los:
+
+Erst wechseln wir in das ssl Verzeichniss
+
+cd /etc/ssl/
+
+Der übersicht halber erstellen wir ein Unterverzeichnis "Zertifikate" wo wir später unsere ganzen erstellten Zertifikate ablegen.
+
+mkdir Zertifikate
+
+Jetzt erstellen wir die Schlüssel für unser CA ( Certifikate Authority )
+
+openssl genrsa -aes256 -out private/vpn-cakey.pem 2048
+
+openssl: startet die Prozedur
+genrsa: generiert die Schlüssel
+-aes256: ist der Verschlüsselungsalgorithmus
+-out: benennt oder erstellt die Ausgabedatei
+
+Beim ausführen werden wir aufgefordert ein Passwort einzugeben (Enter Pass Phrase for vpn-cakey.pem: ). Diese wird später gebraucht um unsere Zertifikate zu verifizieren.
+
+Danach erstellen wir unser CA
+
+openssl req -new -x509 -days 365 -key private/vpn-cakey.pem -out vpn-ca.pem -set_serial 1
+
+req: erstellt eine Anfrage ( Request )
+-new: sagt das wir eine neue Anfrage schicken
+-x509: verwendeter Standart für das CA
+-days: solange ist das Zertifikat gültig
+-key: der verwendete Masterschlüssel zum erstellen des CA
+-set_serial: die Seriennummer die hochgezählt wird.
+
+Jetzt müssen noch die Clientzertifikate erstellt werden. Der Serverschlüssel wird als erstes von den Schlüsselpaaren erstellt
+
+touch index.txt && echo "01" > serial
+
+index.txt: damit man später die Zertifikate sperren kann
+echo ?01? > serial: um eine 1 in die Serialdatei zu schreiben
+
+Jetzt erstellen wir die Zertifikatanfrage und den Schlüssel
+
+openssl req -new -newkey rsa:2048 -out Zertifikate/server_csr.pem -nodes -keyout private/server_key.pem -days 365
+
+newkey: erstellt einen neuen Schlüsselbund
+rsa:2048: ist die Schlüssellänge (1024 sollten aber auch ausreichen aber 2048 ist besser)
+-nodes: es wird kein Passwort auf das Zertifikt gelegt ( sollte aber bei den Clientzertifikaten nicht verwendet werden )
+-keyout: Ausgabe des Schlüssel in die Datei
+server_csr.pem: Zertifikatanfrage
+
+So jetzt der Schlüssel und das signierte Zertifikat
+
+openssl x509 -req -in Zertifikate/server_csr.pem -out Zertifikate/server_cert.pem -CA vpn-ca.pem -CAkey private/vpn-cakey.pem
+ -CAserial serial -days 365
+
+-in: sagt uns welche Zertifikatanfrage verarbeitet werden soll
+-out: Zertifikatname
+-CA: für das Unterzeichnen des Zertifikates
+-Cakey: Masterschlüssel für das erstellen des Zertifikates
+
+Nun die Clients ( im Prinzip daselbe wie beim Server )
+
+openssl req -new -newkey rsa:2048 -out Zertifikate/Client1_csr.pem -keyout private/Client1_key.pem -days 365
+
+openssl x509 -req -in Zertifikate/Client1_csr.pem -out Zertifikate/Client1_cert.pem -CA vpn-ca.pem
+ -CAkey private/vpn-cakey.pem -CAserial serial -days 365
+
+Zum Schluss noch den Diffie Hellman Parameter [9] erzeugen.
+
+openssl dhparam -out dh2048.pem 2048
+
+Da das erzeugen des Diffie Hellman Parameter sehr lange dauert reichen hier auch 1024 für den normalen gebrauch völlig aus. Muss dann aber in der Config von 2048 auf 1024 geändert werden.
+[bearbeiten] Erstellen der Config-Dateien
+
+Nun müssen wir die Configdateien für den Server und für den Client erstellen. Dieses habe ich auf meinen Windowsrechner mit dem Texteditor gemacht. Beim speichern ist darauf zu achten, dass die Config für den Server unter "Server.ovpn" und die Config für den Windows Client unter "Client.ovpn" gespeichert werden. Bei Speicher darauf achten das die endung ".ovpn" bleibt.
+[bearbeiten] Server-Config (Server.ovpn)
+
+# Port Standardport 1194
+port 1194
+
+# Die Revoke Liste überprüfen
+#crl-verify /etc/ssl/crl.pem
+
+# TCP oder UDP?
+proto udp
+mode server
+tls-server
+
+dev tap
+
+#Unsere Server IP
+ifconfig 192.168.100.1 255.255.255.0
+ifconfig-pool 192.168.100.2 192.168.100.9
+#Server IP Adresse (Adressbereich. in dem Fall alles von 10.10.10.0)
+#server
+
+#Wo liegen unsere Zertifikate
+ca /etc/ssl/vpn-ca.pem
+cert /etc/ssl/Zertifikate/server_cert.pem
+key /etc/ssl/private/server_key.pem
+
+#Diffie-Hellmann Parameter
+dh /etc/ssl/dh2048.pem
+
+#Die Selbe IP in der nächsten Sitzung vergeben
+#ifconfig-pool-persist ipp.txt
+
+#IPs in den IP Tables eintragen, DNS neu vergeben und über Den Server das Routing machen, dass man z.B. über den Tunnel auf ein
+# lokales Intranet zuzugreifen
+#push "route 10.0.0.0 255.0.0.0"
+#push "dhcp-option DNS 192.168.1.xyz"
+#push "redirect-gateway"
+#push "route 0.0.0.0 0.0.0.0"
+
+#Authentifizierungsmethode
+auth SHA1
+
+#Verschlüsselungs Algorithmus
+cipher aes-256-cbc
+
+#Benutze Komprimierung
+comp-lzo
+
+#Setzt die Rechte
+user nobody
+group nogroup
+
+#Wird wegen user nobody/group nobody benötigt.
+persist-key
+persist-tun
+
+#Logging 0, (Zum testen:5)
+verb 7
+
+Weitere Befehle kann man sich auch noch hier [10] anschauen.
+
+Bitte die Client-Config nicht blind kopieren. Es muss noch die "Serveradresse" durch die IP von deinem Server ersetzt werden.
+[bearbeiten] Client-Config (Client.ovpn)
+
+#Festlegen als was fungiert wird
+tls-client
+pull
+
+# Methode festlegen tun oder tap
+dev tap
+
+# Protokoll auswaehlen udp oder tcp
+proto udp
+
+# IP/Name und Port des Servers
+remote Serveradresse 1194
+
+# Auflösen des Hostnames des Servers (wegen nicht permanent mit dem Internet verbundenen Rechnern)
+resolv-retry infinite
+
+# Localen Port festlegen oder freigeben
+nobind
+
+
+# Verbindung immer gleich halten
+persist-key
+persist-tun
+
+#zu verwendende Zertifikate und Schlüssel
+ca C:\\Programme\\Openvpn\\config\\vpn-ca.pem
+cert C:\\Programme\\Openvpn\\config\\Client1_cert.pem
+key C:\\Programme\\Openvpn\\config\\Client1_key.pem
+
+# Verschlüsselung
+cipher AES-256-CBC
+
+# Komprimiernug
+comp-lzo
+
+# Authentifizierungsmethode
+auth SHA1
+
+# "Gesprächigkeit" des Tunnels
+verb 3
+
+# Silence repeating messages
+mute 20
+
+Weitere Befehle kann man sich auch noch hier [10] anschauen.
+So nun folgende Dateien mit WinSCP [8] auf unseren Clientrechner unter "C:\Prorgamme\OpenVPN\config" kopieren
+
+vpn-ca.pem
+client1_cert.pem
+client1_key.pem
+Client.ovpn
+
+Wir sind fast fertig mit der Installation.
+Nur noch unsere erstellte "Server.ovpn" mit WinSCP [8] auf den Server unter
+
+/etc/openvpn/
+
+kopieren.
+
+Um spätere Warnungen zu vermeiden ändern wir noch die Rechte der "server_key.pem" ab:
+
+ chmod 600 /etc/ssl/private/server_key.pem
+
+[bearbeiten] Serverconfig testen
+
+Bevor wir den Tunnel starten, sollten wir die Config mal testen:
+
+openvpn --config /etc/openvpn/Server.ovpn
+
+Hier sollten keine Fehler auftauchen.
+[bearbeiten] Tunnel starten
+
+Wenn wir beim Configtest keine Fehler erhalten haben können wir das ganze jetzt starten:
+
+openvpn /etc/openvpn/Server.ovpn
+
+Sobald der Server läuft können wir versuchen, uns mit dem Client zu verbinden:
+Am Client auf Start -> Programme -> OpenVPN -> OpenVPN GUI
+
+In der Taskleiste erscheint dann ein Symbol mit 2 roten Bildschirmen und einer Weltkugel. Dieses Symbol klicken wir mit der ?rechten Maustaste? an Dann gehen wir im Auswahlfeld auf "Verbinden", geben unser Passwort ein und klicken auf ?Ok?. Nun wird eine Verbindung zum Server aufgebaut. Dies sieht man daran, das das VPN-Symbol von rot auf gelb wechselt. Ist der Verbindungsaufbau abgeschlossen erscheint das VPN-Symbol in grün.
+
+Und "Hurra" wir haben einen VPN-Tunnel zu unserem Server aufgebaut.
+
+So dies ist eine kleine Anleitung wie ich meine erste VPN-Verbindung mit OpenVPN aufgebaut habe.
+############
--- /dev/null
+###scripte: openwrt
+###usbstick 3g/umts nutzen
+###www: http://wiki.openwrt.org/doc/recipes/3gdongle
+#benötigte Paktet installieren
+opkg install comgt kmod-usb2 kmod-usb-acm kmod-usb-ohci kmod-usb-serial-option kmod-usb-serial-wwan kmod-usb-uhci usb-modeswitch usb-modeswitch-data
+#Netzwerk konfigurieren
+edit file: /etc/config/network
+#
+config interface wan
+ option ifname ppp0
+ option pincode 1234
+ option device /dev/ttyUSB0
+ option apn your.apn
+ option service umts
+ option proto 3g
+ option username yourusername
+ option password yourpassword
+#
+#chatscripte einrichten
+edit file: /etc/chatscripts/3g.chat
+#
+ABORT BUSY
+ABORT 'NO CARRIER'
+ABORT ERROR
+REPORT CONNECT
+TIMEOUT 12
+"" "AT&F"
+OK "ATE1"
+OK 'AT+CGDCONT=1,"IP","$USE_APN"'
+ABORT 'NO CARRIER'
+TIMEOUT 15
+OK "ATD*99***1#"
+CONNECT ' '
+#wenn man das noch mit einfügt dann wird die Signalqualität mit angezeigt
+"" "AT+CSQ"
+#starten der wan Verbindung
+ifup wan
+###Signalstärke anzeigen lassen
+gcom info -d /dev/ttyUSBx
+###firewall für wan
+file: /etc/config/firewall
+#
+config 'zone'
+ option 'name' 'wan'
+ option 'input' 'REJECT'
+ option 'output' 'ACCEPT'
+ option 'forward' 'REJECT'
+ option 'masq' '1'
+ option 'mtu_fix' '1'
+ option 'network' 'wan'
+#
+###loadbalancer für multiwan
+file:
+config 'interface' 'wan'
+ option 'proto' '3g'
+ option 'service' 'umts'
+ option 'device' '/dev/ttyUSB0'
+ option 'apn' 'vpn'
+ option 'pincode' ''
+ option 'username' 'vpn'
+ option 'password' 'vpn'
+ option 'maxwait' '20'
+ option 'defaultroute' '0'
+
+config 'interface' 'wan2'
+ option 'proto' '3g'
+ option 'service' 'umts'
+ option 'device' '/dev/ttyUSB3'
+ option 'apn' 'erainternet'
+ option 'pincode' ''
+ option 'username' 'erainternet'
+ option 'password' 'erainternet'
+ option 'maxwait' '10'
+ option 'defaultroute' '0'
+###uci nutzen import von dhcp.conf und merge die schon vorhanden werte
+uci import -m dhcp < /etc/config/dhcp.conf
+###anzeigen aller werte
+uci show
+###setzen eines bestimmten werte
+uci set <config>.<section>[.<option>]=<value>
+uci set httpd.@httpd[0].home=/www
+###einen wert ausgeben lassen
+uci get httpd.@httpd[0].port
+###wan ip abfragen
+uci -P/var/state get network.wan.ipaddr
+###Beispiel Konfigurationsdateien für uci
+package 'example'
+
+config 'example' 'test'
+ option 'string' 'some value'
+ option 'boolean' '1'
+ list 'collection' 'first item'
+ list 'collection' 'second item'
+###eigene Pakete in Image integrieren
+#web: http://wiki.freifunk.net/OpenWrt_Buildroot
+./scripts/feeds update -a # Definitionen ziehen
+./scripts/feeds install -a -p luci # alles von LuCI + Depends holen
+./scripts/feeds install tcpdump nano openvpn # ein paar andere dazu
+#danach stehen die Pakete bei make menuconfig zur Verfügung
+make package/symlinks # erzeugt symlinks in package/feeds/x/y auf feeds/x/y
+ * [ ] Das Paket wird nicht kompiliert
+ * [*] Das Paket wird kompiliert und ins Image übernommen. Es muss nicht mit opkg install nachinstalliert werden.
+ * [M] Das Paket wird kompiliert, aber nicht ins Image übernommen. Es kann mit mit opkg install <Paketname> nachinstalliert werden.
+###downloaden, aber nicht bauen
+make download
+###Kernel konfigurieren
+make kernel_menuconfig
+###Kernelsource neu patchen und Kernel neu kompilieren
+make target/linux/{clean,compile} V=99
+###einzelnes Core-Package (neu-)kompilieren
+make package/<packagename>/{clean,compile} V=99
+###einzelnes Package aus Feed (neu-)kompilieren
+make package/feeds/<feedname>/<packagename>/{clean,compile,install} V=99
+###Paket kompilieren auch wenn es nicht in menuconfig gewählt ist
+make package/... V=99 DEVELOPER=1
+###manuelles Aktualisieren des Package Index packages/Packages, manuell erstellte Pakete tauchen vorher nicht im opkg index auf
+cd bin/<arch>/packages ; ../../../scripts/ipkg-make-index.sh . > Packages ; gzip -c Packages > Packages.gz
+###Paket-feeds updaten (Änderungen an Packeten neu einlesen)
+./scripts/feeds update
+###evtl. neue Programme aus den Paket-feeds installieren (erst hiernach tauchen die Programme im make menuconfig auf)
+./scripts/feeds install -a
+###Target- und Paketlisten neu einlesen
+rm -rf tmp
+###Buildroot auf den aktuellen Stand der Entwicklung aktualisieren
+svn up
+###make bei Fehlern nicht unterbrechen, wenn ein Programm nur als Paket kompiliert wird
+make IGNORE_ERRORS=m
+###spicken bei anderen Paketen z.B. finde und zeige vorhandene DEPENDS:= statements in allen Makefiles im packages feed (feeds/packages)
+grep -Hr --include=Makefile --exclude-dir=.svn -e 'DEPENDS:=' ./feeds/packages
+###einrichten von WDS
+#auf dem Master in /etc/config/wireless einfach option wds '1' beim wlan hinzufügen
+config wifi-iface
+ option device 'radio0'
+ option network 'lan'
+ option ssid 'my-wireless-ssid'
+ option encryption 'psk2'
+ option key 'wireless-secret-password'
+ option mode 'ap'
+ option wds '1'
+
+#auf dem client
+
+###gast wlan einrichten
+#dhcp
+config 'dhcp' 'fewo'
+ option 'interface' 'fewo'
+ option 'start' '50'
+ option 'limit' '100'
+ option 'leasetime' '1h'
+#wireless
+config wifi-iface
+ option device 'radio0'
+ option network 'fewo'
+ option mode 'ap'
+ option ssid 'fewo'
+ option encryption 'psk-mixed'
+ option key 'topsecretkey'
+
+#network
+config interface 'fewo'
+ option 'proto' 'static'
+ option 'ipaddr' '10.0.0.1'
+ option 'netmask' '255.255.255.0'
+
+#firewall
+config zone
+ option 'name' 'fewo'
+ list 'network' 'fewo'
+ option 'input' 'REJECT'
+ option 'forward' 'REJECT'
+ option 'output' 'ACCEPT'
+config forwarding
+ option src 'fewo'
+ option dest 'wan'
+config 'rule'
+ option 'name' 'Allow DNS Queries'
+ option 'src' 'fewo'
+ option 'dest_port' '53'
+ option 'proto' 'tcpudp'
+ option 'target' 'ACCEPT'
+
+config 'rule'
+ option 'name' 'Allow DHCP request'
+ option 'src' 'fewo'
+ option 'src_port' '67-68'
+ option 'dest_port' '67-68'
+ option 'proto' 'udp'
+ option 'target' 'ACCEPT'
+config rule
+ option src 'fewo'
+ option dest 'lan'
+ option name 'Deny Guest -> LAN'
+ option proto 'all'
+ option target 'DROP'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN http'
+ option proto 'tcp'
+ option dest_port '80'
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN https'
+ option proto 'tcp'
+ option dest_port '443'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '25'
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '587'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '465'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '995'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '143'
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '993'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '110'
+
+config rule
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Deny Guest -> WAN'
+ option proto 'all'
+ option target 'DROP'
+###
+
+###reset openwrt auf werkseinstellungen
+#mtd -r erase rootfs_data
+###wan per wlan und ap per wlan
+config wifi-iface
+ option device radio0
+ option network wan
+ option mode sta
+ option ssid ssid_wan_ap
+ option encryption psk
+ option key 'key_von_wan_ap'
+
+config wifi-iface
+ option device radio0
+ option network lan
+ option mode ap
+ option ssid ssid_ap
+ option encryption mixed-psk+tkip+aes
+ option key 'streng_geheim'
--- /dev/null
+ _______ ________ __
+ | |.-----.-----.-----.| | | |.----.| |_
+ | - || _ | -__| || | | || _|| _|
+ |_______|| __|_____|__|__||________||__| |____|
+ |__| W I R E L E S S F R E E D O M
+ -----------------------------------------------------
+ BARRIER BREAKER (Bleeding Edge, r36141)
+ -----------------------------------------------------
+ * 1/2 oz Galliano Pour all ingredients into
+ * 4 oz cold Coffee an irish coffee mug filled
+ * 1 1/2 oz Dark Rum with crushed ice. Stir.
+ * 2 tsp. Creme de Cacao
+ -----------------------------------------------------
--- /dev/null
+config dnsmasq
+ option domainneeded 1
+ option boguspriv 1
+ option filterwin2k 0 # enable for dial on demand
+ option localise_queries 1
+ option rebind_protection 1 # disable if upstream must serve RFC1918 addresses
+ option rebind_localhost 1 # enable for RBL checking and similar services
+ #list rebind_domain example.lan # whitelist RFC1918 responses for domains
+ option local '/lan/'
+ option domain 'lan'
+ option expandhosts 1
+ option nonegcache 0
+ option authoritative 1
+ option readethers 1
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/tmp/resolv.conf.auto'
+ #list server '/mycompany.local/1.2.3.4'
+ #option nonwildcard 1
+ #list interface br-lan
+ #list notinterface lo
+ #list bogusnxdomain '64.94.110.11'
+
+config dhcp lan
+ option interface lan
+ option start 100
+ option limit 150
+ option leasetime 12h
+ option ignore '1'
+
+config dhcp wan
+ option interface wan
+ option proto 'dhcp'
+ option ignore 0
--- /dev/null
+config dropbear
+ option PasswordAuth 'on'
+ option RootPasswordAuth 'on'
+ option Port '22'
+# option BannerFile '/etc/banner'
--- /dev/null
+config defaults
+ option syn_flood 1
+ option input ACCEPT
+ option output ACCEPT
+ option forward REJECT
+# Uncomment this line to disable ipv6 rules
+# option disable_ipv6 1
+
+config zone
+ option name lan
+ option network 'lan'
+ option input ACCEPT
+ option output ACCEPT
+ option forward REJECT
+
+config zone
+ option name wan
+ option network 'wan'
+ option input REJECT
+ option output ACCEPT
+ option forward REJECT
+ option masq 1
+ option mtu_fix 1
+
+config forwarding
+ option src lan
+ option dest wan
+
+# We need to accept udp packets on port 68,
+# see https://dev.openwrt.org/ticket/4108
+config rule
+ option name Allow-DHCP-Renew
+ option src wan
+ option proto udp
+ option dest_port 68
+ option target ACCEPT
+ option family ipv4
+
+# Allow IPv4 ping
+config rule
+ option name Allow-Ping
+ option src wan
+ option proto icmp
+ option icmp_type echo-request
+ option family ipv4
+ option target ACCEPT
+
+# Allow DHCPv6 replies
+# see https://dev.openwrt.org/ticket/10381
+config rule
+ option name Allow-DHCPv6
+ option src wan
+ option proto udp
+ option src_ip fe80::/10
+ option src_port 547
+ option dest_ip fe80::/10
+ option dest_port 546
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential incoming IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Input
+ option src wan
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ list icmp_type router-solicitation
+ list icmp_type neighbour-solicitation
+ list icmp_type router-advertisement
+ list icmp_type neighbour-advertisement
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential forwarded IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Forward
+ option src wan
+ option dest *
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# Block ULA-traffic from leaking out
+config rule
+ option name Enforce-ULA-Border-Src
+ option src *
+ option dest wan
+ option proto all
+ option src_ip fc00::/7
+ option family ipv6
+ option target REJECT
+
+config rule
+ option name Enforce-ULA-Border-Dest
+ option src *
+ option dest wan
+ option proto all
+ option dest_ip fc00::/7
+ option family ipv6
+ option target REJECT
+
+# include a file with users custom iptables rules
+config include
+ option path /etc/firewall.user
+
+
+### EXAMPLE CONFIG SECTIONS
+# do not allow a specific ip to access wan
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option dest wan
+# option proto tcp
+# option target REJECT
+
+# block a specific mac on wan
+#config rule
+# option dest wan
+# option src_mac 00:11:22:33:44:66
+# option target REJECT
+
+# block incoming ICMP traffic on a zone
+#config rule
+# option src lan
+# option proto ICMP
+# option target DROP
+
+# port redirect port coming in on wan to lan
+#config redirect
+# option src wan
+# option src_dport 80
+# option dest lan
+# option dest_ip 192.168.16.235
+# option dest_port 80
+# option proto tcp
+
+# port redirect of remapped ssh port (22001) on wan
+#config redirect
+# option src wan
+# option src_dport 22001
+# option dest lan
+# option dest_port 22
+# option proto tcp
+
+# allow IPsec/ESP and ISAKMP passthrough
+#config rule
+# option src wan
+# option dest lan
+# option protocol esp
+# option target ACCEPT
+
+#config rule
+# option src wan
+# option dest lan
+# option src_port 500
+# option dest_port 500
+# option proto udp
+# option target ACCEPT
+
+### FULL CONFIG SECTIONS
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 80
+# option dest wan
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
+# option target REJECT
+
+#config redirect
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 1024
+# option src_dport 80
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
--- /dev/null
+config interface wan
+ option ifname ppp0
+ option pincode ''
+ option device /dev/ttyUSB0
+ option apn internet.t-d1.de
+ option service umts
+ option proto 3g
+ option username ''
+ option password ''
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config interface 'lan'
+ option ifname 'eth0'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.3'
+ option netmask '255.255.255.0'
--- /dev/null
+config interface wan
+ option ifname ppp0
+ option pincode
+ option device /dev/ttyUSB0
+ option apn yess
+ option service umts
+ option proto 3g
+ option username ''
+ option password ''
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config interface 'lan'
+ option ifname 'eth0'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.1'
+ option netmask '255.255.255.0'
--- /dev/null
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config interface 'lan'
+ option ifname 'eth0'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.1'
+ option netmask '255.255.255.0'
+
+config interface 'wan'
+ option ifname wlan0-1
+ option proto 'dhcp'
--- /dev/null
+
+config system
+ option hostname 'OpenWrt'
+ option timezone 'UTC'
+
+config timeserver 'ntp'
+ list server '0.openwrt.pool.ntp.org'
+ list server '1.openwrt.pool.ntp.org'
+ list server '2.openwrt.pool.ntp.org'
+ list server '3.openwrt.pool.ntp.org'
+ option enable_server '0'
+
+config led 'led_usb'
+ option name 'USB'
+ option sysfs 'tp-link:green:3g'
+ option trigger 'usbdev'
+ option dev '1-1'
+ option interval '50'
+
+config led 'led_wlan'
+ option name 'WLAN'
+ option sysfs 'tp-link:green:wlan'
+ option trigger 'phy0tpt'
+
+config led 'led_lan'
+ option name 'LAN'
+ option sysfs 'tp-link:green:lan'
+ option trigger 'netdev'
+ option dev 'eth0'
+ option mode 'link tx rx'
+
--- /dev/null
+config wifi-device radio0
+ option type mac80211
+ option macaddr 'F8:1A:67:4D:6E:D1'
+ option channel 11
+ option hwmode 11ng
+ option path 'platform/ar933x_wmac'
+ option htmode HT20
+ list ht_capab SHORT-GI-20
+ list ht_capab SHORT-GI-40
+ list ht_capab RX-STBC1
+ list ht_capab DSSS_CCK-40
+ # REMOVE THIS LINE TO ENABLE WIFI:
+ option disabled 0
+
+config wifi-iface wifi1
+ option device radio0
+ option network lan
+ option mode 'sta'
+ option ssid 'blub'
+ option encryption 'psk-mixed+tkip+ccmp'
+ option key 'qwertz123456789'
+ option wds '1'
+
+config wifi-iface wifi2
+ option device radio0
+ option network lan
+ option mode 'ap'
+ option ssid 'blub'
+ option encryption 'psk-mixed+tkip+ccmp'
+ option key 'qwertz123456789'
+
--- /dev/null
+config wifi-device radio0
+ option type mac80211
+ option channel 11
+ option hwmode 11ng
+ option path 'platform/ar933x_wmac'
+ option htmode HT20
+ list ht_capab SHORT-GI-20
+ list ht_capab SHORT-GI-40
+ list ht_capab RX-STBC1
+ list ht_capab DSSS_CCK-40
+ # REMOVE THIS LINE TO ENABLE WIFI:
+ option disabled 0
+
+config wifi-iface wifi1
+ option device radio0
+ option network lan
+ option mode ap
+ option ssid 'test'
+ option encryption 'psk'
+ option key 'testtest'
--- /dev/null
+config wifi-device radio0
+ option type mac80211
+ option channel 11
+ option hwmode 11ng
+ option path 'platform/ar933x_wmac'
+ option htmode HT20
+ list ht_capab SHORT-GI-20
+ list ht_capab SHORT-GI-40
+ list ht_capab RX-STBC1
+ list ht_capab DSSS_CCK-40
+ # REMOVE THIS LINE TO ENABLE WIFI:
+ option disabled 0
+
+config wifi-iface wifi1
+ option device radio0
+ option network lan
+ option mode ap
+ option ssid 'test'
+ option encryption 'psk'
+ option key 'testtest'
+
+config wifi-iface wifi2
+ option device radio0
+ option network wan
+ option mode sta
+ option ssid 'WLAN-141942'
+ option encryption 'psk'
+ option key 'SP-4329D4453'
+
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2009-2013 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/ar71xx.sh
+
+get_status_led() {
+ case $(ar71xx_board_name) in
+ alfa-nx)
+ status_led="alfa:green:led_8"
+ ;;
+ all0305)
+ status_led="eap7660d:green:ds4"
+ ;;
+ ap132)
+ status_led="ap132:green:status"
+ ;;
+ ap136-010|\
+ ap136-020)
+ status_led="ap136:green:status"
+ ;;
+ ap135-020)
+ status_led="ap135:green:status"
+ ;;
+ ap81)
+ status_led="ap81:green:status"
+ ;;
+ ap83)
+ status_led="ap83:green:power"
+ ;;
+ ap96)
+ status_led="ap96:green:led2"
+ ;;
+ aw-nr580)
+ status_led="aw-nr580:green:ready"
+ ;;
+ bullet-m | rocket-m | nano-m | nanostation-m)
+ status_led="ubnt:green:link4"
+ ;;
+ cap4200ag)
+ status_led="senao:green:pwr"
+ ;;
+ db120)
+ status_led="db120:green:status"
+ ;;
+ dir-600-a1 |\
+ dir-615-e4)
+ status_led="d-link:green:power"
+ ;;
+ dir-615-c1)
+ status_led="d-link:green:status"
+ ;;
+ dir-825-b1 |\
+ dir-835-a1)
+ status_led="d-link:orange:power"
+ ;;
+ dir-825-c1)
+ status_led="d-link:orange:power"
+ ;;
+ eap7660d)
+ status_led="eap7660d:green:ds4"
+ ;;
+ hornet-ub)
+ status_led="alfa:blue:wps"
+ ;;
+ ja76pf | \
+ ja76pf2)
+ status_led="jjplus:green:led1"
+ ;;
+ ls-sr71)
+ status_led="ubnt:green:d22"
+ ;;
+ mr600)
+ status_led="mr600:orange:power"
+ ;;
+ mr600v2)
+ status_led="mr600:blue:power"
+ ;;
+ mzk-w04nu | \
+ mzk-w300nh)
+ status_led="planex:green:status"
+ ;;
+ nbg460n_550n_550nh)
+ status_led="nbg460n:green:power"
+ ;;
+ om2p | \
+ om2p-hs | \
+ om2p-lc)
+ status_led="om2p:blue:power"
+ ;;
+ pb44)
+ status_led="pb44:amber:jump1"
+ ;;
+ rb-411 | rb-411u | rb-433 | rb-433u | rb-450 | rb-450g | rb-493)
+ status_led="rb4xx:yellow:user"
+ ;;
+ rb-750)
+ status_led="rb750:green:act"
+ ;;
+ routerstation | routerstation-pro)
+ status_led="ubnt:green:rf"
+ ;;
+ rw2458n)
+ status_led="rw2458n:green:d3"
+ ;;
+ tew-632brp)
+ status_led="tew-632brp:green:status"
+ ;;
+ tew-673gru)
+ status_led="trendnet:blue:wps"
+ ;;
+ tew-712br)
+ status_led="trendnet:green:power"
+ ;;
+ tl-mr3020)
+ status_led="tp-link:green:wps"
+ ;;
+ tl-mr3220 | \
+ tl-mr3220-v2 | \
+ tl-mr3420 | \
+ tl-mr3420-v2 | \
+ tl-wa901nd | \
+ tl-wa901nd-v2 | \
+ tl-wdr3500 | \
+ tl-wr1041n-v2 | \
+ tl-wr1043nd | \
+ tl-wr741nd | \
+ tl-wr741nd-v4 | \
+ tl-wr841n-v1 | \
+ tl-wr841n-v7 | \
+ tl-wr841n-v8 | \
+ tl-wr941nd)
+ status_led="tp-link:green:system"
+ ;;
+ tl-wdr4300 | \
+ tl-wr703n)
+ status_led="tp-link:blue:system"
+ ;;
+ tl-wr2543n)
+ status_led="tp-link:green:wps"
+ ;;
+ unifi)
+ status_led="ubnt:green:dome"
+ ;;
+ uap-pro)
+ status_led="ubnt:white:dome"
+ ;;
+ whr-g301n | \
+ whr-hp-g300n | \
+ whr-hp-gn | \
+ wzr-hp-g300nh)
+ status_led="buffalo:green:router"
+ ;;
+ wlae-ag300n)
+ status_led="buffalo:green:status"
+ ;;
+ wzr-hp-ag300h | \
+ wzr-hp-g300nh2)
+ status_led="buffalo:red:diag"
+ ;;
+ wndr3700)
+ status_led="wndr3700:green:power"
+ ;;
+ wndr4300)
+ status_led="netgear:green:power"
+ ;;
+ wnr2000)
+ status_led="wnr2000:green:power"
+ ;;
+ wp543)
+ status_led="wp543:green:diag"
+ ;;
+ wrt400n)
+ status_led="wrt400n:blue:wps"
+ ;;
+ wrt160nl)
+ status_led="wrt160nl:blue:wps"
+ ;;
+ zcn-1523h-2 | zcn-1523h-5)
+ status_led="zcn-1523h:amber:init"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ insmod leds-gpio 2> /dev/null
+ insmod ledtrig-default-on 2> /dev/null
+ insmod ledtrig-timer 2> /dev/null
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}
--- /dev/null
+# Change the following lines if you want dnsmasq to serve SRV
+# records.
+# You may add multiple srv-host lines.
+# The fields are <name>,<target>,<port>,<priority>,<weight>
+
+# A SRV record sending LDAP for the example.com domain to
+# ldapserver.example.com port 289
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
+
+# Two SRV records for LDAP, each with different priorities
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
+
+# A SRV record indicating that there is no LDAP server for the domain
+# example.com
+#srv-host=_ldap._tcp.example.com
+
+# The following line shows how to make dnsmasq serve an arbitrary PTR
+# record. This is useful for DNS-SD.
+# The fields are <name>,<target>
+#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"
+
+# Change the following lines to enable dnsmasq to serve TXT records.
+# These are used for things like SPF and zeroconf.
+# The fields are <name>,<text>,<text>...
+
+#Example SPF.
+#txt-record=example.com,"v=spf1 a -all"
+
+#Example zeroconf
+#txt-record=_http._tcp.example.com,name=value,paper=A4
+
+# Provide an alias for a "local" DNS name. Note that this _only_ works
+# for targets which are names from DHCP or /etc/hosts. Give host
+# "bert" another name, bertrand
+# The fields are <cname>,<target>
+#cname=bertand,bert
--- /dev/null
+# This file is interpreted as shell script.
+# Put your custom iptables rules here, they will
+# be executed with each firewall (re-)start.
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
--- /dev/null
+root:x:0:
+daemon:x:1:
+adm:x:4:
+mail:x:8:
+audio:x:29:
+www-data:x:33:
+ftp:x:55:
+users:x:100:
+network:x:101:
+nogroup:x:65534:
--- /dev/null
+127.0.0.1 localhost
--- /dev/null
+
+# uncomment me to log hotplug events
+# DEVPATH is set {
+# exec logger -s -t hotplug -p daemon.info "name=%DEVNAME%, path=%DEVPATH%"
+# }
+
+$include /etc/hotplug2-platform.rules
+
+DEVNAME ~~ (^null$|^full$|^ptmx$|^zero$|^gpio|^hvc) {
+ makedev /dev/%DEVNAME% 0666
+ next-event
+}
+
+DEVNAME == mapper/control {
+ makedev /dev/%DEVNAME% 0600
+ next-event
+}
+
+ACTION == add, DEVPATH is set {
+ makedev /dev/%DEVNAME% 0644
+}
+
+ACTION == add, DEVPATH is set, DEVNAME ~~ ^tty {
+ chmod 0666 /dev/%DEVNAME%
+}
+
+ACTION == add, DEVPATH is set, DEVNAME ~~ ^ppp {
+ chmod 0600 /dev/%DEVNAME%
+}
+
+ACTION == remove, DEVPATH is set, MAJOR is set, MINOR is set {
+ remove /dev/%DEVNAME%
+}
+
+FIRMWARE is set, ACTION == add {
+ exec /sbin/hotplug-call firmware
+ load-firmware /lib/firmware
+ next-event
+}
+
+SUBSYSTEM == platform {
+ exec /sbin/hotplug-call %SUBSYSTEM%
+}
--- /dev/null
+$include /etc/hotplug2-common.rules
+
+SUBSYSTEM == button {
+ exec kill -USR1 1
+}
--- /dev/null
+$include /etc/hotplug2-common.rules
+
+SUBSYSTEM ~~ (^net$|^input$|^button$|^usb$|^ieee1394$|^block$|^atm$|^zaptel$|^tty$) {
+ exec /sbin/hotplug-call %SUBSYSTEM%
+}
+
+DEVICENAME == watchdog {
+ exec /sbin/watchdog -t 5 /dev/watchdog
+ next-event
+}
--- /dev/null
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+ttyATH0::askfirst:/bin/ash --login
--- /dev/null
+DISTRIB_ID="OpenWrt"
+DISTRIB_RELEASE="Bleeding Edge"
+DISTRIB_REVISION="r36141"
+DISTRIB_CODENAME="barrier_breaker"
+DISTRIB_TARGET="ar71xx/generic"
+DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r36141"
--- /dev/null
+src/gz barrier_breaker http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
+dest root /
+dest ram /tmp
+lists_dir ext /var/opkg-lists
+option overlay_root /overlay
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2010 Vertical Communications
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+pi_ifname=
+pi_ip=192.168.1.1
+pi_broadcast=192.168.1.255
+pi_netmask=255.255.255.0
+
+fs_failsafe_ifname=
+fs_failsafe_ip=192.168.1.1
+fs_failsafe_broadcast=192.168.1.255
+fs_failsafe_netmask=255.255.255.0
+
+fs_failsafe_wait_timeout=2
+
+pi_suppress_stderr="y"
+pi_init_suppress_stderr="y"
+pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
+pi_init_cmd="/sbin/init"
+
+. /lib/functions.sh
+
+boot_hook_init preinit_essential
+boot_hook_init preinit_main
+boot_hook_init failsafe
+boot_hook_init initramfs
+boot_hook_init preinit_mount_root
+
+for pi_source_file in /lib/preinit/*; do
+ . $pi_source_file
+done
+
+boot_run_hook preinit_essential
+
+pi_mount_skip_next=false
+pi_jffs2_mount_success=false
+pi_failsafe_net_message=false
+
+boot_run_hook preinit_main
+
--- /dev/null
+#!/bin/sh
+[ -f /etc/banner ] && cat /etc/banner
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
+export HOME=${HOME:-/root}
+export PS1='\u@\h:\w\$ '
+
+[ -x /bin/more ] || alias more=less
+[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
+
+[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
+
+[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
+[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
--- /dev/null
+# Internet (IP) protocols
+#
+# Updated from http://www.iana.org/assignments/protocol-numbers and other
+# sources.
+# New protocols will be added on request if they have been officially
+# assigned by IANA and are not historical.
+# If you need a huge list of used numbers please install the nmap package.
+
+ip 0 IP # internet protocol, pseudo protocol number
+#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+ggp 3 GGP # gateway-gateway protocol
+ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
+st 5 ST # ST datagram mode
+tcp 6 TCP # transmission control protocol
+egp 8 EGP # exterior gateway protocol
+igp 9 IGP # any private interior gateway (Cisco)
+pup 12 PUP # PARC universal packet protocol
+udp 17 UDP # user datagram protocol
+hmp 20 HMP # host monitoring protocol
+xns-idp 22 XNS-IDP # Xerox NS IDP
+rdp 27 RDP # "reliable datagram" protocol
+iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
+xtp 36 XTP # Xpress Transfer Protocol
+ddp 37 DDP # Datagram Delivery Protocol
+idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
+ipv6 41 IPv6 # Internet Protocol, version 6
+ipv6-route 43 IPv6-Route # Routing Header for IPv6
+ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
+idrp 45 IDRP # Inter-Domain Routing Protocol
+rsvp 46 RSVP # Reservation Protocol
+gre 47 GRE # General Routing Encapsulation
+esp 50 IPSEC-ESP # Encap Security Payload [RFC2046]
+ah 51 IPSEC-AH # Authentication Header [RFC2402]
+skip 57 SKIP # SKIP
+ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
+ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
+ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
+rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
+vmtp 81 VMTP # Versatile Message Transport
+eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
+ospf 89 OSPFIGP # Open Shortest Path First IGP
+ax.25 93 AX.25 # AX.25 frames
+ipip 94 IPIP # IP-within-IP Encapsulation Protocol
+etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
+encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
+# 99 # any private encryption scheme
+pim 103 PIM # Protocol Independent Multicast
+ipcomp 108 IPCOMP # IP Payload Compression Protocol
+vrrp 112 VRRP # Virtual Router Redundancy Protocol
+l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
+isis 124 ISIS # IS-IS over IPv4
+sctp 132 SCTP # Stream Control Transmission Protocol
+fc 133 FC # Fibre Channel
+
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006-2012 OpenWrt.org
+
+. $IPKG_INSTROOT/lib/functions.sh
+. $IPKG_INSTROOT/lib/functions/service.sh
+
+initscript=$1
+action=${2:-help}
+shift 2
+
+start() {
+ return 0
+}
+
+stop() {
+ return 0
+}
+
+reload() {
+ return 1
+}
+
+restart() {
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+boot() {
+ start "$@"
+}
+
+shutdown() {
+ stop
+}
+
+disable() {
+ name="$(basename "${initscript}")"
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/K??$name
+}
+
+enable() {
+ name="$(basename "${initscript}")"
+ disable
+ [ -n "$START" -o -n "$STOP" ] || {
+ echo "/etc/init.d/$name does not have a START or STOP value"
+ return 1
+ }
+ [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
+ [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
+}
+
+enabled() {
+ name="$(basename "${initscript}")"
+ [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ]
+}
+
+depends() {
+ return 0
+}
+
+help() {
+ cat <<EOF
+Syntax: $initscript [command]
+
+Available commands:
+ start Start the service
+ stop Stop the service
+ restart Restart the service
+ reload Reload configuration files (or restart if that fails)
+ enable Enable service autostart
+ disable Disable service autostart
+$EXTRA_HELP
+EOF
+}
+
+# for procd
+start_service() {
+ return 0
+}
+
+stop_service() {
+ return 0
+}
+
+${INIT_TRACE:+set -x}
+
+. "$initscript"
+
+[ -n "$USE_PROCD" ] && {
+ . $IPKG_INSTROOT/lib/functions/procd.sh
+
+ rc_procd() {
+ procd_open_service "$(basename "$initscript")" "$initscript"
+ "$@"
+ procd_close_service
+ }
+
+ start() {
+ rc_procd start_service "$@"
+ }
+
+ stop() {
+ procd_kill "$(basename "$initscript")" "$1"
+ }
+
+ reload() {
+ start
+ }
+}
+
+ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
+list_contains ALL_COMMANDS "$action" || action=help
+[ "$action" = "reload" ] && action='eval reload "$@" || restart "$@" && :'
+$action "$@"
--- /dev/null
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+exit 0
--- /dev/null
+search lan
+nameserver 127.0.0.1
--- /dev/null
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+daytime 13/tcp
+daytime 13/udp
+netstat 15/tcp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp 21/tcp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+smtp 25/tcp
+time 37/tcp
+time 37/udp
+whois 43/tcp
+domain 53/tcp
+domain 53/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/udp
+finger 79/tcp
+www 80/tcp http
+kerberos 88/tcp kerberos5 krb5 kerberos-sec
+kerberos 88/udp kerberos5 krb5 kerberos-sec
+pop3 110/tcp
+pop3 110/udp
+sunrpc 111/tcp
+sunrpc 111/udp
+auth 113/tcp ident
+sftp 115/tcp
+nntp 119/tcp
+ntp 123/tcp
+ntp 123/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap2 143/tcp imap
+imap2 143/udp imap
+snmp 161/tcp
+snmp 161/udp
+snmp-trap 162/tcp snmptrap
+snmp-trap 162/udp snmptrap
+xdmcp 177/tcp
+xdmcp 177/udp
+bgp 179/tcp
+bgp 179/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+https 443/tcp
+https 443/udp
+microsoft-ds 445/tcp
+microsoft-ds 445/udp
+isakmp 500/tcp
+isakmp 500/udp
+rtsp 554/tcp
+rtsp 554/udp
+ipp 631/tcp
+ipp 631/udp
+syslog 514/udp
+printer 515/tcp spooler
+dhcpv6-client 546/tcp
+dhcpv6-client 546/udp
+dhcpv6-server 547/tcp
+dhcpv6-server 547/udp
+afpovertcp 548/tcp
+afpovertcp 548/udp
+nntps 563/tcp snntp
+nntps 563/udp snntp
+ldaps 636/tcp
+ldaps 636/udp
+tinc 655/tcp
+tinc 655/udp
+rsync 873/tcp
+rsync 873/udp
+ftps-data 989/tcp
+ftps 990/tcp
+imaps 993/tcp
+imaps 993/udp
+ircs 994/tcp
+ircs 994/udp
+pop3s 995/tcp
+pop3s 995/udp
+socks 1080/tcp
+socks 1080/udp
+openvpn 1194/tcp
+openvpn 1194/udp
+l2f 1701/tcp l2tp
+l2f 1701/udp l2tp
+radius 1812/tcp
+radius 1812/udp
+radius-acct 1813/tcp radacct
+radius-acct 1813/udp radacct
+nfs 2049/tcp
+nfs 2049/udp
+dict 2628/tcp
+dict 2628/udp
+gpsd 2947/tcp
+gpsd 2947/udp
+icpv2 3130/tcp icp
+icpv2 3130/udp icp
+mysql 3306/tcp
+mysql 3306/udp
+nut 3493/tcp
+nut 3493/udp
+distcc 3632/tcp
+distcc 3632/udp
+daap 3689/tcp
+daap 3689/udp
+svn 3690/tcp subversion
+svn 3690/udp subversion
+epmd 4369/tcp
+epmd 4369/udp
+iax 4569/tcp
+iax 4569/udp
+mtn 4691/tcp
+mtn 4691/udp
+munin 4949/tcp
+sip 5060/tcp
+sip 5060/udp
+sip-tls 5061/tcp
+sip-tls 5061/udp
+xmpp-client 5222/tcp jabber-client
+xmpp-client 5222/udp jabber-client
+xmpp-server 5269/tcp jabber-server
+xmpp-server 5269/udp jabber-server
+mdns 5353/tcp
+mdns 5353/udp
+postgresql 5432/tcp postgres
+postgresql 5432/udp postgres
+x11 6000/tcp
+x11 6000/udp
+mysql-proxy 6446/tcp
+mysql-proxy 6446/udp
+bacula-dir 9101/tcp
+bacula-dir 9101/udp
+bacula-fd 9102/tcp
+bacula-fd 9102/udp
+bacula-sd 9103/tcp
+bacula-sd 9103/udp
+nbd 10809/tcp
+zabbix-agent 10050/tcp
+zabbix-agent 10050/udp
+zabbix-trapper 10051/tcp
+zabbix-trapper 10051/udp
+hkp 11371/tcp
+hkp 11371/udp
+ssmtp 465/tcp smtps
+spamd 783/tcp
+zebrasrv 2600/tcp
+zebra 2601/tcp
+ripd 2602/tcp
+ripngd 2603/tcp
+ospfd 2604/tcp
+bgpd 2605/tcp
+ospf6d 2606/tcp
+ospfapi 2607/tcp
+isisd 2608/tcp
+sane-port 6566/tcp sane saned
+ircd 6667/tcp
+git 9418/tcp
+
--- /dev/null
+root:$1$RRY0oRDK$fLOY/iZVga4H7lMdhIQ9B/:0:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+root:x:0:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+kernel.panic=3
+net.ipv4.conf.default.arp_ignore=1
+net.ipv4.conf.all.arp_ignore=1
+net.ipv4.ip_forward=1
+net.ipv4.icmp_echo_ignore_broadcasts=1
+net.ipv4.icmp_ignore_bogus_error_responses=1
+net.ipv4.tcp_ecn=0
+net.ipv4.tcp_fin_timeout=30
+net.ipv4.tcp_keepalive_time=120
+net.ipv4.tcp_syncookies=1
+net.ipv4.tcp_timestamps=1
+net.ipv4.tcp_sack=1
+net.ipv4.tcp_dsack=1
+
+net.ipv6.conf.default.forwarding=2
+net.ipv6.conf.all.forwarding=2
+
+net.netfilter.nf_conntrack_acct=1
+net.netfilter.nf_conntrack_checksum=0
+net.netfilter.nf_conntrack_max=16384
+net.netfilter.nf_conntrack_tcp_timeout_established=3600
+net.netfilter.nf_conntrack_udp_timeout=60
+net.netfilter.nf_conntrack_udp_timeout_stream=180
+
+# disable bridge firewalling by default
+net.bridge.bridge-nf-call-arptables=0
+net.bridge.bridge-nf-call-ip6tables=0
+net.bridge.bridge-nf-call-iptables=0
--- /dev/null
+## This file contains files and directories that should
+## be preserved during an upgrade.
+
+# /etc/example.conf
+# /etc/openvpn/
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2011 OpenWrt.org
+
+START=97
+
+start() {
+ [ -c /dev/watchdog ] || return 1
+ [ -x /sbin/watchdog ] || return 1
+ service_start /sbin/watchdog -t 5 /dev/watchdog
+}
+stop() {
+ service_stop /sbin/watchdog
+}
--- /dev/null
+config 'interface' 'example'
+ option 'proto' 'dhcp'
+ option 'ifname' 'eth0'
--- /dev/null
+config 'interface' 'example'
+ option 'proto' 'dhcp'
+ option 'ifname' 'eth0'
+ option 'gateway' '0.0.0.0
--- /dev/null
+package network
+
+config 'interface' 'example'
+ option 'type' 'bridge'
+ option 'proto' 'none'
+ option 'ifname' 'eth0 eth1'
+ option 'auto' '1'
--- /dev/null
+package dhcp
+
+config dnsmasq
+ option nonegcache '1'
+ option authoritative '1'
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/etc/resolv.conf.auto'
+
+config dhcp 'lan'
+ option interface 'lan'
+ option start '10.8.36.2'
+ option limit '10.8.36.254'
+ option leasetime '30m'
+
+config dhcp 'wan'
+ option interface 'wan'
+ option ignore '1'
--- /dev/null
+#!/bin/bash
+
+# PLEASE KEEP VERSION INFORMATION UPDATED IN CASE YOU MAKE CHANGES TO THIS SCRIPT
+VERSION="20130322"
+
+CONFDIR="/etc"
+UPDATESRV="http://firmware.chemnitz.freifunk.net/autoupdate/attitude_adjustment/STABLE"
+STATSRV="http://api.routers.chemnitz.freifunk.net/update.php"
+
+## Configuration and inputs
+read_config() {
+ source $CONFDIR/ffc.conf
+ if [ "$REMOVEME" == "1" ]; then
+ echo "Dieser Router ist noch nicht konfiguriert."
+ echo "Bitte >> /usr/sbin/ffc firstboot << starten, um das Setup zu beginnen."
+ exit 2
+ fi
+}
+
+## Setup
+setup_firstboot() {
+ source $CONFDIR/ffc.conf
+ if [ "$REMOVEME" != "1" ]; then
+ echo "! DIESER ROUTER IST BEREITS KONFIGURIERT !"; echo ""
+ fi
+
+ # Gather all values needed for setup
+ echo "Willkommen zum Freifunk Chemnitz Router-Setup!"; echo ""
+ echo "Hilfe zu den Konfigurations-Flags gibt es unter:"
+ echo "http://www.chemnitz.freifunk.net/static-howto-setup"; echo ""
+ for key in "${SETUP[@]}"; do
+ eval val="\${$key[0]}"
+ echo -n "$key [$val]: "; read ans
+ ans=${ans:-$val}
+ sed -e "s/^$key=.*/$key=\"$ans\"/g" -i $CONFDIR/ffc.conf
+ done
+
+ # Remove firstboot entry and perform configuration reload
+ sed -e "/^REMOVEME/d" -i $CONFDIR/ffc.conf
+ source $CONFDIR/ffc.conf
+
+ echo ""; echo "---"; cat $CONFDIR/ffc.conf; echo "---"; echo ""
+
+ # VTUN
+ echo -n "VTUN: "
+ if [ "$WANIF" ] && [ "$VTUNPSK" ]; then
+ sed -e "s/WANIF/$WANIF/g" -e "s/VTUNIF/$VTUNIF/g" -e "s/IPV4_1/$IPV4_1/g" -e "s/IPV4_2/$IPV4_2/g" -e "s/VTUNPSK/$VTUNPSK/g" -i $CONFDIR/vtund.conf
+ echo "OK"
+ else
+ echo "disabled"
+ fi
+
+ # 5GHz
+ echo -n "5GHz: "
+ if [ "$WLANAP5GHZ" ] || [ "$WLANMESH5GHZ" ]; then
+ echo "OK"
+ else
+ echo "disabled"
+ fi
+
+ # UCI
+ echo -n "UCI: "
+ uci import -m dhcp < $CONFDIR/ffc.uci.dhcp
+ uci import -m wireless < $CONFDIR/ffc.uci.wireless
+ uci set system.hostname="node-$IPV4_1-$IPV4_2"
+ uci set system.timezone="CET-1CEST,M3.5.0,M10.5.0/3"
+ uci commit
+ echo "OK";
+}
+
+setup_autostart() {
+ setup_mesh
+ if [ "$WANIF" ] && [ "$VTUNPSK" ]; then
+ vtund -p -t 30 node-${IPV4_1}-${IPV4_2} uplink-vtun.routers.chemnitz.freifunk.net
+ fi
+
+ # Overwrite any maintenance or pre-configured network settings
+ ip addr flush dev $BRIDGEIF
+ ip addr add 10.8.${IPV4_1}.${IPV4_2}/21 brd 10.8.47.255 dev $BRIDGEIF
+ ip -6 addr add 2001:470:7b1d:ff::${IPV4_1}:${IPV4_2}/64 dev $BRIDGEIF
+ ip route add 10.8.0.0/16 via 10.8.47.254 dev $BRIDGEIF
+ ip link set up dev $BRIDGEIF
+ setup_firewall
+
+ if [ -f "/tmp/ffc.selfupdate.conf" ]; then
+ source /tmp/ffc.selfupdate.conf
+ if [ "$POSTPONED" == "1" ]; then
+ ip route add default via 10.8.47.254 dev $BRIDGEIF
+ echo "nameserver 10.8.6.6" > /etc/resolv.conf
+ setup_selfupdate
+ fi
+ fi
+}
+
+setup_mesh() {
+ read_config
+ ip link set up mtu 1528 multicast on dev $WLANMESH
+ batctl interface add $WLANMESH
+ if [ "$WLANMESH5GHZ" ]; then
+ ip link set up mtu 1528 multicast on dev $WLANMESH5GHZ
+ batctl interface add $WLANMESH5GHZ
+ fi
+ brctl addif $BRIDGEIF $BATMANIF
+ ip link set up dev $BATMANIF address 00:ff:c0:00:${IPV4_1}:${IPV4_2}
+}
+
+setup_vtun() {
+ read_config
+ ip link set up mtu 1528 multicast on dev $VTUNIF
+ batctl interface add $VTUNIF
+ batctl bridge_loop_avoidance 1
+ brctl addif $BRIDGEIF $BATMANIF
+ ip link set up dev $BATMANIF address 00:ff:c0:00:${IPV4_1}:${IPV4_2}
+}
+
+setup_firewall() {
+ read_config
+ if [ -x "/usr/sbin/ffc-firewall-local" ]; then
+ /usr/sbin/ffc-firewall-local
+ fi
+}
+
+setup_selfupdate() {
+ # Routers without native internet connection will have no default gateway yet
+ # to connect to the update server since the mesh has not yet been set up.
+ # We have to postpone all operations until the router is fully configured by autostart.
+ if [ ! "$(ip route show | grep default)" ]; then
+ echo "Keine Internetverbindung"
+ echo "POSTPONED=1" > /tmp/ffc.selfupdate.conf
+ exit 1
+ fi
+
+ wget -q -O /tmp/ffc "$UPDATESRV/ffc"
+ if [ $? -gt 0 ] && [ $(wc -c /tmp/ffc | awk '{print $1}') -lt 1000 ]; then
+ echo "Verbindung fehlgeschlagen"
+ exit 2
+ fi
+ chmod +x /tmp/ffc
+ /bin/bash -n /tmp/ffc
+ if [ $? -gt 0 ]; then
+ echo "Syntax-Check fehlgeschlagen"
+ exit 2
+ fi
+ mv /tmp/ffc /usr/sbin/ffc
+}
+
+statistics() {
+ read_config
+ STATURL="$STATSRV?apikey=$APIKEY&version=$VERSION&type=statistics"
+
+ # Network traffic
+ DATA="/sys/class/net/$BATMANIF/statistics"
+ if [ -d "$DATA" ]; then
+ VAL1=$(cat $DATA/rx_bytes)
+ VAL2=$(cat $DATA/tx_bytes)
+ STATURL="$STATURL&traffic=$VAL1;$VAL2"
+ unset VAL1 VAL2
+ fi
+
+ # Wired clients
+ DATA="" # TODO
+ if [ "$DATA" ]; then
+ VAL1=""
+ STATURL="$STATURL&clients_wired=$VAL1"
+ unset VAL1
+ fi
+
+ # Wireless clients 2.4GHz
+ DATA=$(iw dev $WLANAP station dump)
+ if [ "$DATA" ]; then
+ VAL1=$(echo "$DATA" | grep -e "^Station" | awk '{print $2}' | tr '\n' ';')
+ STATURL="$STATURL&clients_24ghz=$VAL1"
+ unset VAL1
+ fi
+
+ # Wireless clients 5GHz
+ if [ "$WLANAP5GHZ" ]; then
+ DATA=$(iw dev $WLANAP5GHZ station dump)
+ if [ "$DATA" ]; then
+ VAL1=$(echo "$DATA" | grep -e "^Station" | awk '{print $2}' | tr '\n' ';')
+ STATURL="$STATURL&clients_5ghz=$VAL1"
+ unset VAL1
+ fi
+ fi
+
+ wget -q -O /dev/null "$STATURL"
+}
+
+# This function will be called once in a minute by crond
+cron_sched() {
+ # Export statistics
+ statistics
+}
+
+## Main function
+case $1 in
+ autostart) setup_autostart ;;
+ firstboot) setup_firstboot ;;
+ selfupdate) setup_selfupdate ;;
+ statistics) statistics ;;
+ cron-scheduler) cron_sched ;;
+ setup-mesh) setup_mesh ;;
+ setup-vtun) setup_vtun ;;
+ setup-firewall) setup_firewall ;;
+ *) echo "Usage: autostart | firstboot | selfupdate | statistics | cron-scheduler | setup-mesh | setup-vtun | setup-firewall" ;;
+esac
+
+exit 1
--- /dev/null
+package dhcp
+
+config dnsmasq
+ option nonegcache '1'
+ option authoritative '1'
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/etc/resolv.conf.auto'
+ option domain routers.chemnitz.freifunk.net
+
+config dhcp 'wan'
+ option interface 'wan'
+ option ignore '1'
+
--- /dev/null
+package wireless
+
+config wifi-device 'radio0'
+ option channel '11'
+ option hwmode '11ng'
+ option disabled '0'
+
+config wifi-iface
+ option device 'radio0'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'chemnitz.freifunk.net'
+ option encryption 'none'
+
+config wifi-iface
+ option device 'radio0'
+ option networt 'batmesh'
+ option mode 'adhoc'
+ option ssid 'peer.chemnitz.freifunk.net'
+ option bssid '02:ff:c0:00:00:00'
+ option encryption 'none'
+
+config wifi-device 'radio1'
+ option channel '36'
+ option hwmode '11na'
+ option disabled '0'
+
+config wifi-iface
+ option device 'radio1'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'chemnitz.freifunk.net'
+ option encryption 'none'
+
+config wifi-iface
+ option device 'radio1'
+ option network 'batmesh'
+ option mode 'adhoc'
+ option ssid 'peer.chemnitz.freifunk.net'
+ option bssid '02:ff:c0:00:00:00'
+ option encryption 'none'
+
--- /dev/null
+#
+# Automatically generated make config: don't edit
+# OpenWrt version: Attitude Adjustment (r41408)
+# Mon Jun 30 20:16:58 2014
+#
+CONFIG_HAVE_DOT_CONFIG=y
+# CONFIG_TARGET_ppc40x is not set
+# CONFIG_TARGET_ppc44x is not set
+# CONFIG_TARGET_realview is not set
+# CONFIG_TARGET_atheros is not set
+CONFIG_TARGET_ar71xx=y
+# CONFIG_TARGET_at91 is not set
+# CONFIG_TARGET_avr32 is not set
+# CONFIG_TARGET_etrax is not set
+# CONFIG_TARGET_brcm2708 is not set
+# CONFIG_TARGET_brcm63xx is not set
+# CONFIG_TARGET_brcm47xx is not set
+# CONFIG_TARGET_sibyte is not set
+# CONFIG_TARGET_cns21xx is not set
+# CONFIG_TARGET_cns3xxx is not set
+# CONFIG_TARGET_octeon is not set
+# CONFIG_TARGET_ep93xx is not set
+# CONFIG_TARGET_cobalt is not set
+# CONFIG_TARGET_gemini is not set
+# CONFIG_TARGET_coldfire is not set
+# CONFIG_TARGET_mpc52xx is not set
+# CONFIG_TARGET_mpc83xx is not set
+# CONFIG_TARGET_mpc85xx is not set
+# CONFIG_TARGET_imx21 is not set
+# CONFIG_TARGET_goldfish is not set
+# CONFIG_TARGET_amazon is not set
+# CONFIG_TARGET_adm8668 is not set
+# CONFIG_TARGET_adm5120 is not set
+# CONFIG_TARGET_xburst is not set
+# CONFIG_TARGET_iop32x is not set
+# CONFIG_TARGET_ixp4xx is not set
+# CONFIG_TARGET_leon is not set
+# CONFIG_TARGET_lantiq is not set
+# CONFIG_TARGET_malta is not set
+# CONFIG_TARGET_kirkwood is not set
+# CONFIG_TARGET_orion is not set
+# CONFIG_TARGET_pxa is not set
+# CONFIG_TARGET_rb532 is not set
+# CONFIG_TARGET_mcs814x is not set
+# CONFIG_TARGET_pxcab is not set
+# CONFIG_TARGET_rdc is not set
+# CONFIG_TARGET_au1000 is not set
+# CONFIG_TARGET_ramips is not set
+# CONFIG_TARGET_s3c24xx is not set
+# CONFIG_TARGET_ps3 is not set
+# CONFIG_TARGET_sparc is not set
+# CONFIG_TARGET_ar7 is not set
+# CONFIG_TARGET_omap24xx is not set
+# CONFIG_TARGET_omap35xx is not set
+# CONFIG_TARGET_omap4 is not set
+# CONFIG_TARGET_ubicom32 is not set
+# CONFIG_TARGET_uml is not set
+# CONFIG_TARGET_x86 is not set
+# CONFIG_TARGET_ps3_petitboot is not set
+# CONFIG_TARGET_at91_9g20 is not set
+# CONFIG_TARGET_at91_9260 is not set
+# CONFIG_TARGET_at91_9263 is not set
+# CONFIG_TARGET_malta_le is not set
+# CONFIG_TARGET_malta_be is not set
+# CONFIG_TARGET_orion_generic is not set
+# CONFIG_TARGET_orion_harddisk is not set
+# CONFIG_TARGET_orion_dns323 is not set
+# CONFIG_TARGET_lantiq_ar9 is not set
+# CONFIG_TARGET_lantiq_ase is not set
+# CONFIG_TARGET_lantiq_danube is not set
+# CONFIG_TARGET_lantiq_falcon is not set
+# CONFIG_TARGET_lantiq_svip_be is not set
+# CONFIG_TARGET_lantiq_svip_le is not set
+# CONFIG_TARGET_lantiq_vr9 is not set
+# CONFIG_TARGET_xburst_qi_lb60 is not set
+# CONFIG_TARGET_xburst_n516 is not set
+# CONFIG_TARGET_xburst_n526 is not set
+# CONFIG_TARGET_xburst_id800wt is not set
+# CONFIG_TARGET_s3c24xx_openmoko_gta02 is not set
+# CONFIG_TARGET_x86_generic is not set
+# CONFIG_TARGET_x86_olpc is not set
+# CONFIG_TARGET_x86_xen_domu is not set
+# CONFIG_TARGET_x86_ep80579 is not set
+# CONFIG_TARGET_x86_net5501 is not set
+# CONFIG_TARGET_x86_kvm_guest is not set
+# CONFIG_TARGET_x86_geos is not set
+# CONFIG_TARGET_x86_alix2 is not set
+# CONFIG_TARGET_x86_thincan is not set
+# CONFIG_TARGET_ixp4xx_generic is not set
+# CONFIG_TARGET_ixp4xx_harddisk is not set
+CONFIG_TARGET_ar71xx_generic=y
+# CONFIG_TARGET_ar71xx_nand is not set
+# CONFIG_TARGET_adm5120_router_le is not set
+# CONFIG_TARGET_adm5120_router_be is not set
+# CONFIG_TARGET_adm5120_rb1xx is not set
+# CONFIG_TARGET_ramips_rt288x is not set
+# CONFIG_TARGET_ramips_rt305x is not set
+# CONFIG_TARGET_ramips_rt3883 is not set
+# CONFIG_TARGET_omap35xx_beagleboard is not set
+# CONFIG_TARGET_omap35xx_gumstix is not set
+# CONFIG_TARGET_au1000_au1500 is not set
+# CONFIG_TARGET_au1000_au1550 is not set
+# CONFIG_TARGET_ppc44x_Default is not set
+# CONFIG_TARGET_uml_Default is not set
+# CONFIG_TARGET_ps3_petitboot_Default is not set
+# CONFIG_TARGET_mpc52xx_Default is not set
+# CONFIG_TARGET_goldfish_Default is not set
+# CONFIG_TARGET_iop32x_Default is not set
+# CONFIG_TARGET_at91_9g20_Default is not set
+# CONFIG_TARGET_at91_9260_flexibity-minimal is not set
+# CONFIG_TARGET_at91_9260_flexibity-xwrt is not set
+# CONFIG_TARGET_at91_9260_flexibity-luci is not set
+# CONFIG_TARGET_at91_9263_Default is not set
+# CONFIG_TARGET_ubicom32_Default is not set
+# CONFIG_TARGET_malta_le_Default is not set
+# CONFIG_TARGET_malta_be_Default is not set
+# CONFIG_TARGET_mcs814x_Generic is not set
+# CONFIG_TARGET_mcs814x_dLAN_USB_Extender is not set
+# CONFIG_TARGET_mpc83xx_Default is not set
+# CONFIG_TARGET_omap24xx_n810-base is not set
+# CONFIG_TARGET_omap24xx_n810-gui is not set
+# CONFIG_TARGET_mpc85xx_Default is not set
+# CONFIG_TARGET_adm8668_Default is not set
+# CONFIG_TARGET_sparc_Default is not set
+# CONFIG_TARGET_atheros_Default is not set
+# CONFIG_TARGET_orion_generic_Default is not set
+# CONFIG_TARGET_orion_harddisk_Default is not set
+# CONFIG_TARGET_orion_dns323_Default is not set
+# CONFIG_TARGET_imx21_Default is not set
+# CONFIG_TARGET_lantiq_ar9_Generic is not set
+# CONFIG_TARGET_lantiq_ar9_EASY50812 is not set
+# CONFIG_TARGET_lantiq_ar9_DGN3500B is not set
+# CONFIG_TARGET_lantiq_ar9_WBMR is not set
+# CONFIG_TARGET_lantiq_ar9_FRITZ7320 is not set
+# CONFIG_TARGET_lantiq_ar9_P2601HNFX is not set
+# CONFIG_TARGET_lantiq_ar9_H201L is not set
+# CONFIG_TARGET_lantiq_ase_Generic is not set
+# CONFIG_TARGET_lantiq_ase_EASY50601 is not set
+# CONFIG_TARGET_lantiq_danube_Generic is not set
+# CONFIG_TARGET_lantiq_danube_EASY50712 is not set
+# CONFIG_TARGET_lantiq_danube_ARV3527P is not set
+# CONFIG_TARGET_lantiq_danube_ARV4510PW is not set
+# CONFIG_TARGET_lantiq_danube_ARV4518PW is not set
+# CONFIG_TARGET_lantiq_danube_ARV4519PW is not set
+# CONFIG_TARGET_lantiq_danube_ARV4520PW is not set
+# CONFIG_TARGET_lantiq_danube_ARV4525PW is not set
+# CONFIG_TARGET_lantiq_danube_ARV7525PW is not set
+# CONFIG_TARGET_lantiq_danube_ARV452CPW is not set
+# CONFIG_TARGET_lantiq_danube_ARV752DPW is not set
+# CONFIG_TARGET_lantiq_danube_ARV752DPW22 is not set
+# CONFIG_TARGET_lantiq_danube_ARV7518PW is not set
+# CONFIG_TARGET_lantiq_danube_GIGASX76X is not set
+# CONFIG_TARGET_lantiq_danube_BTHOMEHUBV2B is not set
+# CONFIG_TARGET_lantiq_danube_BTHOMEHUBV2BOPENRG is not set
+# CONFIG_TARGET_lantiq_falcon_Generic is not set
+# CONFIG_TARGET_lantiq_falcon_EASY98000 is not set
+# CONFIG_TARGET_lantiq_falcon_EASY98020 is not set
+# CONFIG_TARGET_lantiq_svip_be_Generic is not set
+# CONFIG_TARGET_lantiq_svip_be_EASY336 is not set
+# CONFIG_TARGET_lantiq_svip_be_EASY33016 is not set
+# CONFIG_TARGET_lantiq_svip_le_Generic is not set
+# CONFIG_TARGET_lantiq_svip_le_EASY336 is not set
+# CONFIG_TARGET_lantiq_vr9_Generic is not set
+# CONFIG_TARGET_lantiq_vr9_FRITZ3370 is not set
+# CONFIG_TARGET_xburst_qi_lb60_Default is not set
+# CONFIG_TARGET_xburst_n516_Default is not set
+# CONFIG_TARGET_xburst_n526_Default is not set
+# CONFIG_TARGET_xburst_id800wt_Default is not set
+# CONFIG_TARGET_s3c24xx_openmoko_gta02_openmoko-gta02-minimal is not set
+# CONFIG_TARGET_s3c24xx_openmoko_gta02_openmoko-gta02-full is not set
+# CONFIG_TARGET_x86_generic_Generic is not set
+# CONFIG_TARGET_x86_generic_Soekris45xx is not set
+# CONFIG_TARGET_x86_generic_Soekris48xx is not set
+# CONFIG_TARGET_x86_generic_Wrap is not set
+# CONFIG_TARGET_x86_olpc_Default is not set
+# CONFIG_TARGET_x86_xen_domu_Default is not set
+# CONFIG_TARGET_x86_ep80579_Default is not set
+# CONFIG_TARGET_x86_net5501_Default is not set
+# CONFIG_TARGET_x86_kvm_guest_Default is not set
+# CONFIG_TARGET_x86_geos_Default is not set
+# CONFIG_TARGET_x86_alix2_Default is not set
+# CONFIG_TARGET_x86_thincan_DBE61 is not set
+# CONFIG_TARGET_cns3xxx_Default is not set
+# CONFIG_TARGET_rdc_ar525w is not set
+# CONFIG_TARGET_rdc_bifferboard is not set
+# CONFIG_TARGET_rdc_r8610 is not set
+# CONFIG_TARGET_rdc_sitecom is not set
+# CONFIG_TARGET_ixp4xx_generic_Default is not set
+# CONFIG_TARGET_ixp4xx_generic_Atheros-ath5k is not set
+# CONFIG_TARGET_ixp4xx_generic_NSLU2 is not set
+# CONFIG_TARGET_ixp4xx_generic_NAS100d is not set
+# CONFIG_TARGET_ixp4xx_generic_DSMG600RevA is not set
+# CONFIG_TARGET_ixp4xx_generic_USR8200 is not set
+# CONFIG_TARGET_ixp4xx_harddisk_FSG3 is not set
+# CONFIG_TARGET_brcm2708_RaspberryPi is not set
+# CONFIG_TARGET_omap4_Default is not set
+# CONFIG_TARGET_ar7_Annex-A is not set
+# CONFIG_TARGET_ar7_Annex-B is not set
+# CONFIG_TARGET_ar7_Texas is not set
+# CONFIG_TARGET_ar7_None is not set
+# CONFIG_TARGET_brcm47xx_Broadcom-b43 is not set
+# CONFIG_TARGET_brcm47xx_Broadcom-wl is not set
+# CONFIG_TARGET_brcm47xx_Broadcom-ath5k is not set
+# CONFIG_TARGET_brcm47xx_Broadcom-none is not set
+# CONFIG_TARGET_brcm47xx_Bcm4705-b43 is not set
+# CONFIG_TARGET_brcm47xx_Bcm4705-wl is not set
+# CONFIG_TARGET_brcm47xx_Bcm4705-none is not set
+# CONFIG_TARGET_brcm47xx_Ps1208mfg is not set
+# CONFIG_TARGET_brcm47xx_WGT634U is not set
+# CONFIG_TARGET_brcm47xx_WL500GPv1 is not set
+# CONFIG_TARGET_brcm47xx_WRT350Nv1 is not set
+# CONFIG_TARGET_brcm47xx_WRTSL54GS is not set
+# CONFIG_TARGET_gemini_Default is not set
+# CONFIG_TARGET_ppc40x_Default is not set
+# CONFIG_TARGET_etrax_default is not set
+# CONFIG_TARGET_etrax_vhdl_no_fb is not set
+# CONFIG_TARGET_cobalt_Default is not set
+# CONFIG_TARGET_rb532_Default is not set
+# CONFIG_TARGET_leon_Default is not set
+# CONFIG_TARGET_coldfire_Default is not set
+CONFIG_TARGET_ar71xx_generic_Default=y
+# CONFIG_TARGET_ar71xx_generic_Minimal is not set
+# CONFIG_TARGET_ar71xx_generic_ath5k is not set
+# CONFIG_TARGET_ar71xx_generic_ALFAAP96 is not set
+# CONFIG_TARGET_ar71xx_generic_HORNETUB is not set
+# CONFIG_TARGET_ar71xx_generic_ALFANX is not set
+# CONFIG_TARGET_ar71xx_generic_ALL0305 is not set
+# CONFIG_TARGET_ar71xx_generic_ALL0258N is not set
+# CONFIG_TARGET_ar71xx_generic_ALL0315N is not set
+# CONFIG_TARGET_ar71xx_generic_AP113 is not set
+# CONFIG_TARGET_ar71xx_generic_AP121 is not set
+# CONFIG_TARGET_ar71xx_generic_AP121MINI is not set
+# CONFIG_TARGET_ar71xx_generic_AP136 is not set
+# CONFIG_TARGET_ar71xx_generic_AP81 is not set
+# CONFIG_TARGET_ar71xx_generic_AP83 is not set
+# CONFIG_TARGET_ar71xx_generic_AP96 is not set
+# CONFIG_TARGET_ar71xx_generic_DB120 is not set
+# CONFIG_TARGET_ar71xx_generic_PB42 is not set
+# CONFIG_TARGET_ar71xx_generic_PB44 is not set
+# CONFIG_TARGET_ar71xx_generic_PB92 is not set
+# CONFIG_TARGET_ar71xx_generic_A02RBW300N is not set
+# CONFIG_TARGET_ar71xx_generic_WZRHPG300NH is not set
+# CONFIG_TARGET_ar71xx_generic_WZRHPG300NH2 is not set
+# CONFIG_TARGET_ar71xx_generic_WZRHPAG300H is not set
+# CONFIG_TARGET_ar71xx_generic_WZRHPG450H is not set
+# CONFIG_TARGET_ar71xx_generic_WHRG301N is not set
+# CONFIG_TARGET_ar71xx_generic_WHRHPG300N is not set
+# CONFIG_TARGET_ar71xx_generic_WHRHPGN is not set
+# CONFIG_TARGET_ar71xx_generic_WLAEAG300N is not set
+# CONFIG_TARGET_ar71xx_generic_WP543 is not set
+# CONFIG_TARGET_ar71xx_generic_WPE72 is not set
+# CONFIG_TARGET_ar71xx_generic_DIR600A1 is not set
+# CONFIG_TARGET_ar71xx_generic_DIR601A1 is not set
+# CONFIG_TARGET_ar71xx_generic_DIR615C1 is not set
+# CONFIG_TARGET_ar71xx_generic_DIR615E4 is not set
+# CONFIG_TARGET_ar71xx_generic_DIR825B1 is not set
+# CONFIG_TARGET_ar71xx_generic_EWDORIN is not set
+# CONFIG_TARGET_ar71xx_generic_JA76PF is not set
+# CONFIG_TARGET_ar71xx_generic_JA76PF2 is not set
+# CONFIG_TARGET_ar71xx_generic_JWAP003 is not set
+# CONFIG_TARGET_ar71xx_generic_WRT160NL is not set
+# CONFIG_TARGET_ar71xx_generic_WRT400N is not set
+# CONFIG_TARGET_ar71xx_generic_WNDR3700 is not set
+# CONFIG_TARGET_ar71xx_generic_OM2P is not set
+# CONFIG_TARGET_ar71xx_generic_MR600 is not set
+# CONFIG_TARGET_ar71xx_generic_UBDEV01 is not set
+# CONFIG_TARGET_ar71xx_generic_DLRTDEV01 is not set
+# CONFIG_TARGET_ar71xx_generic_MZKW04NU is not set
+# CONFIG_TARGET_ar71xx_generic_MZKW300NH is not set
+# CONFIG_TARGET_ar71xx_generic_RW2458N is not set
+# CONFIG_TARGET_ar71xx_generic_CAP4200AG is not set
+# CONFIG_TARGET_ar71xx_generic_TLMR11U is not set
+# CONFIG_TARGET_ar71xx_generic_TLMR3020 is not set
+# CONFIG_TARGET_ar71xx_generic_TLMR3040 is not set
+# CONFIG_TARGET_ar71xx_generic_TLMR3220 is not set
+# CONFIG_TARGET_ar71xx_generic_TLMR3420 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR703 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWA701 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWA7510 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWA901 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWDR4300 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR740 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR741 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR743 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR841 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR842 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR941 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR1041 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR1043 is not set
+# CONFIG_TARGET_ar71xx_generic_TLWR2543 is not set
+# CONFIG_TARGET_ar71xx_generic_TEW632BRP is not set
+# CONFIG_TARGET_ar71xx_generic_TEW652BRP is not set
+# CONFIG_TARGET_ar71xx_generic_TEW673GRU is not set
+# CONFIG_TARGET_ar71xx_generic_TEW712BR is not set
+# CONFIG_TARGET_ar71xx_generic_UBNTRS is not set
+# CONFIG_TARGET_ar71xx_generic_UBNTRSPRO is not set
+# CONFIG_TARGET_ar71xx_generic_UBNTUNIFI is not set
+# CONFIG_TARGET_ar71xx_generic_UBNTUNIFIOUTDOOR is not set
+# CONFIG_TARGET_ar71xx_generic_UBNT is not set
+# CONFIG_TARGET_ar71xx_generic_ZCN1523H28 is not set
+# CONFIG_TARGET_ar71xx_generic_ZCN1523H516 is not set
+# CONFIG_TARGET_ar71xx_generic_NBG_460N_550N_550NH is not set
+# CONFIG_TARGET_ar71xx_nand_DefaultNoWifi is not set
+# CONFIG_TARGET_ar71xx_nand_Ath5k is not set
+# CONFIG_TARGET_adm5120_router_le_Generic is not set
+# CONFIG_TARGET_adm5120_router_le_EB-214A is not set
+# CONFIG_TARGET_adm5120_router_le_CAS630 is not set
+# CONFIG_TARGET_adm5120_router_le_CAS630W is not set
+# CONFIG_TARGET_adm5120_router_le_CAS670 is not set
+# CONFIG_TARGET_adm5120_router_le_CAS670W is not set
+# CONFIG_TARGET_adm5120_router_le_CAS700 is not set
+# CONFIG_TARGET_adm5120_router_le_CAS700W is not set
+# CONFIG_TARGET_adm5120_router_le_CAS771 is not set
+# CONFIG_TARGET_adm5120_router_le_CAS771W is not set
+# CONFIG_TARGET_adm5120_router_le_CAS790 is not set
+# CONFIG_TARGET_adm5120_router_le_CAS861 is not set
+# CONFIG_TARGET_adm5120_router_le_CAS861W is not set
+# CONFIG_TARGET_adm5120_router_le_NFS101U is not set
+# CONFIG_TARGET_adm5120_router_le_NFS101WU is not set
+# CONFIG_TARGET_adm5120_router_le_NP27G is not set
+# CONFIG_TARGET_adm5120_router_le_NP28G is not set
+# CONFIG_TARGET_adm5120_router_le_WP54 is not set
+# CONFIG_TARGET_adm5120_router_le_BR6104K is not set
+# CONFIG_TARGET_adm5120_router_le_BR6104KP is not set
+# CONFIG_TARGET_adm5120_router_le_BR6104WG is not set
+# CONFIG_TARGET_adm5120_router_le_BR6114WG is not set
+# CONFIG_TARGET_adm5120_router_le_EASY5120RT is not set
+# CONFIG_TARGET_adm5120_router_le_EASY5120PATA is not set
+# CONFIG_TARGET_adm5120_router_le_PMUGW is not set
+# CONFIG_TARGET_adm5120_router_le_5GXI is not set
+# CONFIG_TARGET_adm5120_router_be_Generic is not set
+# CONFIG_TARGET_adm5120_router_be_P334WT is not set
+# CONFIG_TARGET_adm5120_router_be_P335WT is not set
+# CONFIG_TARGET_adm5120_rb1xx_RouterBoard is not set
+# CONFIG_TARGET_pxa_Default is not set
+# CONFIG_TARGET_pxa_Gumstix is not set
+# CONFIG_TARGET_avr32_Default is not set
+# CONFIG_TARGET_brcm63xx_Broadcom is not set
+# CONFIG_TARGET_brcm63xx_Broadcom-wl is not set
+# CONFIG_TARGET_brcm63xx_Atheros is not set
+# CONFIG_TARGET_brcm63xx_Ralink is not set
+# CONFIG_TARGET_brcm63xx_NoWiFi is not set
+# CONFIG_TARGET_brcm63xx_Broadcom-brcmsmac is not set
+# CONFIG_TARGET_brcm63xx_GW6X00 is not set
+# CONFIG_TARGET_pxcab_Default is not set
+# CONFIG_TARGET_octeon_generic is not set
+# CONFIG_TARGET_octeon_mototech is not set
+# CONFIG_TARGET_kirkwood_Default is not set
+# CONFIG_TARGET_ramips_rt288x_Default is not set
+# CONFIG_TARGET_ramips_rt288x_RTN15 is not set
+# CONFIG_TARGET_ramips_rt288x_F5D8235V1 is not set
+# CONFIG_TARGET_ramips_rt305x_Default is not set
+# CONFIG_TARGET_ramips_rt305x_ALL02393G is not set
+# CONFIG_TARGET_ramips_rt305x_ALL0256N is not set
+# CONFIG_TARGET_ramips_rt305x_ALL5002 is not set
+# CONFIG_TARGET_ramips_rt305x_HW5503G is not set
+# CONFIG_TARGET_ramips_rt305x_F5D8235V2 is not set
+# CONFIG_TARGET_ramips_rt305x_ESR9753 is not set
+# CONFIG_TARGET_ramips_rt305x_FREESTATION5 is not set
+# CONFIG_TARGET_ramips_rt305x_W306R_V20 is not set
+# CONFIG_TARGET_ramips_rt305x_UPVEL is not set
+# CONFIG_TARGET_ramips_rt3883_Default is not set
+# CONFIG_TARGET_ramips_rt3883_RTN56U is not set
+# CONFIG_TARGET_ramips_rt3883_DIR645 is not set
+# CONFIG_TARGET_ramips_rt3883_TEW691GR is not set
+# CONFIG_TARGET_ramips_rt3883_TEW692GR is not set
+# CONFIG_TARGET_amazon_Default is not set
+# CONFIG_TARGET_omap35xx_beagleboard_Beagleboard is not set
+# CONFIG_TARGET_omap35xx_gumstix_Gumstix is not set
+# CONFIG_TARGET_omap35xx_gumstix_Vpp is not set
+# CONFIG_TARGET_omap35xx_gumstix_Es is not set
+# CONFIG_TARGET_ep93xx_Default is not set
+# CONFIG_TARGET_ep93xx_Simone is not set
+# CONFIG_TARGET_sibyte_Default is not set
+# CONFIG_TARGET_realview_Default is not set
+# CONFIG_TARGET_cns21xx_Default is not set
+# CONFIG_TARGET_au1000_au1500_Atheros is not set
+# CONFIG_TARGET_au1000_au1500_InternetBox is not set
+# CONFIG_TARGET_au1000_au1500_MeshCube is not set
+# CONFIG_TARGET_au1000_au1550_DBAu1550 is not set
+CONFIG_HAS_SUBTARGETS=y
+CONFIG_TARGET_BOARD="ar71xx"
+CONFIG_TARGET_ARCH_PACKAGES="ar71xx"
+CONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves"
+CONFIG_LINUX_3_3=y
+CONFIG_DEFAULT_base-files=y
+CONFIG_DEFAULT_busybox=y
+CONFIG_DEFAULT_dnsmasq=y
+CONFIG_DEFAULT_dropbear=y
+CONFIG_DEFAULT_firewall=y
+CONFIG_DEFAULT_hotplug2=y
+CONFIG_DEFAULT_iptables=y
+CONFIG_DEFAULT_kmod-ath9k=y
+CONFIG_DEFAULT_kmod-gpio-button-hotplug=y
+CONFIG_DEFAULT_kmod-ipt-nathelper=y
+CONFIG_DEFAULT_kmod-leds-gpio=y
+CONFIG_DEFAULT_kmod-ledtrig-default-on=y
+CONFIG_DEFAULT_kmod-ledtrig-netdev=y
+CONFIG_DEFAULT_kmod-ledtrig-timer=y
+CONFIG_DEFAULT_kmod-ledtrig-usbdev=y
+CONFIG_DEFAULT_kmod-usb-core=y
+CONFIG_DEFAULT_kmod-usb-ohci=y
+CONFIG_DEFAULT_kmod-usb2=y
+CONFIG_DEFAULT_kmod-wdt-ath79=y
+CONFIG_DEFAULT_libc=y
+CONFIG_DEFAULT_libgcc=y
+CONFIG_DEFAULT_mtd=y
+CONFIG_DEFAULT_netifd=y
+CONFIG_DEFAULT_opkg=y
+CONFIG_DEFAULT_ppp=y
+CONFIG_DEFAULT_ppp-mod-pppoe=y
+CONFIG_DEFAULT_swconfig=y
+CONFIG_DEFAULT_uboot-envtools=y
+CONFIG_DEFAULT_uci=y
+CONFIG_DEFAULT_wpad-mini=y
+CONFIG_AUDIO_SUPPORT=y
+CONFIG_GPIO_SUPPORT=y
+CONFIG_PCI_SUPPORT=y
+CONFIG_USB_SUPPORT=y
+CONFIG_BIG_ENDIAN=y
+CONFIG_USES_SQUASHFS=y
+CONFIG_USES_JFFS2=y
+CONFIG_USES_TARGZ=y
+CONFIG_mips=y
+CONFIG_ARCH="mips"
+
+#
+# Target Images
+#
+# CONFIG_TARGET_ROOTFS_INITRAMFS is not set
+CONFIG_EXTERNAL_CPIO=""
+
+#
+# Root filesystem archives
+#
+# CONFIG_TARGET_ROOTFS_CPIOGZ is not set
+# CONFIG_TARGET_ROOTFS_TARGZ is not set
+
+#
+# Root filesystem images
+#
+# CONFIG_TARGET_ROOTFS_EXT4FS is not set
+# CONFIG_TARGET_ROOTFS_JFFS2 is not set
+CONFIG_TARGET_ROOTFS_SQUASHFS=y
+
+#
+# Image Options
+#
+
+#
+# Global build settings
+#
+# CONFIG_ALL is not set
+
+#
+# General build options
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+CONFIG_BUILD_PATENTED=y
+# CONFIG_BUILD_NLS is not set
+# CONFIG_BUILD_STATIC_TOOLS is not set
+# CONFIG_SHADOW_PASSWORDS is not set
+CONFIG_CLEAN_IPKG=y
+# CONFIG_COLLECT_KERNEL_DEBUG is not set
+
+#
+# Kernel build options
+#
+CONFIG_KERNEL_DEBUG_FS=y
+# CONFIG_KERNEL_PERF_EVENTS is not set
+# CONFIG_KERNEL_PROFILING is not set
+# CONFIG_KERNEL_KALLSYMS is not set
+# CONFIG_KERNEL_FTRACE is not set
+# CONFIG_KERNEL_DEBUG_KERNEL is not set
+# CONFIG_KERNEL_DEBUG_INFO is not set
+# CONFIG_KERNEL_AIO is not set
+CONFIG_KERNEL_MAGIC_SYSRQ=y
+CONFIG_KERNEL_ELF_CORE=y
+# CONFIG_KERNEL_PROVE_LOCKING is not set
+CONFIG_KERNEL_PRINTK_TIME=y
+CONFIG_KERNEL_RELAY=y
+
+#
+# Package build options
+#
+# CONFIG_DEBUG is not set
+CONFIG_IPV6=y
+CONFIG_PKG_BUILD_PARALLEL=y
+CONFIG_PKG_BUILD_USE_JOBSERVER=y
+
+#
+# Stripping options
+#
+# CONFIG_NO_STRIP is not set
+# CONFIG_USE_STRIP is not set
+CONFIG_USE_SSTRIP=y
+CONFIG_STRIP_KERNEL_EXPORTS=y
+CONFIG_USE_MKLIBS=y
+CONFIG_USE_UCLIBCXX=y
+# CONFIG_USE_LIBSTDCXX is not set
+# CONFIG_DEVEL is not set
+# CONFIG_BROKEN is not set
+CONFIG_DOWNLOAD_FOLDER=""
+CONFIG_LOCALMIRROR=""
+CONFIG_AUTOREBUILD=y
+CONFIG_BUILD_SUFFIX=""
+CONFIG_TARGET_ROOTFS_DIR=""
+# CONFIG_CCACHE is not set
+CONFIG_EXTERNAL_KERNEL_TREE=""
+CONFIG_KERNEL_GIT_CLONE_URI=""
+CONFIG_KERNEL_GIT_LOCAL_REPOSITORY=""
+CONFIG_TARGET_OPTIMIZATION="-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves"
+CONFIG_SOFT_FLOAT=y
+# CONFIG_EXTRA_TARGET_ARCH is not set
+CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS=""
+CONFIG_BINUTILS_VERSION="2.22"
+CONFIG_GCC_VERSION_4_6_LINARO=y
+CONFIG_EXTRA_GCC_CONFIG_OPTIONS=""
+# CONFIG_SSP_SUPPORT is not set
+# CONFIG_TLS_SUPPORT is not set
+# CONFIG_SJLJ_EXCEPTIONS is not set
+CONFIG_INSTALL_LIBSTDCPP=y
+# CONFIG_INSTALL_LIBGCJ is not set
+# CONFIG_INSTALL_GFORTRAN is not set
+CONFIG_USE_UCLIBC=y
+CONFIG_UCLIBC_VERSION_0_9_33=y
+CONFIG_GDB=y
+# CONFIG_INSIGHT is not set
+CONFIG_GCC_DEFAULT_VERSION_4_6_LINARO=y
+CONFIG_GCC_VERSION="4.6-linaro"
+CONFIG_GCC_VERSION_4_6=y
+CONFIG_UCLIBC_VERSION="0.9.33.2"
+CONFIG_LIBC="uClibc"
+CONFIG_LIBC_VERSION="0.9.33.2"
+CONFIG_TARGET_SUFFIX="uclibc"
+# CONFIG_IB is not set
+# CONFIG_SDK is not set
+# CONFIG_MAKE_TOOLCHAIN is not set
+CONFIG_IMAGEOPT=y
+CONFIG_PREINITOPT=y
+CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
+CONFIG_TARGET_PREINIT_TIMEOUT=2
+# CONFIG_TARGET_PREINIT_SHOW_NETMSG is not set
+# CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG is not set
+CONFIG_TARGET_PREINIT_IFNAME=""
+CONFIG_TARGET_PREINIT_IP="192.168.1.1"
+CONFIG_TARGET_PREINIT_NETMASK="255.255.255.0"
+CONFIG_TARGET_PREINIT_BROADCAST="192.168.1.255"
+# CONFIG_INITOPT is not set
+CONFIG_TARGET_INIT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
+CONFIG_TARGET_INIT_ENV=""
+CONFIG_TARGET_INIT_CMD="/sbin/init"
+CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
+CONFIG_VERSIONOPT=y
+CONFIG_VERSION_DIST="OpenWrt"
+CONFIG_VERSION_NICK="ffc"
+CONFIG_VERSION_NUMBER="attitude_adjustment-STABLE"
+CONFIG_VERSION_REPO="http://firmware.chemnitz.freifunk.net/firmware/attitude_adjustment/STABLE/%T/packages/"
+
+#
+# Package features
+#
+CONFIG_FEATURE_drawing-backend_DirectFB=y
+
+#
+# Base system
+#
+CONFIG_PACKAGE_base-files=y
+# CONFIG_PACKAGE_block-mount is not set
+CONFIG_EXTROOT_SETTLETIME=20
+CONFIG_PACKAGE_bridge=y
+CONFIG_PACKAGE_busybox=y
+# CONFIG_BUSYBOX_CONFIG_NOMMU is not set
+# CONFIG_CONFIG_BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH is not set
+# CONFIG_BUSYBOX_CONFIG_HUSH is not set
+CONFIG_BUSYBOX_CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+# CONFIG_BUSYBOX_CONFIG_DESKTOP is not set
+# CONFIG_BUSYBOX_CONFIG_EXTRA_COMPAT is not set
+# CONFIG_BUSYBOX_CONFIG_INCLUDE_SUSv2 is not set
+# CONFIG_BUSYBOX_CONFIG_USE_PORTABLE_CODE is not set
+CONFIG_BUSYBOX_CONFIG_PLATFORM_LINUX=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
+CONFIG_BUSYBOX_CONFIG_SHOW_USAGE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_INSTALLER is not set
+# CONFIG_BUSYBOX_CONFIG_INSTALL_NO_USR is not set
+# CONFIG_BUSYBOX_CONFIG_LOCALE_SUPPORT is not set
+# CONFIG_BUSYBOX_CONFIG_UNICODE_SUPPORT is not set
+CONFIG_BUSYBOX_CONFIG_LONG_OPTS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_DEVPTS=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_CLEAN_UP is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_UTMP is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_PIDFILE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_SUID=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SUID_CONFIG is not set
+# CONFIG_BUSYBOX_CONFIG_SELINUX is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS=y
+CONFIG_BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOG=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+# CONFIG_BUSYBOX_CONFIG_STATIC is not set
+# CONFIG_BUSYBOX_CONFIG_PIE is not set
+CONFIG_BUSYBOX_CONFIG_LFS=y
+CONFIG_BUSYBOX_CONFIG_CROSS_COMPILER_PREFIX=""
+CONFIG_BUSYBOX_CONFIG_EXTRA_CFLAGS=""
+
+#
+# Debugging Options
+#
+# CONFIG_BUSYBOX_CONFIG_DEBUG is not set
+# CONFIG_BUSYBOX_CONFIG_WERROR is not set
+CONFIG_BUSYBOX_CONFIG_NO_DEBUG_LIB=y
+# CONFIG_BUSYBOX_CONFIG_DMALLOC is not set
+# CONFIG_BUSYBOX_CONFIG_EFENCE is not set
+
+#
+# Installation Options ("make install" behavior)
+#
+CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS=y
+# CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS is not set
+# CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+# CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_DONT is not set
+CONFIG_BUSYBOX_CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SYSTEMD is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_RTMINMAX is not set
+CONFIG_BUSYBOX_CONFIG_PASSWORD_MINLEN=6
+CONFIG_BUSYBOX_CONFIG_MD5_SIZE_VS_SPEED=0
+CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_USE_TERMIOS is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_MAX_LEN=512
+# CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_VI is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_HISTORY=256
+CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_REVERSE_SEARCH is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_USERNAME_COMPLETION is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_COPYBUF_KB=4
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SKIP_ROOTFS is not set
+# CONFIG_BUSYBOX_CONFIG_MONOTONIC_SYSCALL is not set
+CONFIG_BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_HWIB is not set
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_LZMA is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_BZ2 is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z is not set
+# CONFIG_BUSYBOX_CONFIG_AR is not set
+CONFIG_BUSYBOX_CONFIG_BUNZIP2=y
+# CONFIG_BUSYBOX_CONFIG_BZIP2 is not set
+# CONFIG_BUSYBOX_CONFIG_CPIO is not set
+# CONFIG_BUSYBOX_CONFIG_DPKG is not set
+# CONFIG_BUSYBOX_CONFIG_DPKG_DEB is not set
+CONFIG_BUSYBOX_CONFIG_GUNZIP=y
+CONFIG_BUSYBOX_CONFIG_GZIP=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
+# CONFIG_BUSYBOX_CONFIG_LZOP is not set
+# CONFIG_BUSYBOX_CONFIG_RPM2CPIO is not set
+# CONFIG_BUSYBOX_CONFIG_RPM is not set
+CONFIG_BUSYBOX_CONFIG_TAR=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_CREATE=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_AUTODETECT is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_FROM=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_UNAME_GNAME is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set
+# CONFIG_BUSYBOX_CONFIG_UNCOMPRESS is not set
+# CONFIG_BUSYBOX_CONFIG_UNLZMA is not set
+# CONFIG_BUSYBOX_CONFIG_UNXZ is not set
+# CONFIG_BUSYBOX_CONFIG_UNZIP is not set
+
+#
+# Coreutils
+#
+CONFIG_BUSYBOX_CONFIG_BASENAME=y
+CONFIG_BUSYBOX_CONFIG_CAT=y
+CONFIG_BUSYBOX_CONFIG_DATE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_DATE_NANO is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_DATE_COMPAT is not set
+CONFIG_BUSYBOX_CONFIG_ID=y
+# CONFIG_BUSYBOX_CONFIG_GROUPS is not set
+CONFIG_BUSYBOX_CONFIG_TEST=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TEST_64=y
+CONFIG_BUSYBOX_CONFIG_TOUCH=y
+CONFIG_BUSYBOX_CONFIG_TR=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TR_CLASSES is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TR_EQUIV is not set
+CONFIG_BUSYBOX_CONFIG_BASE64=y
+# CONFIG_BUSYBOX_CONFIG_CAL is not set
+# CONFIG_BUSYBOX_CONFIG_CATV is not set
+CONFIG_BUSYBOX_CONFIG_CHGRP=y
+CONFIG_BUSYBOX_CONFIG_CHMOD=y
+CONFIG_BUSYBOX_CONFIG_CHOWN=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set
+CONFIG_BUSYBOX_CONFIG_CHROOT=y
+# CONFIG_BUSYBOX_CONFIG_CKSUM is not set
+# CONFIG_BUSYBOX_CONFIG_COMM is not set
+CONFIG_BUSYBOX_CONFIG_CP=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS is not set
+CONFIG_BUSYBOX_CONFIG_CUT=y
+CONFIG_BUSYBOX_CONFIG_DD=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_DD_IBS_OBS is not set
+CONFIG_BUSYBOX_CONFIG_DF=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_DF_FANCY is not set
+CONFIG_BUSYBOX_CONFIG_DIRNAME=y
+# CONFIG_BUSYBOX_CONFIG_DOS2UNIX is not set
+CONFIG_BUSYBOX_CONFIG_DU=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
+CONFIG_BUSYBOX_CONFIG_ECHO=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_ECHO=y
+CONFIG_BUSYBOX_CONFIG_ENV=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+# CONFIG_BUSYBOX_CONFIG_EXPAND is not set
+CONFIG_BUSYBOX_CONFIG_EXPR=y
+CONFIG_BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64=y
+CONFIG_BUSYBOX_CONFIG_FALSE=y
+# CONFIG_BUSYBOX_CONFIG_FOLD is not set
+# CONFIG_BUSYBOX_CONFIG_FSYNC is not set
+CONFIG_BUSYBOX_CONFIG_HEAD=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_HEAD=y
+CONFIG_BUSYBOX_CONFIG_HOSTID=y
+# CONFIG_BUSYBOX_CONFIG_INSTALL is not set
+CONFIG_BUSYBOX_CONFIG_LN=y
+# CONFIG_BUSYBOX_CONFIG_LOGNAME is not set
+CONFIG_BUSYBOX_CONFIG_LS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LS_FILETYPES=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LS_SORTFILES=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LS_USERNAME=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LS_COLOR=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+CONFIG_BUSYBOX_CONFIG_MD5SUM=y
+CONFIG_BUSYBOX_CONFIG_MKDIR=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+CONFIG_BUSYBOX_CONFIG_MKFIFO=y
+CONFIG_BUSYBOX_CONFIG_MKNOD=y
+CONFIG_BUSYBOX_CONFIG_MV=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+CONFIG_BUSYBOX_CONFIG_NICE=y
+# CONFIG_BUSYBOX_CONFIG_NOHUP is not set
+# CONFIG_BUSYBOX_CONFIG_OD is not set
+# CONFIG_BUSYBOX_CONFIG_PRINTENV is not set
+CONFIG_BUSYBOX_CONFIG_PRINTF=y
+CONFIG_BUSYBOX_CONFIG_PWD=y
+# CONFIG_BUSYBOX_CONFIG_READLINK is not set
+# CONFIG_BUSYBOX_CONFIG_REALPATH is not set
+CONFIG_BUSYBOX_CONFIG_RM=y
+CONFIG_BUSYBOX_CONFIG_RMDIR=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+CONFIG_BUSYBOX_CONFIG_SEQ=y
+# CONFIG_BUSYBOX_CONFIG_SHA1SUM is not set
+# CONFIG_BUSYBOX_CONFIG_SHA256SUM is not set
+# CONFIG_BUSYBOX_CONFIG_SHA512SUM is not set
+CONFIG_BUSYBOX_CONFIG_SLEEP=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP is not set
+CONFIG_BUSYBOX_CONFIG_SORT=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SORT_BIG is not set
+# CONFIG_BUSYBOX_CONFIG_SPLIT is not set
+# CONFIG_BUSYBOX_CONFIG_STAT is not set
+# CONFIG_BUSYBOX_CONFIG_STTY is not set
+# CONFIG_BUSYBOX_CONFIG_SUM is not set
+CONFIG_BUSYBOX_CONFIG_SYNC=y
+# CONFIG_BUSYBOX_CONFIG_TAC is not set
+# CONFIG_BUSYBOX_CONFIG_TAIL is not set
+CONFIG_BUSYBOX_CONFIG_TEE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+# CONFIG_BUSYBOX_CONFIG_TRUE is not set
+# CONFIG_BUSYBOX_CONFIG_TTY is not set
+CONFIG_BUSYBOX_CONFIG_UNAME=y
+# CONFIG_BUSYBOX_CONFIG_UNEXPAND is not set
+CONFIG_BUSYBOX_CONFIG_UNIQ=y
+# CONFIG_BUSYBOX_CONFIG_USLEEP is not set
+# CONFIG_BUSYBOX_CONFIG_UUDECODE is not set
+# CONFIG_BUSYBOX_CONFIG_UUENCODE is not set
+CONFIG_BUSYBOX_CONFIG_WC=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_WC_LARGE is not set
+# CONFIG_BUSYBOX_CONFIG_WHOAMI is not set
+# CONFIG_BUSYBOX_CONFIG_YES is not set
+
+#
+# Common options for cp and mv
+#
+CONFIG_BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+CONFIG_BUSYBOX_CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+CONFIG_BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum, sha256sum, sha512sum
+#
+CONFIG_BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_CHVT is not set
+# CONFIG_BUSYBOX_CONFIG_FGCONSOLE is not set
+CONFIG_BUSYBOX_CONFIG_CLEAR=y
+# CONFIG_BUSYBOX_CONFIG_DEALLOCVT is not set
+# CONFIG_BUSYBOX_CONFIG_DUMPKMAP is not set
+# CONFIG_BUSYBOX_CONFIG_KBD_MODE is not set
+# CONFIG_BUSYBOX_CONFIG_LOADFONT is not set
+# CONFIG_BUSYBOX_CONFIG_LOADKMAP is not set
+# CONFIG_BUSYBOX_CONFIG_OPENVT is not set
+CONFIG_BUSYBOX_CONFIG_RESET=y
+# CONFIG_BUSYBOX_CONFIG_RESIZE is not set
+# CONFIG_BUSYBOX_CONFIG_SETCONSOLE is not set
+# CONFIG_BUSYBOX_CONFIG_SETFONT is not set
+# CONFIG_BUSYBOX_CONFIG_SETKEYCODES is not set
+# CONFIG_BUSYBOX_CONFIG_SETLOGCONS is not set
+# CONFIG_BUSYBOX_CONFIG_SHOWKEY is not set
+
+#
+# Debian Utilities
+#
+CONFIG_BUSYBOX_CONFIG_MKTEMP=y
+# CONFIG_BUSYBOX_CONFIG_PIPE_PROGRESS is not set
+# CONFIG_BUSYBOX_CONFIG_RUN_PARTS is not set
+CONFIG_BUSYBOX_CONFIG_START_STOP_DAEMON=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
+CONFIG_BUSYBOX_CONFIG_WHICH=y
+
+#
+# Editors
+#
+# CONFIG_BUSYBOX_CONFIG_PATCH is not set
+CONFIG_BUSYBOX_CONFIG_VI=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_MAX_LEN=1024
+# CONFIG_BUSYBOX_CONFIG_FEATURE_VI_8BIT is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_COLON=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_YANKMARK=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SEARCH=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_DOT_CMD=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_READONLY=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SETOPTS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SET=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_WIN_RESIZE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_ASK_TERMINAL=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+CONFIG_BUSYBOX_CONFIG_AWK=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_AWK_LIBM=y
+# CONFIG_BUSYBOX_CONFIG_CMP is not set
+# CONFIG_BUSYBOX_CONFIG_DIFF is not set
+# CONFIG_BUSYBOX_CONFIG_ED is not set
+CONFIG_BUSYBOX_CONFIG_SED=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+CONFIG_BUSYBOX_CONFIG_FIND=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PRINT0=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MTIME is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MMIN is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PERM=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_TYPE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_XDEV=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MAXDEPTH=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_NEWER is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_INUM is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_EXEC=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_USER=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_GROUP=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_NOT=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_DEPTH=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PAREN=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_SIZE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PRUNE=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_DELETE is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PATH=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_REGEX=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_LINKS is not set
+CONFIG_BUSYBOX_CONFIG_GREP=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT=y
+CONFIG_BUSYBOX_CONFIG_XARGS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_BOOTCHARTD is not set
+CONFIG_BUSYBOX_CONFIG_HALT=y
+CONFIG_BUSYBOX_CONFIG_INIT=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_USE_INITTAB=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_KILL_REMOVED is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_INIT_SCTTY is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_INIT_SYSLOG=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_INITRD is not set
+CONFIG_BUSYBOX_CONFIG_INIT_TERMINAL_TYPE="linux"
+# CONFIG_BUSYBOX_CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_ADD_SHELL is not set
+# CONFIG_BUSYBOX_CONFIG_REMOVE_SHELL is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS is not set
+# CONFIG_BUSYBOX_CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_BUSYBOX_CONFIG_USE_BB_CRYPT is not set
+# CONFIG_BUSYBOX_CONFIG_ADDUSER is not set
+# CONFIG_BUSYBOX_CONFIG_ADDGROUP is not set
+# CONFIG_BUSYBOX_CONFIG_DELUSER is not set
+# CONFIG_BUSYBOX_CONFIG_DELGROUP is not set
+# CONFIG_BUSYBOX_CONFIG_GETTY is not set
+# CONFIG_BUSYBOX_CONFIG_LOGIN is not set
+CONFIG_BUSYBOX_CONFIG_PASSWD=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+# CONFIG_BUSYBOX_CONFIG_CRYPTPW is not set
+# CONFIG_BUSYBOX_CONFIG_CHPASSWD is not set
+# CONFIG_BUSYBOX_CONFIG_SU is not set
+# CONFIG_BUSYBOX_CONFIG_SULOGIN is not set
+# CONFIG_BUSYBOX_CONFIG_VLOCK is not set
+
+#
+# Linux Ext2 FS Progs
+#
+# CONFIG_BUSYBOX_CONFIG_CHATTR is not set
+# CONFIG_BUSYBOX_CONFIG_FSCK is not set
+# CONFIG_BUSYBOX_CONFIG_LSATTR is not set
+# CONFIG_BUSYBOX_CONFIG_TUNE2FS is not set
+
+#
+# Linux Module Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_MODINFO is not set
+# CONFIG_BUSYBOX_CONFIG_MODPROBE_SMALL is not set
+CONFIG_BUSYBOX_CONFIG_INSMOD=y
+CONFIG_BUSYBOX_CONFIG_RMMOD=y
+CONFIG_BUSYBOX_CONFIG_LSMOD=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+# CONFIG_BUSYBOX_CONFIG_MODPROBE is not set
+# CONFIG_BUSYBOX_CONFIG_DEPMOD is not set
+
+#
+# Options common to multiple modutils
+#
+# CONFIG_BUSYBOX_CONFIG_FEATURE_2_4_MODULES is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+CONFIG_BUSYBOX_CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
+
+#
+# Linux System Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_BLOCKDEV is not set
+# CONFIG_BUSYBOX_CONFIG_REV is not set
+# CONFIG_BUSYBOX_CONFIG_ACPID is not set
+# CONFIG_BUSYBOX_CONFIG_BLKID is not set
+CONFIG_BUSYBOX_CONFIG_DMESG=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY=y
+# CONFIG_BUSYBOX_CONFIG_FBSET is not set
+# CONFIG_BUSYBOX_CONFIG_FDFLUSH is not set
+# CONFIG_BUSYBOX_CONFIG_FDFORMAT is not set
+# CONFIG_BUSYBOX_CONFIG_FDISK is not set
+# CONFIG_BUSYBOX_CONFIG_FINDFS is not set
+# CONFIG_BUSYBOX_CONFIG_FLOCK is not set
+# CONFIG_BUSYBOX_CONFIG_FREERAMDISK is not set
+# CONFIG_BUSYBOX_CONFIG_FSCK_MINIX is not set
+# CONFIG_BUSYBOX_CONFIG_MKFS_EXT2 is not set
+# CONFIG_BUSYBOX_CONFIG_MKFS_MINIX is not set
+# CONFIG_BUSYBOX_CONFIG_MKFS_REISER is not set
+# CONFIG_BUSYBOX_CONFIG_MKFS_VFAT is not set
+# CONFIG_BUSYBOX_CONFIG_GETOPT is not set
+CONFIG_BUSYBOX_CONFIG_HEXDUMP=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+# CONFIG_BUSYBOX_CONFIG_HD is not set
+CONFIG_BUSYBOX_CONFIG_HWCLOCK=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
+# CONFIG_BUSYBOX_CONFIG_IPCRM is not set
+# CONFIG_BUSYBOX_CONFIG_IPCS is not set
+# CONFIG_BUSYBOX_CONFIG_LOSETUP is not set
+# CONFIG_BUSYBOX_CONFIG_LSPCI is not set
+# CONFIG_BUSYBOX_CONFIG_LSUSB is not set
+# CONFIG_BUSYBOX_CONFIG_MDEV is not set
+# CONFIG_BUSYBOX_CONFIG_MKSWAP is not set
+# CONFIG_BUSYBOX_CONFIG_MORE is not set
+CONFIG_BUSYBOX_CONFIG_MOUNT=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_NFS=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB=y
+CONFIG_BUSYBOX_CONFIG_PIVOT_ROOT=y
+# CONFIG_BUSYBOX_CONFIG_RDATE is not set
+# CONFIG_BUSYBOX_CONFIG_RDEV is not set
+# CONFIG_BUSYBOX_CONFIG_READPROFILE is not set
+# CONFIG_BUSYBOX_CONFIG_RTCWAKE is not set
+# CONFIG_BUSYBOX_CONFIG_SCRIPT is not set
+# CONFIG_BUSYBOX_CONFIG_SCRIPTREPLAY is not set
+# CONFIG_BUSYBOX_CONFIG_SETARCH is not set
+# CONFIG_BUSYBOX_CONFIG_SWAPONOFF is not set
+CONFIG_BUSYBOX_CONFIG_SWITCH_ROOT=y
+CONFIG_BUSYBOX_CONFIG_UMOUNT=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT is not set
+# CONFIG_BUSYBOX_CONFIG_VOLUMEID is not set
+
+#
+# Miscellaneous Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_CONSPY is not set
+CONFIG_BUSYBOX_CONFIG_LESS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES=9999999
+# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_FLAGS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_MARKS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_REGEXP is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_WINCH is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD is not set
+# CONFIG_BUSYBOX_CONFIG_NANDWRITE is not set
+# CONFIG_BUSYBOX_CONFIG_NANDDUMP is not set
+# CONFIG_BUSYBOX_CONFIG_SETSERIAL is not set
+# CONFIG_BUSYBOX_CONFIG_UBIATTACH is not set
+# CONFIG_BUSYBOX_CONFIG_UBIDETACH is not set
+# CONFIG_BUSYBOX_CONFIG_UBIMKVOL is not set
+# CONFIG_BUSYBOX_CONFIG_UBIRMVOL is not set
+# CONFIG_BUSYBOX_CONFIG_UBIRSVOL is not set
+# CONFIG_BUSYBOX_CONFIG_UBIUPDATEVOL is not set
+# CONFIG_BUSYBOX_CONFIG_ADJTIMEX is not set
+# CONFIG_BUSYBOX_CONFIG_BBCONFIG is not set
+# CONFIG_BUSYBOX_CONFIG_BEEP is not set
+# CONFIG_BUSYBOX_CONFIG_CHAT is not set
+# CONFIG_BUSYBOX_CONFIG_CHRT is not set
+CONFIG_BUSYBOX_CONFIG_CROND=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_D is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
+CONFIG_BUSYBOX_CONFIG_CRONTAB=y
+# CONFIG_BUSYBOX_CONFIG_DC is not set
+# CONFIG_BUSYBOX_CONFIG_DEVFSD is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_DEVFS is not set
+# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
+# CONFIG_BUSYBOX_CONFIG_EJECT is not set
+# CONFIG_BUSYBOX_CONFIG_FBSPLASH is not set
+# CONFIG_BUSYBOX_CONFIG_FLASHCP is not set
+# CONFIG_BUSYBOX_CONFIG_FLASH_LOCK is not set
+# CONFIG_BUSYBOX_CONFIG_FLASH_UNLOCK is not set
+# CONFIG_BUSYBOX_CONFIG_FLASH_ERASEALL is not set
+# CONFIG_BUSYBOX_CONFIG_IONICE is not set
+# CONFIG_BUSYBOX_CONFIG_INOTIFYD is not set
+# CONFIG_BUSYBOX_CONFIG_HDPARM is not set
+CONFIG_BUSYBOX_CONFIG_LOCK=y
+# CONFIG_BUSYBOX_CONFIG_MAKEDEVS is not set
+# CONFIG_BUSYBOX_CONFIG_MAN is not set
+# CONFIG_BUSYBOX_CONFIG_MICROCOM is not set
+# CONFIG_BUSYBOX_CONFIG_MOUNTPOINT is not set
+# CONFIG_BUSYBOX_CONFIG_MT is not set
+# CONFIG_BUSYBOX_CONFIG_RAIDAUTORUN is not set
+# CONFIG_BUSYBOX_CONFIG_READAHEAD is not set
+# CONFIG_BUSYBOX_CONFIG_RFKILL is not set
+# CONFIG_BUSYBOX_CONFIG_RX is not set
+# CONFIG_BUSYBOX_CONFIG_SETSID is not set
+CONFIG_BUSYBOX_CONFIG_STRINGS=y
+# CONFIG_BUSYBOX_CONFIG_TASKSET is not set
+CONFIG_BUSYBOX_CONFIG_TIME=y
+# CONFIG_BUSYBOX_CONFIG_TIMEOUT is not set
+# CONFIG_BUSYBOX_CONFIG_TTYSIZE is not set
+# CONFIG_BUSYBOX_CONFIG_VOLNAME is not set
+CONFIG_BUSYBOX_CONFIG_WATCHDOG=y
+
+#
+# Networking Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_NAMEIF is not set
+# CONFIG_BUSYBOX_CONFIG_NBDCLIENT is not set
+CONFIG_BUSYBOX_CONFIG_NC=y
+# CONFIG_BUSYBOX_CONFIG_NC_SERVER is not set
+# CONFIG_BUSYBOX_CONFIG_NC_EXTRA is not set
+# CONFIG_BUSYBOX_CONFIG_NC_110_COMPAT is not set
+CONFIG_BUSYBOX_CONFIG_PING=y
+CONFIG_BUSYBOX_CONFIG_PING6=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_PING=y
+# CONFIG_BUSYBOX_CONFIG_WHOIS is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_IPV6=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_UNIX_LOCAL is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
+CONFIG_BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS=y
+CONFIG_BUSYBOX_CONFIG_ARP=y
+CONFIG_BUSYBOX_CONFIG_ARPING=y
+CONFIG_BUSYBOX_CONFIG_BRCTL=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_FANCY=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW=y
+# CONFIG_BUSYBOX_CONFIG_DNSD is not set
+# CONFIG_BUSYBOX_CONFIG_ETHER_WAKE is not set
+# CONFIG_BUSYBOX_CONFIG_FAKEIDENTD is not set
+# CONFIG_BUSYBOX_CONFIG_FTPD is not set
+# CONFIG_BUSYBOX_CONFIG_FTPGET is not set
+# CONFIG_BUSYBOX_CONFIG_FTPPUT is not set
+CONFIG_BUSYBOX_CONFIG_HOSTNAME=y
+# CONFIG_BUSYBOX_CONFIG_HTTPD is not set
+CONFIG_BUSYBOX_CONFIG_IFCONFIG=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
+# CONFIG_BUSYBOX_CONFIG_IFENSLAVE is not set
+# CONFIG_BUSYBOX_CONFIG_IFPLUGD is not set
+# CONFIG_BUSYBOX_CONFIG_IFUPDOWN is not set
+# CONFIG_BUSYBOX_CONFIG_INETD is not set
+CONFIG_BUSYBOX_CONFIG_IP=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_IP_ADDRESS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_IP_LINK=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_IP_ROUTE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_IP_TUNNEL=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_IP_RULE=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+# CONFIG_BUSYBOX_CONFIG_IPCALC is not set
+CONFIG_BUSYBOX_CONFIG_NETMSG=y
+CONFIG_BUSYBOX_CONFIG_NETSTAT=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_WIDE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_PRG=y
+CONFIG_BUSYBOX_CONFIG_NSLOOKUP=y
+CONFIG_BUSYBOX_CONFIG_NTPD=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER=y
+# CONFIG_BUSYBOX_CONFIG_PSCAN is not set
+CONFIG_BUSYBOX_CONFIG_ROUTE=y
+# CONFIG_BUSYBOX_CONFIG_SLATTACH is not set
+# CONFIG_BUSYBOX_CONFIG_TCPSVD is not set
+# CONFIG_BUSYBOX_CONFIG_TELNET is not set
+CONFIG_BUSYBOX_CONFIG_TELNETD=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
+# CONFIG_BUSYBOX_CONFIG_TFTP is not set
+CONFIG_BUSYBOX_CONFIG_TFTPD=y
+
+#
+# Common options for tftp/tftpd
+#
+CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_GET=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE=y
+# CONFIG_BUSYBOX_CONFIG_TFTP_DEBUG is not set
+CONFIG_BUSYBOX_CONFIG_TRACEROUTE=y
+CONFIG_BUSYBOX_CONFIG_TRACEROUTE6=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
+# CONFIG_BUSYBOX_CONFIG_TUNCTL is not set
+# CONFIG_BUSYBOX_CONFIG_UDHCPD is not set
+CONFIG_BUSYBOX_CONFIG_UDHCPC=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCPC_ARPING is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_PORT is not set
+CONFIG_BUSYBOX_CONFIG_UDHCP_DEBUG=0
+CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_RFC3397=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q is not set
+CONFIG_BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+CONFIG_BUSYBOX_CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
+# CONFIG_BUSYBOX_CONFIG_UDPSVD is not set
+CONFIG_BUSYBOX_CONFIG_VCONFIG=y
+CONFIG_BUSYBOX_CONFIG_WGET=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_STATUSBAR is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT is not set
+# CONFIG_BUSYBOX_CONFIG_ZCIP is not set
+
+#
+# Print Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_LPD is not set
+# CONFIG_BUSYBOX_CONFIG_LPR is not set
+# CONFIG_BUSYBOX_CONFIG_LPQ is not set
+
+#
+# Mail Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_MAKEMIME is not set
+# CONFIG_BUSYBOX_CONFIG_POPMAILDIR is not set
+# CONFIG_BUSYBOX_CONFIG_REFORMIME is not set
+# CONFIG_BUSYBOX_CONFIG_SENDMAIL is not set
+
+#
+# Process Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_IOSTAT is not set
+# CONFIG_BUSYBOX_CONFIG_MPSTAT is not set
+# CONFIG_BUSYBOX_CONFIG_NMETER is not set
+# CONFIG_BUSYBOX_CONFIG_PMAP is not set
+# CONFIG_BUSYBOX_CONFIG_POWERTOP is not set
+# CONFIG_BUSYBOX_CONFIG_PSTREE is not set
+# CONFIG_BUSYBOX_CONFIG_PWDX is not set
+# CONFIG_BUSYBOX_CONFIG_SMEMCAP is not set
+CONFIG_BUSYBOX_CONFIG_UPTIME=y
+CONFIG_BUSYBOX_CONFIG_FREE=y
+# CONFIG_BUSYBOX_CONFIG_FUSER is not set
+CONFIG_BUSYBOX_CONFIG_KILL=y
+CONFIG_BUSYBOX_CONFIG_KILLALL=y
+# CONFIG_BUSYBOX_CONFIG_KILLALL5 is not set
+CONFIG_BUSYBOX_CONFIG_PGREP=y
+CONFIG_BUSYBOX_CONFIG_PIDOF=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_PIDOF_SINGLE is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT is not set
+CONFIG_BUSYBOX_CONFIG_PKILL=y
+CONFIG_BUSYBOX_CONFIG_PS=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_PS_WIDE=y
+# CONFIG_BUSYBOX_CONFIG_RENICE is not set
+CONFIG_BUSYBOX_CONFIG_BB_SYSCTL=y
+CONFIG_BUSYBOX_CONFIG_TOP=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_TOPMEM is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SHOW_THREADS is not set
+# CONFIG_BUSYBOX_CONFIG_WATCH is not set
+
+#
+# Runit Utilities
+#
+# CONFIG_BUSYBOX_CONFIG_RUNSV is not set
+# CONFIG_BUSYBOX_CONFIG_RUNSVDIR is not set
+# CONFIG_BUSYBOX_CONFIG_SV is not set
+# CONFIG_BUSYBOX_CONFIG_SVLOGD is not set
+# CONFIG_BUSYBOX_CONFIG_CHPST is not set
+# CONFIG_BUSYBOX_CONFIG_SETUIDGID is not set
+# CONFIG_BUSYBOX_CONFIG_ENVUIDGID is not set
+# CONFIG_BUSYBOX_CONFIG_ENVDIR is not set
+# CONFIG_BUSYBOX_CONFIG_SOFTLIMIT is not set
+
+#
+# Shells
+#
+CONFIG_BUSYBOX_CONFIG_ASH=y
+CONFIG_BUSYBOX_CONFIG_ASH_BASH_COMPAT=y
+# CONFIG_BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT is not set
+CONFIG_BUSYBOX_CONFIG_ASH_JOB_CONTROL=y
+CONFIG_BUSYBOX_CONFIG_ASH_ALIAS=y
+CONFIG_BUSYBOX_CONFIG_ASH_GETOPTS=y
+CONFIG_BUSYBOX_CONFIG_ASH_BUILTIN_ECHO=y
+CONFIG_BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF=y
+CONFIG_BUSYBOX_CONFIG_ASH_BUILTIN_TEST=y
+CONFIG_BUSYBOX_CONFIG_ASH_CMDCMD=y
+# CONFIG_BUSYBOX_CONFIG_ASH_MAIL is not set
+# CONFIG_BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
+# CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT is not set
+CONFIG_BUSYBOX_CONFIG_ASH_EXPAND_PRMT=y
+# CONFIG_BUSYBOX_CONFIG_CTTYHACK is not set
+# CONFIG_BUSYBOX_CONFIG_MSH is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_SH_IS_ASH=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_IS_NONE is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE=y
+CONFIG_BUSYBOX_CONFIG_SH_MATH_SUPPORT=y
+CONFIG_BUSYBOX_CONFIG_SH_MATH_SUPPORT_64=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_STANDALONE is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_NOFORK is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE is not set
+
+#
+# System Logging Utilities
+#
+CONFIG_BUSYBOX_CONFIG_SYSLOGD=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_REMOTE_LOG=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_DUP is not set
+# CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_CFG is not set
+CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
+CONFIG_BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
+CONFIG_BUSYBOX_CONFIG_LOGREAD=y
+# CONFIG_BUSYBOX_CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
+CONFIG_BUSYBOX_CONFIG_KLOGD=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_KLOGD_KLOGCTL=y
+CONFIG_BUSYBOX_CONFIG_LOGGER=y
+# CONFIG_PACKAGE_dash is not set
+CONFIG_PACKAGE_dnsmasq=y
+# CONFIG_PACKAGE_dnsmasq-dhcpv6 is not set
+CONFIG_PACKAGE_dropbear=y
+# CONFIG_PACKAGE_ead is not set
+# CONFIG_PACKAGE_firewall is not set
+CONFIG_PACKAGE_hotplug2=y
+# CONFIG_PACKAGE_hsflowd is not set
+CONFIG_PACKAGE_libc=y
+CONFIG_PACKAGE_libgcc=y
+CONFIG_PACKAGE_libpthread=y
+CONFIG_PACKAGE_librt=y
+CONFIG_PACKAGE_libstdcpp=y
+# CONFIG_PACKAGE_mksh is not set
+CONFIG_PACKAGE_mtd=y
+CONFIG_PACKAGE_netifd=y
+# CONFIG_PACKAGE_nvram is not set
+# CONFIG_PACKAGE_om-watchdog is not set
+CONFIG_PACKAGE_opkg=y
+# CONFIG_PACKAGE_qos-scripts is not set
+CONFIG_PACKAGE_resolveip=y
+# CONFIG_PACKAGE_sflowovsd is not set
+CONFIG_PACKAGE_swconfig=y
+CONFIG_PACKAGE_ubus=y
+CONFIG_PACKAGE_ubusd=y
+CONFIG_PACKAGE_uci=y
+CONFIG_PACKAGE_udev=m
+
+#
+# Configuration
+#
+# CONFIG_UDEV_DISABLE_LOGGING is not set
+# CONFIG_UDEV_ENABLE_DEBUG is not set
+CONFIG_UDEV_EXTRA_accelerometer=y
+CONFIG_UDEV_EXTRA_ata_id=y
+CONFIG_UDEV_EXTRA_cdrom_id=y
+# CONFIG_UDEV_EXTRA_collect is not set
+# CONFIG_UDEV_EXTRA_edd_id is not set
+# CONFIG_UDEV_EXTRA_firmware is not set
+# CONFIG_UDEV_EXTRA_floppy is not set
+CONFIG_UDEV_EXTRA_input_id=y
+CONFIG_UDEV_EXTRA_mtd_probe=y
+CONFIG_UDEV_EXTRA_path_id=y
+CONFIG_UDEV_EXTRA_qemu=y
+CONFIG_UDEV_EXTRA_rule_generator=y
+CONFIG_UDEV_EXTRA_scsi_id=y
+CONFIG_UDEV_EXTRA_usb_id=y
+CONFIG_UDEV_EXTRA_v4l_id=y
+CONFIG_PACKAGE_wireless-tools=y
+
+#
+# IPv6
+#
+
+#
+# Firewall
+#
+CONFIG_PACKAGE_ip6tables=y
+# CONFIG_PACKAGE_shorewall6-lite is not set
+
+#
+# IPv6 attack and analyzing toolset (thc-ipv6)
+#
+# CONFIG_PACKAGE_alive6 is not set
+# CONFIG_PACKAGE_detect-new-ip6 is not set
+# CONFIG_PACKAGE_dos-new-ip6 is not set
+# CONFIG_PACKAGE_fake_advertise6 is not set
+# CONFIG_PACKAGE_fake_mipv6 is not set
+# CONFIG_PACKAGE_fake_mld6 is not set
+# CONFIG_PACKAGE_fake_router6 is not set
+# CONFIG_PACKAGE_parasite6 is not set
+# CONFIG_PACKAGE_redir6 is not set
+# CONFIG_PACKAGE_rsmurf6 is not set
+# CONFIG_PACKAGE_smurf6 is not set
+# CONFIG_PACKAGE_toobig6 is not set
+
+#
+# IPv6 discovery tools
+#
+# CONFIG_PACKAGE_ndisc6 is not set
+# CONFIG_PACKAGE_rdisc6 is not set
+# CONFIG_PACKAGE_rdnssd is not set
+# CONFIG_PACKAGE_traceroute6 is not set
+
+#
+# miredo: Teredo (IPv6 tunneling over UDP through NAT)
+#
+# CONFIG_PACKAGE_miredo-client is not set
+# CONFIG_PACKAGE_miredo-common is not set
+# CONFIG_PACKAGE_miredo-server is not set
+
+#
+# wide-dhcpv6
+#
+# CONFIG_PACKAGE_wide-dhcpv6-client is not set
+# CONFIG_PACKAGE_wide-dhcpv6-control is not set
+# CONFIG_PACKAGE_wide-dhcpv6-relay is not set
+# CONFIG_PACKAGE_wide-dhcpv6-server is not set
+# CONFIG_PACKAGE_6in4 is not set
+# CONFIG_PACKAGE_6rd is not set
+# CONFIG_PACKAGE_6relayd is not set
+# CONFIG_PACKAGE_6scripts is not set
+# CONFIG_PACKAGE_6to4 is not set
+# CONFIG_PACKAGE_6tunnel is not set
+# CONFIG_PACKAGE_ahcpd is not set
+# CONFIG_PACKAGE_aiccu is not set
+# CONFIG_PACKAGE_bird6 is not set
+# CONFIG_PACKAGE_birdc6 is not set
+# CONFIG_PACKAGE_dhcp6-client is not set
+# CONFIG_PACKAGE_dhcp6-server is not set
+# CONFIG_PACKAGE_dibbler-client is not set
+# CONFIG_PACKAGE_dibbler-relay is not set
+# CONFIG_PACKAGE_dibbler-requestor is not set
+# CONFIG_PACKAGE_dibbler-server is not set
+# CONFIG_PACKAGE_ds-lite is not set
+# CONFIG_PACKAGE_gw6c is not set
+# CONFIG_PACKAGE_ipv6-support is not set
+# CONFIG_PACKAGE_ipv6calc is not set
+# CONFIG_PACKAGE_ipv6calc-mini is not set
+# CONFIG_PACKAGE_ipv6log is not set
+# CONFIG_PACKAGE_ipv6log-mini is not set
+# CONFIG_PACKAGE_mrd6 is not set
+# CONFIG_PACKAGE_ndppd is not set
+# CONFIG_PACKAGE_odhcp6c is not set
+# CONFIG_PACKAGE_ptrtd is not set
+# CONFIG_PACKAGE_radvd is not set
+# CONFIG_PACKAGE_radvdump is not set
+# CONFIG_PACKAGE_send is not set
+# CONFIG_PACKAGE_tayga is not set
+# CONFIG_PACKAGE_totd is not set
+# CONFIG_PACKAGE_tspc is not set
+# CONFIG_PACKAGE_tunslip6 is not set
+
+#
+# LuCI
+#
+
+#
+# 1. Collections
+#
+# CONFIG_PACKAGE_luci is not set
+# CONFIG_PACKAGE_luci-ssl is not set
+
+#
+# 2. Modules
+#
+# CONFIG_PACKAGE_luci-mod-admin-core is not set
+# CONFIG_PACKAGE_luci-mod-admin-full is not set
+# CONFIG_PACKAGE_luci-mod-failsafe is not set
+# CONFIG_PACKAGE_luci-mod-freifunk is not set
+# CONFIG_PACKAGE_luci-mod-rpc is not set
+
+#
+# 3. Applications
+#
+# CONFIG_PACKAGE_luci-app-ahcp is not set
+# CONFIG_PACKAGE_luci-app-bmx6 is not set
+# CONFIG_PACKAGE_luci-app-commands is not set
+# CONFIG_PACKAGE_luci-app-ddns is not set
+# CONFIG_PACKAGE_luci-app-diag-core is not set
+# CONFIG_PACKAGE_luci-app-diag-devinfo is not set
+# CONFIG_PACKAGE_luci-app-firewall is not set
+# CONFIG_PACKAGE_luci-app-freifunk-diagnostics is not set
+# CONFIG_PACKAGE_luci-app-freifunk-policyrouting is not set
+# CONFIG_PACKAGE_luci-app-freifunk-widgets is not set
+# CONFIG_PACKAGE_luci-app-hd-idle is not set
+# CONFIG_PACKAGE_luci-app-ltqtapi is not set
+# CONFIG_PACKAGE_luci-app-meshwizard is not set
+# CONFIG_PACKAGE_luci-app-mmc-over-gpio is not set
+# CONFIG_PACKAGE_luci-app-ntpc is not set
+# CONFIG_PACKAGE_luci-app-p910nd is not set
+# CONFIG_PACKAGE_luci-app-pbx is not set
+# CONFIG_PACKAGE_luci-app-polipo is not set
+# CONFIG_PACKAGE_luci-app-qos is not set
+# CONFIG_PACKAGE_luci-app-radvd is not set
+# CONFIG_PACKAGE_luci-app-samba is not set
+# CONFIG_PACKAGE_luci-app-siitwizard is not set
+# CONFIG_PACKAGE_luci-app-splash is not set
+# CONFIG_PACKAGE_luci-app-statistics is not set
+# CONFIG_PACKAGE_luci-app-tinyproxy is not set
+# CONFIG_PACKAGE_luci-app-transmission is not set
+# CONFIG_PACKAGE_luci-app-upnp is not set
+# CONFIG_PACKAGE_luci-app-vnstat is not set
+# CONFIG_PACKAGE_luci-app-voice-core is not set
+# CONFIG_PACKAGE_luci-app-watchcat is not set
+# CONFIG_PACKAGE_luci-app-wol is not set
+# CONFIG_PACKAGE_luci-app-wshaper is not set
+
+#
+# 4. Themes
+#
+# CONFIG_PACKAGE_luci-theme-base is not set
+# CONFIG_PACKAGE_luci-theme-bootstrap is not set
+# CONFIG_PACKAGE_luci-theme-freifunk-bno is not set
+# CONFIG_PACKAGE_luci-theme-freifunk-generic is not set
+# CONFIG_PACKAGE_luci-theme-openwrt is not set
+
+#
+# 5. Translations
+#
+# CONFIG_PACKAGE_luci-i18n-catalan is not set
+# CONFIG_PACKAGE_luci-i18n-chinese is not set
+# CONFIG_PACKAGE_luci-i18n-english is not set
+# CONFIG_PACKAGE_luci-i18n-french is not set
+# CONFIG_PACKAGE_luci-i18n-german is not set
+# CONFIG_PACKAGE_luci-i18n-greek is not set
+# CONFIG_PACKAGE_luci-i18n-hebrew is not set
+# CONFIG_PACKAGE_luci-i18n-hungarian is not set
+# CONFIG_PACKAGE_luci-i18n-italian is not set
+# CONFIG_PACKAGE_luci-i18n-japanese is not set
+# CONFIG_PACKAGE_luci-i18n-malay is not set
+# CONFIG_PACKAGE_luci-i18n-norwegian is not set
+# CONFIG_PACKAGE_luci-i18n-polish is not set
+# CONFIG_PACKAGE_luci-i18n-portuguese is not set
+# CONFIG_PACKAGE_luci-i18n-portuguese-brazilian is not set
+# CONFIG_PACKAGE_luci-i18n-romanian is not set
+# CONFIG_PACKAGE_luci-i18n-russian is not set
+# CONFIG_PACKAGE_luci-i18n-spanish is not set
+# CONFIG_PACKAGE_luci-i18n-ukrainian is not set
+# CONFIG_PACKAGE_luci-i18n-vietnamese is not set
+
+#
+# 6. Protocols
+#
+# CONFIG_PACKAGE_luci-proto-core is not set
+# CONFIG_PACKAGE_luci-proto-ipv6 is not set
+# CONFIG_PACKAGE_luci-proto-ppp is not set
+# CONFIG_PACKAGE_luci-proto-relay is not set
+
+#
+# 7. Server Interfaces
+#
+# CONFIG_PACKAGE_luci-sgi-cgi is not set
+# CONFIG_PACKAGE_luci-sgi-uhttpd is not set
+
+#
+# 8. Libraries
+#
+# CONFIG_PACKAGE_luci-lib-core is not set
+CONFIG_PACKAGE_luci-lib-core_compile=y
+# CONFIG_PACKAGE_luci-lib-core_stripped is not set
+# CONFIG_PACKAGE_luci-lib-core_srcdiet is not set
+# CONFIG_PACKAGE_luci-lib-core_source is not set
+# CONFIG_PACKAGE_luci-lib-fastindex is not set
+# CONFIG_PACKAGE_luci-lib-httpclient is not set
+# CONFIG_PACKAGE_luci-lib-ipkg is not set
+# CONFIG_PACKAGE_luci-lib-json is not set
+# CONFIG_PACKAGE_luci-lib-lucid is not set
+# CONFIG_PACKAGE_luci-lib-lucid-http is not set
+# CONFIG_PACKAGE_luci-lib-lucid-rpc is not set
+# CONFIG_PACKAGE_luci-lib-nixio is not set
+CONFIG_PACKAGE_luci-lib-nixio_notls=y
+# CONFIG_PACKAGE_luci-lib-nixio_axtls is not set
+# CONFIG_PACKAGE_luci-lib-nixio_cyassl is not set
+# CONFIG_PACKAGE_luci-lib-nixio_openssl is not set
+# CONFIG_PACKAGE_luci-lib-px5g is not set
+# CONFIG_PACKAGE_luci-lib-sys is not set
+# CONFIG_PACKAGE_luci-lib-web is not set
+
+#
+# 9. Freifunk
+#
+# CONFIG_PACKAGE_freifunk-common is not set
+# CONFIG_PACKAGE_freifunk-firewall is not set
+# CONFIG_PACKAGE_freifunk-p2pblock is not set
+# CONFIG_PACKAGE_freifunk-policyrouting is not set
+# CONFIG_PACKAGE_freifunk-watchdog is not set
+# CONFIG_PACKAGE_meshwizard is not set
+# CONFIG_PACKAGE_remote-update is not set
+
+#
+# Kernel modules
+#
+
+#
+# Block Devices
+#
+# CONFIG_PACKAGE_kmod-aoe is not set
+# CONFIG_PACKAGE_kmod-ata-core is not set
+# CONFIG_PACKAGE_kmod-block2mtd is not set
+# CONFIG_PACKAGE_kmod-dm is not set
+# CONFIG_PACKAGE_kmod-ide-core is not set
+# CONFIG_PACKAGE_kmod-libsas is not set
+# CONFIG_PACKAGE_kmod-loop is not set
+# CONFIG_PACKAGE_kmod-md-mod is not set
+# CONFIG_PACKAGE_kmod-nbd is not set
+# CONFIG_PACKAGE_kmod-scsi-cdrom is not set
+# CONFIG_PACKAGE_kmod-scsi-core is not set
+# CONFIG_PACKAGE_kmod-scsi-generic is not set
+
+#
+# Cryptographic API modules
+#
+CONFIG_PACKAGE_kmod-crypto-aes=y
+CONFIG_PACKAGE_kmod-crypto-arc4=y
+# CONFIG_PACKAGE_kmod-crypto-authenc is not set
+# CONFIG_PACKAGE_kmod-crypto-cbc is not set
+CONFIG_PACKAGE_kmod-crypto-core=y
+CONFIG_PACKAGE_kmod-crypto-crc32c=y
+# CONFIG_PACKAGE_kmod-crypto-deflate is not set
+# CONFIG_PACKAGE_kmod-crypto-des is not set
+# CONFIG_PACKAGE_kmod-crypto-ecb is not set
+CONFIG_PACKAGE_kmod-crypto-hash=y
+# CONFIG_PACKAGE_kmod-crypto-hmac is not set
+# CONFIG_PACKAGE_kmod-crypto-hw-geode is not set
+# CONFIG_PACKAGE_kmod-crypto-hw-hifn-795x is not set
+# CONFIG_PACKAGE_kmod-crypto-hw-padlock is not set
+# CONFIG_PACKAGE_kmod-crypto-iv is not set
+# CONFIG_PACKAGE_kmod-crypto-manager is not set
+# CONFIG_PACKAGE_kmod-crypto-md4 is not set
+# CONFIG_PACKAGE_kmod-crypto-md5 is not set
+# CONFIG_PACKAGE_kmod-crypto-michael-mic is not set
+# CONFIG_PACKAGE_kmod-crypto-misc is not set
+# CONFIG_PACKAGE_kmod-crypto-null is not set
+# CONFIG_PACKAGE_kmod-crypto-ocf is not set
+# CONFIG_PACKAGE_kmod-crypto-rng is not set
+# CONFIG_PACKAGE_kmod-crypto-sha1 is not set
+# CONFIG_PACKAGE_kmod-crypto-test is not set
+# CONFIG_PACKAGE_kmod-crypto-user is not set
+# CONFIG_PACKAGE_kmod-crypto-wq is not set
+# CONFIG_PACKAGE_kmod-crypto-xts is not set
+# CONFIG_PACKAGE_kmod-loop-aes is not set
+
+#
+# Filesystems
+#
+# CONFIG_PACKAGE_kmod-fs-autofs4 is not set
+# CONFIG_PACKAGE_kmod-fs-btrfs is not set
+# CONFIG_PACKAGE_kmod-fs-cifs is not set
+# CONFIG_PACKAGE_kmod-fs-exportfs is not set
+# CONFIG_PACKAGE_kmod-fs-ext4 is not set
+# CONFIG_PACKAGE_kmod-fs-hfs is not set
+# CONFIG_PACKAGE_kmod-fs-hfsplus is not set
+# CONFIG_PACKAGE_kmod-fs-isofs is not set
+# CONFIG_PACKAGE_kmod-fs-minix is not set
+# CONFIG_PACKAGE_kmod-fs-msdos is not set
+# CONFIG_PACKAGE_kmod-fs-nfs is not set
+# CONFIG_PACKAGE_kmod-fs-nfs-common is not set
+# CONFIG_PACKAGE_kmod-fs-nfsd is not set
+# CONFIG_PACKAGE_kmod-fs-ntfs is not set
+# CONFIG_PACKAGE_kmod-fs-reiserfs is not set
+# CONFIG_PACKAGE_kmod-fs-udf is not set
+# CONFIG_PACKAGE_kmod-fs-vfat is not set
+# CONFIG_PACKAGE_kmod-fs-xfs is not set
+# CONFIG_PACKAGE_kmod-fuse is not set
+
+#
+# FireWire support
+#
+# CONFIG_PACKAGE_kmod-firewire is not set
+
+#
+# Hardware Monitoring Support
+#
+# CONFIG_PACKAGE_kmod-hwmon-core is not set
+
+#
+# I2C support
+#
+# CONFIG_PACKAGE_kmod-i2c-core is not set
+# CONFIG_PACKAGE_kmod-i2c-gpio-custom is not set
+
+#
+# LED modules
+#
+CONFIG_PACKAGE_kmod-leds-gpio=y
+# CONFIG_PACKAGE_kmod-leds-rb750 is not set
+# CONFIG_PACKAGE_kmod-leds-wndr3700-usb is not set
+CONFIG_PACKAGE_kmod-ledtrig-default-on=y
+CONFIG_PACKAGE_kmod-ledtrig-gpio=y
+# CONFIG_PACKAGE_kmod-ledtrig-heartbeat is not set
+# CONFIG_PACKAGE_kmod-ledtrig-morse is not set
+CONFIG_PACKAGE_kmod-ledtrig-netdev=y
+# CONFIG_PACKAGE_kmod-ledtrig-netfilter is not set
+CONFIG_PACKAGE_kmod-ledtrig-timer=y
+# CONFIG_PACKAGE_kmod-ledtrig-usbdev is not set
+
+#
+# Libraries
+#
+# CONFIG_PACKAGE_kmod-lib-cordic is not set
+# CONFIG_PACKAGE_kmod-lib-crc-ccitt is not set
+# CONFIG_PACKAGE_kmod-lib-crc-itu-t is not set
+CONFIG_PACKAGE_kmod-lib-crc16=y
+CONFIG_PACKAGE_kmod-lib-crc32c=y
+# CONFIG_PACKAGE_kmod-lib-crc7 is not set
+# CONFIG_PACKAGE_kmod-lib-crc8 is not set
+# CONFIG_PACKAGE_kmod-lib-lzo is not set
+CONFIG_PACKAGE_kmod-lib-textsearch=y
+# CONFIG_PACKAGE_kmod-lib-zlib is not set
+
+#
+# Native Language Support
+#
+CONFIG_PACKAGE_kmod-nls-base=y
+# CONFIG_PACKAGE_kmod-nls-cp1250 is not set
+# CONFIG_PACKAGE_kmod-nls-cp1251 is not set
+# CONFIG_PACKAGE_kmod-nls-cp437 is not set
+# CONFIG_PACKAGE_kmod-nls-cp775 is not set
+# CONFIG_PACKAGE_kmod-nls-cp850 is not set
+# CONFIG_PACKAGE_kmod-nls-cp852 is not set
+# CONFIG_PACKAGE_kmod-nls-cp866 is not set
+# CONFIG_PACKAGE_kmod-nls-iso8859-1 is not set
+# CONFIG_PACKAGE_kmod-nls-iso8859-13 is not set
+# CONFIG_PACKAGE_kmod-nls-iso8859-15 is not set
+# CONFIG_PACKAGE_kmod-nls-iso8859-2 is not set
+# CONFIG_PACKAGE_kmod-nls-koi8r is not set
+# CONFIG_PACKAGE_kmod-nls-utf8 is not set
+
+#
+# Netfilter Extensions
+#
+CONFIG_PACKAGE_kmod-arptables=y
+CONFIG_PACKAGE_kmod-ebtables=y
+CONFIG_PACKAGE_kmod-ebtables-ipv4=y
+CONFIG_PACKAGE_kmod-ebtables-ipv6=y
+# CONFIG_PACKAGE_kmod-ebtables-watchers is not set
+CONFIG_PACKAGE_kmod-ip6tables=y
+CONFIG_PACKAGE_kmod-ipt-core=y
+# CONFIG_PACKAGE_kmod-ipt-account is not set
+# CONFIG_PACKAGE_kmod-ipt-chaos is not set
+CONFIG_PACKAGE_kmod-ipt-compat-xtables=y
+# CONFIG_PACKAGE_kmod-ipt-condition is not set
+CONFIG_PACKAGE_kmod-ipt-conntrack=y
+# CONFIG_PACKAGE_kmod-ipt-conntrack-extra is not set
+# CONFIG_PACKAGE_kmod-ipt-debug is not set
+# CONFIG_PACKAGE_kmod-ipt-delude is not set
+# CONFIG_PACKAGE_kmod-ipt-dhcpmac is not set
+# CONFIG_PACKAGE_kmod-ipt-dnetmap is not set
+# CONFIG_PACKAGE_kmod-ipt-extra is not set
+CONFIG_PACKAGE_kmod-ipt-filter=y
+# CONFIG_PACKAGE_kmod-ipt-fuzzy is not set
+# CONFIG_PACKAGE_kmod-ipt-geoip is not set
+# CONFIG_PACKAGE_kmod-ipt-hashlimit is not set
+# CONFIG_PACKAGE_kmod-ipt-iface is not set
+# CONFIG_PACKAGE_kmod-ipt-ipmark is not set
+# CONFIG_PACKAGE_kmod-ipt-ipopt is not set
+# CONFIG_PACKAGE_kmod-ipt-ipp2p is not set
+# CONFIG_PACKAGE_kmod-ipt-iprange is not set
+# CONFIG_PACKAGE_kmod-ipt-ipsec is not set
+# CONFIG_PACKAGE_kmod-ipt-ipset is not set
+# CONFIG_PACKAGE_kmod-ipt-ipv4options is not set
+# CONFIG_PACKAGE_kmod-ipt-led is not set
+# CONFIG_PACKAGE_kmod-ipt-length2 is not set
+# CONFIG_PACKAGE_kmod-ipt-logmark is not set
+# CONFIG_PACKAGE_kmod-ipt-lscan is not set
+# CONFIG_PACKAGE_kmod-ipt-lua is not set
+CONFIG_PACKAGE_kmod-ipt-nat=y
+# CONFIG_PACKAGE_kmod-ipt-nat-extra is not set
+# CONFIG_PACKAGE_kmod-ipt-nathelper is not set
+# CONFIG_PACKAGE_kmod-ipt-nathelper-extra is not set
+# CONFIG_PACKAGE_kmod-ipt-nathelper-rtsp is not set
+# CONFIG_PACKAGE_kmod-ipt-psd is not set
+# CONFIG_PACKAGE_kmod-ipt-queue is not set
+# CONFIG_PACKAGE_kmod-ipt-quota2 is not set
+# CONFIG_PACKAGE_kmod-ipt-rawnat is not set
+# CONFIG_PACKAGE_kmod-ipt-rawpost is not set
+# CONFIG_PACKAGE_kmod-ipt-steal is not set
+# CONFIG_PACKAGE_kmod-ipt-sysrq is not set
+# CONFIG_PACKAGE_kmod-ipt-tarpit is not set
+# CONFIG_PACKAGE_kmod-ipt-tee is not set
+# CONFIG_PACKAGE_kmod-ipt-tproxy is not set
+# CONFIG_PACKAGE_kmod-ipt-u32 is not set
+# CONFIG_PACKAGE_kmod-ipt-ulog is not set
+# CONFIG_PACKAGE_kmod-nf-conntrack-netlink is not set
+# CONFIG_PACKAGE_kmod-nfnetlink is not set
+# CONFIG_PACKAGE_kmod-nfnetlink-log is not set
+# CONFIG_PACKAGE_kmod-nfnetlink-queue is not set
+
+#
+# Network Devices
+#
+# CONFIG_PACKAGE_kmod-3c59x is not set
+# CONFIG_PACKAGE_kmod-8139cp is not set
+# CONFIG_PACKAGE_kmod-8139too is not set
+# CONFIG_PACKAGE_kmod-atl1 is not set
+# CONFIG_PACKAGE_kmod-atl1c is not set
+# CONFIG_PACKAGE_kmod-atl1e is not set
+# CONFIG_PACKAGE_kmod-atl2 is not set
+# CONFIG_PACKAGE_kmod-b44 is not set
+# CONFIG_PACKAGE_kmod-dm9000 is not set
+# CONFIG_PACKAGE_kmod-dummy is not set
+# CONFIG_PACKAGE_kmod-e100 is not set
+# CONFIG_PACKAGE_kmod-e1000 is not set
+# CONFIG_PACKAGE_kmod-et131x is not set
+# CONFIG_PACKAGE_kmod-gigaset is not set
+# CONFIG_PACKAGE_kmod-hfcmulti is not set
+# CONFIG_PACKAGE_kmod-hfcpci is not set
+CONFIG_PACKAGE_kmod-ifb=y
+# CONFIG_PACKAGE_kmod-libphy is not set
+CONFIG_PACKAGE_kmod-macvlan=y
+# CONFIG_PACKAGE_kmod-natsemi is not set
+# CONFIG_PACKAGE_kmod-ne2k-pci is not set
+# CONFIG_PACKAGE_kmod-pcnet32 is not set
+# CONFIG_PACKAGE_kmod-r6040 is not set
+# CONFIG_PACKAGE_kmod-r8169 is not set
+# CONFIG_PACKAGE_kmod-siit is not set
+# CONFIG_PACKAGE_kmod-sis190 is not set
+# CONFIG_PACKAGE_kmod-sis900 is not set
+# CONFIG_PACKAGE_kmod-skge is not set
+# CONFIG_PACKAGE_kmod-sky2 is not set
+# CONFIG_PACKAGE_kmod-solos-pci is not set
+# CONFIG_PACKAGE_kmod-swconfig is not set
+# CONFIG_PACKAGE_kmod-switch-ip17xx is not set
+# CONFIG_PACKAGE_kmod-switch-rtl8366-smi is not set
+# CONFIG_PACKAGE_kmod-switch-rtl8366rb is not set
+# CONFIG_PACKAGE_kmod-switch-rtl8366s is not set
+# CONFIG_PACKAGE_kmod-tg3 is not set
+# CONFIG_PACKAGE_kmod-tulip is not set
+# CONFIG_PACKAGE_kmod-via-rhine is not set
+# CONFIG_PACKAGE_kmod-via-velocity is not set
+
+#
+# Network Support
+#
+# CONFIG_PACKAGE_kmod-8021q is not set
+# CONFIG_PACKAGE_kmod-appletalk is not set
+# CONFIG_PACKAGE_kmod-atm is not set
+# CONFIG_PACKAGE_kmod-ax25 is not set
+CONFIG_PACKAGE_kmod-batman-adv=y
+CONFIG_KMOD_BATMAN_ADV_DEBUG_LOG=y
+CONFIG_KMOD_BATMAN_ADV_BLA=y
+CONFIG_KMOD_BATMAN_ADV_DAT=y
+# CONFIG_KMOD_BATMAN_ADV_NC is not set
+CONFIG_KMOD_BATMAN_ADV_BATCTL=y
+# CONFIG_PACKAGE_kmod-bonding is not set
+CONFIG_PACKAGE_kmod-bridge=y
+# CONFIG_PACKAGE_kmod-capi is not set
+# CONFIG_PACKAGE_kmod-gre is not set
+# CONFIG_PACKAGE_kmod-ip6-tunnel is not set
+# CONFIG_PACKAGE_kmod-ipip is not set
+# CONFIG_PACKAGE_kmod-ipsec is not set
+# CONFIG_PACKAGE_kmod-iptunnel4 is not set
+# CONFIG_PACKAGE_kmod-iptunnel6 is not set
+CONFIG_PACKAGE_kmod-ipv6=y
+# CONFIG_PACKAGE_kmod-isdn4linux is not set
+# CONFIG_PACKAGE_kmod-l2tp is not set
+# CONFIG_PACKAGE_kmod-l2tp-eth is not set
+# CONFIG_PACKAGE_kmod-l2tp-ip is not set
+CONFIG_PACKAGE_kmod-llc=y
+# CONFIG_PACKAGE_kmod-misdn is not set
+# CONFIG_PACKAGE_kmod-mp-alg is not set
+# CONFIG_PACKAGE_kmod-ppp is not set
+# CONFIG_PACKAGE_kmod-netem is not set
+# CONFIG_PACKAGE_kmod-openswan is not set
+# CONFIG_PACKAGE_kmod-pktgen is not set
+CONFIG_PACKAGE_kmod-sched=y
+# CONFIG_PACKAGE_kmod-sched-connmark is not set
+CONFIG_PACKAGE_kmod-sched-core=y
+CONFIG_PACKAGE_kmod-sched-esfq=y
+# CONFIG_PACKAGE_kmod-sctp is not set
+# CONFIG_PACKAGE_kmod-sit is not set
+# CONFIG_PACKAGE_kmod-slip is not set
+CONFIG_PACKAGE_kmod-stp=y
+# CONFIG_PACKAGE_kmod-trelay is not set
+CONFIG_PACKAGE_kmod-tun=y
+# CONFIG_PACKAGE_kmod-wprobe is not set
+
+#
+# Other modules
+#
+# CONFIG_PACKAGE_kmod-bcma is not set
+# CONFIG_PACKAGE_kmod-bluetooth is not set
+# CONFIG_PACKAGE_kmod-button-hotplug is not set
+# CONFIG_PACKAGE_kmod-eeprom-93cx6 is not set
+# CONFIG_PACKAGE_kmod-eeprom-at24 is not set
+# CONFIG_PACKAGE_kmod-eeprom-at25 is not set
+# CONFIG_PACKAGE_kmod-gpio-button-hotplug is not set
+# CONFIG_PACKAGE_kmod-gpio-dev is not set
+# CONFIG_PACKAGE_kmod-gpio-nxp-74hc164 is not set
+# CONFIG_PACKAGE_kmod-gpiotoggling is not set
+# CONFIG_PACKAGE_kmod-hid is not set
+# CONFIG_PACKAGE_kmod-input-core is not set
+# CONFIG_PACKAGE_kmod-input-evdev is not set
+# CONFIG_PACKAGE_kmod-input-gpio-buttons is not set
+# CONFIG_PACKAGE_kmod-input-gpio-encoder is not set
+# CONFIG_PACKAGE_kmod-input-gpio-keys is not set
+# CONFIG_PACKAGE_kmod-input-gpio-keys-polled is not set
+# CONFIG_PACKAGE_kmod-input-joydev is not set
+# CONFIG_PACKAGE_kmod-input-polldev is not set
+# CONFIG_PACKAGE_kmod-mmc is not set
+# CONFIG_PACKAGE_kmod-mmc-over-gpio is not set
+# CONFIG_PACKAGE_kmod-mtdtests is not set
+# CONFIG_PACKAGE_kmod-nand is not set
+# CONFIG_PACKAGE_kmod-nand-ar934x is not set
+# CONFIG_PACKAGE_kmod-nandsim is not set
+# CONFIG_PACKAGE_kmod-pwm is not set
+# CONFIG_PACKAGE_kmod-pwm-gpio is not set
+# CONFIG_PACKAGE_kmod-regmap is not set
+# CONFIG_PACKAGE_kmod-rfkill is not set
+# CONFIG_PACKAGE_kmod-rotary-gpio-custom is not set
+# CONFIG_PACKAGE_kmod-serial-8250 is not set
+# CONFIG_PACKAGE_kmod-softdog is not set
+# CONFIG_PACKAGE_kmod-ssb is not set
+CONFIG_PACKAGE_kmod-wdt-ath79=y
+
+#
+# PCMCIA support
+#
+
+#
+# SPI Support
+#
+# CONFIG_PACKAGE_kmod-mmc-spi is not set
+# CONFIG_PACKAGE_kmod-spi-bitbang is not set
+# CONFIG_PACKAGE_kmod-spi-dev is not set
+# CONFIG_PACKAGE_kmod-spi-gpio is not set
+# CONFIG_PACKAGE_kmod-spi-gpio-old is not set
+# CONFIG_PACKAGE_kmod-spi-ks8995 is not set
+# CONFIG_PACKAGE_kmod-spi-vsc7385 is not set
+
+#
+# Sound Support
+#
+# CONFIG_PACKAGE_kmod-sound-core is not set
+
+#
+# USB Support
+#
+# CONFIG_PACKAGE_kmod-usb-acm is not set
+# CONFIG_PACKAGE_kmod-usb-atm is not set
+# CONFIG_PACKAGE_kmod-usb-cm109 is not set
+# CONFIG_PACKAGE_kmod-usb-core is not set
+# CONFIG_PACKAGE_kmod-usb-hid is not set
+# CONFIG_PACKAGE_kmod-usb-net is not set
+# CONFIG_PACKAGE_kmod-usb-ohci is not set
+# CONFIG_PACKAGE_kmod-usb-printer is not set
+# CONFIG_PACKAGE_kmod-usb-serial is not set
+# CONFIG_PACKAGE_kmod-usb-sierrawireless-directip is not set
+# CONFIG_PACKAGE_kmod-usb-storage is not set
+# CONFIG_PACKAGE_kmod-usb-storage-extras is not set
+# CONFIG_PACKAGE_kmod-usb-uhci is not set
+# CONFIG_PACKAGE_kmod-usb-yealink is not set
+# CONFIG_PACKAGE_kmod-usb2 is not set
+# CONFIG_PACKAGE_kmod-usbip is not set
+# CONFIG_PACKAGE_kmod-usbip-client is not set
+# CONFIG_PACKAGE_kmod-usbip-server is not set
+
+#
+# Video Support
+#
+# CONFIG_PACKAGE_kmod-video-core is not set
+
+#
+# Virtualization Support
+#
+
+#
+# Voice over IP
+#
+# CONFIG_PACKAGE_kmod-zaptel14 is not set
+# CONFIG_PACKAGE_kmod-zaptel14-dummy is not set
+# CONFIG_PACKAGE_kmod-zaptel14-wctdm is not set
+# CONFIG_PACKAGE_kmod-zaptel14-wcusb is not set
+
+#
+# W1 support
+#
+# CONFIG_PACKAGE_kmod-w1 is not set
+
+#
+# Wireless Drivers
+#
+# CONFIG_PACKAGE_kmod-adm8211 is not set
+CONFIG_PACKAGE_kmod-ath=y
+# CONFIG_ATH_USER_REGD is not set
+CONFIG_PACKAGE_ATH_DEBUG=y
+# CONFIG_PACKAGE_ATH_DFS is not set
+# CONFIG_PACKAGE_kmod-ath10k is not set
+# CONFIG_PACKAGE_kmod-ath5k is not set
+CONFIG_PACKAGE_kmod-ath9k=y
+CONFIG_PACKAGE_kmod-ath9k-common=y
+# CONFIG_PACKAGE_kmod-ath9k-htc is not set
+# CONFIG_PACKAGE_kmod-b43 is not set
+# CONFIG_PACKAGE_kmod-b43legacy is not set
+# CONFIG_PACKAGE_kmod-brcmfmac is not set
+# CONFIG_PACKAGE_kmod-brcmsmac is not set
+# CONFIG_PACKAGE_kmod-brcmutil is not set
+# CONFIG_PACKAGE_kmod-carl9170 is not set
+CONFIG_PACKAGE_kmod-cfg80211=y
+# CONFIG_PACKAGE_kmod-hostap is not set
+# CONFIG_PACKAGE_kmod-hostap-pci is not set
+# CONFIG_PACKAGE_kmod-hostap-plx is not set
+# CONFIG_PACKAGE_kmod-iwl-legacy is not set
+# CONFIG_PACKAGE_kmod-iwl3945 is not set
+# CONFIG_PACKAGE_kmod-iwl4965 is not set
+# CONFIG_PACKAGE_kmod-iwlagn is not set
+# CONFIG_PACKAGE_kmod-ks7010 is not set
+# CONFIG_PACKAGE_kmod-lib80211 is not set
+# CONFIG_PACKAGE_kmod-libertas-sd is not set
+# CONFIG_PACKAGE_kmod-libertas-usb is not set
+CONFIG_PACKAGE_kmod-mac80211=y
+CONFIG_PACKAGE_MAC80211_DEBUGFS=y
+CONFIG_PACKAGE_MAC80211_MESH=y
+# CONFIG_PACKAGE_kmod-mac80211-hwsim is not set
+# CONFIG_PACKAGE_kmod-madwifi is not set
+# CONFIG_PACKAGE_kmod-mwl8k is not set
+# CONFIG_PACKAGE_kmod-net-airo is not set
+# CONFIG_PACKAGE_kmod-net-hermes is not set
+# CONFIG_PACKAGE_kmod-net-hermes-pci is not set
+# CONFIG_PACKAGE_kmod-net-hermes-plx is not set
+# CONFIG_PACKAGE_kmod-net-ipw2100 is not set
+# CONFIG_PACKAGE_kmod-net-ipw2200 is not set
+# CONFIG_PACKAGE_kmod-net-libipw is not set
+# CONFIG_PACKAGE_kmod-net-prism54 is not set
+# CONFIG_PACKAGE_kmod-net-zd1201 is not set
+# CONFIG_PACKAGE_kmod-p54-common is not set
+# CONFIG_PACKAGE_kmod-p54-pci is not set
+# CONFIG_PACKAGE_kmod-p54-usb is not set
+# CONFIG_PACKAGE_kmod-rt2400-pci is not set
+# CONFIG_PACKAGE_kmod-rt2500-pci is not set
+# CONFIG_PACKAGE_kmod-rt2500-usb is not set
+# CONFIG_PACKAGE_kmod-rt2800-pci is not set
+# CONFIG_PACKAGE_kmod-rt2800-usb is not set
+# CONFIG_PACKAGE_kmod-rt2x00-lib is not set
+# CONFIG_PACKAGE_kmod-rt61-pci is not set
+# CONFIG_PACKAGE_kmod-rt73-usb is not set
+# CONFIG_PACKAGE_kmod-rtl8180 is not set
+# CONFIG_PACKAGE_kmod-rtl8187 is not set
+# CONFIG_PACKAGE_kmod-rtl8192ce is not set
+# CONFIG_PACKAGE_kmod-rtl8192cu is not set
+# CONFIG_PACKAGE_kmod-rtl8192de is not set
+# CONFIG_PACKAGE_kmod-rtl8192se is not set
+# CONFIG_PACKAGE_kmod-rtlwifi is not set
+# CONFIG_PACKAGE_kmod-zd1211rw is not set
+
+#
+# Boot Loaders
+#
+# CONFIG_PACKAGE_uboot-ar71xx-nbg460n_550n_550nh is not set
+
+#
+# Education
+#
+# CONFIG_PACKAGE_nightsky is not set
+
+#
+# Administration
+#
+
+#
+# Pmacct suite
+#
+# CONFIG_PACKAGE_nfacctd is not set
+# CONFIG_PACKAGE_nfacctd-mysql is not set
+# CONFIG_PACKAGE_nfacctd-pgsql is not set
+# CONFIG_PACKAGE_nfacctd-sqlite is not set
+# CONFIG_PACKAGE_pmacct-client is not set
+# CONFIG_PACKAGE_pmacctd is not set
+# CONFIG_PACKAGE_pmacctd-mysql is not set
+# CONFIG_PACKAGE_pmacctd-pgsql is not set
+# CONFIG_PACKAGE_pmacctd-sqlite is not set
+# CONFIG_PACKAGE_sfacctd is not set
+# CONFIG_PACKAGE_sfacctd-mysql is not set
+# CONFIG_PACKAGE_sfacctd-pgsql is not set
+# CONFIG_PACKAGE_sfacctd-sqlite is not set
+# CONFIG_PACKAGE_uacctd is not set
+# CONFIG_PACKAGE_uacctd-mysql is not set
+# CONFIG_PACKAGE_uacctd-pgsql is not set
+# CONFIG_PACKAGE_uacctd-sqlite is not set
+
+#
+# webif
+#
+# CONFIG_PACKAGE_webif is not set
+# CONFIG_PACKAGE_webif-applications is not set
+# CONFIG_PACKAGE_webif-fonheartbeat is not set
+# CONFIG_PACKAGE_webif-freeloader is not set
+# CONFIG_PACKAGE_webif-freeloader-lang-cs is not set
+# CONFIG_PACKAGE_webif-hotspot is not set
+# CONFIG_PACKAGE_webif-iw-lua is not set
+# CONFIG_PACKAGE_webif-iw-lua-chillispot is not set
+# CONFIG_PACKAGE_webif-iw-lua-openssl is not set
+# CONFIG_PACKAGE_webif-iw-lua-openvpn is not set
+# CONFIG_PACKAGE_webif-lang-ca is not set
+# CONFIG_PACKAGE_webif-lang-cs is not set
+# CONFIG_PACKAGE_webif-lang-da is not set
+# CONFIG_PACKAGE_webif-lang-de is not set
+# CONFIG_PACKAGE_webif-lang-ee is not set
+# CONFIG_PACKAGE_webif-lang-es is not set
+# CONFIG_PACKAGE_webif-lang-fr is not set
+# CONFIG_PACKAGE_webif-lang-hr is not set
+# CONFIG_PACKAGE_webif-lang-hu is not set
+# CONFIG_PACKAGE_webif-lang-it is not set
+# CONFIG_PACKAGE_webif-lang-nl is not set
+# CONFIG_PACKAGE_webif-lang-no is not set
+# CONFIG_PACKAGE_webif-lang-pl is not set
+# CONFIG_PACKAGE_webif-lang-pt is not set
+# CONFIG_PACKAGE_webif-lang-ru is not set
+# CONFIG_PACKAGE_webif-lang-sq is not set
+# CONFIG_PACKAGE_webif-lang-sv is not set
+# CONFIG_PACKAGE_webif-lang-uk is not set
+# CONFIG_PACKAGE_webif-lang-zh is not set
+# CONFIG_PACKAGE_webif-mesh is not set
+# CONFIG_PACKAGE_webif-netsukuku is not set
+# CONFIG_PACKAGE_webif-theme-clubman is not set
+# CONFIG_PACKAGE_webif-theme-sedky1 is not set
+# CONFIG_PACKAGE_webif-theme-xwrt is not set
+# CONFIG_PACKAGE_webif-theme-xwrt-mini is not set
+# CONFIG_PACKAGE_webif-theme-zephyr is not set
+# CONFIG_PACKAGE_webif-vpn is not set
+
+#
+# zabbix
+#
+# CONFIG_PACKAGE_zabbix-agent is not set
+# CONFIG_PACKAGE_zabbix-agentd is not set
+# CONFIG_PACKAGE_zabbix-get is not set
+# CONFIG_PACKAGE_zabbix-proxy is not set
+# CONFIG_PACKAGE_zabbix-sender is not set
+# CONFIG_PACKAGE_zabbix-server is not set
+# CONFIG_PACKAGE_gkrellmd is not set
+# CONFIG_PACKAGE_htop is not set
+# CONFIG_PACKAGE_monit is not set
+# CONFIG_PACKAGE_monit-nossl is not set
+# CONFIG_PACKAGE_muninlite is not set
+# CONFIG_PACKAGE_nagios is not set
+# CONFIG_PACKAGE_nagios-plugins is not set
+# CONFIG_PACKAGE_nrpe is not set
+# CONFIG_PACKAGE_osirisd is not set
+# CONFIG_PACKAGE_ostiary is not set
+# CONFIG_PACKAGE_send-nsca is not set
+# CONFIG_PACKAGE_sudo is not set
+# CONFIG_PACKAGE_syslog-ng is not set
+# CONFIG_PACKAGE_syslog-ng3 is not set
+
+#
+# Maths
+#
+
+#
+# Video Streaming
+#
+# CONFIG_PACKAGE_openrtsp is not set
+
+#
+# Mail
+#
+# CONFIG_PACKAGE_dovecot is not set
+# CONFIG_PACKAGE_fetchmail is not set
+# CONFIG_PACKAGE_fetchmail-nossl is not set
+# CONFIG_PACKAGE_imapfilter is not set
+# CONFIG_PACKAGE_mini-sendmail is not set
+# CONFIG_PACKAGE_msmtp is not set
+# CONFIG_PACKAGE_msmtp-nossl is not set
+# CONFIG_PACKAGE_msmtp-queue is not set
+# CONFIG_PACKAGE_mutt is not set
+# CONFIG_PACKAGE_nullmailer is not set
+# CONFIG_PACKAGE_procmail is not set
+# CONFIG_PACKAGE_ssmtp is not set
+# CONFIG_PACKAGE_xmail is not set
+
+#
+# Xorg
+#
+
+#
+# app
+#
+# CONFIG_PACKAGE_gmenu2x is not set
+# CONFIG_PACKAGE_vido is not set
+
+#
+# font
+#
+
+#
+# libraries
+#
+# CONFIG_PACKAGE_orbit2 is not set
+# CONFIG_PACKAGE_dgclock is not set
+
+#
+# Libraries
+#
+
+#
+# Filesystem
+#
+# CONFIG_PACKAGE_libcom_err is not set
+# CONFIG_PACKAGE_libext2fs is not set
+# CONFIG_PACKAGE_libfuse is not set
+# CONFIG_PACKAGE_libnfsidmap is not set
+# CONFIG_PACKAGE_libow is not set
+# CONFIG_PACKAGE_libow-capi is not set
+# CONFIG_PACKAGE_libsysfs is not set
+
+#
+# Firewall
+#
+# CONFIG_PACKAGE_libfko is not set
+CONFIG_PACKAGE_libip4tc=y
+CONFIG_PACKAGE_libip6tc=y
+# CONFIG_PACKAGE_libipq is not set
+# CONFIG_PACKAGE_libiptc is not set
+CONFIG_PACKAGE_libxtables=y
+
+#
+# Liballegro
+#
+# CONFIG_PACKAGE_liballegro is not set
+# CONFIG_PACKAGE_liballegro-data is not set
+# CONFIG_PACKAGE_liballegro-demo is not set
+# CONFIG_PACKAGE_liballegro-digmid is not set
+# CONFIG_PACKAGE_liballegro-examples is not set
+# CONFIG_PACKAGE_liballegro-jpeg is not set
+# CONFIG_PACKAGE_liballegro-ogg is not set
+# CONFIG_PACKAGE_liballegro-png is not set
+# CONFIG_PACKAGE_liballegro-setup is not set
+# CONFIG_PACKAGE_liballegro-utils is not set
+
+#
+# PLplot
+#
+# CONFIG_PACKAGE_plplot is not set
+# CONFIG_PACKAGE_plplot-cxx is not set
+# CONFIG_PACKAGE_plplot-demo is not set
+# CONFIG_PACKAGE_plplot-linuxvga is not set
+# CONFIG_PACKAGE_plplot-lua is not set
+# CONFIG_PACKAGE_plplot-qt is not set
+# CONFIG_PACKAGE_plplot-tcl is not set
+
+#
+# SSL
+#
+# CONFIG_PACKAGE_libaxtls is not set
+# CONFIG_PACKAGE_libcyassl is not set
+# CONFIG_PACKAGE_libgnutls is not set
+# CONFIG_PACKAGE_libgnutls-extra is not set
+# CONFIG_PACKAGE_libgnutls-openssl is not set
+# CONFIG_PACKAGE_libmatrixssl is not set
+# CONFIG_PACKAGE_libopenssl is not set
+# CONFIG_PACKAGE_libpolarssl is not set
+
+#
+# Sound
+#
+# CONFIG_PACKAGE_liblo is not set
+
+#
+# database
+#
+# CONFIG_PACKAGE_libpq is not set
+# CONFIG_PACKAGE_libsqlite2 is not set
+# CONFIG_PACKAGE_libsqlite3 is not set
+# CONFIG_PACKAGE_pgsqlodbc is not set
+# CONFIG_PACKAGE_tokyocabinet is not set
+# CONFIG_PACKAGE_unixodbc is not set
+# CONFIG_PACKAGE_alsa-lib is not set
+# CONFIG_PACKAGE_argp-standalone is not set
+# CONFIG_PACKAGE_argtable is not set
+# CONFIG_PACKAGE_ascii-paint is not set
+# CONFIG_PACKAGE_bind-libs is not set
+# CONFIG_PACKAGE_bluez-libs is not set
+# CONFIG_PACKAGE_boost-chrono is not set
+# CONFIG_PACKAGE_boost-date_time is not set
+# CONFIG_PACKAGE_boost-filesystem is not set
+# CONFIG_PACKAGE_boost-graph is not set
+# CONFIG_PACKAGE_boost-iostreams is not set
+# CONFIG_PACKAGE_boost-locale is not set
+# CONFIG_PACKAGE_boost-math is not set
+# CONFIG_PACKAGE_boost-program_options is not set
+# CONFIG_PACKAGE_boost-python is not set
+# CONFIG_PACKAGE_boost-random is not set
+# CONFIG_PACKAGE_boost-regex is not set
+# CONFIG_PACKAGE_boost-serialization is not set
+# CONFIG_PACKAGE_boost-signals is not set
+# CONFIG_PACKAGE_boost-system is not set
+# CONFIG_PACKAGE_boost-test is not set
+# CONFIG_PACKAGE_boost-thread is not set
+# CONFIG_PACKAGE_boost-wave is not set
+# CONFIG_PACKAGE_ccid is not set
+# CONFIG_PACKAGE_cgilib is not set
+# CONFIG_PACKAGE_check is not set
+# CONFIG_PACKAGE_classpath is not set
+# CONFIG_PACKAGE_classpath-tools is not set
+# CONFIG_PACKAGE_clearsilver is not set
+# CONFIG_PACKAGE_confuse is not set
+# CONFIG_PACKAGE_credis is not set
+# CONFIG_PACKAGE_directfb is not set
+# CONFIG_PACKAGE_fcgi is not set
+# CONFIG_PACKAGE_fftw3 is not set
+# CONFIG_PACKAGE_fftw3f is not set
+# CONFIG_PACKAGE_fribidi is not set
+# CONFIG_PACKAGE_ftplib is not set
+# CONFIG_PACKAGE_gc is not set
+# CONFIG_PACKAGE_giflib is not set
+# CONFIG_PACKAGE_glib1 is not set
+# CONFIG_PACKAGE_glib2 is not set
+# CONFIG_PACKAGE_glibmm is not set
+# CONFIG_PACKAGE_gnome-mime-data is not set
+# CONFIG_PACKAGE_ibrcommon is not set
+# CONFIG_PACKAGE_id3lib is not set
+# CONFIG_PACKAGE_jansson is not set
+# CONFIG_PACKAGE_jbig2dec is not set
+# CONFIG_PACKAGE_libIDL2 is not set
+# CONFIG_PACKAGE_libaa is not set
+# CONFIG_PACKAGE_libaio is not set
+# CONFIG_PACKAGE_libamsel is not set
+# CONFIG_PACKAGE_libao is not set
+# CONFIG_PACKAGE_libapr is not set
+# CONFIG_PACKAGE_libaprutil is not set
+# CONFIG_PACKAGE_libart is not set
+# CONFIG_PACKAGE_libassuan is not set
+# CONFIG_PACKAGE_libatomicops is not set
+# CONFIG_PACKAGE_libaudiofile is not set
+# CONFIG_PACKAGE_libavahi is not set
+# CONFIG_PACKAGE_libavahi-client is not set
+# CONFIG_PACKAGE_libavahi-dbus-support is not set
+# CONFIG_PACKAGE_libblkid is not set
+CONFIG_PACKAGE_libblobmsg-json=y
+# CONFIG_PACKAGE_libboblight is not set
+# CONFIG_PACKAGE_libbz2 is not set
+# CONFIG_PACKAGE_libcap is not set
+# CONFIG_PACKAGE_libcares is not set
+# CONFIG_PACKAGE_libcelt is not set
+# CONFIG_PACKAGE_libcharset is not set
+# CONFIG_PACKAGE_libcli is not set
+# CONFIG_PACKAGE_libclinkc is not set
+CONFIG_PACKAGE_libconfig=y
+# CONFIG_PACKAGE_libcroco is not set
+# CONFIG_PACKAGE_libcryptoxx is not set
+# CONFIG_PACKAGE_libcss is not set
+# CONFIG_PACKAGE_libcunit is not set
+# CONFIG_PACKAGE_libcurl is not set
+# CONFIG_PACKAGE_libcwiid is not set
+# CONFIG_PACKAGE_libdaemon is not set
+# CONFIG_PACKAGE_libdaq is not set
+# CONFIG_PACKAGE_libdb47 is not set
+# CONFIG_PACKAGE_libdbi is not set
+# CONFIG_PACKAGE_libdbus is not set
+# CONFIG_PACKAGE_libdbus-glib is not set
+# CONFIG_PACKAGE_libdevmapper is not set
+# CONFIG_PACKAGE_libdmapsharing is not set
+# CONFIG_PACKAGE_libdnet is not set
+# CONFIG_PACKAGE_libdvbpsi is not set
+# CONFIG_PACKAGE_libdvdread is not set
+# CONFIG_PACKAGE_libelf is not set
+# CONFIG_PACKAGE_libevent is not set
+# CONFIG_PACKAGE_libevent2 is not set
+# CONFIG_PACKAGE_libevent2-core is not set
+# CONFIG_PACKAGE_libevent2-extra is not set
+# CONFIG_PACKAGE_libevent2-openssl is not set
+# CONFIG_PACKAGE_libevent2-pthreads is not set
+# CONFIG_PACKAGE_libeventlog is not set
+# CONFIG_PACKAGE_libexif is not set
+# CONFIG_PACKAGE_libexpat is not set
+# CONFIG_PACKAGE_libexslt is not set
+# CONFIG_PACKAGE_libezxml is not set
+# CONFIG_PACKAGE_libfaad2 is not set
+# CONFIG_PACKAGE_libfaifa is not set
+# CONFIG_PACKAGE_libffi is not set
+# CONFIG_PACKAGE_libffmpeg-full is not set
+# CONFIG_PACKAGE_libffmpeg-mini is not set
+# CONFIG_PACKAGE_libfixgl is not set
+# CONFIG_PACKAGE_libflac is not set
+# CONFIG_PACKAGE_libfreecwmp is not set
+# CONFIG_PACKAGE_libfreefare is not set
+# CONFIG_PACKAGE_libfreenect is not set
+# CONFIG_PACKAGE_libfreetype is not set
+# CONFIG_PACKAGE_libftdi is not set
+# CONFIG_PACKAGE_libgcrypt is not set
+# CONFIG_PACKAGE_libgd is not set
+# CONFIG_PACKAGE_libgdbm is not set
+# CONFIG_PACKAGE_libggi is not set
+# CONFIG_PACKAGE_libggi-programs is not set
+# CONFIG_PACKAGE_libgii is not set
+# CONFIG_PACKAGE_libgmp is not set
+# CONFIG_PACKAGE_libgpg-error is not set
+# CONFIG_PACKAGE_libgpgme is not set
+# CONFIG_PACKAGE_libgphoto2 is not set
+# CONFIG_PACKAGE_libgps is not set
+# CONFIG_PACKAGE_libgpsd is not set
+# CONFIG_PACKAGE_libgsl is not set
+# CONFIG_PACKAGE_libgsm is not set
+# CONFIG_PACKAGE_libgssapi is not set
+# CONFIG_PACKAGE_libhowl is not set
+# CONFIG_PACKAGE_libhubbub is not set
+# CONFIG_PACKAGE_libiconv is not set
+# CONFIG_PACKAGE_libiconv-full is not set
+# CONFIG_PACKAGE_libid3tag is not set
+# CONFIG_PACKAGE_libidn is not set
+# CONFIG_PACKAGE_libiksemel is not set
+# CONFIG_PACKAGE_libimobiledevice is not set
+# CONFIG_PACKAGE_libinklevel is not set
+# CONFIG_PACKAGE_libintl is not set
+# CONFIG_PACKAGE_libintl-full is not set
+CONFIG_PACKAGE_libiw=y
+CONFIG_PACKAGE_libiwinfo=y
+# CONFIG_PACKAGE_libjpeg is not set
+# CONFIG_PACKAGE_libjs is not set
+# CONFIG_PACKAGE_libjson is not set
+CONFIG_PACKAGE_libjson-c=y
+# CONFIG_PACKAGE_libldns is not set
+# CONFIG_PACKAGE_libleptonica is not set
+CONFIG_PACKAGE_libltdl=m
+CONFIG_PACKAGE_liblua=y
+CONFIG_PACKAGE_liblzo=y
+# CONFIG_PACKAGE_libmad is not set
+# CONFIG_PACKAGE_libmagic is not set
+# CONFIG_PACKAGE_libmbus is not set
+# CONFIG_PACKAGE_libmcrypt is not set
+# CONFIG_PACKAGE_libmicrohttpd is not set
+# CONFIG_PACKAGE_libmicroxml is not set
+# CONFIG_PACKAGE_libmikmod is not set
+# CONFIG_PACKAGE_libminiupnpc is not set
+# CONFIG_PACKAGE_libmms is not set
+# CONFIG_PACKAGE_libmnl is not set
+# CONFIG_PACKAGE_libmodbus is not set
+# CONFIG_PACKAGE_libmosquitto is not set
+# CONFIG_PACKAGE_libmount is not set
+# CONFIG_PACKAGE_libmpc is not set
+# CONFIG_PACKAGE_libmpcdec is not set
+# CONFIG_PACKAGE_libmpd is not set
+# CONFIG_PACKAGE_libmpdclient is not set
+# CONFIG_PACKAGE_libmpeg2 is not set
+# CONFIG_PACKAGE_libmpg123 is not set
+# CONFIG_PACKAGE_libmrss is not set
+# CONFIG_PACKAGE_libmysqlclient is not set
+# CONFIG_PACKAGE_libmysqlclient-r is not set
+# CONFIG_PACKAGE_libnatpmp is not set
+CONFIG_PACKAGE_libncurses=y
+# CONFIG_PACKAGE_libncursesw is not set
+# CONFIG_PACKAGE_libneon is not set
+# CONFIG_PACKAGE_libnet0 is not set
+# CONFIG_PACKAGE_libnet1 is not set
+# CONFIG_PACKAGE_libnetfilter-conntrack is not set
+# CONFIG_PACKAGE_libnetfilter-log is not set
+# CONFIG_PACKAGE_libnetfilter-queue is not set
+# CONFIG_PACKAGE_libnetsnmp is not set
+# CONFIG_PACKAGE_libnewt is not set
+# CONFIG_PACKAGE_libnfc is not set
+# CONFIG_PACKAGE_libnfnetlink is not set
+# CONFIG_PACKAGE_libnids is not set
+CONFIG_PACKAGE_libnl=y
+# CONFIG_PACKAGE_libnl-1 is not set
+# CONFIG_PACKAGE_libnl-3 is not set
+CONFIG_PACKAGE_libnl-tiny=y
+# CONFIG_PACKAGE_libnmeap is not set
+# CONFIG_PACKAGE_libnsbmp is not set
+# CONFIG_PACKAGE_libnsfb is not set
+# CONFIG_PACKAGE_libnsgif is not set
+# CONFIG_PACKAGE_libnxml is not set
+# CONFIG_PACKAGE_libogg is not set
+# CONFIG_PACKAGE_liboil is not set
+# CONFIG_PACKAGE_libol is not set
+# CONFIG_PACKAGE_libopal is not set
+# CONFIG_PACKAGE_libopencdk is not set
+# CONFIG_PACKAGE_libopenh323 is not set
+# CONFIG_PACKAGE_libopenldap is not set
+# CONFIG_PACKAGE_liboping is not set
+# CONFIG_PACKAGE_libortp is not set
+# CONFIG_PACKAGE_libosip2 is not set
+# CONFIG_PACKAGE_libowfat is not set
+# CONFIG_PACKAGE_libpar2 is not set
+# CONFIG_PACKAGE_libparserutils is not set
+# CONFIG_PACKAGE_libpcap is not set
+# CONFIG_PACKAGE_libpcre is not set
+# CONFIG_PACKAGE_libpcrecpp is not set
+# CONFIG_PACKAGE_libpcsclite is not set
+# CONFIG_PACKAGE_libpiano is not set
+# CONFIG_PACKAGE_libplist is not set
+# CONFIG_PACKAGE_libplistcxx is not set
+# CONFIG_PACKAGE_libpng is not set
+# CONFIG_PACKAGE_libpopt is not set
+# CONFIG_PACKAGE_libprotobuf-c is not set
+# CONFIG_PACKAGE_libptmalloc3 is not set
+# CONFIG_PACKAGE_libpurple is not set
+# CONFIG_PACKAGE_libradiusclient-ng is not set
+# CONFIG_PACKAGE_libre is not set
+# CONFIG_PACKAGE_libreadline is not set
+# CONFIG_PACKAGE_librem is not set
+CONFIG_PACKAGE_librpc=y
+# CONFIG_PACKAGE_librpcsecgss is not set
+# CONFIG_PACKAGE_librrd is not set
+# CONFIG_PACKAGE_librrd1 is not set
+# CONFIG_PACKAGE_librsync is not set
+# CONFIG_PACKAGE_libruby is not set
+# CONFIG_PACKAGE_libsamplerate is not set
+# CONFIG_PACKAGE_libsasl2 is not set
+# CONFIG_PACKAGE_libsdl is not set
+# CONFIG_PACKAGE_libsdl-gfx is not set
+# CONFIG_PACKAGE_libsdl-image is not set
+# CONFIG_PACKAGE_libsdl-mixer is not set
+# CONFIG_PACKAGE_libsdl-sound is not set
+# CONFIG_PACKAGE_libsdl-ttf is not set
+# CONFIG_PACKAGE_libsdl-widgets is not set
+# CONFIG_PACKAGE_libsensors is not set
+# CONFIG_PACKAGE_libshout is not set
+# CONFIG_PACKAGE_libsigcxx is not set
+# CONFIG_PACKAGE_libslang2 is not set
+# CONFIG_PACKAGE_libsml is not set
+# CONFIG_PACKAGE_libsndfile is not set
+# CONFIG_PACKAGE_libsocks is not set
+# CONFIG_PACKAGE_libsoup is not set
+# CONFIG_PACKAGE_libspandsp is not set
+# CONFIG_PACKAGE_libspeex is not set
+# CONFIG_PACKAGE_libspeexdsp is not set
+# CONFIG_PACKAGE_libsrtp is not set
+# CONFIG_PACKAGE_libssh2 is not set
+# CONFIG_PACKAGE_libsynce is not set
+# CONFIG_PACKAGE_libtasn1 is not set
+# CONFIG_PACKAGE_libtcod is not set
+# CONFIG_PACKAGE_libtheora is not set
+# CONFIG_PACKAGE_libtiff is not set
+# CONFIG_PACKAGE_libtiffxx is not set
+# CONFIG_PACKAGE_libtorrent is not set
+# CONFIG_PACKAGE_libtwin is not set
+# CONFIG_PACKAGE_libubb is not set
+CONFIG_PACKAGE_libubox=y
+CONFIG_PACKAGE_libubus=y
+CONFIG_PACKAGE_libubus-lua=y
+CONFIG_PACKAGE_libuci=y
+CONFIG_PACKAGE_libuci-lua=y
+# CONFIG_PACKAGE_libucl is not set
+# CONFIG_PACKAGE_libunbound is not set
+# CONFIG_PACKAGE_libunistring is not set
+# CONFIG_PACKAGE_libupnp is not set
+# CONFIG_PACKAGE_libusb is not set
+# CONFIG_PACKAGE_libusb-1.0 is not set
+# CONFIG_PACKAGE_libusbmuxd is not set
+# CONFIG_PACKAGE_libusbpp is not set
+# CONFIG_PACKAGE_libuuid is not set
+# CONFIG_PACKAGE_libv4l is not set
+# CONFIG_PACKAGE_libvncserver is not set
+# CONFIG_PACKAGE_libvorbis is not set
+# CONFIG_PACKAGE_libvorbisidec is not set
+# CONFIG_PACKAGE_libwapcaplet is not set
+# CONFIG_PACKAGE_libwrap is not set
+# CONFIG_PACKAGE_libwxbase is not set
+# CONFIG_PACKAGE_libxapian is not set
+# CONFIG_PACKAGE_libxml2 is not set
+# CONFIG_PACKAGE_libxslt is not set
+# CONFIG_PACKAGE_libzip is not set
+# CONFIG_PACKAGE_libzstream is not set
+# CONFIG_PACKAGE_linux-atm is not set
+# CONFIG_PACKAGE_mpfr is not set
+# CONFIG_PACKAGE_mupdf is not set
+# CONFIG_PACKAGE_mxml is not set
+# CONFIG_PACKAGE_nacl is not set
+# CONFIG_PACKAGE_openjpeg is not set
+# CONFIG_PACKAGE_phidget21 is not set
+# CONFIG_PACKAGE_poco is not set
+# CONFIG_PACKAGE_protobuf is not set
+# CONFIG_PACKAGE_ptlib is not set
+# CONFIG_PACKAGE_pwlib is not set
+# CONFIG_PACKAGE_radlib is not set
+# CONFIG_PACKAGE_sane-libs is not set
+# CONFIG_PACKAGE_serdisplib is not set
+# CONFIG_PACKAGE_shflags is not set
+# CONFIG_PACKAGE_st2205tool is not set
+# CONFIG_PACKAGE_svgalib is not set
+# CONFIG_PACKAGE_taglib is not set
+# CONFIG_PACKAGE_taglibc is not set
+CONFIG_PACKAGE_terminfo=y
+# CONFIG_PACKAGE_tntnet is not set
+# CONFIG_PACKAGE_tre is not set
+CONFIG_PACKAGE_uclibcxx=y
+# CONFIG_PACKAGE_ustl is not set
+# CONFIG_PACKAGE_wt is not set
+# CONFIG_PACKAGE_xmlrpc-c is not set
+# CONFIG_PACKAGE_xmlrpc-c-abyss is not set
+# CONFIG_PACKAGE_xmlrpc-c-client is not set
+# CONFIG_PACKAGE_xmlrpc-c-common is not set
+# CONFIG_PACKAGE_xmlrpc-c-internal is not set
+# CONFIG_PACKAGE_xmlrpc-c-server is not set
+# CONFIG_PACKAGE_xmlrpc-c-server-abyss is not set
+# CONFIG_PACKAGE_xmpp4r is not set
+# CONFIG_PACKAGE_zaptel-libtonezone is not set
+# CONFIG_PACKAGE_zaptel14-libtonezone is not set
+# CONFIG_PACKAGE_zimlib is not set
+CONFIG_PACKAGE_zlib=y
+
+#
+# Network
+#
+
+#
+# BitTorrent
+#
+# CONFIG_PACKAGE_btpd is not set
+# CONFIG_PACKAGE_cbtt is not set
+# CONFIG_PACKAGE_cbtt-mysql is not set
+# CONFIG_PACKAGE_ctorrent is not set
+# CONFIG_PACKAGE_ctorrent-nossl is not set
+# CONFIG_PACKAGE_rtorrent is not set
+# CONFIG_PACKAGE_transmission-daemon is not set
+# CONFIG_PACKAGE_transmission-remote is not set
+
+#
+# Captive Portals
+#
+# CONFIG_PACKAGE_chillispot is not set
+# CONFIG_PACKAGE_coova-chilli is not set
+# CONFIG_PACKAGE_nocatauth is not set
+# CONFIG_PACKAGE_nocatsplash is not set
+# CONFIG_PACKAGE_nodogsplash is not set
+# CONFIG_PACKAGE_pepperspot is not set
+# CONFIG_PACKAGE_wifidog is not set
+
+#
+# File Transfer
+#
+# CONFIG_PACKAGE_aria2 is not set
+# CONFIG_PACKAGE_atftp is not set
+# CONFIG_PACKAGE_atftpd is not set
+# CONFIG_PACKAGE_axel is not set
+# CONFIG_PACKAGE_cmdftp is not set
+# CONFIG_PACKAGE_curl is not set
+# CONFIG_PACKAGE_lftp is not set
+# CONFIG_PACKAGE_ncftp is not set
+# CONFIG_PACKAGE_ncftp-utils is not set
+# CONFIG_PACKAGE_proftpd is not set
+# CONFIG_PACKAGE_pure-ftpd is not set
+# CONFIG_PACKAGE_pure-ftpd-tls is not set
+# CONFIG_PACKAGE_rsync is not set
+# CONFIG_PACKAGE_rsyncd is not set
+# CONFIG_PACKAGE_tftp-hpa is not set
+# CONFIG_PACKAGE_tftpd-hpa is not set
+# CONFIG_PACKAGE_uftp is not set
+# CONFIG_PACKAGE_uftp-keymgt is not set
+# CONFIG_PACKAGE_uftp-notls is not set
+# CONFIG_PACKAGE_uftpd is not set
+# CONFIG_PACKAGE_uftpd-notls is not set
+# CONFIG_PACKAGE_uftpproxyd is not set
+# CONFIG_PACKAGE_uftpproxyd-notls is not set
+# CONFIG_PACKAGE_uucp is not set
+# CONFIG_PACKAGE_vsftpd is not set
+# CONFIG_PACKAGE_wget is not set
+# CONFIG_PACKAGE_wget-nossl is not set
+# CONFIG_PACKAGE_wput is not set
+# CONFIG_PACKAGE_yafc is not set
+# CONFIG_PACKAGE_zstream is not set
+
+#
+# Filesystem
+#
+# CONFIG_PACKAGE_curlftpfs is not set
+# CONFIG_PACKAGE_netatalk is not set
+# CONFIG_PACKAGE_nfs-kernel-server is not set
+# CONFIG_PACKAGE_nfs-server is not set
+# CONFIG_PACKAGE_owftpd is not set
+# CONFIG_PACKAGE_owhttpd is not set
+# CONFIG_PACKAGE_owserver is not set
+# CONFIG_PACKAGE_remotefs is not set
+# CONFIG_PACKAGE_remotefs-server is not set
+# CONFIG_PACKAGE_sshfs is not set
+# CONFIG_PACKAGE_unfs3 is not set
+
+#
+# Firewall
+#
+# CONFIG_PACKAGE_amwall is not set
+# CONFIG_PACKAGE_arptables is not set
+# CONFIG_PACKAGE_conntrack-tools is not set
+CONFIG_PACKAGE_ebtables=y
+# CONFIG_PACKAGE_ebtables-utils is not set
+# CONFIG_PACKAGE_fwknop is not set
+# CONFIG_PACKAGE_fwknopd is not set
+# CONFIG_PACKAGE_ipkungfu is not set
+CONFIG_PACKAGE_iptables=y
+# CONFIG_PACKAGE_iptables-mod-account is not set
+# CONFIG_PACKAGE_iptables-mod-chaos is not set
+# CONFIG_PACKAGE_iptables-mod-condition is not set
+# CONFIG_PACKAGE_iptables-mod-conntrack-extra is not set
+# CONFIG_PACKAGE_iptables-mod-delude is not set
+# CONFIG_PACKAGE_iptables-mod-dhcpmac is not set
+# CONFIG_PACKAGE_iptables-mod-dnetmap is not set
+# CONFIG_PACKAGE_iptables-mod-extra is not set
+CONFIG_PACKAGE_iptables-mod-filter=y
+# CONFIG_PACKAGE_iptables-mod-fuzzy is not set
+# CONFIG_PACKAGE_iptables-mod-geoip is not set
+# CONFIG_PACKAGE_iptables-mod-hashlimit is not set
+# CONFIG_PACKAGE_iptables-mod-iface is not set
+# CONFIG_PACKAGE_iptables-mod-ipmark is not set
+# CONFIG_PACKAGE_iptables-mod-ipopt is not set
+# CONFIG_PACKAGE_iptables-mod-ipp2p is not set
+# CONFIG_PACKAGE_iptables-mod-iprange is not set
+# CONFIG_PACKAGE_iptables-mod-ipsec is not set
+# CONFIG_PACKAGE_iptables-mod-ipset is not set
+# CONFIG_PACKAGE_iptables-mod-ipv4options is not set
+# CONFIG_PACKAGE_iptables-mod-led is not set
+# CONFIG_PACKAGE_iptables-mod-length2 is not set
+# CONFIG_PACKAGE_iptables-mod-logmark is not set
+# CONFIG_PACKAGE_iptables-mod-lscan is not set
+# CONFIG_PACKAGE_iptables-mod-lua is not set
+# CONFIG_PACKAGE_iptables-mod-nat-extra is not set
+# CONFIG_PACKAGE_iptables-mod-psd is not set
+# CONFIG_PACKAGE_iptables-mod-quota2 is not set
+# CONFIG_PACKAGE_iptables-mod-rawnat is not set
+# CONFIG_PACKAGE_iptables-mod-steal is not set
+# CONFIG_PACKAGE_iptables-mod-sysrq is not set
+# CONFIG_PACKAGE_iptables-mod-tarpit is not set
+# CONFIG_PACKAGE_iptables-mod-tee is not set
+# CONFIG_PACKAGE_iptables-mod-tproxy is not set
+# CONFIG_PACKAGE_iptables-mod-u32 is not set
+# CONFIG_PACKAGE_iptables-mod-ulog is not set
+# CONFIG_PACKAGE_iptables-snmp is not set
+# CONFIG_PACKAGE_iptaccount is not set
+# CONFIG_PACKAGE_knock is not set
+# CONFIG_PACKAGE_knockd is not set
+# CONFIG_PACKAGE_l7-protocols is not set
+# CONFIG_PACKAGE_miniupnpc is not set
+# CONFIG_PACKAGE_miniupnpd is not set
+# CONFIG_PACKAGE_natpmp is not set
+# CONFIG_PACKAGE_natpmpc is not set
+# CONFIG_PACKAGE_nufw is not set
+# CONFIG_PACKAGE_nufw-modules is not set
+# CONFIG_PACKAGE_nufw-python is not set
+# CONFIG_PACKAGE_nutcpc is not set
+# CONFIG_PACKAGE_portsentry is not set
+# CONFIG_PACKAGE_scanlogd is not set
+# CONFIG_PACKAGE_shorewall-lite is not set
+# CONFIG_PACKAGE_snort is not set
+# CONFIG_PACKAGE_snort-mysql is not set
+# CONFIG_PACKAGE_snort-pgsql is not set
+
+#
+# Firewall Tunnel
+#
+# CONFIG_PACKAGE_httptunnel is not set
+# CONFIG_PACKAGE_icmptx is not set
+# CONFIG_PACKAGE_iodine is not set
+# CONFIG_PACKAGE_iodined is not set
+# CONFIG_PACKAGE_nstx is not set
+# CONFIG_PACKAGE_nstxd is not set
+# CONFIG_PACKAGE_ptunnel is not set
+
+#
+# IP Addresses and Names
+#
+# CONFIG_PACKAGE_avahi-autoipd is not set
+# CONFIG_PACKAGE_avahi-daemon is not set
+# CONFIG_PACKAGE_avahi-dnsconfd is not set
+# CONFIG_PACKAGE_avahi-utils is not set
+# CONFIG_PACKAGE_bind-check is not set
+# CONFIG_PACKAGE_bind-client is not set
+# CONFIG_PACKAGE_bind-dig is not set
+# CONFIG_PACKAGE_bind-dnssec is not set
+# CONFIG_PACKAGE_bind-host is not set
+# CONFIG_PACKAGE_bind-rndc is not set
+# CONFIG_PACKAGE_bind-server is not set
+# CONFIG_PACKAGE_bind-tools is not set
+# CONFIG_PACKAGE_ddns-scripts is not set
+# CONFIG_PACKAGE_dhcp-forwarder is not set
+# CONFIG_PACKAGE_dhcpcd is not set
+# CONFIG_PACKAGE_djbdns-axfrdns is not set
+# CONFIG_PACKAGE_djbdns-base is not set
+# CONFIG_PACKAGE_djbdns-dnscache is not set
+# CONFIG_PACKAGE_djbdns-rbldns is not set
+# CONFIG_PACKAGE_djbdns-tinydns is not set
+# CONFIG_PACKAGE_djbdns-tools is not set
+# CONFIG_PACKAGE_djbdns-walldns is not set
+# CONFIG_PACKAGE_drill is not set
+# CONFIG_PACKAGE_dudders is not set
+# CONFIG_PACKAGE_ez-ipupdate is not set
+# CONFIG_PACKAGE_howl-autoipd is not set
+# CONFIG_PACKAGE_howl-mdnsresponder is not set
+# CONFIG_PACKAGE_howl-nifd is not set
+# CONFIG_PACKAGE_howl-utils is not set
+# CONFIG_PACKAGE_ipupdate is not set
+# CONFIG_PACKAGE_isc-dhcp-client-ipv4 is not set
+# CONFIG_PACKAGE_isc-dhcp-client-ipv6 is not set
+# CONFIG_PACKAGE_isc-dhcp-omshell-ipv4 is not set
+# CONFIG_PACKAGE_isc-dhcp-omshell-ipv6 is not set
+# CONFIG_PACKAGE_isc-dhcp-relay-ipv4 is not set
+# CONFIG_PACKAGE_isc-dhcp-relay-ipv6 is not set
+# CONFIG_PACKAGE_isc-dhcp-server-ipv4 is not set
+# CONFIG_PACKAGE_isc-dhcp-server-ipv6 is not set
+# CONFIG_PACKAGE_maradns is not set
+# CONFIG_PACKAGE_mdns-utils is not set
+# CONFIG_PACKAGE_mdnsd is not set
+# CONFIG_PACKAGE_mdnsresponder is not set
+# CONFIG_PACKAGE_ndyndns is not set
+# CONFIG_PACKAGE_rarpd is not set
+# CONFIG_PACKAGE_unbound is not set
+# CONFIG_PACKAGE_unbound-anchor is not set
+# CONFIG_PACKAGE_unbound-control is not set
+# CONFIG_PACKAGE_unbound-control-setup is not set
+# CONFIG_PACKAGE_unbound-host is not set
+# CONFIG_PACKAGE_updatedd is not set
+# CONFIG_PACKAGE_yaddns is not set
+
+#
+# Instant Messaging
+#
+# CONFIG_PACKAGE_bahamut is not set
+# CONFIG_PACKAGE_bitchx is not set
+# CONFIG_PACKAGE_bitlbee is not set
+# CONFIG_PACKAGE_centerim is not set
+# CONFIG_PACKAGE_centerim5 is not set
+# CONFIG_PACKAGE_dircproxy is not set
+# CONFIG_PACKAGE_ekg is not set
+# CONFIG_PACKAGE_imsnif is not set
+# CONFIG_PACKAGE_imspector is not set
+# CONFIG_PACKAGE_irssi is not set
+# CONFIG_PACKAGE_irssi-glib1 is not set
+# CONFIG_PACKAGE_irssi-nossl is not set
+# CONFIG_PACKAGE_miau is not set
+# CONFIG_PACKAGE_ngircd is not set
+# CONFIG_PACKAGE_ngircd-nossl is not set
+# CONFIG_PACKAGE_prosody is not set
+# CONFIG_PACKAGE_psybnc is not set
+# CONFIG_PACKAGE_reaim is not set
+# CONFIG_PACKAGE_tmsnc is not set
+# CONFIG_PACKAGE_umurmur-openssl is not set
+# CONFIG_PACKAGE_umurmur-polarssl is not set
+# CONFIG_PACKAGE_unrealircd is not set
+# CONFIG_PACKAGE_weechat is not set
+# CONFIG_PACKAGE_znc is not set
+
+#
+# NMAP Suite
+#
+# CONFIG_PACKAGE_ncat is not set
+# CONFIG_PACKAGE_ncat-ssl is not set
+# CONFIG_PACKAGE_ndiff is not set
+# CONFIG_PACKAGE_nmap is not set
+# CONFIG_PACKAGE_nmap-ssl is not set
+# CONFIG_PACKAGE_nping is not set
+
+#
+# NNTP
+#
+# CONFIG_PACKAGE_leafnode is not set
+# CONFIG_PACKAGE_nzbget is not set
+# CONFIG_PACKAGE_nzbgetweb is not set
+
+#
+# NTRIP
+#
+# CONFIG_PACKAGE_ntripcaster is not set
+# CONFIG_PACKAGE_ntripclient is not set
+# CONFIG_PACKAGE_ntripserver is not set
+
+#
+# P2P
+#
+# CONFIG_PACKAGE_amule is not set
+# CONFIG_PACKAGE_mutella is not set
+# CONFIG_PACKAGE_opendchub is not set
+# CONFIG_PACKAGE_peerguardian is not set
+# CONFIG_PACKAGE_uhub is not set
+
+#
+# Routing and Redirection
+#
+# CONFIG_PACKAGE_babeld is not set
+# CONFIG_PACKAGE_bird4 is not set
+# CONFIG_PACKAGE_birdc4 is not set
+# CONFIG_PACKAGE_bmx6 is not set
+# CONFIG_PACKAGE_igmpproxy is not set
+# CONFIG_PACKAGE_ip is not set
+# CONFIG_PACKAGE_lldpd is not set
+# CONFIG_PACKAGE_net-tools-route is not set
+# CONFIG_PACKAGE_olsrd is not set
+# CONFIG_PACKAGE_parprouted is not set
+# CONFIG_PACKAGE_quagga is not set
+# CONFIG_PACKAGE_redir is not set
+# CONFIG_PACKAGE_relayd is not set
+# CONFIG_PACKAGE_rinetd is not set
+# CONFIG_PACKAGE_smcroute is not set
+# CONFIG_PACKAGE_sslh is not set
+# CONFIG_PACKAGE_udp-broadcast-relay is not set
+# CONFIG_PACKAGE_vrrpd is not set
+# CONFIG_PACKAGE_wing is not set
+
+#
+# SSH
+#
+# CONFIG_PACKAGE_autossh is not set
+# CONFIG_PACKAGE_corkscrew is not set
+# CONFIG_PACKAGE_gesftpserver is not set
+# CONFIG_PACKAGE_openssh-client is not set
+# CONFIG_PACKAGE_openssh-client-utils is not set
+# CONFIG_PACKAGE_openssh-keygen is not set
+# CONFIG_PACKAGE_openssh-moduli is not set
+# CONFIG_PACKAGE_openssh-server is not set
+# CONFIG_PACKAGE_openssh-sftp-client is not set
+# CONFIG_PACKAGE_openssh-sftp-server is not set
+# CONFIG_PACKAGE_rssh is not set
+# CONFIG_PACKAGE_sshtunnel is not set
+
+#
+# Telephony
+#
+# CONFIG_PACKAGE_asterisk18 is not set
+# CONFIG_PACKAGE_baresip is not set
+# CONFIG_PACKAGE_freeswitch is not set
+# CONFIG_PACKAGE_kamailio is not set
+# CONFIG_PACKAGE_kamailio3 is not set
+# CONFIG_PACKAGE_libopenzap is not set
+# CONFIG_PACKAGE_miax is not set
+# CONFIG_PACKAGE_openser is not set
+# CONFIG_PACKAGE_opensips is not set
+# CONFIG_PACKAGE_pcapsipdump is not set
+# CONFIG_PACKAGE_restund is not set
+# CONFIG_PACKAGE_rtpproxy is not set
+# CONFIG_PACKAGE_sipp is not set
+# CONFIG_PACKAGE_siproxd is not set
+# CONFIG_PACKAGE_sipsak is not set
+# CONFIG_PACKAGE_smap is not set
+# CONFIG_PACKAGE_yate is not set
+
+#
+# Time Synchronization
+#
+# CONFIG_PACKAGE_chrony is not set
+# CONFIG_PACKAGE_htpdate is not set
+# CONFIG_PACKAGE_ntp-keygen is not set
+# CONFIG_PACKAGE_ntp-keygen-ssl is not set
+# CONFIG_PACKAGE_ntp-utils is not set
+# CONFIG_PACKAGE_ntpclient is not set
+# CONFIG_PACKAGE_ntpd is not set
+# CONFIG_PACKAGE_ntpd-ssl is not set
+# CONFIG_PACKAGE_ntpdate is not set
+# CONFIG_PACKAGE_openntpd is not set
+# CONFIG_PACKAGE_ptpd is not set
+
+#
+# VPN
+#
+# CONFIG_PACKAGE_chaosvpn is not set
+# CONFIG_PACKAGE_etherpuppet is not set
+# CONFIG_PACKAGE_frickin is not set
+# CONFIG_PACKAGE_ipsec-tools is not set
+# CONFIG_PACKAGE_isakmpd is not set
+# CONFIG_PACKAGE_l2tpd is not set
+# CONFIG_PACKAGE_l2tpns is not set
+# CONFIG_PACKAGE_matrixtunnel is not set
+# CONFIG_PACKAGE_n2n is not set
+# CONFIG_PACKAGE_openconnect is not set
+# CONFIG_PACKAGE_opennhrp is not set
+# CONFIG_PACKAGE_openswan is not set
+# CONFIG_PACKAGE_openvpn is not set
+# CONFIG_PACKAGE_openvpn-devel-nossl is not set
+# CONFIG_PACKAGE_openvpn-devel-openssl is not set
+# CONFIG_PACKAGE_openvpn-devel-polarssl is not set
+# CONFIG_PACKAGE_openvpn-easy-rsa is not set
+# CONFIG_PACKAGE_pptpd is not set
+# CONFIG_PACKAGE_quicktun is not set
+# CONFIG_PACKAGE_ssltunnel is not set
+# CONFIG_PACKAGE_strongswan is not set
+# CONFIG_PACKAGE_strongswan-charon is not set
+# CONFIG_PACKAGE_strongswan-default is not set
+# CONFIG_PACKAGE_strongswan-libfast is not set
+# CONFIG_PACKAGE_strongswan-minimal is not set
+# CONFIG_PACKAGE_strongswan-mod-addrblock is not set
+# CONFIG_PACKAGE_strongswan-mod-aes is not set
+# CONFIG_PACKAGE_strongswan-mod-af-alg is not set
+# CONFIG_PACKAGE_strongswan-mod-agent is not set
+# CONFIG_PACKAGE_strongswan-mod-attr is not set
+# CONFIG_PACKAGE_strongswan-mod-attr-sql is not set
+# CONFIG_PACKAGE_strongswan-mod-blowfish is not set
+# CONFIG_PACKAGE_strongswan-mod-ccm is not set
+# CONFIG_PACKAGE_strongswan-mod-cmac is not set
+# CONFIG_PACKAGE_strongswan-mod-constraints is not set
+# CONFIG_PACKAGE_strongswan-mod-coupling is not set
+# CONFIG_PACKAGE_strongswan-mod-ctr is not set
+# CONFIG_PACKAGE_strongswan-mod-curl is not set
+# CONFIG_PACKAGE_strongswan-mod-des is not set
+# CONFIG_PACKAGE_strongswan-mod-dhcp is not set
+# CONFIG_PACKAGE_strongswan-mod-dnskey is not set
+# CONFIG_PACKAGE_strongswan-mod-duplicheck is not set
+# CONFIG_PACKAGE_strongswan-mod-eap-identity is not set
+# CONFIG_PACKAGE_strongswan-mod-eap-md5 is not set
+# CONFIG_PACKAGE_strongswan-mod-eap-mschapv2 is not set
+# CONFIG_PACKAGE_strongswan-mod-eap-radius is not set
+# CONFIG_PACKAGE_strongswan-mod-farp is not set
+# CONFIG_PACKAGE_strongswan-mod-fips-prf is not set
+# CONFIG_PACKAGE_strongswan-mod-gcm is not set
+# CONFIG_PACKAGE_strongswan-mod-gcrypt is not set
+# CONFIG_PACKAGE_strongswan-mod-gmp is not set
+# CONFIG_PACKAGE_strongswan-mod-ha is not set
+# CONFIG_PACKAGE_strongswan-mod-hmac is not set
+# CONFIG_PACKAGE_strongswan-mod-kernel-klips is not set
+# CONFIG_PACKAGE_strongswan-mod-kernel-libipsec is not set
+# CONFIG_PACKAGE_strongswan-mod-kernel-netlink is not set
+# CONFIG_PACKAGE_strongswan-mod-kernel-pfkey is not set
+# CONFIG_PACKAGE_strongswan-mod-ldap is not set
+# CONFIG_PACKAGE_strongswan-mod-led is not set
+# CONFIG_PACKAGE_strongswan-mod-load-tester is not set
+# CONFIG_PACKAGE_strongswan-mod-md4 is not set
+# CONFIG_PACKAGE_strongswan-mod-md5 is not set
+# CONFIG_PACKAGE_strongswan-mod-mysql is not set
+# CONFIG_PACKAGE_strongswan-mod-nonce is not set
+# CONFIG_PACKAGE_strongswan-mod-openssl is not set
+# CONFIG_PACKAGE_strongswan-mod-pem is not set
+# CONFIG_PACKAGE_strongswan-mod-pgp is not set
+# CONFIG_PACKAGE_strongswan-mod-pkcs1 is not set
+# CONFIG_PACKAGE_strongswan-mod-pkcs11 is not set
+# CONFIG_PACKAGE_strongswan-mod-pkcs8 is not set
+# CONFIG_PACKAGE_strongswan-mod-pubkey is not set
+# CONFIG_PACKAGE_strongswan-mod-random is not set
+# CONFIG_PACKAGE_strongswan-mod-resolve is not set
+# CONFIG_PACKAGE_strongswan-mod-revocation is not set
+# CONFIG_PACKAGE_strongswan-mod-sha1 is not set
+# CONFIG_PACKAGE_strongswan-mod-sha2 is not set
+# CONFIG_PACKAGE_strongswan-mod-smp is not set
+# CONFIG_PACKAGE_strongswan-mod-socket-default is not set
+# CONFIG_PACKAGE_strongswan-mod-socket-dynamic is not set
+# CONFIG_PACKAGE_strongswan-mod-sql is not set
+# CONFIG_PACKAGE_strongswan-mod-sqlite is not set
+# CONFIG_PACKAGE_strongswan-mod-stroke is not set
+# CONFIG_PACKAGE_strongswan-mod-test-vectors is not set
+# CONFIG_PACKAGE_strongswan-mod-uci is not set
+# CONFIG_PACKAGE_strongswan-mod-unity is not set
+# CONFIG_PACKAGE_strongswan-mod-updown is not set
+# CONFIG_PACKAGE_strongswan-mod-whitelist is not set
+# CONFIG_PACKAGE_strongswan-mod-x509 is not set
+# CONFIG_PACKAGE_strongswan-mod-xauth-eap is not set
+# CONFIG_PACKAGE_strongswan-mod-xauth-generic is not set
+# CONFIG_PACKAGE_strongswan-mod-xcbc is not set
+# CONFIG_PACKAGE_strongswan-utils is not set
+# CONFIG_PACKAGE_tinc is not set
+# CONFIG_PACKAGE_uanytun is not set
+# CONFIG_PACKAGE_uanytun-nocrypt is not set
+# CONFIG_PACKAGE_uanytun-sslcrypt is not set
+# CONFIG_PACKAGE_vpnc is not set
+# CONFIG_PACKAGE_vpnc-scripts is not set
+# CONFIG_PACKAGE_vpzone is not set
+CONFIG_PACKAGE_vtun=y
+
+#
+# Configuration
+#
+CONFIG_VTUN_LZO=y
+# CONFIG_VTUN_SSL is not set
+
+#
+# Version Control Systems
+#
+# CONFIG_PACKAGE_git is not set
+# CONFIG_PACKAGE_mercurial is not set
+# CONFIG_PACKAGE_subversion-libs is not set
+
+#
+# Web
+#
+# CONFIG_PACKAGE_bitcoin is not set
+# CONFIG_PACKAGE_gatling is not set
+# CONFIG_PACKAGE_links is not set
+# CONFIG_PACKAGE_netsurf is not set
+# CONFIG_PACKAGE_w3m is not set
+
+#
+# Web Servers/Proxies
+#
+# CONFIG_PACKAGE_apache is not set
+# CONFIG_PACKAGE_appweb is not set
+# CONFIG_PACKAGE_axhttpd is not set
+# CONFIG_PACKAGE_axtlswrap is not set
+# CONFIG_PACKAGE_crowdcontrol is not set
+# CONFIG_PACKAGE_dansguardian is not set
+# CONFIG_PACKAGE_haproxy is not set
+# CONFIG_PACKAGE_hiawatha is not set
+# CONFIG_PACKAGE_lighttpd is not set
+# CONFIG_PACKAGE_mini-httpd is not set
+# CONFIG_PACKAGE_mini-httpd-htpasswd is not set
+# CONFIG_PACKAGE_mini-httpd-matrixssl is not set
+# CONFIG_PACKAGE_mini-httpd-openssl is not set
+# CONFIG_PACKAGE_nginx is not set
+# CONFIG_PACKAGE_obfsproxy is not set
+# CONFIG_PACKAGE_pdnsd is not set
+# CONFIG_PACKAGE_pepsal is not set
+# CONFIG_PACKAGE_polipo is not set
+# CONFIG_PACKAGE_privoxy is not set
+# CONFIG_PACKAGE_seeks is not set
+# CONFIG_PACKAGE_sockd is not set
+# CONFIG_PACKAGE_socksify is not set
+# CONFIG_PACKAGE_spawn-fcgi is not set
+# CONFIG_PACKAGE_squid is not set
+# CONFIG_PACKAGE_srelay is not set
+# CONFIG_PACKAGE_tinyproxy is not set
+# CONFIG_PACKAGE_transocks is not set
+# CONFIG_PACKAGE_tsocks is not set
+# CONFIG_PACKAGE_uhttpd is not set
+# CONFIG_PACKAGE_uhttpd_debug is not set
+# CONFIG_PACKAGE_wccpd is not set
+
+#
+# ben-wpan
+#
+# CONFIG_PACKAGE_atrf-gpio is not set
+# CONFIG_PACKAGE_atrf-id is not set
+# CONFIG_PACKAGE_atrf-path is not set
+# CONFIG_PACKAGE_atrf-proxy is not set
+# CONFIG_PACKAGE_atrf-reset is not set
+# CONFIG_PACKAGE_atrf-rssi is not set
+# CONFIG_PACKAGE_atrf-trim is not set
+# CONFIG_PACKAGE_atrf-txrx is not set
+# CONFIG_PACKAGE_atrf-xmit is not set
+# CONFIG_PACKAGE_atrf-xtal is not set
+# CONFIG_PACKAGE_ben-wpan-doc is not set
+# CONFIG_PACKAGE_dirtpan is not set
+
+#
+# dial-in/up
+#
+# CONFIG_PACKAGE_rp-l2tpd is not set
+# CONFIG_PACKAGE_rp-pppoe-relay is not set
+# CONFIG_PACKAGE_rp-pppoe-server is not set
+# CONFIG_PACKAGE_rp-pppoe-sniff is not set
+
+#
+# firmware
+#
+# CONFIG_PACKAGE_speedtouch-usb-firmware is not set
+
+#
+# wireless
+#
+# CONFIG_PACKAGE_aircrack-ng is not set
+# CONFIG_PACKAGE_aircrack-ptw is not set
+# CONFIG_PACKAGE_airpwn is not set
+# CONFIG_PACKAGE_horst is not set
+# CONFIG_PACKAGE_karma is not set
+# CONFIG_PACKAGE_kismet-client is not set
+# CONFIG_PACKAGE_kismet-drone is not set
+# CONFIG_PACKAGE_kismet-server is not set
+# CONFIG_PACKAGE_mdk3 is not set
+# CONFIG_PACKAGE_reaver is not set
+# CONFIG_PACKAGE_snort-wireless is not set
+# CONFIG_PACKAGE_snort-wireless-mysql is not set
+# CONFIG_PACKAGE_snort-wireless-pgsql is not set
+# CONFIG_PACKAGE_wavemon is not set
+# CONFIG_PACKAGE_xsupplicant is not set
+# CONFIG_PACKAGE_aoetools is not set
+# CONFIG_PACKAGE_apf is not set
+# CONFIG_PACKAGE_aprx is not set
+# CONFIG_PACKAGE_arpd is not set
+# CONFIG_PACKAGE_arpwatch is not set
+# CONFIG_PACKAGE_bing is not set
+# CONFIG_PACKAGE_bmon is not set
+# CONFIG_PACKAGE_bwm is not set
+# CONFIG_PACKAGE_bwping is not set
+# CONFIG_PACKAGE_cdp-tools is not set
+# CONFIG_PACKAGE_cifsmount is not set
+# CONFIG_PACKAGE_climm is not set
+# CONFIG_PACKAGE_crashmail is not set
+# CONFIG_PACKAGE_crda is not set
+# CONFIG_PACKAGE_cups is not set
+# CONFIG_PACKAGE_daemonlogger is not set
+# CONFIG_PACKAGE_darkstat is not set
+# CONFIG_PACKAGE_ditg is not set
+# CONFIG_PACKAGE_dmapd is not set
+# CONFIG_PACKAGE_dns2tcp is not set
+# CONFIG_PACKAGE_dns2tcpd is not set
+# CONFIG_PACKAGE_dsl-qos-queue is not set
+# CONFIG_PACKAGE_e169-stats is not set
+# CONFIG_PACKAGE_elinks is not set
+# CONFIG_PACKAGE_etherwake is not set
+# CONFIG_PACKAGE_ethtool is not set
+# CONFIG_PACKAGE_ettercap is not set
+# CONFIG_PACKAGE_faifa is not set
+# CONFIG_PACKAGE_fakeidentd is not set
+# CONFIG_PACKAGE_flow-tools is not set
+# CONFIG_PACKAGE_fping is not set
+# CONFIG_PACKAGE_fprobe is not set
+# CONFIG_PACKAGE_fprobe-ulog is not set
+# CONFIG_PACKAGE_freeradius2 is not set
+# CONFIG_PACKAGE_genl is not set
+# CONFIG_PACKAGE_gpsd is not set
+# CONFIG_PACKAGE_gpsd-clients is not set
+# CONFIG_PACKAGE_hostapd is not set
+# CONFIG_PACKAGE_hostapd-mini is not set
+# CONFIG_PACKAGE_hostapd-utils is not set
+# CONFIG_PACKAGE_hpavcfg is not set
+# CONFIG_PACKAGE_hping3 is not set
+# CONFIG_PACKAGE_httping is not set
+# CONFIG_PACKAGE_httping-nossl is not set
+# CONFIG_PACKAGE_ifenslave is not set
+# CONFIG_PACKAGE_ifstat is not set
+# CONFIG_PACKAGE_iftop is not set
+# CONFIG_PACKAGE_ipcad is not set
+# CONFIG_PACKAGE_iperf is not set
+# CONFIG_PACKAGE_iperf-mt is not set
+# CONFIG_PACKAGE_ipset is not set
+# CONFIG_PACKAGE_iptraf is not set
+# CONFIG_PACKAGE_iputils-arping is not set
+# CONFIG_PACKAGE_iputils-clockdiff is not set
+# CONFIG_PACKAGE_iputils-ping is not set
+# CONFIG_PACKAGE_iputils-ping6 is not set
+# CONFIG_PACKAGE_iputils-tftpd is not set
+# CONFIG_PACKAGE_iputils-tracepath is not set
+# CONFIG_PACKAGE_iputils-tracepath6 is not set
+# CONFIG_PACKAGE_iputils-traceroute6 is not set
+CONFIG_PACKAGE_iw=y
+# CONFIG_PACKAGE_jtg is not set
+# CONFIG_PACKAGE_keepalived is not set
+# CONFIG_PACKAGE_keynote is not set
+# CONFIG_PACKAGE_krb5-client is not set
+# CONFIG_PACKAGE_krb5-libs is not set
+# CONFIG_PACKAGE_krb5-server is not set
+# CONFIG_PACKAGE_l2tpv3tun is not set
+# CONFIG_PACKAGE_lft is not set
+# CONFIG_PACKAGE_lispd is not set
+# CONFIG_PACKAGE_lowpan-tools is not set
+# CONFIG_PACKAGE_lsm is not set
+# CONFIG_PACKAGE_lynx is not set
+# CONFIG_PACKAGE_m-route is not set
+# CONFIG_PACKAGE_mac-to-devinfo is not set
+# CONFIG_PACKAGE_madwimax is not set
+# CONFIG_PACKAGE_mcabber is not set
+# CONFIG_PACKAGE_memcached is not set
+# CONFIG_PACKAGE_mgen is not set
+# CONFIG_PACKAGE_mii-tool is not set
+# CONFIG_PACKAGE_mini-snmpd is not set
+# CONFIG_PACKAGE_mosquitto is not set
+# CONFIG_PACKAGE_mosquitto-client is not set
+# CONFIG_PACKAGE_mrtg is not set
+# CONFIG_PACKAGE_mtr is not set
+# CONFIG_PACKAGE_multiwan is not set
+# CONFIG_PACKAGE_mvprelay is not set
+# CONFIG_PACKAGE_nbd is not set
+# CONFIG_PACKAGE_nbtscan is not set
+# CONFIG_PACKAGE_net-tools-arp is not set
+# CONFIG_PACKAGE_net-tools-hostname is not set
+# CONFIG_PACKAGE_net-tools-ifconfig is not set
+# CONFIG_PACKAGE_net-tools-ipmaddr is not set
+# CONFIG_PACKAGE_net-tools-iptunnel is not set
+# CONFIG_PACKAGE_net-tools-mii-tool is not set
+# CONFIG_PACKAGE_net-tools-nameif is not set
+# CONFIG_PACKAGE_net-tools-netstat is not set
+# CONFIG_PACKAGE_net-tools-plipconfig is not set
+# CONFIG_PACKAGE_net-tools-rarp is not set
+# CONFIG_PACKAGE_net-tools-slattach is not set
+# CONFIG_PACKAGE_netcat is not set
+# CONFIG_PACKAGE_netdiscover is not set
+# CONFIG_PACKAGE_netio is not set
+# CONFIG_PACKAGE_netperf is not set
+# CONFIG_PACKAGE_netpipe is not set
+# CONFIG_PACKAGE_netstat-nat is not set
+# CONFIG_PACKAGE_ngrep is not set
+# CONFIG_PACKAGE_noping is not set
+# CONFIG_PACKAGE_nuttcp is not set
+# CONFIG_PACKAGE_nuttcp-xinetd is not set
+# CONFIG_PACKAGE_oidentd is not set
+# CONFIG_PACKAGE_openldap-server is not set
+# CONFIG_PACKAGE_openrrcp is not set
+# CONFIG_PACKAGE_openslp is not set
+# CONFIG_PACKAGE_oping is not set
+# CONFIG_PACKAGE_p910nd is not set
+# CONFIG_PACKAGE_paris-traceroute is not set
+# CONFIG_PACKAGE_peervpn is not set
+# CONFIG_PACKAGE_pen is not set
+# CONFIG_PACKAGE_portmap is not set
+# CONFIG_PACKAGE_ppp is not set
+# CONFIG_PACKAGE_ppp-multilink is not set
+# CONFIG_PACKAGE_pyload is not set
+# CONFIG_PACKAGE_pyrit is not set
+# CONFIG_PACKAGE_qolyester is not set
+# CONFIG_PACKAGE_raddump is not set
+# CONFIG_PACKAGE_radiusclient-ng is not set
+# CONFIG_PACKAGE_radsecproxy is not set
+# CONFIG_PACKAGE_rrs is not set
+# CONFIG_PACKAGE_rrs-nossl is not set
+# CONFIG_PACKAGE_rssileds is not set
+# CONFIG_PACKAGE_samba36-client is not set
+# CONFIG_PACKAGE_samba36-server is not set
+# CONFIG_PACKAGE_scdp is not set
+# CONFIG_PACKAGE_sctp is not set
+# CONFIG_PACKAGE_ser2net is not set
+# CONFIG_PACKAGE_serialoverip is not set
+# CONFIG_PACKAGE_shat is not set
+# CONFIG_PACKAGE_slurm is not set
+# CONFIG_PACKAGE_smtptrapd is not set
+# CONFIG_PACKAGE_snmp-utils is not set
+# CONFIG_PACKAGE_snmpd is not set
+# CONFIG_PACKAGE_snmpd-static is not set
+# CONFIG_PACKAGE_socat is not set
+# CONFIG_PACKAGE_softflowd is not set
+# CONFIG_PACKAGE_soloscli is not set
+# CONFIG_PACKAGE_ss is not set
+# CONFIG_PACKAGE_sscep is not set
+# CONFIG_PACKAGE_sslcat is not set
+# CONFIG_PACKAGE_sslsniff is not set
+# CONFIG_PACKAGE_sslstrip is not set
+# CONFIG_PACKAGE_stun-client is not set
+# CONFIG_PACKAGE_stund is not set
+# CONFIG_PACKAGE_stunnel is not set
+# CONFIG_PACKAGE_surfraw is not set
+# CONFIG_PACKAGE_synce-dccm is not set
+CONFIG_PACKAGE_tc=y
+# CONFIG_PACKAGE_tcpdump is not set
+# CONFIG_PACKAGE_tcpdump-mini is not set
+# CONFIG_PACKAGE_tcptraceroute is not set
+# CONFIG_PACKAGE_tctool is not set
+# CONFIG_PACKAGE_tor is not set
+# CONFIG_PACKAGE_tor-alpha is not set
+# CONFIG_PACKAGE_tor-alpha-fw-helper is not set
+# CONFIG_PACKAGE_tor-alpha-geoip is not set
+# CONFIG_PACKAGE_tor-geoip is not set
+# CONFIG_PACKAGE_ttcp is not set
+# CONFIG_PACKAGE_ucarp is not set
+# CONFIG_PACKAGE_ucspi-tcp is not set
+# CONFIG_PACKAGE_udpcast is not set
+# CONFIG_PACKAGE_udpxy is not set
+# CONFIG_PACKAGE_ulogd is not set
+# CONFIG_PACKAGE_uob-nomad is not set
+# CONFIG_PACKAGE_usbip is not set
+# CONFIG_PACKAGE_vblade is not set
+# CONFIG_PACKAGE_veth is not set
+# CONFIG_PACKAGE_vgp is not set
+# CONFIG_PACKAGE_vnc-reflector is not set
+# CONFIG_PACKAGE_vncrepeater is not set
+# CONFIG_PACKAGE_vnstat is not set
+# CONFIG_PACKAGE_vsc7385-ucode-ap83 is not set
+# CONFIG_PACKAGE_vsc7385-ucode-pb44 is not set
+# CONFIG_PACKAGE_vsc7395-ucode-ap83 is not set
+# CONFIG_PACKAGE_vsc7395-ucode-pb44 is not set
+# CONFIG_PACKAGE_wdiag is not set
+# CONFIG_PACKAGE_whob is not set
+# CONFIG_PACKAGE_wiviz is not set
+# CONFIG_PACKAGE_wol is not set
+# CONFIG_PACKAGE_wpa-cli is not set
+# CONFIG_PACKAGE_wpa-supplicant is not set
+# CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK is not set
+# CONFIG_WPA_RFKILL_SUPPORT is not set
+CONFIG_WPA_MSG_MIN_PRIORITY=3
+# CONFIG_DRIVER_WEXT_SUPPORT is not set
+CONFIG_DRIVER_11N_SUPPORT=y
+# CONFIG_PACKAGE_wpa-supplicant-mini is not set
+# CONFIG_PACKAGE_wpa-supplicant-p2p is not set
+# CONFIG_PACKAGE_wpad is not set
+CONFIG_PACKAGE_wpad-mini=y
+# CONFIG_PACKAGE_wprobe-export is not set
+# CONFIG_PACKAGE_wprobe-util is not set
+# CONFIG_PACKAGE_wshaper is not set
+# CONFIG_PACKAGE_xinetd is not set
+
+#
+# Games
+#
+
+#
+# bsd-games
+#
+# CONFIG_PACKAGE_backgammon is not set
+# CONFIG_PACKAGE_primes is not set
+# CONFIG_PACKAGE_tetris is not set
+# CONFIG_PACKAGE_worm is not set
+# CONFIG_PACKAGE_Tile is not set
+# CONFIG_PACKAGE_alex4 is not set
+# CONFIG_PACKAGE_alex4-data is not set
+# CONFIG_PACKAGE_brainless is not set
+# CONFIG_PACKAGE_dega is not set
+# CONFIG_PACKAGE_dopewars is not set
+# CONFIG_PACKAGE_freedroid is not set
+# CONFIG_PACKAGE_frotz-games is not set
+# CONFIG_PACKAGE_gnuchess is not set
+# CONFIG_PACKAGE_gottet is not set
+# CONFIG_PACKAGE_gtypist is not set
+# CONFIG_PACKAGE_libphysfs is not set
+# CONFIG_PACKAGE_nethack is not set
+# CONFIG_PACKAGE_pmars is not set
+# CONFIG_PACKAGE_qball is not set
+# CONFIG_PACKAGE_supertux is not set
+# CONFIG_PACKAGE_tic-tac-toe is not set
+# CONFIG_PACKAGE_vitetris is not set
+
+#
+# Multimedia
+#
+
+#
+# Streaming
+#
+# CONFIG_PACKAGE_darkice is not set
+# CONFIG_PACKAGE_GraphicsMagick is not set
+# CONFIG_PACKAGE_GraphicsMagick-jpeg is not set
+# CONFIG_PACKAGE_MPlayer is not set
+# CONFIG_PACKAGE_bard is not set
+# CONFIG_PACKAGE_crtmpserver is not set
+# CONFIG_PACKAGE_ffmpeg is not set
+# CONFIG_PACKAGE_ffprobe is not set
+# CONFIG_PACKAGE_ffserver is not set
+# CONFIG_PACKAGE_fswebcam is not set
+# CONFIG_PACKAGE_ftpd-topfield is not set
+# CONFIG_PACKAGE_gmediaserver is not set
+# CONFIG_PACKAGE_gmu is not set
+# CONFIG_PACKAGE_gphoto2 is not set
+# CONFIG_PACKAGE_gst-ffmpeg is not set
+# CONFIG_PACKAGE_gst-mod-adpcmdec is not set
+# CONFIG_PACKAGE_gst-mod-adpcmenc is not set
+# CONFIG_PACKAGE_gst-mod-aiff is not set
+# CONFIG_PACKAGE_gst-mod-alsa is not set
+# CONFIG_PACKAGE_gst-mod-app is not set
+# CONFIG_PACKAGE_gst-mod-asf is not set
+# CONFIG_PACKAGE_gst-mod-asfmux is not set
+# CONFIG_PACKAGE_gst-mod-audioconvert is not set
+# CONFIG_PACKAGE_gst-mod-audiofx is not set
+# CONFIG_PACKAGE_gst-mod-audioparsersbad is not set
+# CONFIG_PACKAGE_gst-mod-audiorate is not set
+# CONFIG_PACKAGE_gst-mod-audioresample is not set
+# CONFIG_PACKAGE_gst-mod-audiotestsrc is not set
+# CONFIG_PACKAGE_gst-mod-autoconvert is not set
+# CONFIG_PACKAGE_gst-mod-autodetect is not set
+# CONFIG_PACKAGE_gst-mod-bayer is not set
+# CONFIG_PACKAGE_gst-mod-camerabin is not set
+# CONFIG_PACKAGE_gst-mod-cdxaparse is not set
+# CONFIG_PACKAGE_gst-mod-cutter is not set
+# CONFIG_PACKAGE_gst-mod-dataurisrc is not set
+# CONFIG_PACKAGE_gst-mod-dccp is not set
+# CONFIG_PACKAGE_gst-mod-debug is not set
+# CONFIG_PACKAGE_gst-mod-debugutilsbad is not set
+# CONFIG_PACKAGE_gst-mod-decodebin is not set
+# CONFIG_PACKAGE_gst-mod-decodebin2 is not set
+# CONFIG_PACKAGE_gst-mod-dtmf is not set
+# CONFIG_PACKAGE_gst-mod-dvdspu is not set
+# CONFIG_PACKAGE_gst-mod-equalizer is not set
+# CONFIG_PACKAGE_gst-mod-festival is not set
+# CONFIG_PACKAGE_gst-mod-flac is not set
+# CONFIG_PACKAGE_gst-mod-freeze is not set
+# CONFIG_PACKAGE_gst-mod-frei0r is not set
+# CONFIG_PACKAGE_gst-mod-gio is not set
+# CONFIG_PACKAGE_gst-mod-h264parse is not set
+# CONFIG_PACKAGE_gst-mod-hdvparse is not set
+# CONFIG_PACKAGE_gst-mod-icydemux is not set
+# CONFIG_PACKAGE_gst-mod-id3demux is not set
+# CONFIG_PACKAGE_gst-mod-id3tag is not set
+# CONFIG_PACKAGE_gst-mod-interleave is not set
+# CONFIG_PACKAGE_gst-mod-invtelecine is not set
+# CONFIG_PACKAGE_gst-mod-jpegformat is not set
+# CONFIG_PACKAGE_gst-mod-lame is not set
+# CONFIG_PACKAGE_gst-mod-legacyresample is not set
+# CONFIG_PACKAGE_gst-mod-level is not set
+# CONFIG_PACKAGE_gst-mod-liveadder is not set
+# CONFIG_PACKAGE_gst-mod-mad is not set
+# CONFIG_PACKAGE_gst-mod-mms is not set
+# CONFIG_PACKAGE_gst-mod-mpeg2dec is not set
+# CONFIG_PACKAGE_gst-mod-mpeg4videoparse is not set
+# CONFIG_PACKAGE_gst-mod-mpegdemux is not set
+# CONFIG_PACKAGE_gst-mod-mpegpsmux is not set
+# CONFIG_PACKAGE_gst-mod-mpegtsmux is not set
+# CONFIG_PACKAGE_gst-mod-mpegvideoparse is not set
+# CONFIG_PACKAGE_gst-mod-multifile is not set
+# CONFIG_PACKAGE_gst-mod-multipart is not set
+# CONFIG_PACKAGE_gst-mod-mve is not set
+# CONFIG_PACKAGE_gst-mod-mxf is not set
+# CONFIG_PACKAGE_gst-mod-nsf is not set
+# CONFIG_PACKAGE_gst-mod-nuvdemux is not set
+# CONFIG_PACKAGE_gst-mod-ogg is not set
+# CONFIG_PACKAGE_gst-mod-ossaudio is not set
+# CONFIG_PACKAGE_gst-mod-pcapparse is not set
+# CONFIG_PACKAGE_gst-mod-playbin is not set
+# CONFIG_PACKAGE_gst-mod-pnm is not set
+# CONFIG_PACKAGE_gst-mod-qtmux is not set
+# CONFIG_PACKAGE_gst-mod-rawparse is not set
+# CONFIG_PACKAGE_gst-mod-replaygain is not set
+# CONFIG_PACKAGE_gst-mod-rtp is not set
+# CONFIG_PACKAGE_gst-mod-rtpmux is not set
+# CONFIG_PACKAGE_gst-mod-rtsp is not set
+# CONFIG_PACKAGE_gst-mod-scaletempoplugin is not set
+# CONFIG_PACKAGE_gst-mod-sdpelem is not set
+# CONFIG_PACKAGE_gst-mod-segmentclip is not set
+# CONFIG_PACKAGE_gst-mod-selector is not set
+# CONFIG_PACKAGE_gst-mod-siren is not set
+# CONFIG_PACKAGE_gst-mod-souphttpsrc is not set
+# CONFIG_PACKAGE_gst-mod-spectrum is not set
+# CONFIG_PACKAGE_gst-mod-speed is not set
+# CONFIG_PACKAGE_gst-mod-stereo is not set
+# CONFIG_PACKAGE_gst-mod-subenc is not set
+# CONFIG_PACKAGE_gst-mod-tcp is not set
+# CONFIG_PACKAGE_gst-mod-theora is not set
+# CONFIG_PACKAGE_gst-mod-tta is not set
+# CONFIG_PACKAGE_gst-mod-typefindfunctions is not set
+# CONFIG_PACKAGE_gst-mod-udp is not set
+# CONFIG_PACKAGE_gst-mod-valve is not set
+# CONFIG_PACKAGE_gst-mod-videomeasure is not set
+# CONFIG_PACKAGE_gst-mod-videosignal is not set
+# CONFIG_PACKAGE_gst-mod-videotestsrc is not set
+# CONFIG_PACKAGE_gst-mod-vmnc is not set
+# CONFIG_PACKAGE_gst-mod-volume is not set
+# CONFIG_PACKAGE_gst-mod-vorbis is not set
+# CONFIG_PACKAGE_gst-mod-wavenc is not set
+# CONFIG_PACKAGE_gst-mod-wavparse is not set
+# CONFIG_PACKAGE_gst-plugins-bad is not set
+# CONFIG_PACKAGE_gst-plugins-base is not set
+# CONFIG_PACKAGE_gst-plugins-good is not set
+# CONFIG_PACKAGE_gst-plugins-ugly is not set
+# CONFIG_PACKAGE_gstreamer is not set
+# CONFIG_PACKAGE_gstreamer-utils is not set
+# CONFIG_PACKAGE_hasciicam is not set
+# CONFIG_PACKAGE_icecast is not set
+# CONFIG_PACKAGE_imagemagick is not set
+# CONFIG_PACKAGE_imagemagick-jpeg is not set
+# CONFIG_PACKAGE_imagemagick-png is not set
+# CONFIG_PACKAGE_imagemagick-tiff is not set
+# CONFIG_PACKAGE_imagemagick-tools is not set
+# CONFIG_PACKAGE_kissdx is not set
+# CONFIG_PACKAGE_libgstapp is not set
+# CONFIG_PACKAGE_libgstaudio is not set
+# CONFIG_PACKAGE_libgstcdda is not set
+# CONFIG_PACKAGE_libgstcheck is not set
+# CONFIG_PACKAGE_libgstcontroller is not set
+# CONFIG_PACKAGE_libgstdataprotocol is not set
+# CONFIG_PACKAGE_libgstfft is not set
+# CONFIG_PACKAGE_libgstinterfaces is not set
+# CONFIG_PACKAGE_libgstnet is not set
+# CONFIG_PACKAGE_libgstnetbuffer is not set
+# CONFIG_PACKAGE_libgstpbutils is not set
+# CONFIG_PACKAGE_libgstphotography is not set
+# CONFIG_PACKAGE_libgstreamer is not set
+# CONFIG_PACKAGE_libgstriff is not set
+# CONFIG_PACKAGE_libgstrtp is not set
+# CONFIG_PACKAGE_libgstrtsp is not set
+# CONFIG_PACKAGE_libgstsdp is not set
+# CONFIG_PACKAGE_libgsttag is not set
+# CONFIG_PACKAGE_libgstvideo is not set
+# CONFIG_PACKAGE_mjpg-streamer is not set
+# CONFIG_PACKAGE_motion is not set
+# CONFIG_PACKAGE_mplayer_jz47xx is not set
+# CONFIG_PACKAGE_peercast is not set
+# CONFIG_PACKAGE_puppy is not set
+# CONFIG_PACKAGE_streamripper is not set
+# CONFIG_PACKAGE_vips is not set
+
+#
+# Utilities
+#
+
+#
+# Boot Loaders
+#
+
+#
+# CPU tools
+#
+# CONFIG_PACKAGE_msr-tools is not set
+
+#
+# Editors
+#
+# CONFIG_PACKAGE_joe is not set
+# CONFIG_PACKAGE_joe-full is not set
+# CONFIG_PACKAGE_mg is not set
+# CONFIG_PACKAGE_nano is not set
+# CONFIG_PACKAGE_ne is not set
+# CONFIG_PACKAGE_vim is not set
+# CONFIG_PACKAGE_vim-full is not set
+# CONFIG_PACKAGE_vim-help is not set
+# CONFIG_PACKAGE_vim-runtime is not set
+# CONFIG_PACKAGE_wordgrinder is not set
+# CONFIG_PACKAGE_zile is not set
+
+#
+# Emacs
+#
+# CONFIG_PACKAGE_emacs is not set
+# CONFIG_PACKAGE_emacs-data is not set
+# CONFIG_PACKAGE_emacs-el is not set
+# CONFIG_PACKAGE_emacs-ja-dic is not set
+# CONFIG_PACKAGE_emacs-ja-dic-m is not set
+
+#
+# Filesystem
+#
+# CONFIG_PACKAGE_badblocks is not set
+# CONFIG_PACKAGE_btrfs-progs is not set
+# CONFIG_PACKAGE_disktype is not set
+# CONFIG_PACKAGE_dosfsck is not set
+# CONFIG_PACKAGE_dosfslabel is not set
+# CONFIG_PACKAGE_e2fsprogs is not set
+# CONFIG_PACKAGE_fuse-utils is not set
+# CONFIG_PACKAGE_mkdosfs is not set
+# CONFIG_PACKAGE_nfs-utils is not set
+# CONFIG_PACKAGE_ntfs-3g is not set
+# CONFIG_PACKAGE_ntfs-3g-low is not set
+# CONFIG_PACKAGE_ntfs-3g-utils is not set
+# CONFIG_PACKAGE_ntfsprogs is not set
+# CONFIG_PACKAGE_ntfsprogs_ntfs-3g is not set
+# CONFIG_PACKAGE_owfs is not set
+# CONFIG_PACKAGE_owshell is not set
+# CONFIG_PACKAGE_reiserfsprogs is not set
+# CONFIG_PACKAGE_resize2fs is not set
+# CONFIG_PACKAGE_sysfsutils is not set
+# CONFIG_PACKAGE_tune2fs is not set
+
+#
+# SSL
+#
+# CONFIG_PACKAGE_certtool is not set
+# CONFIG_PACKAGE_gnutls-utils is not set
+# CONFIG_PACKAGE_polarssl-progs is not set
+
+#
+# Sound
+#
+# CONFIG_PACKAGE_liblo-utils is not set
+
+#
+# Terminal
+#
+# CONFIG_PACKAGE_agetty is not set
+# CONFIG_PACKAGE_ben-cyrillic is not set
+# CONFIG_PACKAGE_fbsize is not set
+# CONFIG_PACKAGE_fbterm is not set
+# CONFIG_PACKAGE_jfbterm is not set
+# CONFIG_PACKAGE_microcom is not set
+# CONFIG_PACKAGE_minicom is not set
+# CONFIG_PACKAGE_nanoterm is not set
+# CONFIG_PACKAGE_picocom is not set
+# CONFIG_PACKAGE_script-utils is not set
+# CONFIG_PACKAGE_setserial is not set
+# CONFIG_PACKAGE_setterm is not set
+# CONFIG_PACKAGE_wall is not set
+
+#
+# backup
+#
+# CONFIG_PACKAGE_boxbackup is not set
+# CONFIG_PACKAGE_rdiff-backup is not set
+
+#
+# compression
+#
+# CONFIG_PACKAGE_libzip-utils is not set
+# CONFIG_PACKAGE_unrar is not set
+# CONFIG_PACKAGE_unzip is not set
+# CONFIG_PACKAGE_zip is not set
+
+#
+# database
+#
+# CONFIG_PACKAGE_mysql-server is not set
+# CONFIG_PACKAGE_pgsql-cli is not set
+# CONFIG_PACKAGE_pgsql-server is not set
+# CONFIG_PACKAGE_sqlite2-cli is not set
+# CONFIG_PACKAGE_sqlite3-cli is not set
+# CONFIG_PACKAGE_unixodbc-tools is not set
+
+#
+# disc
+#
+# CONFIG_PACKAGE_blkid is not set
+# CONFIG_PACKAGE_cfdisk is not set
+# CONFIG_PACKAGE_devio is not set
+# CONFIG_PACKAGE_fdisk is not set
+# CONFIG_PACKAGE_findfs is not set
+# CONFIG_PACKAGE_hd-idle is not set
+# CONFIG_PACKAGE_hdparm is not set
+# CONFIG_PACKAGE_lsblk is not set
+# CONFIG_PACKAGE_lvm2 is not set
+# CONFIG_PACKAGE_partx-utils is not set
+# CONFIG_PACKAGE_sdparm is not set
+# CONFIG_PACKAGE_sfdisk is not set
+# CONFIG_PACKAGE_swap-utils is not set
+# CONFIG_PACKAGE_wipefs is not set
+
+#
+# fbida
+#
+# CONFIG_PACKAGE_fbi is not set
+
+#
+# filemanager
+#
+# CONFIG_PACKAGE_deco is not set
+# CONFIG_PACKAGE_mc is not set
+
+#
+# zoneinfo
+#
+# CONFIG_PACKAGE_zoneinfo-africa is not set
+# CONFIG_PACKAGE_zoneinfo-asia is not set
+# CONFIG_PACKAGE_zoneinfo-atlantic is not set
+# CONFIG_PACKAGE_zoneinfo-australia-nz is not set
+# CONFIG_PACKAGE_zoneinfo-core is not set
+# CONFIG_PACKAGE_zoneinfo-europe is not set
+# CONFIG_PACKAGE_zoneinfo-india is not set
+# CONFIG_PACKAGE_zoneinfo-middleeast is not set
+# CONFIG_PACKAGE_zoneinfo-northamerica is not set
+# CONFIG_PACKAGE_zoneinfo-pacific is not set
+# CONFIG_PACKAGE_zoneinfo-poles is not set
+# CONFIG_PACKAGE_zoneinfo-simple is not set
+# CONFIG_PACKAGE_zoneinfo-southamerica is not set
+# CONFIG_PACKAGE_NanoMap is not set
+# CONFIG_PACKAGE_NanoMap-maps is not set
+# CONFIG_PACKAGE_abook is not set
+# CONFIG_PACKAGE_aewan is not set
+# CONFIG_PACKAGE_alfilesel is not set
+# CONFIG_PACKAGE_alsa-utils is not set
+# CONFIG_PACKAGE_alsa-utils-seq is not set
+# CONFIG_PACKAGE_alsa-utils-tests is not set
+# CONFIG_PACKAGE_anyremote is not set
+# CONFIG_PACKAGE_ap51-flash is not set
+# CONFIG_PACKAGE_apcupsd is not set
+# CONFIG_PACKAGE_ase is not set
+# CONFIG_PACKAGE_at is not set
+# CONFIG_PACKAGE_avrdude is not set
+# CONFIG_PACKAGE_avrusbboot is not set
+# CONFIG_PACKAGE_bandwidthd is not set
+CONFIG_PACKAGE_bash=y
+# CONFIG_PACKAGE_bash-completion is not set
+# CONFIG_PACKAGE_bc is not set
+# CONFIG_PACKAGE_binkd is not set
+# CONFIG_PACKAGE_bluelog is not set
+# CONFIG_PACKAGE_bluez-hcidump is not set
+# CONFIG_PACKAGE_bluez-utils is not set
+# CONFIG_PACKAGE_boblight-client is not set
+# CONFIG_PACKAGE_boblight-daemon is not set
+# CONFIG_PACKAGE_bonnie is not set
+# CONFIG_PACKAGE_bonniexx is not set
+# CONFIG_PACKAGE_bsdiff is not set
+# CONFIG_PACKAGE_bwbasic is not set
+# CONFIG_PACKAGE_byobu is not set
+# CONFIG_PACKAGE_bzip2 is not set
+# CONFIG_PACKAGE_cal is not set
+# CONFIG_PACKAGE_calcurse is not set
+# CONFIG_PACKAGE_calvaria is not set
+# CONFIG_PACKAGE_catdoc is not set
+# CONFIG_PACKAGE_ccrypt is not set
+# CONFIG_PACKAGE_cdparanoia is not set
+# CONFIG_PACKAGE_cgminer is not set
+# CONFIG_PACKAGE_cksfv is not set
+# CONFIG_PACKAGE_clish is not set
+# CONFIG_PACKAGE_cmdpad is not set
+# CONFIG_PACKAGE_collectd is not set
+# CONFIG_PACKAGE_coreutils is not set
+# CONFIG_PACKAGE_cpusage is not set
+# CONFIG_PACKAGE_crypto-tools is not set
+# CONFIG_PACKAGE_cryptsetup is not set
+# CONFIG_PACKAGE_cscope is not set
+# CONFIG_PACKAGE_ctronome is not set
+# CONFIG_PACKAGE_curveship is not set
+# CONFIG_PACKAGE_cxxtools is not set
+# CONFIG_PACKAGE_daemontools is not set
+# CONFIG_PACKAGE_dbus is not set
+# CONFIG_PACKAGE_devmem2 is not set
+# CONFIG_PACKAGE_dfu-util is not set
+# CONFIG_PACKAGE_dialog is not set
+# CONFIG_PACKAGE_digitemp is not set
+# CONFIG_PACKAGE_digitemp-usb is not set
+# CONFIG_PACKAGE_dir300-flash is not set
+# CONFIG_PACKAGE_directvnc is not set
+# CONFIG_PACKAGE_dmesg is not set
+# CONFIG_PACKAGE_dropbearconvert is not set
+# CONFIG_PACKAGE_dstat is not set
+# CONFIG_PACKAGE_dt is not set
+# CONFIG_PACKAGE_dtach is not set
+# CONFIG_PACKAGE_empty is not set
+# CONFIG_PACKAGE_event_test is not set
+# CONFIG_PACKAGE_fancontroled is not set
+# CONFIG_PACKAGE_fbgrab is not set
+# CONFIG_PACKAGE_fconfig is not set
+# CONFIG_PACKAGE_file is not set
+# CONFIG_PACKAGE_firmwarehotplug is not set
+# CONFIG_PACKAGE_flock is not set
+# CONFIG_PACKAGE_fortune-mod is not set
+# CONFIG_PACKAGE_fowsr is not set
+# CONFIG_PACKAGE_fpgatools is not set
+# CONFIG_PACKAGE_freecwmp-curl is not set
+# CONFIG_PACKAGE_freecwmp-zstream is not set
+# CONFIG_PACKAGE_fxload is not set
+# CONFIG_PACKAGE_gawk is not set
+# CONFIG_PACKAGE_gcal is not set
+# CONFIG_PACKAGE_gdb is not set
+# CONFIG_PACKAGE_gdbserver is not set
+# CONFIG_PACKAGE_getopt is not set
+# CONFIG_PACKAGE_gnokii is not set
+# CONFIG_PACKAGE_gnupg is not set
+# CONFIG_PACKAGE_gnuplot is not set
+# CONFIG_PACKAGE_gnuplot-gfx is not set
+# CONFIG_PACKAGE_gnuplot-gfx-gih is not set
+# CONFIG_PACKAGE_golded is not set
+# CONFIG_PACKAGE_gpioctl is not set
+# CONFIG_PACKAGE_gsm-utils is not set
+# CONFIG_PACKAGE_gtkguitune is not set
+# CONFIG_PACKAGE_gzip is not set
+# CONFIG_PACKAGE_haserl is not set
+# CONFIG_PACKAGE_haveged is not set
+# CONFIG_PACKAGE_heyu is not set
+# CONFIG_PACKAGE_hnb is not set
+# CONFIG_PACKAGE_hplip is not set
+# CONFIG_PACKAGE_huaweiaktbbo is not set
+# CONFIG_PACKAGE_husky is not set
+# CONFIG_PACKAGE_hwclock is not set
+# CONFIG_PACKAGE_i2c-tools is not set
+# CONFIG_PACKAGE_iconv is not set
+# CONFIG_PACKAGE_imgv is not set
+# CONFIG_PACKAGE_ink is not set
+# CONFIG_PACKAGE_input-utils is not set
+# CONFIG_PACKAGE_io is not set
+# CONFIG_PACKAGE_ipmitool is not set
+# CONFIG_PACKAGE_iwcap is not set
+# CONFIG_PACKAGE_iwinfo is not set
+# CONFIG_PACKAGE_jdkdrum is not set
+# CONFIG_PACKAGE_jpeg-tools is not set
+CONFIG_PACKAGE_jshn=y
+# CONFIG_PACKAGE_kbd is not set
+# CONFIG_PACKAGE_kbd-console-fonts is not set
+# CONFIG_PACKAGE_kbd-console-maps is not set
+# CONFIG_PACKAGE_kexec-tools is not set
+# CONFIG_PACKAGE_kexecboot is not set
+# CONFIG_PACKAGE_keymouse is not set
+# CONFIG_PACKAGE_klish is not set
+# CONFIG_PACKAGE_kmemtrace-user is not set
+# CONFIG_PACKAGE_ksymoops is not set
+# CONFIG_PACKAGE_lcd4linux-custom is not set
+# CONFIG_PACKAGE_lcd4linux-tew673gru is not set
+# CONFIG_PACKAGE_lcdproc is not set
+# CONFIG_PACKAGE_ldconfig is not set
+# CONFIG_PACKAGE_ldd is not set
+# CONFIG_PACKAGE_less is not set
+# CONFIG_PACKAGE_less-wide is not set
+# CONFIG_PACKAGE_libfreefare-examples is not set
+# CONFIG_PACKAGE_libimobiledevice-utils is not set
+# CONFIG_PACKAGE_libjson-script is not set
+# CONFIG_PACKAGE_libnfc-bin is not set
+# CONFIG_PACKAGE_libnfc-examples is not set
+# CONFIG_PACKAGE_libplist-utils is not set
+# CONFIG_PACKAGE_lingot is not set
+# CONFIG_PACKAGE_lirc is not set
+# CONFIG_PACKAGE_lm-sensors is not set
+# CONFIG_PACKAGE_lm-sensors-detect is not set
+# CONFIG_PACKAGE_lmbench is not set
+# CONFIG_PACKAGE_logger is not set
+# CONFIG_PACKAGE_logrotate is not set
+# CONFIG_PACKAGE_logtrigger is not set
+# CONFIG_PACKAGE_look is not set
+# CONFIG_PACKAGE_losetup is not set
+# CONFIG_PACKAGE_lrzsz is not set
+# CONFIG_PACKAGE_lsof is not set
+# CONFIG_PACKAGE_luit is not set
+# CONFIG_PACKAGE_maccalc is not set
+# CONFIG_PACKAGE_macchanger is not set
+# CONFIG_PACKAGE_man-tiny is not set
+# CONFIG_PACKAGE_mandoc is not set
+# CONFIG_PACKAGE_mathomatic is not set
+# CONFIG_PACKAGE_mbus-serial is not set
+# CONFIG_PACKAGE_mbus-tcp is not set
+# CONFIG_PACKAGE_mcookie is not set
+# CONFIG_PACKAGE_md5deep is not set
+# CONFIG_PACKAGE_mdadm is not set
+# CONFIG_PACKAGE_mediatomb is not set
+# CONFIG_PACKAGE_memtester is not set
+# CONFIG_PACKAGE_mgetty is not set
+# CONFIG_PACKAGE_mini-jtag is not set
+# CONFIG_PACKAGE_mount-utils is not set
+# CONFIG_PACKAGE_mountd is not set
+# CONFIG_PACKAGE_mpg123 is not set
+# CONFIG_PACKAGE_mtd-utils is not set
+# CONFIG_PACKAGE_mupdf-tools is not set
+# CONFIG_PACKAGE_namei is not set
+# CONFIG_PACKAGE_nanonote-base-files is not set
+# CONFIG_PACKAGE_nanonote-data-files is not set
+# CONFIG_PACKAGE_nanonote-example-files is not set
+# CONFIG_PACKAGE_nanonote-gmenu2x-icons is not set
+# CONFIG_PACKAGE_nprobe is not set
+# CONFIG_PACKAGE_nupdf is not set
+# CONFIG_PACKAGE_o3read is not set
+# CONFIG_PACKAGE_ocf-crypto-headers is not set
+# CONFIG_PACKAGE_odt2txt is not set
+# CONFIG_PACKAGE_open2300 is not set
+# CONFIG_PACKAGE_openldap-utils is not set
+# CONFIG_PACKAGE_openssl-util is not set
+# CONFIG_PACKAGE_owipcalc is not set
+# CONFIG_PACKAGE_oww is not set
+# CONFIG_PACKAGE_pciutils is not set
+# CONFIG_PACKAGE_pcscd is not set
+# CONFIG_PACKAGE_pem is not set
+# CONFIG_PACKAGE_picoc is not set
+# CONFIG_PACKAGE_pipacs is not set
+# CONFIG_PACKAGE_poke is not set
+# CONFIG_PACKAGE_powertop is not set
+# CONFIG_PACKAGE_procps is not set
+# CONFIG_PACKAGE_psmisc is not set
+# CONFIG_PACKAGE_psplash is not set
+# CONFIG_PACKAGE_pv is not set
+# CONFIG_PACKAGE_pwcrypt is not set
+# CONFIG_PACKAGE_pwgen is not set
+# CONFIG_PACKAGE_px5g is not set
+# CONFIG_PACKAGE_pyclock is not set
+# CONFIG_PACKAGE_qstardict is not set
+# CONFIG_PACKAGE_quickcalc is not set
+# CONFIG_PACKAGE_rbcfg is not set
+# CONFIG_PACKAGE_rcs is not set
+# CONFIG_PACKAGE_remind is not set
+# CONFIG_PACKAGE_rename is not set
+# CONFIG_PACKAGE_restorefactory is not set
+# CONFIG_PACKAGE_rng-tools is not set
+# CONFIG_PACKAGE_robocfg is not set
+# CONFIG_PACKAGE_robots is not set
+# CONFIG_PACKAGE_rrdcgi is not set
+# CONFIG_PACKAGE_rrdcgi1 is not set
+# CONFIG_PACKAGE_rrdcollect10 is not set
+# CONFIG_PACKAGE_rrdcollect12 is not set
+# CONFIG_PACKAGE_rrdtool is not set
+# CONFIG_PACKAGE_rrdtool1 is not set
+# CONFIG_PACKAGE_rsyncrypto is not set
+# CONFIG_PACKAGE_sane-backends is not set
+# CONFIG_PACKAGE_sane-frontends is not set
+# CONFIG_PACKAGE_sc is not set
+# CONFIG_PACKAGE_schedtool is not set
+# CONFIG_PACKAGE_scponly is not set
+# CONFIG_PACKAGE_screen is not set
+# CONFIG_PACKAGE_sdcv is not set
+# CONFIG_PACKAGE_sed is not set
+# CONFIG_PACKAGE_setfont2 is not set
+# CONFIG_PACKAGE_sg3-utils is not set
+# CONFIG_PACKAGE_shadow is not set
+# CONFIG_PACKAGE_shadow-common is not set
+# CONFIG_PACKAGE_shadow-groupadd is not set
+# CONFIG_PACKAGE_shadow-groupdel is not set
+# CONFIG_PACKAGE_shadow-groupmod is not set
+# CONFIG_PACKAGE_shadow-groups is not set
+# CONFIG_PACKAGE_shadow-passwd is not set
+# CONFIG_PACKAGE_shadow-su is not set
+# CONFIG_PACKAGE_shadow-useradd is not set
+# CONFIG_PACKAGE_shadow-userdel is not set
+# CONFIG_PACKAGE_shadow-usermod is not set
+# CONFIG_PACKAGE_sispmctl is not set
+# CONFIG_PACKAGE_smartd is not set
+# CONFIG_PACKAGE_smartmontools is not set
+# CONFIG_PACKAGE_snownews is not set
+# CONFIG_PACKAGE_spidev-test is not set
+# CONFIG_PACKAGE_ssldump is not set
+# CONFIG_PACKAGE_stardict is not set
+# CONFIG_PACKAGE_stardict-dic-en-cn is not set
+# CONFIG_PACKAGE_stardict-dic-en-en is not set
+# CONFIG_PACKAGE_stardict-dic-en-sp is not set
+# CONFIG_PACKAGE_strace is not set
+# CONFIG_PACKAGE_stress is not set
+# CONFIG_PACKAGE_sysstat is not set
+# CONFIG_PACKAGE_tar is not set
+# CONFIG_PACKAGE_taskwarrior is not set
+# CONFIG_PACKAGE_tcpser is not set
+# CONFIG_PACKAGE_tcsh is not set
+# CONFIG_PACKAGE_tempest-for-eliza is not set
+# CONFIG_PACKAGE_terminus-font is not set
+# CONFIG_PACKAGE_tesseract is not set
+# CONFIG_PACKAGE_tiff-utils is not set
+# CONFIG_PACKAGE_time is not set
+# CONFIG_PACKAGE_tmux is not set
+# CONFIG_PACKAGE_triggerhappy is not set
+# CONFIG_PACKAGE_tunec is not set
+# CONFIG_PACKAGE_txt2tags is not set
+# CONFIG_PACKAGE_ubbctl is not set
+# CONFIG_PACKAGE_uboot-envtools is not set
+# CONFIG_PACKAGE_unifont is not set
+# CONFIG_PACKAGE_units is not set
+# CONFIG_PACKAGE_upx is not set
+# CONFIG_PACKAGE_urjtag is not set
+# CONFIG_PACKAGE_usb-modeswitch is not set
+# CONFIG_PACKAGE_usbmuxd is not set
+# CONFIG_PACKAGE_usbreset is not set
+# CONFIG_PACKAGE_usbutils is not set
+# CONFIG_PACKAGE_uuidd is not set
+# CONFIG_PACKAGE_uuidgen is not set
+# CONFIG_PACKAGE_v4l-utils is not set
+# CONFIG_PACKAGE_valgrind is not set
+# CONFIG_PACKAGE_watchcat is not set
+# CONFIG_PACKAGE_wattsup is not set
+# CONFIG_PACKAGE_whereis is not set
+# CONFIG_PACKAGE_whiptail is not set
+# CONFIG_PACKAGE_wifitoggle is not set
+# CONFIG_PACKAGE_wminput is not set
+# CONFIG_PACKAGE_wtime is not set
+# CONFIG_PACKAGE_wview is not set
+# CONFIG_PACKAGE_wx200d is not set
+# CONFIG_PACKAGE_xburst-tools is not set
+# CONFIG_PACKAGE_xc3sprog is not set
+# CONFIG_PACKAGE_xdelta3 is not set
+# CONFIG_PACKAGE_xfs-fsck is not set
+# CONFIG_PACKAGE_xfs-growfs is not set
+# CONFIG_PACKAGE_xfs-mkfs is not set
+# CONFIG_PACKAGE_xsltproc is not set
+# CONFIG_PACKAGE_xxd is not set
+# CONFIG_PACKAGE_xz is not set
+# CONFIG_PACKAGE_zaptel14-util is not set
+# CONFIG_PACKAGE_zgv is not set
+# CONFIG_PACKAGE_zimreader is not set
+
+#
+# Extra packages
+#
+# CONFIG_PACKAGE_frotz is not set
+
+#
+# Emulators
+#
+
+#
+# Development
+#
+# CONFIG_PACKAGE_binutils is not set
+# CONFIG_PACKAGE_cppunit is not set
+# CONFIG_PACKAGE_diffutils is not set
+# CONFIG_PACKAGE_gcc-mips is not set
+# CONFIG_PACKAGE_hp48cc is not set
+# CONFIG_PACKAGE_libncurses-dev is not set
+# CONFIG_PACKAGE_libsdl-dev is not set
+# CONFIG_PACKAGE_make is not set
+# CONFIG_PACKAGE_objdump is not set
+# CONFIG_PACKAGE_patch is not set
+# CONFIG_PACKAGE_python-sip is not set
+# CONFIG_PACKAGE_tig is not set
+
+#
+# Sound
+#
+# CONFIG_PACKAGE_cmus is not set
+# CONFIG_PACKAGE_empcd is not set
+# CONFIG_PACKAGE_faad2 is not set
+# CONFIG_PACKAGE_flite is not set
+# CONFIG_PACKAGE_gjay is not set
+# CONFIG_PACKAGE_ices is not set
+# CONFIG_PACKAGE_lame is not set
+# CONFIG_PACKAGE_lame-lib is not set
+# CONFIG_PACKAGE_listener is not set
+# CONFIG_PACKAGE_madplay is not set
+# CONFIG_PACKAGE_mpc is not set
+# CONFIG_PACKAGE_mpd-mini is not set
+# CONFIG_PACKAGE_mpdas is not set
+# CONFIG_PACKAGE_mt-daapd is not set
+# CONFIG_PACKAGE_ncmpc is not set
+# CONFIG_PACKAGE_pianobar is not set
+# CONFIG_PACKAGE_pulseaudio-daemon is not set
+# CONFIG_PACKAGE_pulseaudio-daemon-avahi is not set
+# CONFIG_PACKAGE_scmpc is not set
+# CONFIG_PACKAGE_shell-fm is not set
+# CONFIG_PACKAGE_sox is not set
+
+#
+# Languages
+#
+
+#
+# Erlang
+#
+# CONFIG_PACKAGE_erlang is not set
+# CONFIG_PACKAGE_erlang-asn1 is not set
+# CONFIG_PACKAGE_erlang-compiler is not set
+# CONFIG_PACKAGE_erlang-crypto is not set
+# CONFIG_PACKAGE_erlang-hipe is not set
+# CONFIG_PACKAGE_erlang-inets is not set
+# CONFIG_PACKAGE_erlang-mnesia is not set
+# CONFIG_PACKAGE_erlang-runtime-tools is not set
+# CONFIG_PACKAGE_erlang-snmp is not set
+# CONFIG_PACKAGE_erlang-ssh is not set
+# CONFIG_PACKAGE_erlang-ssl is not set
+# CONFIG_PACKAGE_erlang-syntax-tools is not set
+
+#
+# Java
+#
+# CONFIG_PACKAGE_jamvm is not set
+
+#
+# JavaScript
+#
+# CONFIG_PACKAGE_js is not set
+
+#
+# Lojban
+#
+# CONFIG_PACKAGE_jbofihe is not set
+# CONFIG_PACKAGE_lojban-wordlists is not set
+# CONFIG_PACKAGE_makfa is not set
+
+#
+# Lua
+#
+CONFIG_PACKAGE_libiwinfo-lua=y
+# CONFIG_PACKAGE_lsqlite3 is not set
+CONFIG_PACKAGE_lua=y
+# CONFIG_PACKAGE_lua-examples is not set
+# CONFIG_PACKAGE_luac is not set
+# CONFIG_PACKAGE_luaexpat is not set
+# CONFIG_PACKAGE_luafilesystem is not set
+# CONFIG_PACKAGE_luaposix is not set
+# CONFIG_PACKAGE_luaprofiler is not set
+# CONFIG_PACKAGE_luasec is not set
+# CONFIG_PACKAGE_luasoap is not set
+# CONFIG_PACKAGE_luasocket is not set
+# CONFIG_PACKAGE_luasql-mysql is not set
+# CONFIG_PACKAGE_luasql-pgsql is not set
+# CONFIG_PACKAGE_luasql-sqlite3 is not set
+
+#
+# Octave
+#
+# CONFIG_PACKAGE_octave-data is not set
+
+#
+# PHP
+#
+# CONFIG_PACKAGE_php-pear is not set
+# CONFIG_PACKAGE_php4 is not set
+# CONFIG_PACKAGE_php5 is not set
+
+#
+# Perl
+#
+# CONFIG_PACKAGE_microperl is not set
+# CONFIG_PACKAGE_perl is not set
+
+#
+# Python
+#
+# CONFIG_PACKAGE_cython is not set
+# CONFIG_PACKAGE_dbus-python is not set
+# CONFIG_PACKAGE_distribute is not set
+# CONFIG_PACKAGE_gst-python is not set
+# CONFIG_PACKAGE_ipython is not set
+# CONFIG_PACKAGE_jsonpath is not set
+# CONFIG_PACKAGE_libyaml is not set
+# CONFIG_PACKAGE_logilab-astng is not set
+# CONFIG_PACKAGE_logilab-common is not set
+# CONFIG_PACKAGE_mako is not set
+# CONFIG_PACKAGE_pyclips is not set
+# CONFIG_PACKAGE_pygame is not set
+# CONFIG_PACKAGE_pyopenssl is not set
+# CONFIG_PACKAGE_pyrrd is not set
+# CONFIG_PACKAGE_pyserial is not set
+# CONFIG_PACKAGE_python is not set
+# CONFIG_PACKAGE_python-bluez is not set
+# CONFIG_PACKAGE_python-bzip2 is not set
+# CONFIG_PACKAGE_python-cjson is not set
+# CONFIG_PACKAGE_python-crypto is not set
+# CONFIG_PACKAGE_python-curl is not set
+# CONFIG_PACKAGE_python-cwiid is not set
+# CONFIG_PACKAGE_python-django is not set
+# CONFIG_PACKAGE_python-doc is not set
+# CONFIG_PACKAGE_python-eeml is not set
+# CONFIG_PACKAGE_python-egenix-mx is not set
+# CONFIG_PACKAGE_python-event is not set
+# CONFIG_PACKAGE_python-expat is not set
+# CONFIG_PACKAGE_python-flup is not set
+# CONFIG_PACKAGE_python-gdbm is not set
+# CONFIG_PACKAGE_python-gobject is not set
+# CONFIG_PACKAGE_python-gzip is not set
+# CONFIG_PACKAGE_python-ifconfig is not set
+# CONFIG_PACKAGE_python-imaging-library is not set
+# CONFIG_PACKAGE_python-json is not set
+# CONFIG_PACKAGE_python-kid is not set
+# CONFIG_PACKAGE_python-mimms is not set
+# CONFIG_PACKAGE_python-mini is not set
+# CONFIG_PACKAGE_python-mysql is not set
+# CONFIG_PACKAGE_python-ncurses is not set
+# CONFIG_PACKAGE_python-openssl is not set
+# CONFIG_PACKAGE_python-pcap is not set
+# CONFIG_PACKAGE_python-psycopg is not set
+# CONFIG_PACKAGE_python-pyosc is not set
+# CONFIG_PACKAGE_python-shutil is not set
+# CONFIG_PACKAGE_python-smbus is not set
+# CONFIG_PACKAGE_python-sqlite is not set
+# CONFIG_PACKAGE_python-sqlite3 is not set
+# CONFIG_PACKAGE_python-webpy is not set
+# CONFIG_PACKAGE_python-xapian is not set
+# CONFIG_PACKAGE_python-yapsnmp is not set
+# CONFIG_PACKAGE_python2-chardet is not set
+# CONFIG_PACKAGE_pyusb is not set
+# CONFIG_PACKAGE_pyxdg is not set
+# CONFIG_PACKAGE_pyyaml is not set
+# CONFIG_PACKAGE_simplejson is not set
+# CONFIG_PACKAGE_telepathy-python is not set
+# CONFIG_PACKAGE_twisted is not set
+# CONFIG_PACKAGE_zope-interface is not set
+
+#
+# Ruby
+#
+# CONFIG_PACKAGE_ruby is not set
+# CONFIG_PACKAGE_4th is not set
+# CONFIG_PACKAGE_alpy is not set
+# CONFIG_PACKAGE_alpy-examples is not set
+# CONFIG_PACKAGE_eggdrop is not set
+# CONFIG_PACKAGE_gforth is not set
+# CONFIG_PACKAGE_guile is not set
+# CONFIG_PACKAGE_guile2 is not set
+# CONFIG_PACKAGE_qemu-host is not set
+# CONFIG_PACKAGE_sigscheme is not set
+# CONFIG_PACKAGE_slsh is not set
+# CONFIG_PACKAGE_swig is not set
+# CONFIG_PACKAGE_tcl is not set
--- /dev/null
+ _______ ________ __
+ | |.-----.-----.-----.| | | |.----.| |_
+ | - || _ | -__| || | | || _|| _|
+ |_______|| __|_____|__|__||________||__| |____|
+ |__| W I R E L E S S F R E E D O M
+ -----------------------------------------------------
+ BARRIER BREAKER (Bleeding Edge, r37911)
+ -----------------------------------------------------
+ * 1/2 oz Galliano Pour all ingredients into
+ * 4 oz cold Coffee an irish coffee mug filled
+ * 1 1/2 oz Dark Rum with crushed ice. Stir.
+ * 2 tsp. Creme de Cacao
+ -----------------------------------------------------
--- /dev/null
+config server default
+ option master wan6
+ list network lan
+ option rd server
+ option dhcpv6 server
+ option fallback_relay 'rd dhcpv6 ndp'
+ option management_level 1
+ option compat_ula 1
+
+
+# Example #1: Create a relay for several networks in proxy mode
+# This can be used to proxy Router Discovery, DHCPv6 and NDP.
+
+#config server examplerelay
+# option master 'wan'
+# option network 'lan'
+# option rd 'relay'
+# option dhcpv6 'relay'
+# option ndp 'relay'
+
+
+# Example #2: Provide Router Discovery and stateless DHCPv6 in server mode
+# This can be used as a small radvd and stateless DHCPv6-server replacement.
+
+#config server exampleserver
+# option network 'lan'
+# option rd 'server'
+# option dhcpv6 'server'
+
--- /dev/null
+
+config 'mesh' 'bat0'
+ option 'aggregated_ogms'
+ option 'ap_isolation'
+ option 'bonding'
+ option 'fragmentation'
+ option 'gw_bandwidth'
+ option 'gw_mode'
+ option 'gw_sel_class'
+ option 'log_level'
+ option 'orig_interval'
+ option 'vis_mode'
+ option 'bridge_loop_avoidance'
+ option 'distributed_arp_table'
+ option 'network_coding'
+ option 'hop_penalty'
+
+# yet another batX instance
+# config 'mesh' 'bat5'
+# option 'interfaces' 'second_mesh'
--- /dev/null
+#################################################################
+# In order to enable dynamic dns you need at least one section,
+# and in that seciton the "enabled" option must be set to one
+#
+# Each section represents an update to a different service
+#
+# You specify your domain name, your username and your password
+# with the optins "domain", "username" and "password" respectively
+#
+# Next you need to specify the name of the service you are
+# connecting to "eg. dyndns.org". The format of the update
+# urls for several different dynamic dns services is specified
+# in the /usr/lib/ddns/services file. This list is hardly complete
+# as there are many, many different dynamic dns services. If your
+# service is on the list you can merely specify it with the
+# "service_name" option. Otherwise you will need to determine
+# the format of the url to update with. You can either add an
+# entry to the /usr/lib/ddns/services file or specify this with
+# the "update_url" option.
+#
+# We also need to specify the source of the ip address to associate with
+# your domain. The "ip_source" option can be "network", "interface"
+# or "web", with "network" as the default.
+#
+# If "ip_source" is "network" you specify a network section in your
+# /etc/network config file (e.g. "wan", which is the default) with
+# the "ip_network" option. If you specify "wan", you will update
+# with whatever the ip for your wan is.
+#
+# If "ip_source" is "interface" you specify a hardware interface
+# (e.g. "eth1") and whatever the current ip of this interface is
+# will be associated with the domain when an update is performed.
+#
+# If "ip_source" is "script" you specify a script to obtain ip address.
+# The "ip_script" option should contain path to your script.
+#
+# The last possibility is that "ip_source" is "web", which means
+# that in order to obtain our ip address we will connect to a
+# website, and the first valid ip address listed on that page
+# will be assumed to be ours. If you are behind another firewall
+# this is the best option since none of the local networks or
+# interfaces will have the external ip. The website to connect
+# to is specified by the "ip_url" option. You may specify multiple
+# urls in the option, separated by whitespace.
+#
+# Finally we need to specify how often to check whether we need
+# to check whether the ip address has changed (and if so update
+# it) and how often we need to force an update ( many services
+# will expire your domain if you don't connect and do an update
+# every so often). Use the "check_interval" to specify how
+# often to check whether an update is necessary, the "retry_interval"
+# to specify how often to retry in case the update has failed, and
+# the "force_interval" option to specify how often to force an
+# update. Specify the units for these values with the "check_unit",
+# the "retry_init" and the "force_unit" options. Units can be
+# "days", "hours", "minutes" or "seconds". The default force_unit
+# is hours, the default retry_unit is seconds and the default
+# check_unit is seconds. The default check_interval is 600 seconds,
+# or ten minutes. The default retry_interval is 60 seconds, or one
+# minute. The default force_interval is 72 hours or 3 days.
+#
+#
+#########################################################
+
+config service "myddns"
+ option enabled "0"
+ option interface "wan"
+
+ option service_name "dyndns.org"
+ option domain "mypersonaldomain.dyndns.org"
+ option username "myusername"
+ option password "mypassword"
+
+ option force_interval "72"
+ option force_unit "hours"
+ option check_interval "10"
+ option check_unit "minutes"
+ option retry_interval "60"
+ option retry_unit "seconds"
+
+ #option ip_source "network"
+ #option ip_network "wan"
+
+ #option ip_source "interface"
+ #option ip_interface "eth0.1"
+
+ #option ip_source "script"
+ #option ip_script "path to your scrip"
+
+ option ip_source "web"
+ option ip_url "http://checkip.dyndns.com/"
+
+ #option update_url "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
+
+
--- /dev/null
+config dnsmasq
+ option domainneeded 1
+ option boguspriv 1
+ option filterwin2k 0 # enable for dial on demand
+ option localise_queries 1
+ option rebind_protection 1 # disable if upstream must serve RFC1918 addresses
+ option rebind_localhost 1 # enable for RBL checking and similar services
+ #list rebind_domain example.lan # whitelist RFC1918 responses for domains
+ option local '/lan/'
+ option domain 'lan'
+ option expandhosts 1
+ option nonegcache 0
+ option authoritative 1
+ option readethers 1
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/tmp/resolv.conf.auto'
+ #list server '/mycompany.local/1.2.3.4'
+ #option nonwildcard 1
+ #list interface br-lan
+ #list notinterface lo
+ #list bogusnxdomain '64.94.110.11'
+
+config dhcp lan
+ option interface lan
+ option start 100
+ option limit 150
+ option leasetime 12h
+
+config dhcp wan
+ option interface wan
+ option ignore 1
--- /dev/null
+config dnsmasq
+ option domainneeded 1
+ option boguspriv 1
+ option filterwin2k 0 # enable for dial on demand
+ option localise_queries 1
+ option rebind_protection 1 # disable if upstream must serve RFC1918 addresses
+ option rebind_localhost 1 # enable for RBL checking and similar services
+ #list rebind_domain example.lan # whitelist RFC1918 responses for domains
+ option local '/lan/'
+ option domain 'lan'
+ option expandhosts 1
+ option nonegcache 0
+ option authoritative 1
+ option readethers 1
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/tmp/resolv.conf.auto'
+ #list server '/mycompany.local/1.2.3.4'
+ #option nonwildcard 1
+ #list interface br-lan
+ #list notinterface lo
+ #list bogusnxdomain '64.94.110.11'
+
+config dhcp lan
+ option interface lan
+ option start 100
+ option limit 150
+ option leasetime 12h
+
+config dhcp wan
+ option interface wan
+ option ignore 1
--- /dev/null
+
+config dropbear
+ option PasswordAuth 'on'
+ option Port '22'
+
--- /dev/null
+
+config defaults
+ option syn_flood '1'
+ option input 'ACCEPT'
+ option output 'ACCEPT'
+ option forward 'REJECT'
+
+config zone
+ option name 'lan'
+ option input 'ACCEPT'
+ option output 'ACCEPT'
+ option forward 'ACCEPT'
+ option network 'lan'
+
+config zone
+ option name 'wan'
+ option input 'REJECT'
+ option output 'ACCEPT'
+ option forward 'REJECT'
+ option masq '1'
+ option mtu_fix '1'
+ option network 'wan wan6 ppp0'
+
+config forwarding
+ option src 'lan'
+ option dest 'wan'
+
+config rule
+ option name 'Allow-DHCP-Renew'
+ option src 'wan'
+ option proto 'udp'
+ option dest_port '68'
+ option target 'ACCEPT'
+ option family 'ipv4'
+
+config rule
+ option name 'Allow-Ping'
+ option src 'wan'
+ option proto 'icmp'
+ option icmp_type 'echo-request'
+ option family 'ipv4'
+ option target 'ACCEPT'
+
+config rule
+ option name 'Allow-DHCPv6'
+ option src 'wan'
+ option proto 'udp'
+ option src_ip 'fe80::/10'
+ option src_port '547'
+ option dest_ip 'fe80::/10'
+ option dest_port '546'
+ option family 'ipv6'
+ option target 'ACCEPT'
+
+config rule
+ option name 'Allow-ICMPv6-Input'
+ option src 'wan'
+ option proto 'icmp'
+ list icmp_type 'echo-request'
+ list icmp_type 'echo-reply'
+ list icmp_type 'destination-unreachable'
+ list icmp_type 'packet-too-big'
+ list icmp_type 'time-exceeded'
+ list icmp_type 'bad-header'
+ list icmp_type 'unknown-header-type'
+ list icmp_type 'router-solicitation'
+ list icmp_type 'neighbour-solicitation'
+ list icmp_type 'router-advertisement'
+ list icmp_type 'neighbour-advertisement'
+ option limit '1000/sec'
+ option family 'ipv6'
+ option target 'ACCEPT'
+
+config rule
+ option name 'Allow-ICMPv6-Forward'
+ option src 'wan'
+ option dest '*'
+ option proto 'icmp'
+ list icmp_type 'echo-request'
+ list icmp_type 'echo-reply'
+ list icmp_type 'destination-unreachable'
+ list icmp_type 'packet-too-big'
+ list icmp_type 'time-exceeded'
+ list icmp_type 'bad-header'
+ list icmp_type 'unknown-header-type'
+ option limit '1000/sec'
+ option family 'ipv6'
+ option target 'ACCEPT'
+
+config include
+ option path '/etc/firewall.user'
+
--- /dev/null
+config iodined
+ option address ''
+ option password ''
+ option tunnelip '10.0.0.1'
+ option tld ''
--- /dev/null
+
+config core 'main'
+ option lang 'auto'
+ option mediaurlbase '/luci-static/openwrt.org'
+ option resourcebase '/luci-static/resources'
+
+config extern 'flash_keep'
+ option uci '/etc/config/'
+ option dropbear '/etc/dropbear/'
+ option openvpn '/etc/openvpn/'
+ option passwd '/etc/passwd'
+ option opkg '/etc/opkg.conf'
+ option firewall '/etc/firewall.user'
+ option uploads '/lib/uci/upload/'
+
+config internal 'languages'
+ option en 'English'
+
+config internal 'sauth'
+ option sessionpath '/tmp/luci-sessions'
+ option sessiontime '3600'
+
+config internal 'ccache'
+ option enable '1'
+
+config internal 'themes'
+ option Bootstrap '/luci-static/bootstrap'
+ option OpenWrt '/luci-static/openwrt.org'
+
--- /dev/null
+config 'smap_scannet' 'SIP_LAN'
+ option 'enable' '0'
+ option 'interface' 'lan'
+ option 'subnet' '192.168.99.0/24'
+
+config 'smap_scannet' 'SIP_WAN'
+ option 'enable' '0'
+ option 'interface' 'wan'
+ option 'subnet' '216.218.0.0/16'
+
+config 'netdiscover_scannet' 'SCAN_LAN'
+ option 'enable' '0'
+ option 'interface' 'lan'
+ option 'subnet' '192.168.99.0/24'
+
+config 'netdiscover_scannet' 'SCAN_WAN'
+ option 'enable' '0'
+ option 'interface' 'wan'
+ option 'subnet' '216.218.0.0/16'
+
--- /dev/null
+package mactodevinfo
+
--- /dev/null
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config globals 'globals'
+ option ula_prefix 'fdc8:5c10:5d93::/48'
+
+config interface 'lan'
+ option ifname 'eth0.1'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.1'
+ option netmask '255.255.255.0'
+ option ip6assign '60'
+ option macaddr '9c:41:7c:4d:a8:78'
+
+config interface 'wan'
+ option proto 'dhcp'
+ option macaddr '9c:41:7c:4d:a8:79'
+ option _orig_ifname 'eth0.2'
+ option _orig_bridge 'false'
+ option ifname 'ppp0'
+
+config interface 'wan6'
+ option ifname '@wan'
+ option proto 'dhcpv6'
+
+config switch
+ option name 'rt305x'
+ option reset '1'
+ option enable_vlan '1'
+
+config switch_vlan
+ option device 'rt305x'
+ option vlan '1'
+ option ports '0 1 2 3 6t'
+
+config switch_vlan
+ option device 'rt305x'
+ option vlan '2'
+ option ports '4 6t'
+
+config interface 'ppp0'
+ option proto '3g'
+ option device '/dev/ttyUSB0'
+ option apn 'web.yesss.at'
+ option pincode '4271'
+ option service 'umts_only'
+
--- /dev/null
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config globals 'globals'
+ option ula_prefix 'fdc8:5c10:5d93::/48'
+
+config interface 'lan'
+ option ifname 'eth0.1'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.1'
+ option netmask '255.255.255.0'
+ option ip6assign '60'
+ option macaddr '9c:41:7c:4d:a8:78'
+
+config interface 'wan'
+ option proto 'dhcp'
+ option macaddr '9c:41:7c:4d:a8:79'
+ option _orig_ifname 'eth0.2'
+ option _orig_bridge 'false'
+ option ifname 'ppp0'
+
+config interface 'wan6'
+ option ifname '@wan'
+ option proto 'dhcpv6'
+
+config switch
+ option name 'rt305x'
+ option reset '1'
+ option enable_vlan '1'
+
+config switch_vlan
+ option device 'rt305x'
+ option vlan '1'
+ option ports '0 1 2 3 6t'
+
+config switch_vlan
+ option device 'rt305x'
+ option vlan '2'
+ option ports '4 6t'
+
+config interface 'ppp0'
+ option proto '3g'
+ option device '/dev/ttyUSB0'
+ option service 'umts_only'
+ option apn 'web.yesss.at'
+ option pincode '4271'
+
--- /dev/null
+package openvpn
+
+#################################################
+# Sample to include a custom config file. #
+#################################################
+
+config openvpn custom_config
+
+ # Set to 1 to enable this instance:
+ option enabled 0
+
+ # Include OpenVPN configuration
+ option config /etc/openvpn/my-vpn.conf
+
+
+#################################################
+# Sample OpenVPN 2.0 uci config for #
+# multi-client server. #
+#################################################
+
+config openvpn sample_server
+
+ # Set to 1 to enable this instance:
+ option enabled 0
+
+ # Which local IP address should OpenVPN
+ # listen on? (optional)
+# option local 0.0.0.0
+
+ # Which TCP/UDP port should OpenVPN listen on?
+ # If you want to run multiple OpenVPN instances
+ # on the same machine, use a different port
+ # number for each one. You will need to
+ # open up this port on your firewall.
+ option port 1194
+
+ # TCP or UDP server?
+# option proto tcp
+ option proto udp
+
+ # "dev tun" will create a routed IP tunnel,
+ # "dev tap" will create an ethernet tunnel.
+ # Use "dev tap0" if you are ethernet bridging
+ # and have precreated a tap0 virtual interface
+ # and bridged it with your ethernet interface.
+ # If you want to control access policies
+ # over the VPN, you must create firewall
+ # rules for the the TUN/TAP interface.
+ # On non-Windows systems, you can give
+ # an explicit unit number, such as tun0.
+ # On Windows, use "dev-node" for this.
+ # On most systems, the VPN will not function
+ # unless you partially or fully disable
+ # the firewall for the TUN/TAP interface.
+# option dev tap
+ option dev tun
+
+ # SSL/TLS root certificate (ca), certificate
+ # (cert), and private key (key). Each client
+ # and the server must have their own cert and
+ # key file. The server and all clients will
+ # use the same ca file.
+ #
+ # See the "easy-rsa" directory for a series
+ # of scripts for generating RSA certificates
+ # and private keys. Remember to use
+ # a unique Common Name for the server
+ # and each of the client certificates.
+ #
+ # Any X509 key management system can be used.
+ # OpenVPN can also use a PKCS #12 formatted key file
+ # (see "pkcs12" directive in man page).
+ option ca /etc/openvpn/ca.crt
+ option cert /etc/openvpn/server.crt
+ # This file should be kept secret:
+ option key /etc/openvpn/server.key
+
+ # Diffie hellman parameters.
+ # Generate your own with:
+ # openssl dhparam -out dh1024.pem 1024
+ # Substitute 2048 for 1024 if you are using
+ # 2048 bit keys.
+ option dh /etc/openvpn/dh1024.pem
+
+ # Configure server mode and supply a VPN subnet
+ # for OpenVPN to draw client addresses from.
+ # The server will take 10.8.0.1 for itself,
+ # the rest will be made available to clients.
+ # Each client will be able to reach the server
+ # on 10.8.0.1. Comment this line out if you are
+ # ethernet bridging. See the man page for more info.
+ option server "10.8.0.0 255.255.255.0"
+
+ # Maintain a record of client <-> virtual IP address
+ # associations in this file. If OpenVPN goes down or
+ # is restarted, reconnecting clients can be assigned
+ # the same virtual IP address from the pool that was
+ # previously assigned.
+ option ifconfig_pool_persist /tmp/ipp.txt
+
+ # Configure server mode for ethernet bridging.
+ # You must first use your OS's bridging capability
+ # to bridge the TAP interface with the ethernet
+ # NIC interface. Then you must manually set the
+ # IP/netmask on the bridge interface, here we
+ # assume 10.8.0.4/255.255.255.0. Finally we
+ # must set aside an IP range in this subnet
+ # (start=10.8.0.50 end=10.8.0.100) to allocate
+ # to connecting clients. Leave this line commented
+ # out unless you are ethernet bridging.
+# option server_bridge "10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100"
+
+ # Push routes to the client to allow it
+ # to reach other private subnets behind
+ # the server. Remember that these
+ # private subnets will also need
+ # to know to route the OpenVPN client
+ # address pool (10.8.0.0/255.255.255.0)
+ # back to the OpenVPN server.
+# list push "route 192.168.10.0 255.255.255.0"
+# list push "route 192.168.20.0 255.255.255.0"
+
+ # To assign specific IP addresses to specific
+ # clients or if a connecting client has a private
+ # subnet behind it that should also have VPN access,
+ # use the subdirectory "ccd" for client-specific
+ # configuration files (see man page for more info).
+
+ # EXAMPLE: Suppose the client
+ # having the certificate common name "Thelonious"
+ # also has a small subnet behind his connecting
+ # machine, such as 192.168.40.128/255.255.255.248.
+ # First, uncomment out these lines:
+# option client_config_dir /etc/openvpn/ccd
+# list route "192.168.40.128 255.255.255.248"
+ # Then create a file ccd/Thelonious with this line:
+ # iroute 192.168.40.128 255.255.255.248
+ # This will allow Thelonious' private subnet to
+ # access the VPN. This example will only work
+ # if you are routing, not bridging, i.e. you are
+ # using "dev tun" and "server" directives.
+
+ # EXAMPLE: Suppose you want to give
+ # Thelonious a fixed VPN IP address of 10.9.0.1.
+ # First uncomment out these lines:
+# option client_config_dir /etc/openvpn/ccd
+# list route "10.9.0.0 255.255.255.252"
+# list route "192.168.100.0 255.255.255.0"
+ # Then add this line to ccd/Thelonious:
+ # ifconfig-push "10.9.0.1 10.9.0.2"
+
+ # Suppose that you want to enable different
+ # firewall access policies for different groups
+ # of clients. There are two methods:
+ # (1) Run multiple OpenVPN daemons, one for each
+ # group, and firewall the TUN/TAP interface
+ # for each group/daemon appropriately.
+ # (2) (Advanced) Create a script to dynamically
+ # modify the firewall in response to access
+ # from different clients. See man
+ # page for more info on learn-address script.
+# option learn_address /etc/openvpn/script
+
+ # If enabled, this directive will configure
+ # all clients to redirect their default
+ # network gateway through the VPN, causing
+ # all IP traffic such as web browsing and
+ # and DNS lookups to go through the VPN
+ # (The OpenVPN server machine may need to NAT
+ # the TUN/TAP interface to the internet in
+ # order for this to work properly).
+ # CAVEAT: May break client's network config if
+ # client's local DHCP server packets get routed
+ # through the tunnel. Solution: make sure
+ # client's local DHCP server is reachable via
+ # a more specific route than the default route
+ # of 0.0.0.0/0.0.0.0.
+# list push "redirect-gateway"
+
+ # Certain Windows-specific network settings
+ # can be pushed to clients, such as DNS
+ # or WINS server addresses. CAVEAT:
+ # http://openvpn.net/faq.html#dhcpcaveats
+# list push "dhcp-option DNS 10.8.0.1"
+# list push "dhcp-option WINS 10.8.0.1"
+
+ # Uncomment this directive to allow different
+ # clients to be able to "see" each other.
+ # By default, clients will only see the server.
+ # To force clients to only see the server, you
+ # will also need to appropriately firewall the
+ # server's TUN/TAP interface.
+# option client_to_client 1
+
+ # Uncomment this directive if multiple clients
+ # might connect with the same certificate/key
+ # files or common names. This is recommended
+ # only for testing purposes. For production use,
+ # each client should have its own certificate/key
+ # pair.
+ #
+ # IF YOU HAVE NOT GENERATED INDIVIDUAL
+ # CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
+ # EACH HAVING ITS OWN UNIQUE "COMMON NAME",
+ # UNCOMMENT THIS LINE OUT.
+# option duplicate_cn 1
+
+ # The keepalive directive causes ping-like
+ # messages to be sent back and forth over
+ # the link so that each side knows when
+ # the other side has gone down.
+ # Ping every 10 seconds, assume that remote
+ # peer is down if no ping received during
+ # a 120 second time period.
+ option keepalive "10 120"
+
+ # For extra security beyond that provided
+ # by SSL/TLS, create an "HMAC firewall"
+ # to help block DoS attacks and UDP port flooding.
+ #
+ # Generate with:
+ # openvpn --genkey --secret ta.key
+ #
+ # The server and each client must have
+ # a copy of this key.
+ # The second parameter should be '0'
+ # on the server and '1' on the clients.
+ # This file is secret:
+# option tls_auth "/etc/openvpn/ta.key 0"
+
+ # Select a cryptographic cipher.
+ # This config item must be copied to
+ # the client config file as well.
+ # Blowfish (default):
+# option cipher BF-CBC
+ # AES:
+# option cipher AES-128-CBC
+ # Triple-DES:
+# option cipher DES-EDE3-CBC
+
+ # Enable compression on the VPN link.
+ # If you enable it here, you must also
+ # enable it in the client config file.
+ option comp_lzo 1
+
+ # The maximum number of concurrently connected
+ # clients we want to allow.
+# option max_clients 100
+
+ # The persist options will try to avoid
+ # accessing certain resources on restart
+ # that may no longer be accessible because
+ # of the privilege downgrade.
+ option persist_key 1
+ option persist_tun 1
+
+ # Output a short status file showing
+ # current connections, truncated
+ # and rewritten every minute.
+ option status /tmp/openvpn-status.log
+
+ # By default, log messages will go to the syslog (or
+ # on Windows, if running as a service, they will go to
+ # the "\Program Files\OpenVPN\log" directory).
+ # Use log or log-append to override this default.
+ # "log" will truncate the log file on OpenVPN startup,
+ # while "log-append" will append to it. Use one
+ # or the other (but not both).
+# option log /tmp/openvpn.log
+# option log_append /tmp/openvpn.log
+
+ # Set the appropriate level of log
+ # file verbosity.
+ #
+ # 0 is silent, except for fatal errors
+ # 4 is reasonable for general usage
+ # 5 and 6 can help to debug connection problems
+ # 9 is extremely verbose
+ option verb 3
+
+ # Silence repeating messages. At most 20
+ # sequential messages of the same message
+ # category will be output to the log.
+# option mute 20
+
+
+##############################################
+# Sample client-side OpenVPN 2.0 uci config #
+# for connecting to multi-client server. #
+##############################################
+
+config openvpn sample_client
+
+ # Set to 1 to enable this instance:
+ option enabled 0
+
+ # Specify that we are a client and that we
+ # will be pulling certain config file directives
+ # from the server.
+ option client 1
+
+ # Use the same setting as you are using on
+ # the server.
+ # On most systems, the VPN will not function
+ # unless you partially or fully disable
+ # the firewall for the TUN/TAP interface.
+# option dev tap
+ option dev tun
+
+ # Are we connecting to a TCP or
+ # UDP server? Use the same setting as
+ # on the server.
+# option proto tcp
+ option proto udp
+
+ # The hostname/IP and port of the server.
+ # You can have multiple remote entries
+ # to load balance between the servers.
+ list remote "my_server_1 1194"
+# list remote "my_server_2 1194"
+
+ # Choose a random host from the remote
+ # list for load_balancing. Otherwise
+ # try hosts in the order specified.
+# option remote_random 1
+
+ # Keep trying indefinitely to resolve the
+ # host name of the OpenVPN server. Very useful
+ # on machines which are not permanently connected
+ # to the internet such as laptops.
+ option resolv_retry infinite
+
+ # Most clients don't need to bind to
+ # a specific local port number.
+ option nobind 1
+
+ # Try to preserve some state across restarts.
+ option persist_key 1
+ option persist_tun 1
+
+ # If you are connecting through an
+ # HTTP proxy to reach the actual OpenVPN
+ # server, put the proxy server/IP and
+ # port number here. See the man page
+ # if your proxy server requires
+ # authentication.
+ # retry on connection failures:
+# option http_proxy_retry 1
+ # specify http proxy address and port:
+# option http_proxy "192.168.1.100 8080"
+
+ # Wireless networks often produce a lot
+ # of duplicate packets. Set this flag
+ # to silence duplicate packet warnings.
+# option mute_replay_warnings 1
+
+ # SSL/TLS parms.
+ # See the server config file for more
+ # description. It's best to use
+ # a separate .crt/.key file pair
+ # for each client. A single ca
+ # file can be used for all clients.
+ option ca /etc/openvpn/ca.crt
+ option cert /etc/openvpn/client.crt
+ option key /etc/openvpn/client.key
+
+ # Verify server certificate by checking
+ # that the certicate has the nsCertType
+ # field set to "server". This is an
+ # important precaution to protect against
+ # a potential attack discussed here:
+ # http://openvpn.net/howto.html#mitm
+ #
+ # To use this feature, you will need to generate
+ # your server certificates with the nsCertType
+ # field set to "server". The build_key_server
+ # script in the easy_rsa folder will do this.
+# option ns_cert_type server
+
+ # If a tls_auth key is used on the server
+ # then every client must also have the key.
+# option tls_auth "/etc/openvpn/ta.key 1"
+
+ # Select a cryptographic cipher.
+ # If the cipher option is used on the server
+ # then you must also specify it here.
+# option cipher x
+
+ # Enable compression on the VPN link.
+ # Don't enable this unless it is also
+ # enabled in the server config file.
+ option comp_lzo 1
+
+ # Set log file verbosity.
+ option verb 3
+
+ # Silence repeating messages
+# option mute 20
--- /dev/null
+# QoS configuration for OpenWrt
+
+# INTERFACES:
+config interface wan
+ option classgroup "Default"
+ option enabled 0
+ option upload 128
+ option download 1024
+
+# RULES:
+config classify
+ option target "Priority"
+ option ports "22,53"
+config classify
+ option target "Normal"
+ option proto "tcp"
+ option ports "20,21,25,80,110,443,993,995"
+config classify
+ option target "Express"
+ option ports "5190"
+config default
+ option target "Express"
+ option proto "udp"
+ option pktsize "-500"
+config reclassify
+ option target "Priority"
+ option proto "icmp"
+config default
+ option target "Bulk"
+ option portrange "1024-65535"
+config reclassify
+ option target "Priority"
+ option proto "tcp"
+ option pktsize "-128"
+ option mark "!Bulk"
+ option tcpflags "SYN"
+config reclassify
+ option target "Priority"
+ option proto "tcp"
+ option pktsize "-128"
+ option mark "!Bulk"
+ option tcpflags "ACK"
+
+
+# Don't change the stuff below unless you
+# really know what it means :)
+
+config classgroup "Default"
+ option classes "Priority Express Normal Bulk"
+ option default "Normal"
+
+
+config class "Priority"
+ option packetsize 400
+ option maxsize 400
+ option avgrate 10
+ option priority 20
+config class "Priority_down"
+ option packetsize 1000
+ option avgrate 10
+
+
+config class "Express"
+ option packetsize 1000
+ option maxsize 800
+ option avgrate 50
+ option priority 10
+
+config class "Normal"
+ option packetsize 1500
+ option packetdelay 100
+ option avgrate 10
+ option priority 5
+config class "Normal_down"
+ option avgrate 20
+
+config class "Bulk"
+ option avgrate 1
+ option packetdelay 200
--- /dev/null
+
+config system
+ option hostname 'OpenWrt'
+ option timezone 'UTC'
+
+config timeserver 'ntp'
+ list server '0.openwrt.pool.ntp.org'
+ list server '1.openwrt.pool.ntp.org'
+ list server '2.openwrt.pool.ntp.org'
+ list server '3.openwrt.pool.ntp.org'
+ option enable_server '0'
+
+config led 'led_wifi_led'
+ option name 'wifi'
+ option sysfs 'mpr-a2:blue:system'
+ option trigger 'netdev'
+ option dev 'wlan0'
+ option mode 'link tx rx'
+
--- /dev/null
+config network
+ option init network
+ list affects dhcp
+ list affects radvd
+
+config wireless
+ list affects network
+
+config firewall
+ option init firewall
+ list affects luci-splash
+ list affects qos
+ list affects miniupnpd
+
+config olsr
+ option init olsrd
+
+config dhcp
+ option init dnsmasq
+
+config dropbear
+ option init dropbear
+
+config httpd
+ option init httpd
+
+config fstab
+ option init fstab
+
+config qos
+ option init qos
+
+config system
+ option init led
+ list affects luci_statistics
+
+config luci_splash
+ option init luci_splash
+
+config upnpd
+ option init miniupnpd
+
+config ntpclient
+ option init ntpclient
+
+config samba
+ option init samba
+
+config tinyproxy
+ option init tinyproxy
+
+config 6relayd
+ option init 6relayd
--- /dev/null
+# Server configuration
+config uhttpd main
+
+ # HTTP listen addresses, multiple allowed
+ list listen_http 0.0.0.0:80
+# list listen_http [::]:80
+
+ # HTTPS listen addresses, multiple allowed
+ list listen_https 0.0.0.0:443
+# list listen_https [::]:443
+
+ # Server document root
+ option home /www
+
+ # Reject requests from RFC1918 IP addresses
+ # directed to the servers public IP(s).
+ # This is a DNS rebinding countermeasure.
+ option rfc1918_filter 1
+
+ # Maximum number of concurrent requests.
+ # If this number is exceeded, further requests are
+ # queued until the number of running requests drops
+ # below the limit again.
+ option max_requests 3
+
+ # Maximum number of concurrent connections.
+ # If this number is exceeded, further TCP connection
+ # attempts are queued until the number of active
+ # connections drops below the limit again.
+ option max_connections 100
+
+ # Certificate and private key for HTTPS.
+ # If no listen_https addresses are given,
+ # the key options are ignored.
+ option cert /etc/uhttpd.crt
+ option key /etc/uhttpd.key
+
+ # CGI url prefix, will be searched in docroot.
+ # Default is /cgi-bin
+ option cgi_prefix /cgi-bin
+
+ # List of extension->interpreter mappings.
+ # Files with an associated interpreter can
+ # be called outside of the CGI prefix and do
+ # not need to be executable.
+# list interpreter ".php=/usr/bin/php-cgi"
+# list interpreter ".cgi=/usr/bin/perl"
+
+ # Lua url prefix and handler script.
+ # Lua support is disabled if no prefix given.
+# option lua_prefix /luci
+# option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua
+
+ # Specify the ubus-rpc prefix and socket path.
+# option ubus_prefix /ubus
+# option ubus_socket /var/run/ubus.sock
+
+ # CGI/Lua timeout, if the called script does not
+ # write data within the given amount of seconds,
+ # the server will terminate the request with
+ # 504 Gateway Timeout response.
+ option script_timeout 60
+
+ # Network timeout, if the current connection is
+ # blocked for the specified amount of seconds,
+ # the server will terminate the associated
+ # request process.
+ option network_timeout 30
+
+ # HTTP Keep-Alive, specifies the timeout for persistent
+ # HTTP/1.1 connections. Setting this to 0 will disable
+ # persistent HTTP connections.
+ option http_keepalive 20
+
+ # TCP Keep-Alive, send periodic keep-alive probes
+ # over established connections to detect dead peers.
+ # The value is given in seconds to specify the
+ # interval between subsequent probes.
+ # Setting this to 0 will disable TCP keep-alive.
+ option tcp_keepalive 1
+
+ # Basic auth realm, defaults to local hostname
+# option realm OpenWrt
+
+ # Configuration file in busybox httpd format
+# option config /etc/httpd.conf
+
+ # Do not follow symlinks that point outside of the
+ # home directory.
+# option no_symlinks 0
+
+ # Do not produce directory listings but send 403
+ # instead if a client requests an url pointing to
+ # a directory without any index file.
+# option no_dirlists 0
+
+ # Do not authenticate any ubus-rpc requests against
+ # the ubus session/access procedure.
+ # This is dangerous and should be always left off
+ # except for development and debug purposes!
+# option no_ubusauth 0
+
+
+# Certificate defaults for px5g key generator
+config cert px5g
+
+ # Validity time
+ option days 730
+
+ # RSA key size
+ option bits 1024
+
+ # Location
+ option country DE
+ option state Berlin
+ option location Berlin
+
+ # Common name
+ option commonname OpenWrt
--- /dev/null
+
+config wifi-device 'radio0'
+ option type 'mac80211'
+ option channel '11'
+ option hwmode '11ng'
+ option path '10180000.wmac'
+ option htmode 'HT20'
+ list ht_capab 'GF'
+ list ht_capab 'SHORT-GI-20'
+ list ht_capab 'SHORT-GI-40'
+ list ht_capab 'RX-STBC1'
+ option txpower '20'
+ option country '00'
+
+config wifi-iface
+ option device 'radio0'
+ option mode 'ap'
+ option network 'lan'
+ option encryption 'psk-mixed+tkip+ccmp'
+ option key 'qwertz123456789'
+ option ssid 'blub'
+ option wds '1'
+
--- /dev/null
+
+config wifi-device 'radio0'
+ option type 'mac80211'
+ option channel '11'
+ option hwmode '11ng'
+ option path '10180000.wmac'
+ option htmode 'HT20'
+ list ht_capab 'GF'
+ list ht_capab 'SHORT-GI-20'
+ list ht_capab 'SHORT-GI-40'
+ list ht_capab 'RX-STBC1'
+ option txpower '20'
+ option country '00'
+
+config wifi-iface
+ option device 'radio0'
+ option mode 'ap'
+ option network 'lan'
+ option encryption 'psk-mixed+tkip+ccmp'
+ option key 'qwertz123456789'
+ option ssid 'blub'
+
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2010-2013 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/ramips.sh
+
+get_status_led() {
+ case $(ramips_board_name) in
+ 3g-6200n)
+ status_led="edimax:green:power"
+ ;;
+ 3g300m | w150m)
+ status_led="tenda:blue:ap"
+ ;;
+ argus-atp52b)
+ status_led="argus-atp52b:green:run"
+ ;;
+ asl26555)
+ status_led="asl26555:green:power"
+ ;;
+ br6524n)
+ status_led="edimax:blue:power"
+ ;;
+ br6425)
+ status_led="edimax:green:power"
+ ;;
+ d105)
+ status_led="d105:red:power"
+ ;;
+ dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-610-a1 | dir-615-h1 | dir-615-d | dir-620-a1| dir-620-d1)
+ status_led="d-link:green:status"
+ ;;
+ dir-645)
+ status_led="d-link:green:wps"
+ ;;
+ dap-1350)
+ status_led="d-link:blue:power"
+ ;;
+ esr-9753)
+ status_led="esr-9753:orange:power"
+ ;;
+ f5d8235-v2)
+ status_led="f5d8235v2:blue:router"
+ ;;
+ fonera20n)
+ status_led="fonera20n:green:power"
+ ;;
+ ip2202)
+ status_led="ip2202:green:run"
+ ;;
+ rt-n13u)
+ status_led="rt-n13u:power"
+ ;;
+ all0239-3g|\
+ hw550-3g)
+ status_led="hw550-3g:green:status"
+ ;;
+ m3)
+ status_led="m3:blue:status"
+ ;;
+ m4)
+ status_led="m4:blue:status"
+ ;;
+ mofi3500-3gn)
+ status_led="mofi3500-3gn:green:status"
+ ;;
+ mpr-a1)
+ status_led="mpr-a1:red:power"
+ ;;
+ mpr-a2)
+ status_led="mpr-a2:red:power"
+ ;;
+ nbg-419n)
+ status_led="nbg-419n:green:power"
+ ;;
+ nw718)
+ status_led="nw718:amber:cpu"
+ ;;
+ omni-emb|\
+ omni-emb-hpm)
+ status_led="emb:green:status"
+ ;;
+ psr-680w)
+ status_led="psr-680w:red:wan"
+ ;;
+ pwh2004)
+ status_led="pwh2004:green:power"
+ ;;
+ rt-n15)
+ status_led="rt-n15:blue:power"
+ ;;
+ rt-n10-plus)
+ status_led="asus:green:wps"
+ ;;
+ rt-n56u | wl-330n | wl-330n3g)
+ status_led="asus:blue:power"
+ ;;
+ sl-r7205)
+ status_led="sl-r7205:green:status"
+ ;;
+ tew-691gr|\
+ tew-692gr)
+ status_led="trendnet:green:wps"
+ ;;
+ v11st-fe)
+ status_led="v11st-fe:green:status"
+ ;;
+ v22rw-2x2)
+ status_led="v22rw-2x2:green:security"
+ ;;
+ w306r-v20)
+ status_led="w306r-v20:green:sys"
+ ;;
+ w502u)
+ status_led="alfa:blue:wps"
+ ;;
+ wcr-150gn)
+ status_led="wcr150gn:amber:power"
+ ;;
+ whr-g300n)
+ status_led="whr-g300n:green:router"
+ ;;
+ wli-tx4-ag300n)
+ status_led="buffalo:blue:power"
+ ;;
+ wl-351)
+ status_led="wl-351:amber:power"
+ ;;
+ wr512-3gn)
+ status_led="wr512:green:wps"
+ ;;
+ wnce2001)
+ status_led="netgear:green:power"
+ ;;
+ mzk-w300nh2)
+ status_led="mzkw300nh2:green:power"
+ ;;
+ ur-326n4g)
+ status_led="ur326:green:wps"
+ ;;
+ ur-336un)
+ status_led="ur336:green:wps"
+ ;;
+ x5)
+ status_led="x5:green:power"
+ ;;
+ x8)
+ status_led="x8:green:power"
+ ;;
+ xdxrn502j)
+ status_led="xdxrn502j:green:power"
+ ;;
+ f7c027)
+ status_led="belkin:orange:status"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2010-2013 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/ramips.sh
+
+get_status_led() {
+ case $(ramips_board_name) in
+ 3g-6200n)
+ status_led="edimax:green:power"
+ ;;
+ 3g300m | w150m)
+ status_led="tenda:blue:ap"
+ ;;
+ argus-atp52b)
+ status_led="argus-atp52b:green:run"
+ ;;
+ asl26555)
+ status_led="asl26555:green:power"
+ ;;
+ br6524n)
+ status_led="edimax:blue:power"
+ ;;
+ br6425)
+ status_led="edimax:green:power"
+ ;;
+ d105)
+ status_led="d105:red:power"
+ ;;
+ dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-610-a1 | dir-615-h1 | dir-615-d | dir-620-a1| dir-620-d1)
+ status_led="d-link:green:status"
+ ;;
+ dir-645)
+ status_led="d-link:green:wps"
+ ;;
+ dap-1350)
+ status_led="d-link:blue:power"
+ ;;
+ esr-9753)
+ status_led="esr-9753:orange:power"
+ ;;
+ f5d8235-v2)
+ status_led="f5d8235v2:blue:router"
+ ;;
+ fonera20n)
+ status_led="fonera20n:green:power"
+ ;;
+ ip2202)
+ status_led="ip2202:green:run"
+ ;;
+ rt-n13u)
+ status_led="rt-n13u:power"
+ ;;
+ all0239-3g|\
+ hw550-3g)
+ status_led="hw550-3g:green:status"
+ ;;
+ m3)
+ status_led="m3:blue:status"
+ ;;
+ m4)
+ status_led="m4:blue:status"
+ ;;
+ mofi3500-3gn)
+ status_led="mofi3500-3gn:green:status"
+ ;;
+ mpr-a1)
+ status_led="mpr-a1:red:power"
+ ;;
+ mpr-a2)
+ status_led="mpr-a2:red:power"
+ ;;
+ nbg-419n)
+ status_led="nbg-419n:green:power"
+ ;;
+ nw718)
+ status_led="nw718:amber:cpu"
+ ;;
+ omni-emb|\
+ omni-emb-hpm)
+ status_led="emb:green:status"
+ ;;
+ psr-680w)
+ status_led="psr-680w:red:wan"
+ ;;
+ pwh2004)
+ status_led="pwh2004:green:power"
+ ;;
+ rt-n15)
+ status_led="rt-n15:blue:power"
+ ;;
+ rt-n10-plus)
+ status_led="asus:green:wps"
+ ;;
+ rt-n56u | wl-330n | wl-330n3g)
+ status_led="asus:blue:power"
+ ;;
+ sl-r7205)
+ status_led="sl-r7205:green:status"
+ ;;
+ tew-691gr|\
+ tew-692gr)
+ status_led="trendnet:green:wps"
+ ;;
+ v11st-fe)
+ status_led="v11st-fe:green:status"
+ ;;
+ v22rw-2x2)
+ status_led="v22rw-2x2:green:security"
+ ;;
+ w306r-v20)
+ status_led="w306r-v20:green:sys"
+ ;;
+ w502u)
+ status_led="alfa:blue:wps"
+ ;;
+ wcr-150gn)
+ status_led="wcr150gn:amber:power"
+ ;;
+ whr-g300n)
+ status_led="whr-g300n:green:router"
+ ;;
+ wli-tx4-ag300n)
+ status_led="buffalo:blue:power"
+ ;;
+ wl-351)
+ status_led="wl-351:amber:power"
+ ;;
+ wr512-3gn)
+ status_led="wr512:green:wps"
+ ;;
+ wnce2001)
+ status_led="netgear:green:power"
+ ;;
+ mzk-w300nh2)
+ status_led="mzkw300nh2:green:power"
+ ;;
+ ur-326n4g)
+ status_led="ur326:green:wps"
+ ;;
+ ur-336un)
+ status_led="ur336:green:wps"
+ ;;
+ x5)
+ status_led="x5:green:power"
+ ;;
+ x8)
+ status_led="x8:green:power"
+ ;;
+ xdxrn502j)
+ status_led="xdxrn502j:green:power"
+ ;;
+ f7c027)
+ status_led="belkin:orange:status"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}
--- /dev/null
+# Change the following lines if you want dnsmasq to serve SRV
+# records.
+# You may add multiple srv-host lines.
+# The fields are <name>,<target>,<port>,<priority>,<weight>
+
+# A SRV record sending LDAP for the example.com domain to
+# ldapserver.example.com port 289
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
+
+# Two SRV records for LDAP, each with different priorities
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
+
+# A SRV record indicating that there is no LDAP server for the domain
+# example.com
+#srv-host=_ldap._tcp.example.com
+
+# The following line shows how to make dnsmasq serve an arbitrary PTR
+# record. This is useful for DNS-SD.
+# The fields are <name>,<target>
+#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"
+
+# Change the following lines to enable dnsmasq to serve TXT records.
+# These are used for things like SPF and zeroconf.
+# The fields are <name>,<text>,<text>...
+
+#Example SPF.
+#txt-record=example.com,"v=spf1 a -all"
+
+#Example zeroconf
+#txt-record=_http._tcp.example.com,name=value,paper=A4
+
+# Provide an alias for a "local" DNS name. Note that this _only_ works
+# for targets which are names from DHCP or /etc/hosts. Give host
+# "bert" another name, bertrand
+# The fields are <cname>,<target>
+#cname=bertand,bert
--- /dev/null
+[options]
+broken_system_clock = true
+
--- /dev/null
+# This file is interpreted as shell script.
+# Put your custom iptables rules here, they will
+# be executed with each firewall (re-)start.
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
--- /dev/null
+root:x:0:
+daemon:x:1:
+adm:x:4:
+mail:x:8:
+audio:x:29:
+www-data:x:33:
+ftp:x:55:
+users:x:100:
+network:x:101:
+nogroup:x:65534:
--- /dev/null
+127.0.0.1 localhost
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ }, ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/failsafe" ]
+ ],
+]
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "and",
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME",
+ [ "null", "full", "ptmx", "zero" ],
+ ],
+ [ "regex", "DEVNAME",
+ [ "^gpio", "^hvc", "^tty" ],
+ ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0666" ],
+ [ "return" ],
+ ]
+ ],
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME", "mapper/control" ],
+ [ "regex", "DEVPATH", "^ppp" ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0600" ],
+ [ "return" ],
+ ],
+ ],
+ [ "if",
+ [ "has", "DEVNAME" ],
+ [ "makedev", "/dev/%DEVNAME%", "0644" ],
+ ],
+ ],
+ ],
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ "remove" : [
+ [ "if",
+ [ "and",
+ [ "has", "DEVNAME" ],
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [ "rm", "/dev/%DEVNAME%" ]
+ ]
+ ]
+ } ],
+ [ "if",
+ [ "eq", "SUBSYSTEM", "platform" ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "has", "BUTTON" ],
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/%BUTTON%" ]
+ ],
+ [ "if",
+ [ "eq", "SUBSYSTEM",
+ [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]
+ ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+]
--- /dev/null
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+ttyS0::askfirst:/bin/ash --login
--- /dev/null
+DISTRIB_ID="OpenWrt"
+DISTRIB_RELEASE="Bleeding Edge"
+DISTRIB_REVISION="r37911"
+DISTRIB_CODENAME="barrier_breaker"
+DISTRIB_TARGET="ramips/rt305x"
+DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r37911"
--- /dev/null
+src/gz barrier_breaker http://downloads.openwrt.org/snapshots/trunk/ramips/packages
+dest root /
+dest ram /tmp
+lists_dir ext /var/opkg-lists
+option overlay_root /overlay
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2010 Vertical Communications
+
+[ -z "$PREINIT" ] && exec /sbin/init
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+pi_ifname=
+pi_ip=192.168.1.1
+pi_broadcast=192.168.1.255
+pi_netmask=255.255.255.0
+
+fs_failsafe_ifname=
+fs_failsafe_ip=192.168.1.1
+fs_failsafe_broadcast=192.168.1.255
+fs_failsafe_netmask=255.255.255.0
+
+fs_failsafe_wait_timeout=2
+
+pi_suppress_stderr="y"
+pi_init_suppress_stderr="y"
+pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
+pi_init_cmd="/sbin/init"
+
+. /lib/functions.sh
+
+boot_hook_init preinit_essential
+boot_hook_init preinit_main
+boot_hook_init failsafe
+boot_hook_init initramfs
+boot_hook_init preinit_mount_root
+
+for pi_source_file in /lib/preinit/*; do
+ . $pi_source_file
+done
+
+boot_run_hook preinit_essential
+
+pi_mount_skip_next=false
+pi_jffs2_mount_success=false
+pi_failsafe_net_message=false
+
+boot_run_hook preinit_main
+
--- /dev/null
+#!/bin/sh
+[ -f /etc/banner ] && cat /etc/banner
+
+export PATH=/usr/bin:/usr/sbin:/bin:/sbin
+export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
+export HOME=${HOME:-/root}
+export PS1='\u@\h:\w\$ '
+
+[ -x /bin/more ] || alias more=less
+[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
+
+[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
+
+[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
+[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
--- /dev/null
+# Internet (IP) protocols
+#
+# Updated from http://www.iana.org/assignments/protocol-numbers and other
+# sources.
+# New protocols will be added on request if they have been officially
+# assigned by IANA and are not historical.
+# If you need a huge list of used numbers please install the nmap package.
+
+ip 0 IP # internet protocol, pseudo protocol number
+#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+ggp 3 GGP # gateway-gateway protocol
+ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
+st 5 ST # ST datagram mode
+tcp 6 TCP # transmission control protocol
+egp 8 EGP # exterior gateway protocol
+igp 9 IGP # any private interior gateway (Cisco)
+pup 12 PUP # PARC universal packet protocol
+udp 17 UDP # user datagram protocol
+hmp 20 HMP # host monitoring protocol
+xns-idp 22 XNS-IDP # Xerox NS IDP
+rdp 27 RDP # "reliable datagram" protocol
+iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
+xtp 36 XTP # Xpress Transfer Protocol
+ddp 37 DDP # Datagram Delivery Protocol
+idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
+ipv6 41 IPv6 # Internet Protocol, version 6
+ipv6-route 43 IPv6-Route # Routing Header for IPv6
+ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
+idrp 45 IDRP # Inter-Domain Routing Protocol
+rsvp 46 RSVP # Reservation Protocol
+gre 47 GRE # General Routing Encapsulation
+esp 50 IPSEC-ESP # Encap Security Payload [RFC2046]
+ah 51 IPSEC-AH # Authentication Header [RFC2402]
+skip 57 SKIP # SKIP
+ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
+ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
+ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
+rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
+vmtp 81 VMTP # Versatile Message Transport
+eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
+ospf 89 OSPFIGP # Open Shortest Path First IGP
+ax.25 93 AX.25 # AX.25 frames
+ipip 94 IPIP # IP-within-IP Encapsulation Protocol
+etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
+encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
+# 99 # any private encryption scheme
+pim 103 PIM # Protocol Independent Multicast
+ipcomp 108 IPCOMP # IP Payload Compression Protocol
+vrrp 112 VRRP # Virtual Router Redundancy Protocol
+l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
+isis 124 ISIS # IS-IS over IPv4
+sctp 132 SCTP # Stream Control Transmission Protocol
+fc 133 FC # Fibre Channel
+
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006-2012 OpenWrt.org
+
+. $IPKG_INSTROOT/lib/functions.sh
+. $IPKG_INSTROOT/lib/functions/service.sh
+
+initscript=$1
+action=${2:-help}
+shift 2
+
+start() {
+ return 0
+}
+
+stop() {
+ return 0
+}
+
+reload() {
+ return 1
+}
+
+restart() {
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+boot() {
+ start "$@"
+}
+
+shutdown() {
+ stop
+}
+
+disable() {
+ name="$(basename "${initscript}")"
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/K??$name
+}
+
+enable() {
+ name="$(basename "${initscript}")"
+ disable
+ [ -n "$START" -o -n "$STOP" ] || {
+ echo "/etc/init.d/$name does not have a START or STOP value"
+ return 1
+ }
+ [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
+ [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
+}
+
+enabled() {
+ name="$(basename "${initscript}")"
+ [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ]
+}
+
+depends() {
+ return 0
+}
+
+help() {
+ cat <<EOF
+Syntax: $initscript [command]
+
+Available commands:
+ start Start the service
+ stop Stop the service
+ restart Restart the service
+ reload Reload configuration files (or restart if that fails)
+ enable Enable service autostart
+ disable Disable service autostart
+$EXTRA_HELP
+EOF
+}
+
+# for procd
+start_service() {
+ return 0
+}
+
+service_triggers() {
+ return 0
+}
+
+stop_service() {
+ return 0
+}
+
+${INIT_TRACE:+set -x}
+
+. "$initscript"
+
+[ -n "$USE_PROCD" ] && {
+ . $IPKG_INSTROOT/lib/functions/procd.sh
+ basescript=$(readlink "$initscript")
+ rc_procd() {
+ procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
+ "$@"
+ procd_close_service
+ }
+
+ start() {
+ rc_procd start_service "$@"
+ }
+
+ stop() {
+ procd_kill "$(basename ${basescript:-$initscript})" "$1"
+ }
+
+ reload() {
+ start
+ }
+}
+
+ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
+list_contains ALL_COMMANDS "$action" || action=help
+[ "$action" = "reload" ] && action='eval reload "$@" || restart "$@" && :'
+$action "$@"
--- /dev/null
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+exit 0
--- /dev/null
+search lan
+nameserver 127.0.0.1
--- /dev/null
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+daytime 13/tcp
+daytime 13/udp
+netstat 15/tcp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp 21/tcp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+smtp 25/tcp
+time 37/tcp
+time 37/udp
+whois 43/tcp
+domain 53/tcp
+domain 53/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/udp
+finger 79/tcp
+www 80/tcp http
+kerberos 88/tcp kerberos5 krb5 kerberos-sec
+kerberos 88/udp kerberos5 krb5 kerberos-sec
+pop3 110/tcp
+pop3 110/udp
+sunrpc 111/tcp
+sunrpc 111/udp
+auth 113/tcp ident
+sftp 115/tcp
+nntp 119/tcp
+ntp 123/tcp
+ntp 123/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap2 143/tcp imap
+imap2 143/udp imap
+snmp 161/tcp
+snmp 161/udp
+snmp-trap 162/tcp snmptrap
+snmp-trap 162/udp snmptrap
+xdmcp 177/tcp
+xdmcp 177/udp
+bgp 179/tcp
+bgp 179/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+https 443/tcp
+https 443/udp
+microsoft-ds 445/tcp
+microsoft-ds 445/udp
+isakmp 500/tcp
+isakmp 500/udp
+rtsp 554/tcp
+rtsp 554/udp
+ipp 631/tcp
+ipp 631/udp
+syslog 514/udp
+printer 515/tcp spooler
+dhcpv6-client 546/tcp
+dhcpv6-client 546/udp
+dhcpv6-server 547/tcp
+dhcpv6-server 547/udp
+afpovertcp 548/tcp
+afpovertcp 548/udp
+nntps 563/tcp snntp
+nntps 563/udp snntp
+ldaps 636/tcp
+ldaps 636/udp
+tinc 655/tcp
+tinc 655/udp
+rsync 873/tcp
+rsync 873/udp
+ftps-data 989/tcp
+ftps 990/tcp
+imaps 993/tcp
+imaps 993/udp
+ircs 994/tcp
+ircs 994/udp
+pop3s 995/tcp
+pop3s 995/udp
+socks 1080/tcp
+socks 1080/udp
+openvpn 1194/tcp
+openvpn 1194/udp
+l2f 1701/tcp l2tp
+l2f 1701/udp l2tp
+radius 1812/tcp
+radius 1812/udp
+radius-acct 1813/tcp radacct
+radius-acct 1813/udp radacct
+nfs 2049/tcp
+nfs 2049/udp
+dict 2628/tcp
+dict 2628/udp
+gpsd 2947/tcp
+gpsd 2947/udp
+icpv2 3130/tcp icp
+icpv2 3130/udp icp
+mysql 3306/tcp
+mysql 3306/udp
+nut 3493/tcp
+nut 3493/udp
+distcc 3632/tcp
+distcc 3632/udp
+daap 3689/tcp
+daap 3689/udp
+svn 3690/tcp subversion
+svn 3690/udp subversion
+epmd 4369/tcp
+epmd 4369/udp
+iax 4569/tcp
+iax 4569/udp
+mtn 4691/tcp
+mtn 4691/udp
+munin 4949/tcp
+sip 5060/tcp
+sip 5060/udp
+sip-tls 5061/tcp
+sip-tls 5061/udp
+xmpp-client 5222/tcp jabber-client
+xmpp-client 5222/udp jabber-client
+xmpp-server 5269/tcp jabber-server
+xmpp-server 5269/udp jabber-server
+mdns 5353/tcp
+mdns 5353/udp
+postgresql 5432/tcp postgres
+postgresql 5432/udp postgres
+x11 6000/tcp
+x11 6000/udp
+mysql-proxy 6446/tcp
+mysql-proxy 6446/udp
+bacula-dir 9101/tcp
+bacula-dir 9101/udp
+bacula-fd 9102/tcp
+bacula-fd 9102/udp
+bacula-sd 9103/tcp
+bacula-sd 9103/udp
+nbd 10809/tcp
+zabbix-agent 10050/tcp
+zabbix-agent 10050/udp
+zabbix-trapper 10051/tcp
+zabbix-trapper 10051/udp
+hkp 11371/tcp
+hkp 11371/udp
+ssmtp 465/tcp smtps
+spamd 783/tcp
+zebrasrv 2600/tcp
+zebra 2601/tcp
+ripd 2602/tcp
+ripngd 2603/tcp
+ospfd 2604/tcp
+bgpd 2605/tcp
+ospf6d 2606/tcp
+ospfapi 2607/tcp
+isisd 2608/tcp
+sane-port 6566/tcp sane saned
+ircd 6667/tcp
+git 9418/tcp
+
--- /dev/null
+root:$1$HA606KI2$p2xC0xL0cw0vQldpUWLPq.:15945:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+root:x:0:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+/bin/ash
+/bin/bash
+/bin/rbash
--- /dev/null
+kernel.panic=3
+net.ipv4.conf.default.arp_ignore=1
+net.ipv4.conf.all.arp_ignore=1
+net.ipv4.ip_forward=1
+net.ipv4.icmp_echo_ignore_broadcasts=1
+net.ipv4.icmp_ignore_bogus_error_responses=1
+net.ipv4.tcp_ecn=0
+net.ipv4.tcp_fin_timeout=30
+net.ipv4.tcp_keepalive_time=120
+net.ipv4.tcp_syncookies=1
+net.ipv4.tcp_timestamps=1
+net.ipv4.tcp_sack=1
+net.ipv4.tcp_dsack=1
+
+net.ipv6.conf.default.forwarding=1
+net.ipv6.conf.all.forwarding=1
+
+net.netfilter.nf_conntrack_acct=1
+net.netfilter.nf_conntrack_checksum=0
+net.netfilter.nf_conntrack_max=16384
+net.netfilter.nf_conntrack_tcp_timeout_established=3600
+net.netfilter.nf_conntrack_udp_timeout=60
+net.netfilter.nf_conntrack_udp_timeout_stream=180
+
+# disable bridge firewalling by default
+net.bridge.bridge-nf-call-arptables=0
+net.bridge.bridge-nf-call-ip6tables=0
+net.bridge.bridge-nf-call-iptables=0
--- /dev/null
+## This file contains files and directories that should
+## be preserved during an upgrade.
+
+# /etc/example.conf
+# /etc/openvpn/
--- /dev/null
+{
+ "messages" : [
+ "555342431234567800000000000006d0000000000000000000000000000000",
+ "5553424312345678000000000000061b004600000000000000000000000000",
+ "5553424312345678000000000000061b000000020000000000000000000000",
+ "5553424312345678000000000000061b000000030000000000000000000000",
+ "55534243f0298d8124000000800006bc626563240000000000000000000000",
+ "0902200001010080fa0904000002080650000705010200020007058102000200",
+ "55534243785634120100000080000601000000000000000000000000000000",
+ "55534243123456780000000000000616000000000000000000000000000000",
+ "5553424312345678000000000000061b000000ff0000000000000000000000",
+ "55534243123456780000000000000601000000000000000000000000000000",
+ "5553424368032c882400000080000612000000240000000000000000000000",
+ "5553424312345678c00000008000069f140000000000000000000000000000",
+ "01b0000000000000000000000000000000000000000000000000000000000000",
+ "1b5a01",
+ "5553424312345678c000000080010606f50402527000000000000000000000",
+ "5553424329000000000000000000061b000000020000000000000000000000",
+ "555342431234567800000000000006f0010300000000000000000000000000",
+ "5553424312345678000000000000061e000000000000000000000000000000",
+ "5553424312345679000000000000061b000000020000000000000000000000",
+ "55534243123456780000000000000aff554d53434847000000000000000000",
+ "555342431234567803000000800006f1010100000000000000000000000000",
+ "555342431234567800000000000005f1010100000000000000000000000000",
+ "555342431234567824000000800008ff024445564348470000000000000000",
+ "555342431234567824000000800008ff020000000000000000000000000000",
+ "55534243b82e238c24000000800008ff020000000000000000000000000000",
+ "5553424387654321000000000000061b000000020000000000000000000000",
+ "55534243123456780000000000000011062000000100000000000000000000",
+ "55534243123456780600000080010a11060000000000000000000000000000",
+ "55534243123456780000000000000a11062000000000000100000000000000",
+ "55534243908ecd89000000000000061b000000020000000000000000000000",
+ "555342431234567824000000800008ff524445564348470000000000000000",
+ "555342431234567824000000800008ff524445564348473100000000000000",
+ "55534243123456782400000080000dfe524445564348473d4e444953000000",
+ "55534243d85dd88524000000800008ff524445564348470000000000000000",
+ "5553424302000000000000000000061b000000020000000000000000000000",
+ "55534243123456702000000080000c85010101180101010101000000000000",
+ "55534243123456782400000080000685000000240000000000000000000000",
+ "555342430800498200000000000010ff000000000000000000000000000000",
+ "5553424348c4758600000000000010ff000000000000000000000000000000",
+ "555342431234567824000000800006bc626563240000000000000000000000",
+ "5553424330f4cf8124000000800108df200000000000000000000000000000",
+ "5553424312345678c00000008000069f030000000000000000000000000000",
+ "555342431234567824000000800008FF05B112AEE102000000000000000000",
+ "5553424328ae1a85000000000000061b000000020000000000000000000000",
+ "55534243123456788000000080000606f50402527000000000000000000000",
+ "55534243123456780000000000000606f50402527000000000000000000000",
+ "55534243123456780000000080000606f50402527000000000000000000000",
+ "55534243123456781200000080000603000000020000000000000000000000",
+ "55534243123456780000000000000cff020000000000000000000000000000",
+ "555342431234567800000000000006bd000000020000000000000000000000",
+ "5553424312345678800000008000060619181a207000000000000000000000",
+ "555342431234567800000000000010ff000000000000000000000000000000",
+ "555342431234567800000000000008ff000000000000030000000000000000",
+ "555342431234567824000000800108df200000000000000000000000000000",
+ "555342431234567800000000000003f0010100000000000000000000000000",
+ "55534243123456780000000000000600000000000000000000000000000000",
+ "5553424312345679c000000080000671030000000000000000000000000000",
+ "5553424308902082000000000000061b000000020000000000000000000000",
+ "5553424312345678c000000080000671010000000000000000000000000000",
+ "555342439f000000000000000000061b000000020000000000000000000000",
+ "5553424398e2c4812400000080000bff524445564348473d43440000000000"
+ ],
+
+ "devices" : {
+ "03f0:002a": {
+ "*": {
+ "t_class": 7,
+ "msg": [ 0 ],
+ "response": true
+ }
+ },
+ "0408:f000": {
+ "*": {
+ "t_vendor": 1032,
+ "t_product": [ 53257 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0421:060c": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1550 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0421:0610": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1554 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0421:061d": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1566 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0421:0622": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1571 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0421:0627": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1554, 1577 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0421:062c": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1581 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0421:0632": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1586 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0421:0637": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1592 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0471:1210": {
+ ":uMa=Philips": {
+ "t_class": 255,
+ "msg": [ 2 ],
+ "response": true
+ },
+ ":uMa=Wisue": {
+ "t_vendor": 7612,
+ "t_product": [ 5 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "0471:1237": {
+ "*": {
+ "t_vendor": 1137,
+ "t_product": [ 4614, 4660 ],
+ "msg": [ 3 ],
+ "response": true
+ }
+ },
+ "0482:024d": {
+ "*": {
+ "t_class": 2,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "04bb:bccd": {
+ "*": {
+ "t_vendor": 1211,
+ "t_product": [ 2377 ],
+ "msg": [ 4 ]
+ }
+ },
+ "04e8:680c": {
+ "*": {
+ "t_vendor": 1256,
+ "t_product": [ 26514 ],
+ "msg": [ 5 ]
+ }
+ },
+ "04e8:689a": {
+ "*": {
+ "t_vendor": 1256,
+ "t_product": [ 26761 ],
+ "msg": [ 6 ]
+ }
+ },
+ "04e8:f000": {
+ ":sMo=U209": {
+ "t_vendor": 1256,
+ "t_product": [ 26113 ],
+ "msg": [ 7 ]
+ }
+ },
+ "057c:84ff": {
+ "*": {
+ "t_vendor": 1404,
+ "t_product": [ 33793 ],
+ "no_driver": true,
+ "msg": [ 8 ]
+ }
+ },
+ "05c6:1000": {
+ ":sVe=Option": {
+ "t_vendor": 2800,
+ "t_product": [ 26881, 26369, 26112 ],
+ "msg": [ 9 ],
+ "response": true
+ },
+ ":uMa=AnyDATA": {
+ "t_vendor": 5845,
+ "t_product": [ 25858 ],
+ "msg": [ 2 ]
+ },
+ ":uMa=CELOT": {
+ "t_vendor": 8479,
+ "t_product": [ 26625 ],
+ "msg": [ 2 ]
+ },
+ ":uMa=DGT": {
+ "t_vendor": 8479,
+ "t_product": [ 26626 ],
+ "msg": [ 2 ]
+ },
+ ":uMa=Option": {
+ "t_vendor": 2800,
+ "t_product": [ 26881 ],
+ "msg": [ 9 ],
+ "response": true
+ },
+ ":uMa=SAMSUNG": {
+ "t_vendor": 1256,
+ "t_product": [ 26113 ],
+ "msg": [ 7 ]
+ },
+ ":uMa=SSE": {
+ "t_vendor": 1478,
+ "t_product": [ 24576 ],
+ "msg": [ 2 ],
+ "response": true
+ },
+ ":uMa=StrongRising": {
+ "t_vendor": 650,
+ "t_product": [ 4102 ],
+ "msg": [ 2 ]
+ },
+ ":uMa=Vertex": {
+ "t_vendor": 8167,
+ "t_product": [ 256 ],
+ "msg": [ 2 ]
+ }
+ },
+ "05c6:2000": {
+ "*": {
+ "t_vendor": 1478,
+ "t_product": [ 21 ],
+ "msg": [ 10 ],
+ "response": true,
+ "check": true
+ }
+ },
+ "05c6:2001": {
+ "*": {
+ "t_vendor": 7694,
+ "t_product": [ 52758, 52990 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "05c6:6503": {
+ "*": {
+ "t_vendor": 5845,
+ "t_product": [ 25858 ],
+ "msg": [ 2 ]
+ }
+ },
+ "05c6:f000": {
+ "*": {
+ "t_vendor": 1478,
+ "t_product": [ 36864 ],
+ "msg": [ 2 ]
+ }
+ },
+ "05c7:1000": {
+ "*": {
+ "t_vendor": 1479,
+ "t_product": [ 24576 ],
+ "msg": [ 11 ]
+ }
+ },
+ "072f:100d": {
+ "*": {
+ "t_vendor": 1839,
+ "t_product": [ 37068 ],
+ "no_driver": true,
+ "msg_endpoint": 2,
+ "msg": [ 12 ]
+ }
+ },
+ "07d1:a800": {
+ "*": {
+ "t_vendor": 2001,
+ "t_product": [ 15874 ],
+ "msg": [ 2 ]
+ }
+ },
+ "07d1:a804": {
+ "*": {
+ "t_vendor": 2001,
+ "t_product": [ 32273 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0922:1001": {
+ "*": {
+ "t_vendor": 2338,
+ "t_product": [ 4098 ],
+ "no_driver": true,
+ "msg_endpoint": 1,
+ "msg": [ 13 ],
+ "response_endpoint": 1
+ }
+ },
+ "0930:0d46": {
+ "*": {
+ "t_vendor": 2352,
+ "t_product": [ 3397 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "0ace:2011": {
+ "*": {
+ "no_driver": true,
+ "msg": [ 2 ]
+ }
+ },
+ "0ace:20ff": {
+ "*": {
+ "no_driver": true,
+ "msg": [ 2 ]
+ }
+ },
+ "0af0:4007": {
+ "*": {
+ "t_vendor": 2800,
+ "t_product": [ 16389 ],
+ "mode": "Sierra",
+ "no_driver": true,
+ "msg": [ ]
+ }
+ },
+ "0af0:6711": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6731": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6751": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6771": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6791": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6811": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6911": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6951": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6971": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7011": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7031": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7051": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7071": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7111": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7211": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7251": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7271": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7301": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7311": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7361": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7381": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7401": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7501": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7601": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7701": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7706": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7801": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7901": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7a01": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 9 ]
+ }
+ },
+ "0af0:7a05": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 9 ]
+ }
+ },
+ "0af0:8006": {
+ "*": {
+ "t_vendor": 2800,
+ "t_product": [ 37120 ],
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8200": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8201": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8300": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8302": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8304": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8400": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8600": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8700": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8800": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8900": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:9000": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:c031": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:c100": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d001": {
+ "*": {
+ "t_vendor": 2800,
+ "t_product": [ 53591 ],
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d013": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d031": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d033": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d035": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d055": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d057": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d058": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d155": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d157": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d255": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d257": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d357": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0b3c:c700": {
+ "*": {
+ "t_vendor": 2876,
+ "t_product": [ 49152, 49153, 49154 ],
+ "msg": [ 3 ],
+ "response": true
+ }
+ },
+ "0b3c:f000": {
+ "*": {
+ "t_vendor": 2876,
+ "t_product": [ 49155, 49156 ],
+ "msg": [ 14 ],
+ "response": true
+ }
+ },
+ "0cf3:20ff": {
+ "*": {
+ "t_vendor": 3315,
+ "t_product": [ 28688 ],
+ "no_driver": true,
+ "msg": [ 15 ],
+ "response": true
+ }
+ },
+ "0d46:45a1": {
+ "*": {
+ "t_vendor": 3398,
+ "t_product": [ 17833 ],
+ "mode": "Kobil",
+ "msg": [ ]
+ }
+ },
+ "0d46:45a5": {
+ "*": {
+ "t_vendor": 3398,
+ "t_product": [ 17837 ],
+ "mode": "Kobil",
+ "msg": [ ]
+ }
+ },
+ "0df7:0800": {
+ "*": {
+ "t_class": 255,
+ "mode": "MobileAction",
+ "no_driver": true,
+ "msg": [ ]
+ }
+ },
+ "0e8d:0002": {
+ ":uPr=MT": {
+ "t_vendor": 3725,
+ "t_product": [ 161, 162 ],
+ "msg": [ 16 ]
+ }
+ },
+ "0e8d:7109": {
+ "*": {
+ "t_vendor": 3725,
+ "t_product": [ 28952 ],
+ "no_driver": true,
+ "msg": [ 17, 18 ]
+ }
+ },
+ "0fce:d0cf": {
+ "*": {
+ "t_class": 2,
+ "detach_storage": true,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "0fce:d0e1": {
+ "*": {
+ "t_class": 2,
+ "mode": "Sony",
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "0fce:d103": {
+ "*": {
+ "t_class": 2,
+ "mode": "Sony",
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "0fd1:1000": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "1004:1000": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 19 ]
+ }
+ },
+ "1004:607f": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24576, 24852 ],
+ "msg": [ 20 ],
+ "response": true
+ }
+ },
+ "1004:613a": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24868 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "1004:613f": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24897 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "1004:614e": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24885 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "1004:6156": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24919 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "1004:6190": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24999 ],
+ "msg": [ 2 ]
+ }
+ },
+ "1004:61aa": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24999 ],
+ "msg": [ 2 ]
+ }
+ },
+ "1004:61dd": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24975 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "1004:61e7": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 25062 ],
+ "msg": [ 2 ]
+ }
+ },
+ "1004:61eb": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 25066 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "1004:6327": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 25382 ],
+ "msg": [ 21 ]
+ }
+ },
+ "1033:0035": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4099 ],
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "106c:3b03": {
+ "*": {
+ "t_vendor": 4204,
+ "t_product": [ 14101 ],
+ "msg": [ 22 ]
+ }
+ },
+ "106c:3b05": {
+ "*": {
+ "t_vendor": 4204,
+ "t_product": [ 14102 ],
+ "msg": [ 23 ]
+ }
+ },
+ "106c:3b06": {
+ "*": {
+ "t_vendor": 4204,
+ "t_product": [ 14103 ],
+ "msg": [ 24 ]
+ }
+ },
+ "106c:3b14": {
+ "*": {
+ "t_vendor": 4204,
+ "t_product": [ 14113 ],
+ "no_driver": true,
+ "msg": [ 22 ]
+ }
+ },
+ "1076:7f40": {
+ "*": {
+ "t_vendor": 4214,
+ "t_product": [ 32512 ],
+ "mode": "GCT",
+ "msg": [ ]
+ }
+ },
+ "109b:f009": {
+ "*": {
+ "t_vendor": 4251,
+ "t_product": [ 37140 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "1199:0fff": {
+ "*": {
+ "t_vendor": 4505,
+ "t_product": [ 23, 24, 25, 32, 33, 34, 36, 38, 39, 40, 41, 274, 288, 536, 544, 548, 769, 26626, 26627, 26628, 26629, 26632, 26633, 26642, 26643, 26645, 26646, 26656, 26657, 26658, 26674, 26675, 26676, 26677, 26680, 26681, 26682, 26683, 26684, 26685, 26686, 26704, 26705, 26706, 26707, 26709, 26710, 26713, 26714 ],
+ "mode": "Sierra",
+ "no_driver": true,
+ "msg": [ ]
+ }
+ },
+ "1266:1000": {
+ "*": {
+ "t_vendor": 4710,
+ "t_product": [ 4098, 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4113, 4114 ],
+ "msg": [ 17, 25 ],
+ "response": true
+ }
+ },
+ "12d1:1001": {
+ "*": {
+ "t_class": 255,
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:1003": {
+ "*": {
+ "t_class": 255,
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:1009": {
+ "*": {
+ "t_class": 255,
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:101e": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1030": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4148 ],
+ "no_driver": true,
+ "msg": [ 27 ]
+ }
+ },
+ "12d1:1031": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4149 ],
+ "no_driver": true,
+ "msg": [ 27 ]
+ }
+ },
+ "12d1:1414": {
+ "*": {
+ "t_class": 255,
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:1446": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4097, 5126, 5131, 5132, 5138, 5147, 5170, 5171, 5174, 5292, 5382, 5393 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1449": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5188 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14ad": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5294 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14b5": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5288, 5290 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14b7": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5324 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14ba": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5330 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14c1": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5318 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14c3": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5320 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14c4": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5322 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14c5": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5323 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14d1": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5321 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14fe": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5382 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1505": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5131, 5382, 5391, 5386 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:151a": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5403 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1520": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5221 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1521": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5220 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1523": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5265 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1526": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5327 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1553": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4097 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1557": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5285 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:155b": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5382 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1c0b": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 7173, 7175, 7176, 7184 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1c24": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 7186 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1d50": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "12d1:1da1": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 7433 ],
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:1f01": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5339 ],
+ "no_driver": true,
+ "msg": [ 28 ]
+ }
+ },
+ "12d1:1f11": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5308 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:380b": {
+ "*": {
+ "t_class": 2,
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "1307:1169": {
+ "*": {
+ "t_vendor": 5041,
+ "t_product": [ 49 ],
+ "mode": "Cisco",
+ "no_driver": true,
+ "msg": [ ]
+ }
+ },
+ "1410:5010": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 16640, 17408, 28720 ],
+ "msg": [ 2 ]
+ }
+ },
+ "1410:5020": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 24576, 28673 ],
+ "msg": [ 2 ]
+ }
+ },
+ "1410:5030": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 24576 ],
+ "msg": [ 2 ]
+ }
+ },
+ "1410:5031": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 24578 ],
+ "msg": [ 2 ]
+ }
+ },
+ "1410:5041": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 28673, 28675 ],
+ "msg": [ 2 ]
+ }
+ },
+ "1410:5059": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 28721, 28738 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "1410:7001": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 2 ]
+ }
+ },
+ "148e:a000": {
+ "*": {
+ "t_class": 2,
+ "mode": "Sequans",
+ "msg": [ ]
+ }
+ },
+ "148f:2578": {
+ "*": {
+ "t_vendor": 5263,
+ "t_product": [ 36897 ],
+ "no_driver": true,
+ "msg": [ 29 ]
+ }
+ },
+ "15eb:7153": {
+ "*": {
+ "t_vendor": 5611,
+ "t_product": [ 29010 ],
+ "msg": [ 2 ]
+ }
+ },
+ "16d8:6281": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 30 ]
+ }
+ },
+ "16d8:6803": {
+ "*": {
+ "t_class": 2,
+ "msg": [ 31 ]
+ }
+ },
+ "16d8:6804": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 30 ]
+ }
+ },
+ "16d8:700a": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 32 ]
+ }
+ },
+ "16d8:700b": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 32 ]
+ }
+ },
+ "16d8:f000": {
+ "*": {
+ "t_vendor": 5848,
+ "t_product": [ 24582 ],
+ "msg": [ 33 ]
+ }
+ },
+ "198a:0003": {
+ "*": {
+ "t_vendor": 6538,
+ "t_product": [ 2 ],
+ "msg": [ 2 ]
+ }
+ },
+ "198f:bccd": {
+ "*": {
+ "t_vendor": 6543,
+ "t_product": [ 544 ],
+ "no_driver": true,
+ "msg": [ 4 ]
+ }
+ },
+ "19d2:0003": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 17, 18 ]
+ }
+ },
+ "19d2:0013": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 21 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:0026": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 148, 338 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:0031": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 148 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:0040": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 34 ],
+ "msg": [ 3 ]
+ }
+ },
+ "19d2:0053": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 49 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:0083": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 292 ],
+ "msg": [ 2 ],
+ "response": true
+ },
+ ":uPr=WCDMA": {
+ "t_vendor": 6610,
+ "t_product": [ 292 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:0101": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 260 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:0103": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 49 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:0110": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 289 ],
+ "msg": [ 34 ],
+ "response": true
+ }
+ },
+ "19d2:0115": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 278 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:0120": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 121 ],
+ "detach_storage": false,
+ "msg": [ 2 ],
+ "response": false,
+ "interface": 0
+ }
+ },
+ "19d2:0146": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 323 ],
+ "msg": [ 18 ],
+ "response": true
+ }
+ },
+ "19d2:0149": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 292 ],
+ "msg": [ 17, 18, 35 ],
+ "response": true
+ }
+ },
+ "19d2:0154": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 23, 279 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:0166": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 359 ],
+ "msg": [ 36 ]
+ }
+ },
+ "19d2:0169": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 368 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:0325": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 806 ],
+ "msg": [ 2 ]
+ }
+ },
+ "19d2:1001": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4099 ],
+ "no_driver": true,
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:1007": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4104 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:1009": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4112 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:1013": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4117 ],
+ "no_driver": true,
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:1017": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4120 ],
+ "msg": [ 2 ]
+ }
+ },
+ "19d2:1171": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4467 ],
+ "no_driver": true,
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:1175": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4471 ],
+ "no_driver": true,
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:1179": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4481 ],
+ "no_driver": true,
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:1201": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4611 ],
+ "msg": [ 2 ]
+ }
+ },
+ "19d2:1216": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4631 ],
+ "msg": [ 37 ]
+ }
+ },
+ "19d2:1224": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 130 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:1514": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5397 ],
+ "msg": [ 38 ]
+ }
+ },
+ "19d2:1517": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5401 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:1520": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 322 ],
+ "msg": [ 18 ],
+ "response": true
+ }
+ },
+ "19d2:1523": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5413 ],
+ "msg": [ 2 ],
+ "response": true
+ }
+ },
+ "19d2:1542": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5444 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:2000": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 1, 2, 21, 22, 23, 49, 55, 82, 85, 97, 99, 100, 102, 145, 264, 279, 296, 343, 5122, 8194, 8195 ],
+ "msg": [ 17, 18, 35 ],
+ "response": true
+ }
+ },
+ "19d2:bccd": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 370 ],
+ "no_driver": true,
+ "msg": [ 39 ]
+ }
+ },
+ "19d2:ffde": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 65501 ],
+ "msg": [ 2 ]
+ }
+ },
+ "19d2:ffe6": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 65509 ],
+ "msg": [ 40 ]
+ }
+ },
+ "19d2:fff5": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 65521, 65534, 65535 ],
+ "msg": [ 41 ]
+ }
+ },
+ "19d2:fff6": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 65521 ],
+ "msg": [ 41 ]
+ }
+ },
+ "1a8d:1000": {
+ "*": {
+ "t_vendor": 6797,
+ "t_product": [ 4098, 4105, 8198 ],
+ "msg": [ 17, 18 ],
+ "release_delay": 4000,
+ "response": true
+ }
+ },
+ "1a8d:2000": {
+ "*": {
+ "t_vendor": 6797,
+ "t_product": [ 8198 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "1ab7:5700": {
+ "*": {
+ "t_vendor": 6839,
+ "t_product": [ 8192, 22321 ],
+ "msg": [ 2 ]
+ }
+ },
+ "1b7d:0700": {
+ "*": {
+ "t_vendor": 7037,
+ "t_product": [ 1 ],
+ "msg": [ 42 ]
+ }
+ },
+ "1bbb:000f": {
+ "*": {
+ "t_vendor": 7099,
+ "t_product": [ 15 ],
+ "msg": [ 43 ]
+ }
+ },
+ "1bbb:00ca": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 44 ]
+ }
+ },
+ "1bbb:f000": {
+ "*": {
+ "t_vendor": 7099,
+ "t_product": [ 0, 23, 183 ],
+ "msg": [ 44 ]
+ }
+ },
+ "1bbb:f017": {
+ "*": {
+ "t_vendor": 7099,
+ "t_product": [ 23 ],
+ "msg": [ 44 ]
+ }
+ },
+ "1bbb:f052": {
+ "*": {
+ "t_vendor": 7099,
+ "t_product": [ 82 ],
+ "msg": [ 44 ]
+ }
+ },
+ "1c9e:1001": {
+ "*": {
+ "t_vendor": 7326,
+ "t_product": [ 24673 ],
+ "msg": [ 45 ]
+ }
+ },
+ "1c9e:6061": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 45 ]
+ }
+ },
+ "1c9e:9200": {
+ "*": {
+ "t_vendor": 7326,
+ "t_product": [ 37378 ],
+ "msg": [ 45 ]
+ }
+ },
+ "1c9e:9800": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 44 ]
+ }
+ },
+ "1c9e:98ff": {
+ "*": {
+ "t_vendor": 7326,
+ "t_product": [ 38913, 38913 ],
+ "msg": [ 46 ]
+ }
+ },
+ "1c9e:9e00": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 45 ]
+ }
+ },
+ "1c9e:f000": {
+ "*": {
+ "t_vendor": 7326,
+ "t_product": [ 36864, 38403, 38405, 38407 ],
+ "msg": [ 44 ]
+ }
+ },
+ "1da5:f000": {
+ "*": {
+ "t_vendor": 7589,
+ "t_product": [ 17682 ],
+ "mode": "Qisda",
+ "msg": [ ]
+ }
+ },
+ "1dd6:1000": {
+ "*": {
+ "t_vendor": 7638,
+ "t_product": [ 4098 ],
+ "msg": [ 47 ],
+ "response": true
+ }
+ },
+ "1de1:1101": {
+ "*": {
+ "t_vendor": 8679,
+ "t_product": [ 14 ],
+ "msg": [ 48 ]
+ }
+ },
+ "1e0e:f000": {
+ "*": {
+ "t_vendor": 7694,
+ "t_product": [ 37376, 36864 ],
+ "msg": [ 49 ],
+ "response": true
+ }
+ },
+ "1e89:f000": {
+ "*": {
+ "t_vendor": 7817,
+ "t_product": [ 6688 ],
+ "msg": [ 50 ]
+ }
+ },
+ "1edf:6003": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "1ee8:0009": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 11 ],
+ "msg": [ 51 ],
+ "response": true
+ }
+ },
+ "1ee8:0013": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 18, 20 ],
+ "msg": [ 51 ],
+ "response": true
+ }
+ },
+ "1ee8:0040": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 62, 63 ],
+ "msg": [ 51 ],
+ "response": true
+ }
+ },
+ "1ee8:004a": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 73 ],
+ "msg": [ 51 ]
+ }
+ },
+ "1ee8:0054": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 83 ],
+ "msg": [ 51 ],
+ "response": true
+ }
+ },
+ "1ee8:0060": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 95 ],
+ "msg": [ 52 ]
+ }
+ },
+ "1f28:0021": {
+ "*": {
+ "t_vendor": 7976,
+ "t_product": [ 32 ],
+ "msg": [ 53 ]
+ }
+ },
+ "1fac:0032": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "1fac:0130": {
+ "*": {
+ "t_vendor": 8108,
+ "t_product": [ 305 ],
+ "msg": [ 53 ]
+ }
+ },
+ "1fac:0150": {
+ "*": {
+ "t_vendor": 8108,
+ "t_product": [ 337 ],
+ "msg": [ 53 ]
+ }
+ },
+ "1fac:0151": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "2001:a80b": {
+ "*": {
+ "t_vendor": 8193,
+ "t_product": [ 32000 ],
+ "msg": [ 54 ]
+ }
+ },
+ "201e:1023": {
+ "*": {
+ "t_vendor": 8222,
+ "t_product": [ 4130 ],
+ "msg": [ 55, 56 ],
+ "response": true
+ }
+ },
+ "201e:2009": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "2020:f00e": {
+ "*": {
+ "t_vendor": 8224,
+ "t_product": [ 4101, 4104 ],
+ "msg": [ 2 ],
+ "wait": 2
+ }
+ },
+ "2077:f000": {
+ "*": {
+ "t_vendor": 8311,
+ "t_product": [ 36864 ],
+ "msg": [ 57 ]
+ }
+ },
+ "21f5:1000": {
+ "*": {
+ "t_vendor": 8693,
+ "t_product": [ 8200 ],
+ "msg": [ 58 ]
+ }
+ },
+ "22de:6803": {
+ "*": {
+ "t_vendor": 8926,
+ "t_product": [ 26625 ],
+ "msg": [ 17, 18 ]
+ }
+ },
+ "22f4:0021": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 59 ]
+ }
+ },
+ "230d:0001": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "230d:0007": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "230d:0101": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "2357:0200": {
+ "*": {
+ "t_vendor": 9047,
+ "t_product": [ 513 ],
+ "msg": [ 2 ]
+ }
+ },
+ "8888:6500": {
+ "*": {
+ "t_vendor": 5848,
+ "t_product": [ 25907 ],
+ "msg": [ 60 ]
+ }
+ }
+ }
+}
--- /dev/null
+#
+# VTun - Virtual Tunnel over TCP/IP network.
+# Copyright (C) 1998-2008 Maxim Krasnyansky <max_mk@yahoo.com>
+#
+# Cleanup of English and spelling by
+# Ted Rolle <ted@acacia.datacomm.com>
+#
+# Configuration file example
+# $Id: vtund.conf,v 1.4.2.2 2008/01/07 22:36:05 mtbishop Exp $
+#
+#
+# Lines which begin with '#' are comments
+#
+# File format:
+#
+# XXXXX {
+# option param; option param;
+# option param;
+# ......
+# }
+# Where XXXXX:
+# options - General options.
+# default - default session options.
+# session - Session options.
+#
+# Options _must_ be grouped by curly braces '{' '}'.
+# Each option _must_ end with ';'
+#
+# -----------
+# General options:
+#
+# type - Server type.
+# 'stand' - Stand alone server (default).
+# 'inetd' - Started by inetd.
+# Used only by the server.
+#
+# -----------
+# port - Server TCP port number.
+#
+# -----------
+# bindaddr - Server listen address. Used to force vtund to bind
+# to the specific address and port in server mode.
+# Format:
+# bindaddr {
+# option .....;
+# };
+#
+# 'bindaddr' options:
+#
+# iface - Use interface address as the listen address.
+# Format:
+# iface if_name;
+#
+# addr - Listen address.
+# Format:
+# addr ip_address;
+# addr host_name;
+#
+# -----------
+# syslog - Syslog facility.
+#
+# -----------
+# timeout - General VTun timeout.
+#
+# -----------
+# ppp - Program for the ppp initialization.
+#
+# -----------
+# ifconfig - Program for the net interface initialization.
+#
+# -----------
+# route - Program for the routing table manipulation.
+#
+# -----------
+# firewall - Program for the firewall setup.
+#
+# -----------
+#
+# Session options:
+#
+# passwd - Password for authentication.
+#
+# -----------
+# type - Tunnel type.
+# 'tun' - IP tunnel (No PPP,Ether,.. headers).
+# 'ether' - Ethernet tunnel.
+# 'tty' - Serial tunnel, PPP, SLIP, etc.
+# 'pipe' - Pipe tunnel.
+# Default type is 'tty'.
+# Ignored by the client.
+#
+# -----------
+# device - Network device.
+# 'tapXX' - for 'ether'
+# 'tunXX' - for 'tun'
+# By default VTun will automatically select available
+# device.
+#
+# -----------
+# proto - Protocol.
+# 'tcp' - TCP protocol.
+# 'udp' - UDP protocol.
+#
+# 'tcp' is default for all tunnel types.
+# 'udp' is recommended for 'ether' and 'tun' only.
+#
+# This option is ignored by the client.
+#
+# -----------
+# persist - Persist mode.
+# 'yes' - Reconnect to the server after connection
+# termination.
+# 'no' - Exit after connection termination (default).
+# Used only by the client.
+#
+# -----------
+# keepalive - Enable 'yes' or disable 'no' connection
+# keep-alive. Ignored by the client.
+#
+# -----------
+# timeout - Connect timeout.
+#
+# -----------
+# compress - Enable 'yes' or disable 'no' compression.
+# It is also possible to specify method:
+# 'zlib' - ZLIB compression
+# 'lzo' - LZO compression
+# and level:
+# from 1(best speed) to 9(best compression)
+# separated by ':'. Default method is 'zlib:1'.
+# Ignored by the client.
+#
+# -----------
+# encrypt - Enable 'yes' or disable 'no' encryption.
+# It is also possible to specify a method:
+# 'blowfish128ecb' - Blowfish cipher, 128 bit key, mode ECB
+# 'blowfish128cbc' - Blowfish cipher, 128 bit key, mode CBC
+# 'blowfish128cfb' - Blowfish cipher, 128 bit key, mode CFB
+# 'blowfish128ofb' - Blowfish cipher, 128 bit key, mode OFB
+# 'blowfish256ecb' - Blowfish cipher, 256 bit key, mode ECB
+# 'blowfish256cbc' - Blowfish cipher, 256 bit key, mode CBC
+# 'blowfish256cfb' - Blowfish cipher, 256 bit key, mode CFB
+# 'blowfish256ofb' - Blowfish cipher, 256 bit key, mode OFB
+# 'aes128ecb' - AES cipher, 128 bit key, mode ECB
+# 'aes128cbc' - AES cipher, 128 bit key, mode CBC
+# 'aes128cfb' - AES cipher, 128 bit key, mode CFB
+# 'aes128ofb' - AES cipher, 128 bit key, mode OFB
+# 'aes256ecb' - AES cipher, 256 bit key, mode ECB
+# 'aes256cbc' - AES cipher, 256 bit key, mode CBC
+# 'aes256cfb' - AES cipher, 256 bit key, mode CFB
+# 'aes256ofb' - AES cipher, 256 bit key, mode OFB
+# Default method is 'blowfish128ecb'.
+# Ignored by the client.
+#
+# -----------
+# stat - Enable 'yes' or disable 'no' statistics.
+# If enabled vtund will log statistic counters every
+# 5 minutes.
+#
+# -----------
+# speed - Speed of the connection in kilobits/second.
+# 8,16,32,64,128,256,etc.
+# 0 means maximum possible speed without shaping.
+# You can specify speed in form IN:OUT.
+# IN - to the client, OUT - from the client.
+# Single number means same speed for IN and OUT.
+# Ignored by the client.
+#
+# -----------
+# up - List of programs to run after connection has been
+# established. Used to initialize protocols, devices,
+# routing and firewall.
+# Format:
+# up {
+# option .....;
+# option .....;
+# };
+#
+# down - List of programs to run after connection has been
+# terminated. Used to reset protocols, devices, routing
+# and firewall.
+# Format:
+# down {
+# option .....;
+# option .....;
+# };
+#
+# 'up' and 'down' options:
+#
+# program - Run specified program.
+# Format:
+# program path arguments wait;
+#
+# path - Full path to the program.
+# '/bin/sh' will be used if path was omitted.
+#
+# arguments - Arguments to pass to the program.
+# Must be enclosed in double quotes.
+# Special characters and expansions:
+# ' (single quotes) - group arguments
+# \ (back slash) - escape character
+# %%(double percent) - same as %d
+# %d - TUN or TAP device or TTY port name
+# %A - Local IP address
+# %P - Local TCP or UDP port
+# %a - Remote IP address
+# %p - Remote TCP or UDP port
+#
+# wait - Wait for the program termination.
+#
+# ppp - Run program specified by 'ppp' statement in
+# 'options' section.
+# Format:
+# ppp arguments;
+#
+# ifconfig - Run program specified by 'ifconfig' statement in
+# 'options' section.
+# Format:
+# ifconfig arguments;
+#
+# route - Run program specified by 'route' statement in
+# 'options' section.
+# Format:
+# route arguments;
+#
+# firewall - Run program specified by 'firewall' statement in
+# 'options' section.
+# Format:
+# firewall arguments;
+#
+# -----------
+# srcaddr - Local (source) address. Used to force vtund to bind
+# to the specific address and port in client mode.
+# Format:
+# srcaddr {
+# option .....;
+# option .....;
+# };
+#
+# 'srcaddr' options:
+#
+# iface - Use interface address as the Source address.
+# Format:
+# iface if_name;
+#
+# addr - Source address.
+# Format:
+# addr ip_address;
+# addr host_name;
+#
+# port - Source port.
+# Format:
+# port port_no;
+#
+# -----------
+# multi - Multiple connections.
+# 'yes' or 'allow' - allow multiple connections.
+# 'no' or 'deny' - deny multiple connections.
+# 'killold' - allow new connection and kill old one.
+# Ignored by the client.
+#
+# -----------
+# Notes:
+# Options 'Ignored by the client' are provided by server
+# at the connection initialization.
+#
+# Option names cannot be abbreviated.
+#
+# ----- CUT HERE --- Server config --- CUT HERE -----
+#
+options {
+ port 5000; # Listen on this port.
+ bindaddr { iface lo; }; # Listen only on loopback device.
+
+ # Syslog facility
+ syslog daemon;
+
+ # Path to various programs
+ ppp /usr/sbin/pppd;
+ ifconfig /sbin/ifconfig;
+ route /sbin/route;
+ firewall /sbin/ipchains;
+ ip /sbin/ip;
+}
+
+# Default session options
+default {
+ compress no; # Compression is off by default
+ speed 0; # By default maximum speed, NO shaping
+}
+
+# TUN example. Session 'cobra'.
+cobra {
+ passwd Ma&^TU; # Password
+ type tun; # IP tunnel
+ proto udp; # UDP protocol
+ compress lzo:9; # LZO compression level 9
+ encrypt yes; # Encryption
+ keepalive yes; # Keep connection alive
+
+ up {
+ # Connection is Up
+
+ # 10.3.0.1 - local, 10.3.0.2 - remote
+ ifconfig "%% 10.3.0.1 pointopoint 10.3.0.2 mtu 1450";
+ };
+}
+
+# the same as above, but with iproute2 command
+cobra {
+ passwd Ma&^TU; # Password
+ type tun; # IP tunnel
+ proto udp; # UDP protocol
+ compress lzo:9; # LZO compression level 9
+ encrypt yes; # Encryption
+ keepalive yes; # Keep connection alive
+
+ up {
+ # Connection is Up
+
+ # 10.3.0.1 - local, 10.3.0.2 - remote
+ ip "link set %% up multicast off mtu 1450";
+ ip "-family inet addr add 10.3.0.1 peer 10.3.0.2 dev %%";
+ };
+}
+
+
+# Ethernet example. Session 'lion'.
+lion {
+ passwd Ma&^TU; # Password
+ type ether; # Ethernet tunnel
+ device tap0; # Device tap0
+ proto udp; # UDP protocol
+ compress lzo:1; # LZO compression level 1
+ encrypt yes; # Encryption
+ stat yes; # Log connection statistic
+ keepalive yes; # Keep connection alive
+
+ up {
+ # Connection is Up
+
+ # Assign IP address
+ ifconfig "%% 10.1.0.1 netmask 255.255.255.0";
+
+ # Add route to net 10.2.0.0/24
+ route "add -net 10.2.0.0 netmask 255.255.255.0 gw 10.1.0.2";
+
+ # Enable masquerading for net 10.2.0.0.0/24
+ firewall "-A forward -s 10.2.0.0/24 -d 0.0.0.0/0 -j MASQ";
+ };
+
+ down {
+ # Connection is Down
+
+ # Shutdown tap device.
+ ifconfig "%% down";
+
+ # Disable masquerading for net 10.2.0.0.0/24
+ firewall "-D forward -s 10.2.0.0/24 -d 0.0.0.0/0 -j MASQ";
+ };
+}
+
+# PPP example. Session 'viper'.
+viper {
+ passwd TTT$bio; # Password
+ compress yes; # ZLIB compression level 1
+ encrypt yes; # Encryption
+ up {
+ # Connection is Up (established)
+
+ # Assign IP addresses 10.0.0.1 - local, 10.0.0.2 - remote
+ ppp "10.0.0.1:10.0.0.2 proxyarp";
+ };
+}
+
+# Pipe example. Session 'backup'.
+backup {
+ passwd OnlyME; # Password
+ type pipe; # Pipe tunnel
+ speed 256:128; # Shaping speed 256K IN and 128K OUT.
+ encrypt yes; # Encryption
+ up {
+ # Connection is Up
+
+ # Start shell and tar '/etc' directory to
+ # the stdout (pipe tunnel).
+ program /bin/sh "-c 'tar cf - /etc/*'";
+ };
+}
+
+# TTY example. Session 'sz'.
+# Silly example to show that VTun can tunnel ALMOST
+# anything :-).
+sz {
+ passwd OnlyME; # Password
+ type tty; # TTY tunnel
+ speed 64; # Shaping speed 64K IN/OUT
+ encrypt yes; # Encryption
+ up {
+ # Connection is Up
+
+ # Send '/etc/profile' via ZMODEM to the
+ # stdout(tty tunnel).
+ program /bin/sh "-c 'sz /etc/termcap'";
+ };
+}
+#
+# ----- CUT HERE -------- End -------- CUT HERE -----
+#
+
+#
+# ----- CUT HERE --- Client config --- CUT HERE -----
+#
+options {
+ port 5000; # Connect to this port.
+ timeout 60; # General timeout
+
+ # Path to various programs
+ ppp /usr/sbin/pppd;
+ ifconfig /sbin/ifconfig;
+ route /sbin/route;
+ firewall /sbin/ipchains;
+ ip /sbin/ip;
+}
+
+# TUN example. Session 'cobra'.
+cobra {
+ passwd Ma&^TU; # Password
+ device tun1; # Device tun1
+ persist yes; # Persist mode
+ up {
+ # Connection is Up
+
+ # Assign IP addresses.
+ ifconfig "%% 10.3.0.2 pointopoint 10.3.0.1 mtu 1450";
+ };
+}
+# same as above, but with iproute2 command
+cobra {
+ passwd Ma&^TU; # Password
+ device tun1; # Device tun1
+ persist yes; # Persist mode
+ up {
+ # Connection is Up
+
+ # Assign IP addresses.
+ ip "link set %% up multicast off mtu 1450";
+ ip "-family inet addr add 10.3.0.2 peer 10.3.0.1 dev %%";
+ };
+}
+
+# Ethernet example. Session 'lion'.
+lion {
+ passwd Ma&^TU; # Password
+ type ether; # Ethernet tunnel
+ device tap1; # Device tap1
+ up {
+ # Connection is Up
+
+ # Assign IP address and netmask.
+ ifconfig "%% 10.1.0.2 netmask 255.255.255.0";
+ };
+ down {
+ # Connection is Down
+
+ # Shutdown tap device
+ ifconfig "%% down";
+ };
+}
+
+# PPP example. Session 'viper'.
+viper {
+ passwd TTT$bio; # Password
+ up {
+ # Connection is Up
+
+ # IP address will be assigned by the server
+ ppp "noipdefault";
+ };
+}
+
+# Pipe example. Session 'backup'.
+backup {
+ passwd OnlyME; # Password
+ up {
+ # Connection is Up
+
+ # Start shell and untar files from
+ # stdin(pipe tunnel).
+ program /bin/sh "-c 'cd /tmp; tar xf -";
+ };
+}
+
+# TTY example. Session 'sz'.
+# Silly example to show that VTun can tunnel ALMOST
+# anything :-).
+sz {
+ passwd OnlyME; # Password
+ up {
+ # Receive file via ZMODEM from the
+ # stdin(tty tunnel).
+ program /bin/sh "-c 'cd /tmp; rz'";
+ };
+}
--- /dev/null
+act_connmark 944 0
+act_mirred 2480 0
+act_skbedit 1744 0
+aead 4256 0
+arc4 1312 2
+asix 15991 0
+batman_adv 102708 0
+button_hotplug 2800 0
+cbc 1984 0
+cdc_acm 12384 0
+cdc_ether 3516 1 rndis_host,
+cdc_mbim 2976 0
+cdc_ncm 7939 1 cdc_mbim,
+cdc_wdm 7413 2 cdc_mbim,qmi_wwan,
+cfg80211 172097 2 rt2x00lib,mac80211,
+cls_flow 4992 0
+cls_fw 3216 0
+cls_route 4976 0
+cls_tcindex 3808 0
+cls_u32 5680 0
+compat 651 3 rt2800pci,mac80211,cfg80211,
+crc16 1015 2 batman_adv,ext4,
+crc32c 944 1
+crc_ccitt 1019 2 ppp_async,rt2800lib,
+crc_itu_t 1019 0
+crypto_blkcipher 10343 3 dm_crypt,cbc,arc4,
+crypto_hash 9546 5 dm_crypt,ext4,jbd2,libcrc32c,crc32c,
+dm9601 4336 0
+dm_crypt 12864 0
+dm_log 7233 2 dm_mirror,dm_region_hash,
+dm_mirror 11232 0
+dm_mod 58374 3 dm_crypt,dm_mirror,dm_log,
+dm_region_hash 5956 1 dm_mirror,
+eeprom_93cx6 1823 0
+ehci_hcd 29756 1 ehci_platform,
+ehci_platform 2272 0
+em_u32 576 0
+exportfs 2848 1 xfs,
+ext4 282633 0
+fat 45375 1 vfat,
+ftdi_sio 26944 0
+fuse 60049 0
+gpio_keys_polled 3456 0
+ifb 2672 0
+input_core 24281 4 gpio_keys_polled,button_hotplug,input_polldev,
+input_polldev 1923 1 gpio_keys_polled,
+ip6_tables 8961 3 ip6table_raw,ip6table_mangle,ip6table_filter,
+ip6t_REJECT 2336 2
+ip6t_ah 816 0
+ip6t_eui64 704 0
+ip6t_frag 896 0
+ip6t_hbh 1296 0
+ip6t_ipv6header 1072 0
+ip6t_mh 704 0
+ip6t_rt 1520 0
+ip6table_filter 608 1
+ip6table_mangle 1040 1
+ip6table_raw 576 1
+ip_tables 9149 4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter,
+ipheth 4816 0
+ipt_ECN 1360 0
+ipt_MASQUERADE 1088 1
+ipt_REJECT 1776 2
+iptable_filter 672 1
+iptable_mangle 912 1
+iptable_nat 1680 1
+iptable_raw 640 1
+ipv6 236335 26 ip6t_REJECT,ip6table_mangle,nf_conntrack_ipv6,nf_defrag_ipv6,
+jbd2 46924 1 ext4,
+kaweth 8752 0
+leds_gpio 2816 0
+libcrc32c 583 2 batman_adv,xfs,
+mac80211 308168 3 rt2800lib,rt2x00soc,rt2x00lib,
+mbcache 3949 1 ext4,
+moto_modem 832 0
+nf_conntrack 44219 17 act_connmark,nf_nat_irc,nf_nat_ftp,nf_conntrack_irc,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat_ipv4,nf_nat,xt_helper,xt_connmark,xt_connbytes,nf_conntrack_ipv6,xt_conntrack,xt_CT,xt_state,nf_conntrack_ipv4,
+nf_conntrack_ftp 5120 1 nf_nat_ftp,
+nf_conntrack_ipv4 4676 6
+nf_conntrack_ipv6 5424 3
+nf_conntrack_irc 2816 1 nf_nat_irc,
+nf_defrag_ipv4 742 1 nf_conntrack_ipv4,
+nf_defrag_ipv6 8865 1 nf_conntrack_ipv6,
+nf_nat 9695 7 nf_nat_irc,nf_nat_ftp,xt_REDIRECT,ipt_MASQUERADE,iptable_nat,nf_nat_ipv4,xt_nat,
+nf_nat_ftp 1232 0
+nf_nat_ipv4 2558 1 iptable_nat,
+nf_nat_irc 944 0
+nls_base 5022 4 vfat,fat,ntfs,usbcore,
+ntfs 88595 0
+ohci_hcd 13360 0
+option 19296 1
+ppp_async 6096 1
+ppp_generic 19698 7 pppoe,pppox,ppp_async,
+pppoe 7616 0
+pppox 1322 1 pppoe,
+qmi_wwan 5968 0
+rndis_host 4649 0
+rt2800lib 73153 1 rt2800pci,
+rt2800pci 6832 0
+rt2x00lib 33776 4 rt2800pci,rt2800lib,rt2x00soc,rt2x00mmio,
+rt2x00mmio 1936 1 rt2800pci,
+rt2x00soc 1218 1 rt2800pci,
+sch_hfsc 13424 0
+sch_ingress 944 0
+scsi_mod 77010 2 usb_storage,sd_mod,
+sd_mod 25328 0
+slhc 4347 1 ppp_generic,
+ts_bm 1424 0
+ts_fsm 2592 0
+ts_kmp 1360 0
+tun 14559 0
+usb_common 1160 1 usbcore,
+usb_storage 35384 0
+usb_wwan 4380 1 option,
+usbcore 106455 20 option,ftdi_sio,ipheth,rndis_host,cdc_mbim,usb_wwan,qmi_wwan,kaweth,dm9601,cdc_ncm,cdc_ether,asix,cdc_wdm,usbserial,usbnet,cdc_acm,usb_storage,ohci_hcd,ehci_platform,ehci_hcd,
+usbnet 16271 7 rndis_host,cdc_mbim,qmi_wwan,dm9601,cdc_ncm,cdc_ether,asix,
+usbserial 18151 6 option,moto_modem,ftdi_sio,usb_wwan,
+vfat 7776 0
+x_tables 10981 47 xt_HL,xt_hl,xt_ecn,ipt_ECN,xt_CLASSIFY,xt_tcpmss,xt_statistic,xt_length,xt_DSCP,xt_dscp,xt_string,xt_REDIRECT,ipt_MASQUERADE,xt_nat,xt_recent,xt_helper,xt_connmark,xt_connbytes,ip6t_REJECT,ip6t_rt,ip6t_hbh,ip6t_mh,ip6t_ipv6header,ip6t_frag,ip6t_eui64,ip6t_ah,ip6table_raw,ip6table_mangle,ip6table_filter,ip6_tables,xt_conntrack,xt_CT,iptable_raw,xt_state,xt_mark,xt_time,ipt_REJECT,xt_TCPMSS,xt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp,
+xfs 450743 0
+xt_CLASSIFY 576 0
+xt_CT 2240 0
+xt_DSCP 1440 0
+xt_HL 1296 0
+xt_LOG 9616 0
+xt_REDIRECT 1040 0
+xt_TCPMSS 2720 4
+xt_comment 480 51
+xt_connbytes 1488 0
+xt_connmark 1040 2
+xt_conntrack 2160 6
+xt_dscp 992 0
+xt_ecn 1248 0
+xt_helper 864 0
+xt_hl 800 0
+xt_length 688 5
+xt_limit 992 20
+xt_mac 608 0
+xt_mark 672 26
+xt_multiport 1200 5
+xt_nat 1088 0
+xt_recent 6352 0
+xt_state 688 0
+xt_statistic 768 0
+xt_string 752 0
+xt_tcpmss 992 0
+xt_tcpudp 1712 19
+xt_time 1664 0
--- /dev/null
+package system
+
+system.led_wan=led
+system.led_wan.name=WAN
+system.led_wan.sysfs=tp-link:green:wan
+system.led_wan.trigger=netdev
+system.led_wan.dev=eth0
+system.led_wan.mode=link tx rx
+system.led_lan1=led
+system.led_lan1.name=LAN1
+system.led_lan1.sysfs=tp-link:green:lan1
+system.led_lan1.trigger=switch0
+system.led_lan1.port_mask=0x04
+system.led_lan2=led
+system.led_lan2.name=LAN2
+system.led_lan2.sysfs=tp-link:green:lan2
+system.led_lan2.trigger=switch0
+system.led_lan2.port_mask=0x08
+system.led_lan3=led
+system.led_lan3.name=LAN3
+system.led_lan3.sysfs=tp-link:green:lan3
+system.led_lan3.trigger=switch0
+system.led_lan3.port_mask=0x10
+system.led_lan4=led
+system.led_lan4.name=LAN4
+system.led_lan4.sysfs=tp-link:green:lan4
+system.led_lan4.trigger=switch0
+system.led_lan4.port_mask=0x02
+system.led_wlan=led
+system.led_wlan.name=WLAN
+system.led_wlan.sysfs=tp-link:green:wlan
+system.led_wlan.trigger=phy0tpt
--- /dev/null
+package network
+
+config interface 'lan'
+ option ifname 'eth0.1 wlan0 wlan1'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '10.8.36.1'
+ option netmask '255.255.255.0'
+
+
--- /dev/null
+ _______ ________ __
+ | |.-----.-----.-----.| | | |.----.| |_
+ | - || _ | -__| || | | || _|| _|
+ |_______|| __|_____|__|__||________||__| |____|
+ |__| W I R E L E S S F R E E D O M
+ -----------------------------------------------------
+ BARRIER BREAKER (Bleeding Edge, r41425)
+ -----------------------------------------------------
+ * 1/2 oz Galliano Pour all ingredients into
+ * 4 oz cold Coffee an irish coffee mug filled
+ * 1 1/2 oz Dark Rum with crushed ice. Stir.
+ * 2 tsp. Creme de Cacao
+ -----------------------------------------------------
--- /dev/null
+
+config dnsmasq
+ option localise_queries '1'
+ option rebind_protection '1'
+ option rebind_localhost '1'
+ option local '/lan/'
+ option domain 'lan'
+ option expandhosts '1'
+ option readethers '1'
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/tmp/resolv.conf.auto'
+ option domainneeded '1'
+ list server '192.168.1.1'
+ list server '8.8.8.8'
+
+config dhcp 'lan'
+ option interface 'lan'
+ option dhcpv6 'server'
+ option ra 'server'
+ option ra_management '1'
+ option ignore '1'
+
+config dhcp 'wan'
+ option interface 'wan'
+ option ignore '1'
+
+config odhcpd 'odhcpd'
+ option maindhcp '0'
+ option leasefile '/tmp/hosts/odhcpd'
+ option leasetrigger '/usr/sbin/odhcpd-update'
+
--- /dev/null
+config dropbear
+ option PasswordAuth 'on'
+ option RootPasswordAuth 'on'
+ option Port '22'
+# option BannerFile '/etc/banner'
--- /dev/null
+config defaults
+ option syn_flood 1
+ option input ACCEPT
+ option output ACCEPT
+ option forward REJECT
+# Uncomment this line to disable ipv6 rules
+# option disable_ipv6 1
+
+config zone
+ option name lan
+ list network 'lan'
+ option input ACCEPT
+ option output ACCEPT
+ option forward ACCEPT
+
+config zone
+ option name wan
+ list network 'wan'
+ list network 'wan6'
+ option input REJECT
+ option output ACCEPT
+ option forward REJECT
+ option masq 1
+ option mtu_fix 1
+
+config forwarding
+ option src lan
+ option dest wan
+
+# We need to accept udp packets on port 68,
+# see https://dev.openwrt.org/ticket/4108
+config rule
+ option name Allow-DHCP-Renew
+ option src wan
+ option proto udp
+ option dest_port 68
+ option target ACCEPT
+ option family ipv4
+
+# Allow IPv4 ping
+config rule
+ option name Allow-Ping
+ option src wan
+ option proto icmp
+ option icmp_type echo-request
+ option family ipv4
+ option target ACCEPT
+
+# Allow DHCPv6 replies
+# see https://dev.openwrt.org/ticket/10381
+config rule
+ option name Allow-DHCPv6
+ option src wan
+ option proto udp
+ option src_ip fe80::/10
+ option src_port 547
+ option dest_ip fe80::/10
+ option dest_port 546
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential incoming IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Input
+ option src wan
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ list icmp_type router-solicitation
+ list icmp_type neighbour-solicitation
+ list icmp_type router-advertisement
+ list icmp_type neighbour-advertisement
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential forwarded IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Forward
+ option src wan
+ option dest *
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# include a file with users custom iptables rules
+config include
+ option path /etc/firewall.user
+
+
+### EXAMPLE CONFIG SECTIONS
+# do not allow a specific ip to access wan
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option dest wan
+# option proto tcp
+# option target REJECT
+
+# block a specific mac on wan
+#config rule
+# option dest wan
+# option src_mac 00:11:22:33:44:66
+# option target REJECT
+
+# block incoming ICMP traffic on a zone
+#config rule
+# option src lan
+# option proto ICMP
+# option target DROP
+
+# port redirect port coming in on wan to lan
+#config redirect
+# option src wan
+# option src_dport 80
+# option dest lan
+# option dest_ip 192.168.16.235
+# option dest_port 80
+# option proto tcp
+
+# port redirect of remapped ssh port (22001) on wan
+#config redirect
+# option src wan
+# option src_dport 22001
+# option dest lan
+# option dest_port 22
+# option proto tcp
+
+# allow IPsec/ESP and ISAKMP passthrough
+#config rule
+# option src wan
+# option dest lan
+# option protocol esp
+# option target ACCEPT
+
+#config rule
+# option src wan
+# option dest lan
+# option src_port 500
+# option dest_port 500
+# option proto udp
+# option target ACCEPT
+
+### FULL CONFIG SECTIONS
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 80
+# option dest wan
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
+# option target REJECT
+
+#config redirect
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 1024
+# option src_dport 80
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
--- /dev/null
+
+config core 'main'
+ option lang 'auto'
+ option mediaurlbase '/luci-static/openwrt.org'
+ option resourcebase '/luci-static/resources'
+
+config extern 'flash_keep'
+ option uci '/etc/config/'
+ option dropbear '/etc/dropbear/'
+ option openvpn '/etc/openvpn/'
+ option passwd '/etc/passwd'
+ option opkg '/etc/opkg.conf'
+ option firewall '/etc/firewall.user'
+ option uploads '/lib/uci/upload/'
+
+config internal 'languages'
+
+config internal 'sauth'
+ option sessionpath '/tmp/luci-sessions'
+ option sessiontime '3600'
+
+config internal 'ccache'
+ option enable '1'
+
+config internal 'themes'
+ option Bootstrap '/luci-static/bootstrap'
+
--- /dev/null
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config globals 'globals'
+ option ula_prefix 'fd94:635c:5136::/48'
+
+config interface 'lan'
+ option force_link '1'
+ option type 'bridge'
+ option proto 'static'
+ option netmask '255.255.255.0'
+ option ip6assign '60'
+ option ipaddr '192.168.1.2'
+ option _orig_ifname 'eth1 wlan0 wlan0-1'
+ option _orig_bridge 'true'
+ option ifname '@wan eth0 eth1'
+
+config interface 'wan'
+ option ifname 'eth0'
+ option proto 'dhcp'
+ option type 'bridge'
+
+config interface 'wan6'
+ option ifname '@wan'
+ option proto 'dhcpv6'
+ option type 'bridge'
+
+config switch
+ option name 'switch0'
+ option reset '1'
+ option enable_vlan '1'
+
+config switch_vlan
+ option device 'switch0'
+ option vlan '1'
+ option ports '0 1 2 3 4'
+
--- /dev/null
+
+config system
+ option hostname 'OpenWrt'
+ option timezone 'UTC'
+
+config timeserver 'ntp'
+ list server '0.openwrt.pool.ntp.org'
+ list server '1.openwrt.pool.ntp.org'
+ list server '2.openwrt.pool.ntp.org'
+ list server '3.openwrt.pool.ntp.org'
+ option enabled '1'
+ option enable_server '0'
+
+config led 'led_wan'
+ option name 'WAN'
+ option sysfs 'tp-link:green:wan'
+ option trigger 'netdev'
+ option dev 'eth0'
+ option mode 'link tx rx'
+
+config led 'led_lan1'
+ option name 'LAN1'
+ option sysfs 'tp-link:green:lan1'
+ option trigger 'switch0'
+ option port_mask '0x04'
+
+config led 'led_lan2'
+ option name 'LAN2'
+ option sysfs 'tp-link:green:lan2'
+ option trigger 'switch0'
+ option port_mask '0x08'
+
+config led 'led_lan3'
+ option name 'LAN3'
+ option sysfs 'tp-link:green:lan3'
+ option trigger 'switch0'
+ option port_mask '0x10'
+
+config led 'led_lan4'
+ option name 'LAN4'
+ option sysfs 'tp-link:green:lan4'
+ option trigger 'switch0'
+ option port_mask '0x02'
+
+config led 'led_wlan'
+ option name 'WLAN'
+ option sysfs 'tp-link:green:wlan'
+ option trigger 'phy0tpt'
+
--- /dev/null
+config network
+ option init network
+ list affects dhcp
+ list affects radvd
+
+config wireless
+ list affects network
+
+config firewall
+ option init firewall
+ list affects luci-splash
+ list affects qos
+ list affects miniupnpd
+
+config olsr
+ option init olsrd
+
+config dhcp
+ option init dnsmasq
+
+config dropbear
+ option init dropbear
+
+config httpd
+ option init httpd
+
+config fstab
+ option init fstab
+
+config qos
+ option init qos
+
+config system
+ option init led
+ list affects luci_statistics
+
+config luci_splash
+ option init luci_splash
+
+config upnpd
+ option init miniupnpd
+
+config ntpclient
+ option init ntpclient
+
+config samba
+ option init samba
+
+config tinyproxy
+ option init tinyproxy
+
+config 6relayd
+ option init 6relayd
--- /dev/null
+
+config uhttpd 'main'
+ list listen_http '0.0.0.0:80'
+ list listen_http '[::]:80'
+ list listen_https '0.0.0.0:443'
+ list listen_https '[::]:443'
+ option home '/www'
+ option rfc1918_filter '1'
+ option max_requests '3'
+ option max_connections '100'
+ option cert '/etc/uhttpd.crt'
+ option key '/etc/uhttpd.key'
+ option cgi_prefix '/cgi-bin'
+ option script_timeout '60'
+ option network_timeout '30'
+ option http_keepalive '20'
+ option tcp_keepalive '1'
+ option ubus_prefix '/ubus'
+
+config cert 'px5g'
+ option days '730'
+ option bits '1024'
+ option country 'DE'
+ option state 'Berlin'
+ option location 'Berlin'
+ option commonname 'OpenWrt'
+
--- /dev/null
+
+config wifi-device 'radio0'
+ option type 'mac80211'
+ option channel '11'
+ option hwmode '11g'
+ option path 'platform/ar934x_wmac'
+ option htmode 'HT20'
+ option txpower '30'
+ option country 'US'
+ option disabled '0'
+
+config wifi-iface
+ option device 'radio0'
+ option ssid 'moellein'
+ option mode 'sta'
+ option wds '1'
+ option encryption 'psk-mixed'
+ option key 'a3f4b9a1cdab5974a6cc7340d31da896b1987c0ee43ab8c9d2d8f4ff285acf9'
+ option network 'lan'
+
+config wifi-iface
+ option device 'radio0'
+ option mode 'ap'
+ option ssid 'moellein'
+ option encryption 'psk-mixed'
+ option key 'a3f4b9a1cdab5974a6cc7340d31da896b1987c0ee43ab8c9d2d8f4ff285acf9'
+ option network 'wan wan6 lan'
+
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2009-2013 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/ar71xx.sh
+
+get_status_led() {
+ case $(ar71xx_board_name) in
+ alfa-nx)
+ status_led="alfa:green:led_8"
+ ;;
+ all0305)
+ status_led="eap7660d:green:ds4"
+ ;;
+ ap132)
+ status_led="ap132:green:status"
+ ;;
+ ap136-010|\
+ ap136-020)
+ status_led="ap136:green:status"
+ ;;
+ ap135-020)
+ status_led="ap135:green:status"
+ ;;
+ ap81)
+ status_led="ap81:green:status"
+ ;;
+ ap83)
+ status_led="ap83:green:power"
+ ;;
+ ap96)
+ status_led="ap96:green:led2"
+ ;;
+ aw-nr580)
+ status_led="aw-nr580:green:ready"
+ ;;
+ bullet-m | rocket-m | nano-m | nanostation-m)
+ status_led="ubnt:green:link4"
+ ;;
+ bxu2000n-2-a1)
+ status_led="bhu:green:status"
+ ;;
+ cap4200ag)
+ status_led="senao:green:pwr"
+ ;;
+ db120)
+ status_led="db120:green:status"
+ ;;
+ dir-505-a1 |\
+ dir-600-a1 |\
+ dir-615-e1 |\
+ dir-615-e4)
+ status_led="d-link:green:power"
+ ;;
+ dir-615-c1)
+ status_led="d-link:green:status"
+ ;;
+ dir-825-b1)
+ status_led="d-link:orange:power"
+ ;;
+ dir-825-c1 |\
+ dir-835-a1)
+ status_led="d-link:amber:power"
+ ;;
+ eap7660d)
+ status_led="eap7660d:green:ds4"
+ ;;
+ el-mini | \
+ el-m150)
+ status_led="EasyLink:green:system"
+ ;;
+ hiwifi-hc6361)
+ status_led="hiwifi:blue:system"
+ ;;
+ hornet-ub)
+ status_led="alfa:blue:wps"
+ ;;
+ ja76pf | \
+ ja76pf2)
+ status_led="jjplus:green:led1"
+ ;;
+ ls-sr71)
+ status_led="ubnt:green:d22"
+ ;;
+ mr600)
+ status_led="mr600:orange:power"
+ ;;
+ mr600v2)
+ status_led="mr600:blue:power"
+ ;;
+ mynet-n600 | \
+ mynet-n750)
+ status_led="wd:blue:power"
+ ;;
+ mynet-rext)
+ status_led="wd:blue:power"
+ ;;
+ mzk-w04nu | \
+ mzk-w300nh)
+ status_led="planex:green:status"
+ ;;
+ nbg460n_550n_550nh)
+ status_led="nbg460n:green:power"
+ ;;
+ nbg6716)
+ status_led="nbg6716:white:power"
+ ;;
+ om2p | \
+ om2pv2 | \
+ om2p-hs | \
+ om2p-hsv2 | \
+ om2p-lc)
+ status_led="om2p:blue:power"
+ ;;
+ pb44)
+ status_led="pb44:amber:jump1"
+ ;;
+ rb-2011l|\
+ rb-2011uas|\
+ rb-2011uas-2hnd)
+ status_led="rb:green:usr"
+ ;;
+ rb-411 | rb-411u | rb-433 | rb-433u | rb-450 | rb-450g | rb-493)
+ status_led="rb4xx:yellow:user"
+ ;;
+ rb-750)
+ status_led="rb750:green:act"
+ ;;
+ rb-911g-2hpnd|\
+ rb-911g-5hpnd|\
+ rb-912uag-2hpnd|\
+ rb-912uag-5hpnd)
+ status_led="rb:green:user"
+ ;;
+ rb-951ui-2hnd)
+ status_led="rb:green:act"
+ ;;
+ routerstation | routerstation-pro)
+ status_led="ubnt:green:rf"
+ ;;
+ rw2458n)
+ status_led="rw2458n:green:d3"
+ ;;
+ oolite)
+ status_led="oolite:red:system"
+ ;;
+ tew-632brp)
+ status_led="tew-632brp:green:status"
+ ;;
+ tew-673gru)
+ status_led="trendnet:blue:wps"
+ ;;
+ tew-712br|\
+ tew-732br)
+ status_led="trendnet:green:power"
+ ;;
+ tl-mr3020)
+ status_led="tp-link:green:wps"
+ ;;
+ tl-wa750re)
+ status_led="tp-link:orange:re"
+ ;;
+ tl-wa850re)
+ status_led="tp-link:blue:re"
+ ;;
+ tl-mr3220 | \
+ tl-mr3220-v2 | \
+ tl-mr3420 | \
+ tl-mr3420-v2 | \
+ tl-wa801nd-v2 | \
+ tl-wa901nd | \
+ tl-wa901nd-v2 | \
+ tl-wa901nd-v3 | \
+ tl-wdr3500 | \
+ tl-wr1041n-v2 | \
+ tl-wr1043nd | \
+ tl-wr1043nd-v2 | \
+ tl-wr741nd | \
+ tl-wr741nd-v4 | \
+ tl-wr841n-v1 | \
+ tl-wr841n-v7 | \
+ tl-wr841n-v8 | \
+ tl-wr842n-v2 | \
+ tl-wr941nd)
+ status_led="tp-link:green:system"
+ ;;
+ archer-c7 | \
+ tl-wdr4900-v2 | \
+ tl-mr10u | \
+ tl-mr13u | \
+ tl-wdr4300 | \
+ tl-wr703n | \
+ tl-wr710n | \
+ tl-wr720n-v3)
+ status_led="tp-link:blue:system"
+ ;;
+ tl-wr841n-v9)
+ status_led="tp-link:green:qss"
+ ;;
+ tl-wr2543n)
+ status_led="tp-link:green:wps"
+ ;;
+ unifi)
+ status_led="ubnt:green:dome"
+ ;;
+ uap-pro)
+ status_led="ubnt:white:dome"
+ ;;
+ whr-g301n | \
+ whr-hp-g300n | \
+ whr-hp-gn | \
+ wzr-hp-g300nh)
+ status_led="buffalo:green:router"
+ ;;
+ wlae-ag300n)
+ status_led="buffalo:green:status"
+ ;;
+ wzr-hp-ag300h | \
+ wzr-hp-g300nh2)
+ status_led="buffalo:red:diag"
+ ;;
+ wndap360 | \
+ wndr3700 | \
+ wndr4300 | \
+ wnr2000 | \
+ wnr2200 |\
+ wnr612-v2)
+ status_led="netgear:green:power"
+ ;;
+ wp543)
+ status_led="wp543:green:diag"
+ ;;
+ wrt400n)
+ status_led="wrt400n:blue:wps"
+ ;;
+ wrt160nl)
+ status_led="wrt160nl:blue:wps"
+ ;;
+ zcn-1523h-2 | zcn-1523h-5)
+ status_led="zcn-1523h:amber:init"
+ ;;
+ wlr8100)
+ status_led="sitecom:amber:status"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}
--- /dev/null
+# Change the following lines if you want dnsmasq to serve SRV
+# records.
+# You may add multiple srv-host lines.
+# The fields are <name>,<target>,<port>,<priority>,<weight>
+
+# A SRV record sending LDAP for the example.com domain to
+# ldapserver.example.com port 289
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
+
+# Two SRV records for LDAP, each with different priorities
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
+
+# A SRV record indicating that there is no LDAP server for the domain
+# example.com
+#srv-host=_ldap._tcp.example.com
+
+# The following line shows how to make dnsmasq serve an arbitrary PTR
+# record. This is useful for DNS-SD.
+# The fields are <name>,<target>
+#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"
+
+# Change the following lines to enable dnsmasq to serve TXT records.
+# These are used for things like SPF and zeroconf.
+# The fields are <name>,<text>,<text>...
+
+#Example SPF.
+#txt-record=example.com,"v=spf1 a -all"
+
+#Example zeroconf
+#txt-record=_http._tcp.example.com,name=value,paper=A4
+
+# Provide an alias for a "local" DNS name. Note that this _only_ works
+# for targets which are names from DHCP or /etc/hosts. Give host
+# "bert" another name, bertrand
+# The fields are <cname>,<target>
+#cname=bertand,bert
--- /dev/null
+# This file is interpreted as shell script.
+# Put your custom iptables rules here, they will
+# be executed with each firewall (re-)start.
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
--- /dev/null
+root:x:0:
+daemon:x:1:
+adm:x:4:
+mail:x:8:
+audio:x:29:
+www-data:x:33:
+ftp:x:55:
+users:x:100:
+network:x:101:
+nogroup:x:65534:
--- /dev/null
+127.0.0.1 localhost
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ }, ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/failsafe" ]
+ ],
+]
--- /dev/null
+#!/bin/sh
+
+ath9k_eeprom_die() {
+ echo "ath9k eeprom: " "$*"
+ exit 1
+}
+
+ath9k_eeprom_extract() {
+ local part=$1
+ local offset=$2
+ local count=$3
+ local mtd
+
+ mtd=$(find_mtd_chardev $part)
+ [ -n "$mtd" ] || \
+ ath9k_eeprom_die "no mtd device found for partition $part"
+
+ dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
+ ath9k_eeprom_die "failed to extract from $mtd"
+}
+
+ath9k_patch_firmware_mac() {
+ local mac=$1
+
+ [ -z "$mac" ] && return
+
+ macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
+}
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+. /lib/ar71xx.sh
+. /lib/functions.sh
+. /lib/functions/system.sh
+
+board=$(ar71xx_board_name)
+
+case "$FIRMWARE" in
+"soc_wmac.eeprom")
+ case $board in
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 4096 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 0)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+
+"pci_wmac0.eeprom")
+ case $board in
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 20480 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 12)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+esac
--- /dev/null
+[ ifup = "$ACTION" ] && {
+ uci_toggle_state network "$INTERFACE" up 1
+ [ -n "$DEVICE" ] && {
+ uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)"
+ uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
+ }
+}
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
+[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0
+
+/etc/init.d/firewall enabled || exit 0
+
+fw3 -q network "$INTERFACE" >/dev/null || exit 0
+
+logger -t firewall "Reloading firewall due to $ACTION of $INTERFACE ($DEVICE)"
+fw3 -q reload
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup ] || exit 0
+
+/etc/init.d/dnsmasq enabled && /etc/init.d/dnsmasq start
--- /dev/null
+#!/bin/sh
+
+if [ -f /etc/sysctl.conf ] && [ "$ACTION" = add ]; then
+ sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" /etc/sysctl.conf | \
+ sysctl -e -p - | logger -t sysctl
+fi
--- /dev/null
+#!/bin/sh
+
+# For AR9220 and AR9223, GPIO JTAG must explicit be disabled
+# before LEDs start working. Do this when wifi device is
+# detected.
+
+#
+# $DEVPATH is not valid for some boards (including WZR-HP-AG300H).
+# Manipulate the $DEVPATH to reach the corresponding phyN.
+#
+
+devdir=`dirname $DEVPATH`
+devdir=`dirname $devdir`
+phydir=/sys$devdir/ieee80211
+phyname=`cat $phydir/phy*/name`
+
+if [ -z $phyname -o $ACTION != "add" ]; then exit 0; fi
+
+#
+# ar922x_disable_gpio_jtag():
+#
+# Emulate
+# REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
+# for AR9220 and AR9223.
+#
+
+ar922x_disable_gpio_jtag()
+{
+ local regidx=0x4054
+
+ [ -f /sys/kernel/debug/ieee80211/$1/ath9k/regidx ] && {
+ echo $regidx > /sys/kernel/debug/ieee80211/$1/ath9k/regidx
+ regval=`cat /sys/kernel/debug/ieee80211/$1/ath9k/regval`
+ regval=$((regval | 0x20000))
+ echo regval $regval
+ echo $regval > /sys/kernel/debug/ieee80211/$1/ath9k/regval
+ }
+}
+
+if [ $phyname -a $ACTION = "add" ]; then
+
+ . /lib/ar71xx.sh
+
+ case $(ar71xx_board_name) in
+ wzr-hp-ag300h)
+ ar922x_disable_gpio_jtag $phyname
+ ;;
+ esac;
+fi
+
+exit 0
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "and",
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME",
+ [ "null", "full", "ptmx", "zero" ],
+ ],
+ [ "regex", "DEVNAME",
+ [ "^gpio", "^hvc" ],
+ ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0666" ],
+ [ "return" ],
+ ]
+ ],
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME", "mapper/control" ],
+ [ "regex", "DEVPATH", "^ppp" ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0600" ],
+ [ "return" ],
+ ],
+ ],
+ [ "if",
+ [ "has", "DEVNAME" ],
+ [ "makedev", "/dev/%DEVNAME%", "0644" ],
+ ],
+ ],
+ ],
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ "remove" : [
+ [ "if",
+ [ "and",
+ [ "has", "DEVNAME" ],
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [ "rm", "/dev/%DEVNAME%" ]
+ ]
+ ]
+ } ],
+ [ "if",
+ [ "eq", "SUBSYSTEM", "platform" ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "has", "BUTTON" ],
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/%BUTTON%" ]
+ ],
+ [ "if",
+ [ "eq", "SUBSYSTEM",
+ [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]
+ ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "usb-serial" ],
+ [ "regex", "DEVNAME",
+ [ "^ttyUSB", "^ttyACM" ]
+ ],
+ ],
+ [ "exec", "/sbin/hotplug-call", "tty" ]
+ ],
+]
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+HOSTFILE="/tmp/hosts/dhcp"
+TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ config_get_bool dnssec "$cfg" dnssec 0
+ [ "$dnssec" -gt 0 ] && {
+ xappend "--conf-file=$TRUSTANCHORSFILE"
+ xappend "--dnssec"
+ append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+
+ config_get_bool dns "$cfg" dns 0
+ [ "$dns" = "1" ] && {
+ echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE
+ }
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+ echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && mount_root done
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+USE_PROCD=1
+QUIET=""
+
+validate_firewall_redirect()
+{
+ uci_validate_section firewall redirect "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
+ 'dest:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
+ 'target:or("SNAT", "DNAT")'
+
+ return $?
+}
+
+validate_firewall_rule()
+{
+ uci_validate_section firewall rule "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'dest:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
+ 'target:string'
+
+ return $?
+}
+
+service_triggers() {
+ procd_add_reload_trigger firewall
+
+ procd_open_validate
+ validate_firewall_redirect
+ validate_firewall_rule
+ procd_close_validate
+}
+
+restart() {
+ fw3 restart
+}
+
+start_service() {
+ fw3 ${QUIET} start
+}
+
+stop_service() {
+ fw3 flush
+}
+
+reload_service() {
+ fw3 reload
+}
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ QUIET=1
+ start
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && date -s @$maxtime
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
+ return $?
+}
+
+start_service() {
+ local server enabled enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ $enabled = 0 ] && return
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in $server; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+
+START=10
+USE_PROCD=1
+
+validate_system_section()
+{
+ uci_validate_section system system "${1}" \
+ 'hostname:string:OpenWrt' \
+ 'conloglevel:uinteger' \
+ 'buffersize:uinteger' \
+ 'timezone:string:UTC' \
+ 'zonename:string'
+
+ return $?
+}
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ validate_system_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ echo "$hostname" > /proc/sys/kernel/hostname
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+ echo "$timezone" > /tmp/TZ
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+reload_service() {
+ config_load system
+ config_foreach system_config system
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_system_section
+}
+
+start_service() {
+ reload_service
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 Jo-Philipp Wich
+
+START=50
+
+USE_PROCD=1
+
+UHTTPD_BIN="/usr/sbin/uhttpd"
+PX5G_BIN="/usr/sbin/px5g"
+
+append_arg() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get val "$cfg" "$var"
+ [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
+}
+
+append_bool() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+generate_keys() {
+ local cfg="$1"
+ local key="$2"
+ local crt="$3"
+ local days bits country state location commonname
+
+ config_get days "$cfg" days
+ config_get bits "$cfg" bits
+ config_get country "$cfg" country
+ config_get state "$cfg" state
+ config_get location "$cfg" location
+ config_get commonname "$cfg" commonname
+
+ [ -x "$PX5G_BIN" ] && {
+ $PX5G_BIN selfsigned -der \
+ -days ${days:-730} -newkey rsa:${bits:-1024} -keyout "$UHTTPD_KEY" -out "$UHTTPD_CERT" \
+ -subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/CN="${commonname:-OpenWrt}"
+ }
+}
+
+start_instance()
+{
+ UHTTPD_CERT=""
+ UHTTPD_KEY=""
+
+ local cfg="$1"
+ local realm="$(uci_get system.@system[0].hostname)"
+ local listen http https interpreter indexes path handler
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command "$UHTTPD_BIN" -f
+
+ append_arg "$cfg" home "-h"
+ append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
+ append_arg "$cfg" config "-c"
+ append_arg "$cfg" cgi_prefix "-x"
+ [ -f /usr/lib/uhttpd_lua.so ] && {
+ config_get handler "$cfg" lua_handler
+ [ -f "$handler" ] && append_arg "$cfg" lua_prefix "-l" && {
+ procd_append_param command "-L" "$handler"
+ }
+ }
+ [ -f /usr/lib/uhttpd_ubus.so ] && {
+ append_arg "$cfg" ubus_prefix "-u"
+ append_arg "$cfg" ubus_socket "-U"
+ }
+ append_arg "$cfg" script_timeout "-t"
+ append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" http_keepalive "-k"
+ append_arg "$cfg" tcp_keepalive "-A"
+ append_arg "$cfg" error_page "-E"
+ append_arg "$cfg" max_requests "-n" 3
+ append_arg "$cfg" max_connections "-N"
+
+ append_bool "$cfg" no_ubusauth "-a" 0
+ append_bool "$cfg" no_symlinks "-S" 0
+ append_bool "$cfg" no_dirlists "-D" 0
+ append_bool "$cfg" rfc1918_filter "-R" 0
+
+ config_get http "$cfg" listen_http
+ for listen in $http; do
+ procd_append_param command -p "$listen"
+ done
+
+ config_get interpreter "$cfg" interpreter
+ for path in $interpreter; do
+ procd_append_param command -i "$path"
+ done
+
+ config_get indexes "$cfg" index_page
+ for path in $indexes; do
+ procd_append_param command -I "$path"
+ done
+
+ config_get https "$cfg" listen_https
+ config_get UHTTPD_KEY "$cfg" key /etc/uhttpd.key
+ config_get UHTTPD_CERT "$cfg" cert /etc/uhttpd.crt
+
+ [ -n "$https" ] && {
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] || {
+ config_foreach generate_keys cert
+ }
+
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] && {
+ append_arg "$cfg" cert "-C"
+ append_arg "$cfg" key "-K"
+
+ for listen in $https; do
+ procd_append_param command -s "$listen"
+ done
+ }
+ }
+
+ procd_close_instance
+
+ # Check if daemon is running, if not then
+ # re-execute in foreground to display error.
+# sleep 1 && service_check $UHTTPD_BIN || \
+# $UHTTPD_BIN -f $UHTTPD_ARGS
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "uhttpd"
+}
+
+start_service() {
+ config_load uhttpd
+ config_foreach start_instance uhttpd
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+::askconsole:/bin/ash --login
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+nf_defrag_ipv6
+nf_conntrack_ipv6
+ip6_tables
+ip6table_filter
+ip6table_mangle
+ip6table_raw
+ip6t_REJECT
--- /dev/null
+nf_conntrack
+nf_defrag_ipv4
+nf_conntrack_ipv4
+xt_state
+iptable_raw
+xt_CT
+xt_conntrack
--- /dev/null
+x_tables
+xt_tcpudp
+ip_tables
+iptable_filter
+iptable_mangle
+xt_limit
+xt_mac
+xt_multiport
+xt_comment
+xt_LOG
+xt_TCPMSS
+ipt_REJECT
+xt_time
+xt_mark
--- /dev/null
+nf_nat
+xt_nat
+nf_nat_ipv4
+iptable_nat
+ipt_MASQUERADE
+xt_REDIRECT
--- /dev/null
+nf_conntrack_ftp
+nf_conntrack_irc
+nf_nat_ftp
+nf_nat_irc
--- /dev/null
+DISTRIB_ID="OpenWrt"
+DISTRIB_RELEASE="Bleeding Edge"
+DISTRIB_REVISION="r41425"
+DISTRIB_CODENAME="barrier_breaker"
+DISTRIB_TARGET="ar71xx/generic"
+DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r41425"
+DISTRIB_TAINTS="no-all"
--- /dev/null
+src/gz barrier_breaker http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
+dest root /
+dest ram /tmp
+lists_dir ext /var/opkg-lists
+option overlay_root /overlay
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+#USERNAME PROVIDER PASSWORD IPADDRESS
--- /dev/null
+#
+# Expression: outbound and not icmp[0] != 8 and not tcp[13] & 4 != 0
+#
+19
+48 0 0 0
+21 0 16 1
+40 0 0 2
+21 0 13 33
+48 0 0 13
+21 0 5 1
+40 0 0 10
+69 9 0 8191
+177 0 0 4
+80 0 0 4
+21 6 7 8
+21 0 5 6
+40 0 0 10
+69 3 0 8191
+177 0 0 4
+80 0 0 17
+69 1 0 4
+6 0 0 4
+6 0 0 0
--- /dev/null
+#debug
+logfile /dev/null
+noipdefault
+noaccomp
+nopcomp
+nocrtscts
+lock
+maxfail 0
+lcp-echo-failure 5
+lcp-echo-interval 1
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2010 Vertical Communications
+
+[ -z "$PREINIT" ] && exec /sbin/init
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+pi_ifname=
+pi_ip=192.168.1.1
+pi_broadcast=192.168.1.255
+pi_netmask=255.255.255.0
+
+fs_failsafe_ifname=
+fs_failsafe_ip=192.168.1.1
+fs_failsafe_broadcast=192.168.1.255
+fs_failsafe_netmask=255.255.255.0
+
+fs_failsafe_wait_timeout=2
+
+pi_suppress_stderr="y"
+pi_init_suppress_stderr="y"
+pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
+pi_init_cmd="/sbin/init"
+
+. /lib/functions.sh
+. /lib/functions/preinit.sh
+. /lib/functions/system.sh
+
+boot_hook_init preinit_essential
+boot_hook_init preinit_main
+boot_hook_init failsafe
+boot_hook_init initramfs
+boot_hook_init preinit_mount_root
+
+for pi_source_file in /lib/preinit/*; do
+ . $pi_source_file
+done
+
+boot_run_hook preinit_essential
+
+pi_mount_skip_next=false
+pi_jffs2_mount_success=false
+pi_failsafe_net_message=false
+
+boot_run_hook preinit_main
--- /dev/null
+#!/bin/sh
+[ -f /etc/banner ] && cat /etc/banner
+
+export PATH=/usr/bin:/usr/sbin:/bin:/sbin
+export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
+export HOME=${HOME:-/root}
+export PS1='\u@\h:\w\$ '
+
+[ -x /bin/more ] || alias more=less
+[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
+
+[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
+
+[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
+[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
--- /dev/null
+# Internet (IP) protocols
+#
+# Updated from http://www.iana.org/assignments/protocol-numbers and other
+# sources.
+# New protocols will be added on request if they have been officially
+# assigned by IANA and are not historical.
+# If you need a huge list of used numbers please install the nmap package.
+
+ip 0 IP # internet protocol, pseudo protocol number
+#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+ggp 3 GGP # gateway-gateway protocol
+ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
+st 5 ST # ST datagram mode
+tcp 6 TCP # transmission control protocol
+egp 8 EGP # exterior gateway protocol
+igp 9 IGP # any private interior gateway (Cisco)
+pup 12 PUP # PARC universal packet protocol
+udp 17 UDP # user datagram protocol
+hmp 20 HMP # host monitoring protocol
+xns-idp 22 XNS-IDP # Xerox NS IDP
+rdp 27 RDP # "reliable datagram" protocol
+iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
+xtp 36 XTP # Xpress Transfer Protocol
+ddp 37 DDP # Datagram Delivery Protocol
+idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
+ipv6 41 IPv6 # Internet Protocol, version 6
+ipv6-route 43 IPv6-Route # Routing Header for IPv6
+ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
+idrp 45 IDRP # Inter-Domain Routing Protocol
+rsvp 46 RSVP # Reservation Protocol
+gre 47 GRE # General Routing Encapsulation
+esp 50 IPSEC-ESP # Encap Security Payload [RFC2046]
+ah 51 IPSEC-AH # Authentication Header [RFC2402]
+skip 57 SKIP # SKIP
+ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
+ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
+ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
+rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
+vmtp 81 VMTP # Versatile Message Transport
+eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
+ospf 89 OSPFIGP # Open Shortest Path First IGP
+ax.25 93 AX.25 # AX.25 frames
+ipip 94 IPIP # IP-within-IP Encapsulation Protocol
+etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
+encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
+# 99 # any private encryption scheme
+pim 103 PIM # Protocol Independent Multicast
+ipcomp 108 IPCOMP # IP Payload Compression Protocol
+vrrp 112 VRRP # Virtual Router Redundancy Protocol
+l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
+isis 124 ISIS # IS-IS over IPv4
+sctp 132 SCTP # Stream Control Transmission Protocol
+fc 133 FC # Fibre Channel
+
--- /dev/null
+#!/bin/sh
+
+[ "${TYPE}" = "switch" ] || echo ${BUTTON} > /tmp/failsafe_button
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" ] || exit 0
+
+exec /sbin/poweroff
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" ] || exit 0
+
+. /lib/functions.sh
+
+logger "$BUTTON pressed for $SEEN seconds"
+
+if [ "$SEEN" -lt 1 ]
+then
+ echo "REBOOT" > /dev/console
+ sync
+ reboot
+elif [ "$SEEN" -gt 5 ]
+then
+ echo "FACTORY RESET" > /dev/console
+ jffs2reset -y && reboot &
+fi
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" -o -n "${TYPE}" ] || exit 0
+
+. /lib/functions.sh
+
+local rfkill_state=0
+
+wifi_rfkill_set() {
+ uci set wireless.$1.disabled=$rfkill_state
+}
+
+wifi_rfkill_check() {
+ local disabled
+ config_get disabled $1 disabled
+ [ "$disabled" = "1" ] || rfkill_state=1
+}
+
+config_load wireless
+case "${TYPE}" in
+"switch")
+ [ "${ACTION}" = "released" ] && rfkill_state=1
+ ;;
+*)
+ config_foreach wifi_rfkill_check wifi-device
+ ;;
+esac
+config_foreach wifi_rfkill_set wifi-device
+uci commit wireless
+wifi up
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006-2012 OpenWrt.org
+
+. $IPKG_INSTROOT/lib/functions.sh
+. $IPKG_INSTROOT/lib/functions/service.sh
+
+initscript=$1
+action=${2:-help}
+shift 2
+
+start() {
+ return 0
+}
+
+stop() {
+ return 0
+}
+
+reload() {
+ return 1
+}
+
+restart() {
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+boot() {
+ start "$@"
+}
+
+shutdown() {
+ stop
+}
+
+disable() {
+ name="$(basename "${initscript}")"
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/K??$name
+}
+
+enable() {
+ name="$(basename "${initscript}")"
+ disable
+ [ -n "$START" -o -n "$STOP" ] || {
+ echo "/etc/init.d/$name does not have a START or STOP value"
+ return 1
+ }
+ [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
+ [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
+}
+
+enabled() {
+ name="$(basename "${initscript}")"
+ [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ]
+}
+
+depends() {
+ return 0
+}
+
+help() {
+ cat <<EOF
+Syntax: $initscript [command]
+
+Available commands:
+ start Start the service
+ stop Stop the service
+ restart Restart the service
+ reload Reload configuration files (or restart if that fails)
+ enable Enable service autostart
+ disable Disable service autostart
+$EXTRA_HELP
+EOF
+}
+
+# for procd
+start_service() {
+ return 0
+}
+
+stop_service() {
+ return 0
+}
+
+service_triggers() {
+ return 0
+}
+
+service_running() {
+ return 0
+}
+
+${INIT_TRACE:+set -x}
+
+. "$initscript"
+
+[ -n "$USE_PROCD" ] && {
+ EXTRA_COMMANDS="${EXTRA_COMMANDS} running"
+
+ . $IPKG_INSTROOT/lib/functions/procd.sh
+ basescript=$(readlink "$initscript")
+ rc_procd() {
+ procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
+ "$@"
+ procd_close_service
+ }
+
+ start() {
+ rc_procd start_service "$@"
+ if eval "type service_started" 2>/dev/null >/dev/null; then
+ service_started
+ fi
+ }
+
+ stop() {
+ stop_service "$@"
+ procd_kill "$(basename ${basescript:-$initscript})" "$1"
+ }
+
+ reload() {
+ if eval "type reload_service" 2>/dev/null >/dev/null; then
+ reload_service "$@"
+ else
+ restart
+ fi
+ }
+
+ running() {
+ service_running "$@"
+ }
+}
+
+ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
+list_contains ALL_COMMANDS "$action" || action=help
+[ "$action" = "reload" ] && action='eval reload "$@" || restart "$@" && :'
+$action "$@"
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && date -s @$maxtime
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+
+START=10
+USE_PROCD=1
+
+validate_system_section()
+{
+ uci_validate_section system system "${1}" \
+ 'hostname:string:OpenWrt' \
+ 'conloglevel:uinteger' \
+ 'buffersize:uinteger' \
+ 'timezone:string:UTC' \
+ 'zonename:string'
+
+ return $?
+}
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ validate_system_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ echo "$hostname" > /proc/sys/kernel/hostname
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+ echo "$timezone" > /tmp/TZ
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+reload_service() {
+ config_load system
+ config_foreach system_config system
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_system_section
+}
+
+start_service() {
+ reload_service
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+USE_PROCD=1
+QUIET=""
+
+validate_firewall_redirect()
+{
+ uci_validate_section firewall redirect "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
+ 'dest:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
+ 'target:or("SNAT", "DNAT")'
+
+ return $?
+}
+
+validate_firewall_rule()
+{
+ uci_validate_section firewall rule "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'dest:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
+ 'target:string'
+
+ return $?
+}
+
+service_triggers() {
+ procd_add_reload_trigger firewall
+
+ procd_open_validate
+ validate_firewall_redirect
+ validate_firewall_rule
+ procd_close_validate
+}
+
+restart() {
+ fw3 restart
+}
+
+start_service() {
+ fw3 ${QUIET} start
+}
+
+stop_service() {
+ fw3 flush
+}
+
+reload_service() {
+ fw3 reload
+}
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ QUIET=1
+ start
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 Jo-Philipp Wich
+
+START=50
+
+USE_PROCD=1
+
+UHTTPD_BIN="/usr/sbin/uhttpd"
+PX5G_BIN="/usr/sbin/px5g"
+
+append_arg() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get val "$cfg" "$var"
+ [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
+}
+
+append_bool() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+generate_keys() {
+ local cfg="$1"
+ local key="$2"
+ local crt="$3"
+ local days bits country state location commonname
+
+ config_get days "$cfg" days
+ config_get bits "$cfg" bits
+ config_get country "$cfg" country
+ config_get state "$cfg" state
+ config_get location "$cfg" location
+ config_get commonname "$cfg" commonname
+
+ [ -x "$PX5G_BIN" ] && {
+ $PX5G_BIN selfsigned -der \
+ -days ${days:-730} -newkey rsa:${bits:-1024} -keyout "$UHTTPD_KEY" -out "$UHTTPD_CERT" \
+ -subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/CN="${commonname:-OpenWrt}"
+ }
+}
+
+start_instance()
+{
+ UHTTPD_CERT=""
+ UHTTPD_KEY=""
+
+ local cfg="$1"
+ local realm="$(uci_get system.@system[0].hostname)"
+ local listen http https interpreter indexes path handler
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command "$UHTTPD_BIN" -f
+
+ append_arg "$cfg" home "-h"
+ append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
+ append_arg "$cfg" config "-c"
+ append_arg "$cfg" cgi_prefix "-x"
+ [ -f /usr/lib/uhttpd_lua.so ] && {
+ config_get handler "$cfg" lua_handler
+ [ -f "$handler" ] && append_arg "$cfg" lua_prefix "-l" && {
+ procd_append_param command "-L" "$handler"
+ }
+ }
+ [ -f /usr/lib/uhttpd_ubus.so ] && {
+ append_arg "$cfg" ubus_prefix "-u"
+ append_arg "$cfg" ubus_socket "-U"
+ }
+ append_arg "$cfg" script_timeout "-t"
+ append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" http_keepalive "-k"
+ append_arg "$cfg" tcp_keepalive "-A"
+ append_arg "$cfg" error_page "-E"
+ append_arg "$cfg" max_requests "-n" 3
+ append_arg "$cfg" max_connections "-N"
+
+ append_bool "$cfg" no_ubusauth "-a" 0
+ append_bool "$cfg" no_symlinks "-S" 0
+ append_bool "$cfg" no_dirlists "-D" 0
+ append_bool "$cfg" rfc1918_filter "-R" 0
+
+ config_get http "$cfg" listen_http
+ for listen in $http; do
+ procd_append_param command -p "$listen"
+ done
+
+ config_get interpreter "$cfg" interpreter
+ for path in $interpreter; do
+ procd_append_param command -i "$path"
+ done
+
+ config_get indexes "$cfg" index_page
+ for path in $indexes; do
+ procd_append_param command -I "$path"
+ done
+
+ config_get https "$cfg" listen_https
+ config_get UHTTPD_KEY "$cfg" key /etc/uhttpd.key
+ config_get UHTTPD_CERT "$cfg" cert /etc/uhttpd.crt
+
+ [ -n "$https" ] && {
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] || {
+ config_foreach generate_keys cert
+ }
+
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] && {
+ append_arg "$cfg" cert "-C"
+ append_arg "$cfg" key "-K"
+
+ for listen in $https; do
+ procd_append_param command -s "$listen"
+ done
+ }
+ }
+
+ procd_close_instance
+
+ # Check if daemon is running, if not then
+ # re-execute in foreground to display error.
+# sleep 1 && service_check $UHTTPD_BIN || \
+# $UHTTPD_BIN -f $UHTTPD_ARGS
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "uhttpd"
+}
+
+start_service() {
+ config_load uhttpd
+ config_foreach start_instance uhttpd
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+HOSTFILE="/tmp/hosts/dhcp"
+TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ config_get_bool dnssec "$cfg" dnssec 0
+ [ "$dnssec" -gt 0 ] && {
+ xappend "--conf-file=$TRUSTANCHORSFILE"
+ xappend "--dnssec"
+ append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+
+ config_get_bool dns "$cfg" dns 0
+ [ "$dns" = "1" ] && {
+ echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE
+ }
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+ echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && mount_root done
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
+ return $?
+}
+
+start_service() {
+ local server enabled enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ $enabled = 0 ] && return
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in $server; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+exit 0
--- /dev/null
+search lan
+nameserver 127.0.0.1
--- /dev/null
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+daytime 13/tcp
+daytime 13/udp
+netstat 15/tcp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp 21/tcp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+smtp 25/tcp
+time 37/tcp
+time 37/udp
+whois 43/tcp
+domain 53/tcp
+domain 53/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/udp
+finger 79/tcp
+www 80/tcp http
+kerberos 88/tcp kerberos5 krb5 kerberos-sec
+kerberos 88/udp kerberos5 krb5 kerberos-sec
+pop3 110/tcp
+pop3 110/udp
+sunrpc 111/tcp
+sunrpc 111/udp
+auth 113/tcp ident
+sftp 115/tcp
+nntp 119/tcp
+ntp 123/tcp
+ntp 123/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap2 143/tcp imap
+imap2 143/udp imap
+snmp 161/tcp
+snmp 161/udp
+snmp-trap 162/tcp snmptrap
+snmp-trap 162/udp snmptrap
+xdmcp 177/tcp
+xdmcp 177/udp
+bgp 179/tcp
+bgp 179/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+https 443/tcp
+https 443/udp
+microsoft-ds 445/tcp
+microsoft-ds 445/udp
+isakmp 500/tcp
+isakmp 500/udp
+rtsp 554/tcp
+rtsp 554/udp
+ipp 631/tcp
+ipp 631/udp
+syslog 514/udp
+printer 515/tcp spooler
+dhcpv6-client 546/tcp
+dhcpv6-client 546/udp
+dhcpv6-server 547/tcp
+dhcpv6-server 547/udp
+afpovertcp 548/tcp
+afpovertcp 548/udp
+nntps 563/tcp snntp
+nntps 563/udp snntp
+ldaps 636/tcp
+ldaps 636/udp
+tinc 655/tcp
+tinc 655/udp
+rsync 873/tcp
+rsync 873/udp
+ftps-data 989/tcp
+ftps 990/tcp
+imaps 993/tcp
+imaps 993/udp
+ircs 994/tcp
+ircs 994/udp
+pop3s 995/tcp
+pop3s 995/udp
+socks 1080/tcp
+socks 1080/udp
+openvpn 1194/tcp
+openvpn 1194/udp
+l2f 1701/tcp l2tp
+l2f 1701/udp l2tp
+radius 1812/tcp
+radius 1812/udp
+radius-acct 1813/tcp radacct
+radius-acct 1813/udp radacct
+nfs 2049/tcp
+nfs 2049/udp
+dict 2628/tcp
+dict 2628/udp
+gpsd 2947/tcp
+gpsd 2947/udp
+icpv2 3130/tcp icp
+icpv2 3130/udp icp
+mysql 3306/tcp
+mysql 3306/udp
+nut 3493/tcp
+nut 3493/udp
+distcc 3632/tcp
+distcc 3632/udp
+daap 3689/tcp
+daap 3689/udp
+svn 3690/tcp subversion
+svn 3690/udp subversion
+epmd 4369/tcp
+epmd 4369/udp
+iax 4569/tcp
+iax 4569/udp
+mtn 4691/tcp
+mtn 4691/udp
+munin 4949/tcp
+sip 5060/tcp
+sip 5060/udp
+sip-tls 5061/tcp
+sip-tls 5061/udp
+xmpp-client 5222/tcp jabber-client
+xmpp-client 5222/udp jabber-client
+xmpp-server 5269/tcp jabber-server
+xmpp-server 5269/udp jabber-server
+mdns 5353/tcp
+mdns 5353/udp
+postgresql 5432/tcp postgres
+postgresql 5432/udp postgres
+x11 6000/tcp
+x11 6000/udp
+mysql-proxy 6446/tcp
+mysql-proxy 6446/udp
+bacula-dir 9101/tcp
+bacula-dir 9101/udp
+bacula-fd 9102/tcp
+bacula-fd 9102/udp
+bacula-sd 9103/tcp
+bacula-sd 9103/udp
+nbd 10809/tcp
+zabbix-agent 10050/tcp
+zabbix-agent 10050/udp
+zabbix-trapper 10051/tcp
+zabbix-trapper 10051/udp
+hkp 11371/tcp
+hkp 11371/udp
+ssmtp 465/tcp smtps
+spamd 783/tcp
+zebrasrv 2600/tcp
+zebra 2601/tcp
+ripd 2602/tcp
+ripngd 2603/tcp
+ospfd 2604/tcp
+bgpd 2605/tcp
+ospf6d 2606/tcp
+ospfapi 2607/tcp
+isisd 2608/tcp
+sane-port 6566/tcp sane saned
+ircd 6667/tcp
+git 9418/tcp
+
--- /dev/null
+root:$1$wC0Ge157$vhq0j/nYRdU7wOUstDg41.:16270:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+root::0:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+kernel.panic=3
+net.ipv4.conf.default.arp_ignore=1
+net.ipv4.conf.all.arp_ignore=1
+net.ipv4.ip_forward=1
+net.ipv4.icmp_echo_ignore_broadcasts=1
+net.ipv4.icmp_ignore_bogus_error_responses=1
+net.ipv4.tcp_ecn=0
+net.ipv4.tcp_fin_timeout=30
+net.ipv4.tcp_keepalive_time=120
+net.ipv4.tcp_syncookies=1
+net.ipv4.tcp_timestamps=1
+net.ipv4.tcp_sack=1
+net.ipv4.tcp_dsack=1
+
+net.ipv6.conf.default.forwarding=1
+net.ipv6.conf.all.forwarding=1
+
+net.netfilter.nf_conntrack_acct=1
+net.netfilter.nf_conntrack_checksum=0
+net.netfilter.nf_conntrack_max=16384
+net.netfilter.nf_conntrack_tcp_timeout_established=3600
+net.netfilter.nf_conntrack_udp_timeout=60
+net.netfilter.nf_conntrack_udp_timeout_stream=180
+
+# disable bridge firewalling by default
+net.bridge.bridge-nf-call-arptables=0
+net.bridge.bridge-nf-call-ip6tables=0
+net.bridge.bridge-nf-call-iptables=0
--- /dev/null
+## This file contains files and directories that should
+## be preserved during an upgrade.
+
+# /etc/example.conf
+# /etc/openvpn/
--- /dev/null
+options {
+ port 5000;
+ bindaddr {
+ iface eth1;
+ };
+
+ syslog daemon;
+}
+
+default {
+ compress yes;
+ encrypt no;
+ keepalive yes;
+ type ether;
+ proto tcp;
+ device vtun0;
+
+ up {
+ program /usr/sbin/ffc "setup-vtun";
+ };
+}
+
+node-40-72 {
+ passwd bfe79d1e9743a;
+}
--- /dev/null
+ _______ ________ __
+ | |.-----.-----.-----.| | | |.----.| |_
+ | - || _ | -__| || | | || _|| _|
+ |_______|| __|_____|__|__||________||__| |____|
+ |__| W I R E L E S S F R E E D O M
+ -----------------------------------------------------
+ BARRIER BREAKER (Bleeding Edge, r39502)
+ -----------------------------------------------------
+ * 1/2 oz Galliano Pour all ingredients into
+ * 4 oz cold Coffee an irish coffee mug filled
+ * 1 1/2 oz Dark Rum with crushed ice. Stir.
+ * 2 tsp. Creme de Cacao
+ -----------------------------------------------------
--- /dev/null
+ABORT BUSY
+ABORT 'NO CARRIER'
+ABORT ERROR
+REPORT CONNECT
+TIMEOUT 10
+"" "AT&F"
+OK "ATE1"
+OK 'AT+CGDCONT=1,"IP","$USE_APN"'
+SAY "Calling UMTS/GPRS"
+TIMEOUT 30
+OK "ATD*99***1#"
+CONNECT ' '
--- /dev/null
+# This is a simple chat script based off of the one provided by Sierra Wireless
+# for CDMA connections. It should work for both Sprint and Verizon networks.
+
+ABORT BUSY
+ABORT 'NO CARRIER'
+ABORT ERROR
+ABORT 'NO DIAL TONE'
+ABORT 'NO ANSWER'
+ABORT DELAYED
+REPORT CONNECT
+TIMEOUT 10
+'' AT
+OK ATZ
+SAY 'Calling CDMA/EVDO'
+TIMEOUT 30
+OK ATDT#777
+CONNECT ''
--- /dev/null
+
+config dnsmasq
+ option domainneeded '1'
+ option boguspriv '1'
+ option filterwin2k '0'
+ option localise_queries '1'
+ option rebind_protection '1'
+ option rebind_localhost '1'
+ option local '/lan/'
+ option domain 'lan'
+ option expandhosts '1'
+ option nonegcache '0'
+ option authoritative '1'
+ option readethers '1'
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/tmp/resolv.conf.auto'
+
+config dhcp 'lan'
+ option interface 'lan'
+ option start '100'
+ option limit '150'
+ option leasetime '12h'
+ option dhcpv6 'hybrid'
+ option ra 'hybrid'
+ option ndp 'hybrid'
+
+config dhcp 'wan'
+ option interface 'wan'
+ option ignore '1'
+
+config odhcpd 'odhcpd'
+ option maindhcp '0'
+ option leasefile '/tmp/hosts/odhcpd'
+ option leasetrigger '/usr/sbin/odhcpd-update'
+
+config dhcp 'wan6'
+ option dhcpv6 'hybrid'
+ option ra 'hybrid'
+ option ndp 'hybrid'
+ option master '1'
+
--- /dev/null
+config dropbear
+ option PasswordAuth 'on'
+ option RootPasswordAuth 'on'
+ option Port '22'
+# option BannerFile '/etc/banner'
--- /dev/null
+config defaults
+ option syn_flood 1
+ option input ACCEPT
+ option output ACCEPT
+ option forward REJECT
+# Uncomment this line to disable ipv6 rules
+# option disable_ipv6 1
+
+config zone
+ option name lan
+ list network 'lan'
+ option input ACCEPT
+ option output ACCEPT
+ option forward ACCEPT
+
+config zone
+ option name wan
+ list network 'wan'
+ list network 'wan6'
+ option input REJECT
+ option output ACCEPT
+ option forward REJECT
+ option masq 1
+ option mtu_fix 1
+
+config forwarding
+ option src lan
+ option dest wan
+
+# We need to accept udp packets on port 68,
+# see https://dev.openwrt.org/ticket/4108
+config rule
+ option name Allow-DHCP-Renew
+ option src wan
+ option proto udp
+ option dest_port 68
+ option target ACCEPT
+ option family ipv4
+
+# Allow IPv4 ping
+config rule
+ option name Allow-Ping
+ option src wan
+ option proto icmp
+ option icmp_type echo-request
+ option family ipv4
+ option target ACCEPT
+
+# Allow DHCPv6 replies
+# see https://dev.openwrt.org/ticket/10381
+config rule
+ option name Allow-DHCPv6
+ option src wan
+ option proto udp
+ option src_ip fe80::/10
+ option src_port 547
+ option dest_ip fe80::/10
+ option dest_port 546
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential incoming IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Input
+ option src wan
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ list icmp_type router-solicitation
+ list icmp_type neighbour-solicitation
+ list icmp_type router-advertisement
+ list icmp_type neighbour-advertisement
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential forwarded IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Forward
+ option src wan
+ option dest *
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# include a file with users custom iptables rules
+config include
+ option path /etc/firewall.user
+
+
+### EXAMPLE CONFIG SECTIONS
+# do not allow a specific ip to access wan
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option dest wan
+# option proto tcp
+# option target REJECT
+
+# block a specific mac on wan
+#config rule
+# option dest wan
+# option src_mac 00:11:22:33:44:66
+# option target REJECT
+
+# block incoming ICMP traffic on a zone
+#config rule
+# option src lan
+# option proto ICMP
+# option target DROP
+
+# port redirect port coming in on wan to lan
+#config redirect
+# option src wan
+# option src_dport 80
+# option dest lan
+# option dest_ip 192.168.16.235
+# option dest_port 80
+# option proto tcp
+
+# port redirect of remapped ssh port (22001) on wan
+#config redirect
+# option src wan
+# option src_dport 22001
+# option dest lan
+# option dest_port 22
+# option proto tcp
+
+# allow IPsec/ESP and ISAKMP passthrough
+#config rule
+# option src wan
+# option dest lan
+# option protocol esp
+# option target ACCEPT
+
+#config rule
+# option src wan
+# option dest lan
+# option src_port 500
+# option dest_port 500
+# option proto udp
+# option target ACCEPT
+
+### FULL CONFIG SECTIONS
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 80
+# option dest wan
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
+# option target REJECT
+
+#config redirect
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 1024
+# option src_dport 80
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
--- /dev/null
+
+config core 'main'
+ option lang 'auto'
+ option mediaurlbase '/luci-static/openwrt.org'
+ option resourcebase '/luci-static/resources'
+
+config extern 'flash_keep'
+ option uci '/etc/config/'
+ option dropbear '/etc/dropbear/'
+ option openvpn '/etc/openvpn/'
+ option passwd '/etc/passwd'
+ option opkg '/etc/opkg.conf'
+ option firewall '/etc/firewall.user'
+ option uploads '/lib/uci/upload/'
+
+config internal 'languages'
+ option en 'English'
+ option de 'Deutsch'
+
+config internal 'sauth'
+ option sessionpath '/tmp/luci-sessions'
+ option sessiontime '3600'
+
+config internal 'ccache'
+ option enable '1'
+
+config internal 'themes'
+ option Bootstrap '/luci-static/bootstrap'
+ option OpenWrt '/luci-static/openwrt.org'
+
--- /dev/null
+package mactodevinfo
+
--- /dev/null
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config globals 'globals'
+ option ula_prefix 'fdee:4b67:09fa::/48'
+
+config interface 'lan'
+ option ifname 'eth0.1'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.1'
+ option netmask '255.255.255.0'
+ option ip6assign '60'
+
+config interface 'wan'
+ option ifname 'eth0.2'
+ option proto 'dhcp'
+
+config interface 'wan6'
+ option ifname '@wan'
+ option proto 'dhcpv6'
+
+config switch
+ option name 'switch0'
+ option reset '1'
+ option enable_vlan '1'
+
+config switch_vlan
+ option device 'switch0'
+ option vlan '1'
+ option ports '0t 2 3 4 5'
+
+config switch_vlan
+ option device 'switch0'
+ option vlan '2'
+ option ports '0t 1'
+
--- /dev/null
+package openvpn
+
+#################################################
+# Sample to include a custom config file. #
+#################################################
+
+config openvpn custom_config
+
+ # Set to 1 to enable this instance:
+ option enabled 0
+
+ # Include OpenVPN configuration
+ option config /etc/openvpn/my-vpn.conf
+
+
+#################################################
+# Sample OpenVPN 2.0 uci config for #
+# multi-client server. #
+#################################################
+
+config openvpn sample_server
+
+ # Set to 1 to enable this instance:
+ option enabled 0
+
+ # Which local IP address should OpenVPN
+ # listen on? (optional)
+# option local 0.0.0.0
+
+ # Which TCP/UDP port should OpenVPN listen on?
+ # If you want to run multiple OpenVPN instances
+ # on the same machine, use a different port
+ # number for each one. You will need to
+ # open up this port on your firewall.
+ option port 1194
+
+ # TCP or UDP server?
+# option proto tcp
+ option proto udp
+
+ # "dev tun" will create a routed IP tunnel,
+ # "dev tap" will create an ethernet tunnel.
+ # Use "dev tap0" if you are ethernet bridging
+ # and have precreated a tap0 virtual interface
+ # and bridged it with your ethernet interface.
+ # If you want to control access policies
+ # over the VPN, you must create firewall
+ # rules for the the TUN/TAP interface.
+ # On non-Windows systems, you can give
+ # an explicit unit number, such as tun0.
+ # On Windows, use "dev-node" for this.
+ # On most systems, the VPN will not function
+ # unless you partially or fully disable
+ # the firewall for the TUN/TAP interface.
+# option dev tap
+ option dev tun
+
+ # SSL/TLS root certificate (ca), certificate
+ # (cert), and private key (key). Each client
+ # and the server must have their own cert and
+ # key file. The server and all clients will
+ # use the same ca file.
+ #
+ # See the "easy-rsa" directory for a series
+ # of scripts for generating RSA certificates
+ # and private keys. Remember to use
+ # a unique Common Name for the server
+ # and each of the client certificates.
+ #
+ # Any X509 key management system can be used.
+ # OpenVPN can also use a PKCS #12 formatted key file
+ # (see "pkcs12" directive in man page).
+ option ca /etc/openvpn/ca.crt
+ option cert /etc/openvpn/server.crt
+ # This file should be kept secret:
+ option key /etc/openvpn/server.key
+
+ # Diffie hellman parameters.
+ # Generate your own with:
+ # openssl dhparam -out dh1024.pem 1024
+ # Substitute 2048 for 1024 if you are using
+ # 2048 bit keys.
+ option dh /etc/openvpn/dh1024.pem
+
+ # Configure server mode and supply a VPN subnet
+ # for OpenVPN to draw client addresses from.
+ # The server will take 10.8.0.1 for itself,
+ # the rest will be made available to clients.
+ # Each client will be able to reach the server
+ # on 10.8.0.1. Comment this line out if you are
+ # ethernet bridging. See the man page for more info.
+ option server "10.8.0.0 255.255.255.0"
+
+ # Maintain a record of client <-> virtual IP address
+ # associations in this file. If OpenVPN goes down or
+ # is restarted, reconnecting clients can be assigned
+ # the same virtual IP address from the pool that was
+ # previously assigned.
+ option ifconfig_pool_persist /tmp/ipp.txt
+
+ # Configure server mode for ethernet bridging.
+ # You must first use your OS's bridging capability
+ # to bridge the TAP interface with the ethernet
+ # NIC interface. Then you must manually set the
+ # IP/netmask on the bridge interface, here we
+ # assume 10.8.0.4/255.255.255.0. Finally we
+ # must set aside an IP range in this subnet
+ # (start=10.8.0.50 end=10.8.0.100) to allocate
+ # to connecting clients. Leave this line commented
+ # out unless you are ethernet bridging.
+# option server_bridge "10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100"
+
+ # Push routes to the client to allow it
+ # to reach other private subnets behind
+ # the server. Remember that these
+ # private subnets will also need
+ # to know to route the OpenVPN client
+ # address pool (10.8.0.0/255.255.255.0)
+ # back to the OpenVPN server.
+# list push "route 192.168.10.0 255.255.255.0"
+# list push "route 192.168.20.0 255.255.255.0"
+
+ # To assign specific IP addresses to specific
+ # clients or if a connecting client has a private
+ # subnet behind it that should also have VPN access,
+ # use the subdirectory "ccd" for client-specific
+ # configuration files (see man page for more info).
+
+ # EXAMPLE: Suppose the client
+ # having the certificate common name "Thelonious"
+ # also has a small subnet behind his connecting
+ # machine, such as 192.168.40.128/255.255.255.248.
+ # First, uncomment out these lines:
+# option client_config_dir /etc/openvpn/ccd
+# list route "192.168.40.128 255.255.255.248"
+ # Then create a file ccd/Thelonious with this line:
+ # iroute 192.168.40.128 255.255.255.248
+ # This will allow Thelonious' private subnet to
+ # access the VPN. This example will only work
+ # if you are routing, not bridging, i.e. you are
+ # using "dev tun" and "server" directives.
+
+ # EXAMPLE: Suppose you want to give
+ # Thelonious a fixed VPN IP address of 10.9.0.1.
+ # First uncomment out these lines:
+# option client_config_dir /etc/openvpn/ccd
+# list route "10.9.0.0 255.255.255.252"
+# list route "192.168.100.0 255.255.255.0"
+ # Then add this line to ccd/Thelonious:
+ # ifconfig-push "10.9.0.1 10.9.0.2"
+
+ # Suppose that you want to enable different
+ # firewall access policies for different groups
+ # of clients. There are two methods:
+ # (1) Run multiple OpenVPN daemons, one for each
+ # group, and firewall the TUN/TAP interface
+ # for each group/daemon appropriately.
+ # (2) (Advanced) Create a script to dynamically
+ # modify the firewall in response to access
+ # from different clients. See man
+ # page for more info on learn-address script.
+# option learn_address /etc/openvpn/script
+
+ # If enabled, this directive will configure
+ # all clients to redirect their default
+ # network gateway through the VPN, causing
+ # all IP traffic such as web browsing and
+ # and DNS lookups to go through the VPN
+ # (The OpenVPN server machine may need to NAT
+ # the TUN/TAP interface to the internet in
+ # order for this to work properly).
+ # CAVEAT: May break client's network config if
+ # client's local DHCP server packets get routed
+ # through the tunnel. Solution: make sure
+ # client's local DHCP server is reachable via
+ # a more specific route than the default route
+ # of 0.0.0.0/0.0.0.0.
+# list push "redirect-gateway"
+
+ # Certain Windows-specific network settings
+ # can be pushed to clients, such as DNS
+ # or WINS server addresses. CAVEAT:
+ # http://openvpn.net/faq.html#dhcpcaveats
+# list push "dhcp-option DNS 10.8.0.1"
+# list push "dhcp-option WINS 10.8.0.1"
+
+ # Uncomment this directive to allow different
+ # clients to be able to "see" each other.
+ # By default, clients will only see the server.
+ # To force clients to only see the server, you
+ # will also need to appropriately firewall the
+ # server's TUN/TAP interface.
+# option client_to_client 1
+
+ # Uncomment this directive if multiple clients
+ # might connect with the same certificate/key
+ # files or common names. This is recommended
+ # only for testing purposes. For production use,
+ # each client should have its own certificate/key
+ # pair.
+ #
+ # IF YOU HAVE NOT GENERATED INDIVIDUAL
+ # CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
+ # EACH HAVING ITS OWN UNIQUE "COMMON NAME",
+ # UNCOMMENT THIS LINE OUT.
+# option duplicate_cn 1
+
+ # The keepalive directive causes ping-like
+ # messages to be sent back and forth over
+ # the link so that each side knows when
+ # the other side has gone down.
+ # Ping every 10 seconds, assume that remote
+ # peer is down if no ping received during
+ # a 120 second time period.
+ option keepalive "10 120"
+
+ # For extra security beyond that provided
+ # by SSL/TLS, create an "HMAC firewall"
+ # to help block DoS attacks and UDP port flooding.
+ #
+ # Generate with:
+ # openvpn --genkey --secret ta.key
+ #
+ # The server and each client must have
+ # a copy of this key.
+ # The second parameter should be '0'
+ # on the server and '1' on the clients.
+ # This file is secret:
+# option tls_auth "/etc/openvpn/ta.key 0"
+
+ # Select a cryptographic cipher.
+ # This config item must be copied to
+ # the client config file as well.
+ # Blowfish (default):
+# option cipher BF-CBC
+ # AES:
+# option cipher AES-128-CBC
+ # Triple-DES:
+# option cipher DES-EDE3-CBC
+
+ # Enable compression on the VPN link.
+ # If you enable it here, you must also
+ # enable it in the client config file.
+ option comp_lzo yes
+
+ # The maximum number of concurrently connected
+ # clients we want to allow.
+# option max_clients 100
+
+ # The persist options will try to avoid
+ # accessing certain resources on restart
+ # that may no longer be accessible because
+ # of the privilege downgrade.
+ option persist_key 1
+ option persist_tun 1
+
+ # Output a short status file showing
+ # current connections, truncated
+ # and rewritten every minute.
+ option status /tmp/openvpn-status.log
+
+ # By default, log messages will go to the syslog (or
+ # on Windows, if running as a service, they will go to
+ # the "\Program Files\OpenVPN\log" directory).
+ # Use log or log-append to override this default.
+ # "log" will truncate the log file on OpenVPN startup,
+ # while "log-append" will append to it. Use one
+ # or the other (but not both).
+# option log /tmp/openvpn.log
+# option log_append /tmp/openvpn.log
+
+ # Set the appropriate level of log
+ # file verbosity.
+ #
+ # 0 is silent, except for fatal errors
+ # 4 is reasonable for general usage
+ # 5 and 6 can help to debug connection problems
+ # 9 is extremely verbose
+ option verb 3
+
+ # Silence repeating messages. At most 20
+ # sequential messages of the same message
+ # category will be output to the log.
+# option mute 20
+
+
+##############################################
+# Sample client-side OpenVPN 2.0 uci config #
+# for connecting to multi-client server. #
+##############################################
+
+config openvpn sample_client
+
+ # Set to 1 to enable this instance:
+ option enabled 0
+
+ # Specify that we are a client and that we
+ # will be pulling certain config file directives
+ # from the server.
+ option client 1
+
+ # Use the same setting as you are using on
+ # the server.
+ # On most systems, the VPN will not function
+ # unless you partially or fully disable
+ # the firewall for the TUN/TAP interface.
+# option dev tap
+ option dev tun
+
+ # Are we connecting to a TCP or
+ # UDP server? Use the same setting as
+ # on the server.
+# option proto tcp
+ option proto udp
+
+ # The hostname/IP and port of the server.
+ # You can have multiple remote entries
+ # to load balance between the servers.
+ list remote "my_server_1 1194"
+# list remote "my_server_2 1194"
+
+ # Choose a random host from the remote
+ # list for load_balancing. Otherwise
+ # try hosts in the order specified.
+# option remote_random 1
+
+ # Keep trying indefinitely to resolve the
+ # host name of the OpenVPN server. Very useful
+ # on machines which are not permanently connected
+ # to the internet such as laptops.
+ option resolv_retry infinite
+
+ # Most clients don't need to bind to
+ # a specific local port number.
+ option nobind 1
+
+ # Try to preserve some state across restarts.
+ option persist_key 1
+ option persist_tun 1
+
+ # If you are connecting through an
+ # HTTP proxy to reach the actual OpenVPN
+ # server, put the proxy server/IP and
+ # port number here. See the man page
+ # if your proxy server requires
+ # authentication.
+ # retry on connection failures:
+# option http_proxy_retry 1
+ # specify http proxy address and port:
+# option http_proxy "192.168.1.100 8080"
+
+ # Wireless networks often produce a lot
+ # of duplicate packets. Set this flag
+ # to silence duplicate packet warnings.
+# option mute_replay_warnings 1
+
+ # SSL/TLS parms.
+ # See the server config file for more
+ # description. It's best to use
+ # a separate .crt/.key file pair
+ # for each client. A single ca
+ # file can be used for all clients.
+ option ca /etc/openvpn/ca.crt
+ option cert /etc/openvpn/client.crt
+ option key /etc/openvpn/client.key
+
+ # Verify server certificate by checking
+ # that the certicate has the nsCertType
+ # field set to "server". This is an
+ # important precaution to protect against
+ # a potential attack discussed here:
+ # http://openvpn.net/howto.html#mitm
+ #
+ # To use this feature, you will need to generate
+ # your server certificates with the nsCertType
+ # field set to "server". The build_key_server
+ # script in the easy_rsa folder will do this.
+# option ns_cert_type server
+
+ # If a tls_auth key is used on the server
+ # then every client must also have the key.
+# option tls_auth "/etc/openvpn/ta.key 1"
+
+ # Select a cryptographic cipher.
+ # If the cipher option is used on the server
+ # then you must also specify it here.
+# option cipher x
+
+ # Enable compression on the VPN link.
+ # Don't enable this unless it is also
+ # enabled in the server config file.
+ option comp_lzo yes
+
+ # Set log file verbosity.
+ option verb 3
+
+ # Silence repeating messages
+# option mute 20
--- /dev/null
+# QoS configuration for OpenWrt
+
+# INTERFACES:
+config interface wan
+ option classgroup "Default"
+ option enabled 0
+ option upload 128
+ option download 1024
+
+# RULES:
+config classify
+ option target "Priority"
+ option ports "22,53"
+config classify
+ option target "Normal"
+ option proto "tcp"
+ option ports "20,21,25,80,110,443,993,995"
+config classify
+ option target "Express"
+ option ports "5190"
+config default
+ option target "Express"
+ option proto "udp"
+ option pktsize "-500"
+config reclassify
+ option target "Priority"
+ option proto "icmp"
+config default
+ option target "Bulk"
+ option portrange "1024-65535"
+config reclassify
+ option target "Priority"
+ option proto "tcp"
+ option pktsize "-128"
+ option mark "!Bulk"
+ option tcpflags "SYN"
+config reclassify
+ option target "Priority"
+ option proto "tcp"
+ option pktsize "-128"
+ option mark "!Bulk"
+ option tcpflags "ACK"
+
+
+# Don't change the stuff below unless you
+# really know what it means :)
+
+config classgroup "Default"
+ option classes "Priority Express Normal Bulk"
+ option default "Normal"
+
+
+config class "Priority"
+ option packetsize 400
+ option maxsize 400
+ option avgrate 10
+ option priority 20
+config class "Priority_down"
+ option packetsize 1000
+ option avgrate 10
+
+
+config class "Express"
+ option packetsize 1000
+ option maxsize 800
+ option avgrate 50
+ option priority 10
+
+config class "Normal"
+ option packetsize 1500
+ option packetdelay 100
+ option avgrate 10
+ option priority 5
+config class "Normal_down"
+ option avgrate 20
+
+config class "Bulk"
+ option avgrate 1
+ option packetdelay 200
--- /dev/null
+
+config system
+ option hostname 'OpenWrt'
+ option timezone 'UTC'
+
+config timeserver 'ntp'
+ list server '0.openwrt.pool.ntp.org'
+ list server '1.openwrt.pool.ntp.org'
+ list server '2.openwrt.pool.ntp.org'
+ list server '3.openwrt.pool.ntp.org'
+ option enable_server '0'
+
+config led 'led_usb1'
+ option name 'USB1'
+ option sysfs 'tp-link:green:usb1'
+ option trigger 'usbdev'
+ option dev '1-1.1'
+ option interval '50'
+
+config led 'led_usb2'
+ option name 'USB2'
+ option sysfs 'tp-link:green:usb2'
+ option trigger 'usbdev'
+ option dev '1-1.2'
+ option interval '50'
+
+config led 'led_wlan2g'
+ option name 'WLAN2G'
+ option sysfs 'tp-link:blue:wlan2g'
+ option trigger 'phy0tpt'
+
--- /dev/null
+config network
+ option init network
+ list affects dhcp
+ list affects radvd
+
+config wireless
+ list affects network
+
+config firewall
+ option init firewall
+ list affects luci-splash
+ list affects qos
+ list affects miniupnpd
+
+config olsr
+ option init olsrd
+
+config dhcp
+ option init dnsmasq
+
+config dropbear
+ option init dropbear
+
+config httpd
+ option init httpd
+
+config fstab
+ option init fstab
+
+config qos
+ option init qos
+
+config system
+ option init led
+ list affects luci_statistics
+
+config luci_splash
+ option init luci_splash
+
+config upnpd
+ option init miniupnpd
+
+config ntpclient
+ option init ntpclient
+
+config samba
+ option init samba
+
+config tinyproxy
+ option init tinyproxy
+
+config 6relayd
+ option init 6relayd
--- /dev/null
+
+config uhttpd 'main'
+ list listen_http '0.0.0.0:80'
+ list listen_https '0.0.0.0:443'
+ option home '/www'
+ option rfc1918_filter '1'
+ option max_requests '3'
+ option max_connections '100'
+ option cert '/etc/uhttpd.crt'
+ option key '/etc/uhttpd.key'
+ option cgi_prefix '/cgi-bin'
+ option script_timeout '60'
+ option network_timeout '30'
+ option http_keepalive '20'
+ option tcp_keepalive '1'
+ option ubus_prefix '/ubus'
+
+config cert 'px5g'
+ option days '730'
+ option bits '1024'
+ option country 'DE'
+ option state 'Berlin'
+ option location 'Berlin'
+ option commonname 'OpenWrt'
+
--- /dev/null
+config wifi-device radio0
+ option type mac80211
+ option channel 11
+ option hwmode 11ng
+ option path 'platform/ar934x_wmac'
+ list ht_capab LDPC
+ list ht_capab SHORT-GI-20
+ list ht_capab SHORT-GI-40
+ list ht_capab TX-STBC
+ list ht_capab RX-STBC1
+ list ht_capab DSSS_CCK-40
+ option htmode HT20
+ # REMOVE THIS LINE TO ENABLE WIFI:
+ option disabled 1
+
+config wifi-iface
+ option device radio0
+ option network lan
+ option mode ap
+ option ssid OpenWrt
+ option encryption none
+
+config wifi-device radio1
+ option type mac80211
+ option channel 36
+ option hwmode 11na
+ option path 'pci0000:00/0000:00:00.0'
+ list ht_capab LDPC
+ list ht_capab SHORT-GI-20
+ list ht_capab SHORT-GI-40
+ list ht_capab TX-STBC
+ list ht_capab RX-STBC1
+ list ht_capab DSSS_CCK-40
+ option htmode HT20
+ # REMOVE THIS LINE TO ENABLE WIFI:
+ option disabled 1
+
+config wifi-iface
+ option device radio1
+ option network lan
+ option mode ap
+ option ssid OpenWrt
+ option encryption none
+
--- /dev/null
+config 'wshaper' 'settings'
+ option 'network' 'wan'
+ option 'downlink' '2000'
+ option 'uplink' '240'
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2009-2013 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/ar71xx.sh
+
+get_status_led() {
+ case $(ar71xx_board_name) in
+ alfa-nx)
+ status_led="alfa:green:led_8"
+ ;;
+ all0305)
+ status_led="eap7660d:green:ds4"
+ ;;
+ ap132)
+ status_led="ap132:green:status"
+ ;;
+ ap136-010|\
+ ap136-020)
+ status_led="ap136:green:status"
+ ;;
+ ap135-020)
+ status_led="ap135:green:status"
+ ;;
+ ap81)
+ status_led="ap81:green:status"
+ ;;
+ ap83)
+ status_led="ap83:green:power"
+ ;;
+ ap96)
+ status_led="ap96:green:led2"
+ ;;
+ aw-nr580)
+ status_led="aw-nr580:green:ready"
+ ;;
+ bullet-m | rocket-m | nano-m | nanostation-m)
+ status_led="ubnt:green:link4"
+ ;;
+ bxu2000n-2-a1)
+ status_led="bhu:green:status"
+ ;;
+ cap4200ag)
+ status_led="senao:green:pwr"
+ ;;
+ db120)
+ status_led="db120:green:status"
+ ;;
+ dir-505-a1 |\
+ dir-600-a1 |\
+ dir-615-e4)
+ status_led="d-link:green:power"
+ ;;
+ dir-615-c1)
+ status_led="d-link:green:status"
+ ;;
+ dir-825-b1)
+ status_led="d-link:orange:power"
+ ;;
+ dir-825-c1 |\
+ dir-835-a1)
+ status_led="d-link:amber:power"
+ ;;
+ eap7660d)
+ status_led="eap7660d:green:ds4"
+ ;;
+ hornet-ub)
+ status_led="alfa:blue:wps"
+ ;;
+ ja76pf | \
+ ja76pf2)
+ status_led="jjplus:green:led1"
+ ;;
+ ls-sr71)
+ status_led="ubnt:green:d22"
+ ;;
+ mr600)
+ status_led="mr600:orange:power"
+ ;;
+ mr600v2)
+ status_led="mr600:blue:power"
+ ;;
+ mynet-n600 | \
+ mynet-n750)
+ status_led="wd:blue:power"
+ ;;
+ mynet-rext)
+ status_led="wd:blue:power"
+ ;;
+ mzk-w04nu | \
+ mzk-w300nh)
+ status_led="planex:green:status"
+ ;;
+ nbg460n_550n_550nh)
+ status_led="nbg460n:green:power"
+ ;;
+ om2p | \
+ om2p-hs | \
+ om2p-lc)
+ status_led="om2p:blue:power"
+ ;;
+ pb44)
+ status_led="pb44:amber:jump1"
+ ;;
+ rb-2011l|\
+ rb-2011uas|\
+ rb-2011uas-2hnd)
+ status_led="rb:green:usr"
+ ;;
+ rb-411 | rb-411u | rb-433 | rb-433u | rb-450 | rb-450g | rb-493)
+ status_led="rb4xx:yellow:user"
+ ;;
+ rb-750)
+ status_led="rb750:green:act"
+ ;;
+ routerstation | routerstation-pro)
+ status_led="ubnt:green:rf"
+ ;;
+ rw2458n)
+ status_led="rw2458n:green:d3"
+ ;;
+ tew-632brp)
+ status_led="tew-632brp:green:status"
+ ;;
+ tew-673gru)
+ status_led="trendnet:blue:wps"
+ ;;
+ tew-712br|\
+ tew-732br)
+ status_led="trendnet:green:power"
+ ;;
+ tl-mr3020)
+ status_led="tp-link:green:wps"
+ ;;
+ tl-wa750re)
+ status_led="tp-link:orange:re"
+ ;;
+ tl-wa850re)
+ status_led="tp-link:blue:re"
+ ;;
+ tl-mr3220 | \
+ tl-mr3220-v2 | \
+ tl-mr3420 | \
+ tl-mr3420-v2 | \
+ tl-wa801nd-v2 | \
+ tl-wa901nd | \
+ tl-wa901nd-v2 | \
+ tl-wa901nd-v3 | \
+ tl-wdr3500 | \
+ tl-wr1041n-v2 | \
+ tl-wr1043nd | \
+ tl-wr1043nd-v2 | \
+ tl-wr741nd | \
+ tl-wr741nd-v4 | \
+ tl-wr841n-v1 | \
+ tl-wr841n-v7 | \
+ tl-wr841n-v8 | \
+ tl-wr842n-v2 | \
+ tl-wr941nd)
+ status_led="tp-link:green:system"
+ ;;
+ archer-c7 | \
+ tl-mr10u | \
+ tl-mr13u | \
+ tl-wdr4300 | \
+ tl-wr703n | \
+ tl-wr710n | \
+ tl-wr720n-v3)
+ status_led="tp-link:blue:system"
+ ;;
+ tl-wr2543n)
+ status_led="tp-link:green:wps"
+ ;;
+ unifi)
+ status_led="ubnt:green:dome"
+ ;;
+ uap-pro)
+ status_led="ubnt:white:dome"
+ ;;
+ whr-g301n | \
+ whr-hp-g300n | \
+ whr-hp-gn | \
+ wzr-hp-g300nh)
+ status_led="buffalo:green:router"
+ ;;
+ wlae-ag300n)
+ status_led="buffalo:green:status"
+ ;;
+ wzr-hp-ag300h | \
+ wzr-hp-g300nh2)
+ status_led="buffalo:red:diag"
+ ;;
+ wndap360 | \
+ wndr3700 | \
+ wndr4300 | \
+ wnr2000 | \
+ wnr2200 |\
+ wnr612-v2)
+ status_led="netgear:green:power"
+ ;;
+ wp543)
+ status_led="wp543:green:diag"
+ ;;
+ wrt400n)
+ status_led="wrt400n:blue:wps"
+ ;;
+ wrt160nl)
+ status_led="wrt160nl:blue:wps"
+ ;;
+ zcn-1523h-2 | zcn-1523h-5)
+ status_led="zcn-1523h:amber:init"
+ ;;
+ wlr8100)
+ status_led="sitecom:amber:status"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}
--- /dev/null
+# Change the following lines if you want dnsmasq to serve SRV
+# records.
+# You may add multiple srv-host lines.
+# The fields are <name>,<target>,<port>,<priority>,<weight>
+
+# A SRV record sending LDAP for the example.com domain to
+# ldapserver.example.com port 289
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
+
+# Two SRV records for LDAP, each with different priorities
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
+
+# A SRV record indicating that there is no LDAP server for the domain
+# example.com
+#srv-host=_ldap._tcp.example.com
+
+# The following line shows how to make dnsmasq serve an arbitrary PTR
+# record. This is useful for DNS-SD.
+# The fields are <name>,<target>
+#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"
+
+# Change the following lines to enable dnsmasq to serve TXT records.
+# These are used for things like SPF and zeroconf.
+# The fields are <name>,<text>,<text>...
+
+#Example SPF.
+#txt-record=example.com,"v=spf1 a -all"
+
+#Example zeroconf
+#txt-record=_http._tcp.example.com,name=value,paper=A4
+
+# Provide an alias for a "local" DNS name. Note that this _only_ works
+# for targets which are names from DHCP or /etc/hosts. Give host
+# "bert" another name, bertrand
+# The fields are <cname>,<target>
+#cname=bertand,bert
--- /dev/null
+# This file is interpreted as shell script.
+# Put your custom iptables rules here, they will
+# be executed with each firewall (re-)start.
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
--- /dev/null
+opengt
+ set com 115200n81
+ set comecho off
+ set senddelay 0.02
+ waitquiet 0.2 0.2
+ flash 0.1
+
+:start
+ send "ATI^m"
+ get 1 "" $s
+ print $s
+
+:continue
+ exit 0
--- /dev/null
+opengt
+ set senddelay 0.05
+ waitquiet 1 0.2
+ let c=1
+ :loop
+ inc c
+ send "AT+CGATT?^m"
+ waitfor 5 "+CGATT: 1","+CGATT: 0"
+ print "\n."
+ if % = -1 goto error
+ if c > 10 goto toolong
+ if % = 0 goto out
+ sleep 2
+ if % = 1 goto loop
+ :toolong
+ exit 1
+ :error
+ exit 0
+ :out
+ exit 0
--- /dev/null
+opengt
+ set com 115200n81
+ set comecho off
+ set senddelay 0.02
+ waitquiet 0.2 0.2
+ flash 0.1
+
+:start
+ send "AT+CNUM^m"
+ get 1 "^m" $n
+ get 1 ":" $n
+ get 1 "\"" $n
+ get 1 "\"" $n
+ get 1 "\"" $n
+ get 1 "\"" $n
+ let n = len($n)
+ if n<1 goto continue
+ print $n
+:continue
+ exit 0
--- /dev/null
+opengt
+ set com 115200n81
+ set comecho off
+ set senddelay 0.02
+ waitquiet 0.2 0.2
+ flash 0.1
+
+:start
+ send "AT+CIMI^m"
+ get 1 "^m" $s
+ get 1 "^m" $s
+ let x = len($s)
+ if x<2 goto continue
+ let $s = $right($s, x-1)
+ print $s
+:continue
+ exit 0
--- /dev/null
+opengt
+ set com 115200n81
+ set comecho off
+ set senddelay 0.02
+ waitquiet 0.2 0.2
+ flash 0.1
+
+:start
+ send "AT+CSQ^m"
+ get 1 "" $s
+ print $s
+
+:continue
+ exit 0
--- /dev/null
+# set wwan mode from environment
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+
+:start
+ print "Trying to set mode\n"
+ send $env("MODE")
+ send "^m"
+
+ waitfor 15 "OK","ERR","ERROR"
+ if % = 0 goto continue
+ if % = 1 goto modeerror
+ if % = 2 goto modeerror
+
+ print "Timeout setting WWAN mode!\n"
+ exit 1
+
+:modeerror
+ print "Error setting WWAN mode!\n"
+ exit 1
+
+:continue
+ exit 0
--- /dev/null
+# set pin code from evnironment "$PINCODE"
+opengt
+ set com 115200n81
+ set senddelay 0.05
+ waitquiet 3 0.5
+ flash 0.1
+
+ let c=0
+:start
+ send "AT+CPIN?^m"
+ waitfor 15 "SIM PUK","SIM PIN","READY","ERROR","ERR"
+ if % = -1 goto timeout
+ if % = 0 goto ready
+ if % = 1 goto setpin
+ if % = 2 goto ready
+ if % = 3 goto checkrepeat
+ if % = 4 goto checkrepeat
+
+:checkrepeat
+ inc c
+ if c>3 goto pinerror
+ waitquiet 12 0.5
+ goto start
+
+:timeout
+ print "timeout checking for PIN."
+ exit 1
+
+:ready
+ print "SIM ready\n"
+ goto continue
+ exit 0
+
+:setpin
+ # check if output was "SIM PIN2", that's ok.
+ waitfor 1 "2"
+ if % = 0 goto ready
+
+ print "Trying to set PIN\n"
+ send "AT+CPIN=\""
+ send $env("PINCODE")
+ send "\"^m"
+
+ waitfor 20 "OK","ERR"
+ if % = -1 goto pinerror
+ if % = 0 goto continue
+ if % = 1 goto pinerror
+
+:pinerror
+ print "Error setting PIN, check card manually\n"
+ exit 1
+
+:continue
+ print "PIN set successfully\n"
+ exit 0
--- /dev/null
+root:x:0:
+daemon:x:1:
+adm:x:4:
+mail:x:8:
+audio:x:29:
+www-data:x:33:
+ftp:x:55:
+users:x:100:
+network:x:101:
+nogroup:x:65534:
--- /dev/null
+127.0.0.1 localhost
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ }, ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/failsafe" ]
+ ],
+]
--- /dev/null
+#!/bin/sh
+
+ath9k_eeprom_die() {
+ echo "ath9k eeprom: " "$*"
+ exit 1
+}
+
+ath9k_eeprom_extract() {
+ local part=$1
+ local offset=$2
+ local count=$3
+ local mtd
+
+ mtd=$(find_mtd_chardev $part)
+ [ -n "$mtd" ] || \
+ ath9k_eeprom_die "no mtd device found for partition $part"
+
+ dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
+ ath9k_eeprom_die "failed to extract from $mtd"
+}
+
+ath9k_patch_firmware_mac() {
+ local mac=$1
+
+ [ -z "$mac" ] && return
+
+ macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
+}
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+. /lib/ar71xx.sh
+. /lib/functions.sh
+
+board=$(ar71xx_board_name)
+
+case "$FIRMWARE" in
+"soc_wmac.eeprom")
+ case $board in
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 4096 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 0)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+
+"pci_wmac0.eeprom")
+ case $board in
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 20480 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 12)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+esac
--- /dev/null
+[ ifup = "$ACTION" ] && {
+ uci_toggle_state network "$INTERFACE" up 1
+ [ -n "$DEVICE" ] && {
+ uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)"
+ uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
+ }
+}
--- /dev/null
+#!/bin/sh
+[ "$ACTION" = ifup ] && /etc/init.d/qos enabled && /usr/lib/qos/generate.sh interface "$INTERFACE" | sh
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+
+if [ "$ACTION" != "ifup" ]; then
+ exit
+fi
+
+config_load network
+
+config_get teql $INTERFACE teql
+
+if [ "$teql" != "" ]; then
+ logger Adding device $DEVICE to TEQL master $teql
+ insmod sch_teql
+ tc qdisc add dev $DEVICE root $teql
+
+ # The kernel doesn't let us bring it up until it has at least one
+ # slave. So bring it up now, if it isn't already.
+ if ! cat /sys/class/net/$teql/carrier &>/dev/null; then
+ ifup $teql &
+ fi
+fi
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
+[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0
+
+/etc/init.d/firewall enabled || exit 0
+
+fw3 -q network "$INTERFACE" >/dev/null || exit 0
+
+logger -t firewall "Reloading firewall due to $ACTION of $INTERFACE ($DEVICE)"
+fw3 -q reload
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup ] || exit 0
+
+/etc/init.d/dnsmasq enabled && /etc/init.d/dnsmasq start
--- /dev/null
+#!/bin/sh
+/etc/init.d/relayd enabled && /etc/init.d/relayd start
--- /dev/null
+#!/bin/sh
+
+if [ -f /etc/sysctl.conf ] && [ "$ACTION" = add ]; then
+ sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" /etc/sysctl.conf | \
+ sysctl -e -p - | logger -t sysctl
+fi
--- /dev/null
+#!/bin/sh
+
+# For AR9220 and AR9223, GPIO JTAG must explicit be disabled
+# before LEDs start working. Do this when wifi device is
+# detected.
+
+#
+# $DEVPATH is not valid for some boards (including WZR-HP-AG300H).
+# Manipulate the $DEVPATH to reach the corresponding phyN.
+#
+
+devdir=`dirname $DEVPATH`
+devdir=`dirname $devdir`
+phydir=/sys$devdir/ieee80211
+phyname=`cat $phydir/phy*/name`
+
+if [ -z $phyname -o $ACTION != "add" ]; then exit 0; fi
+
+#
+# ar922x_disable_gpio_jtag():
+#
+# Emulate
+# REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
+# for AR9220 and AR9223.
+#
+
+ar922x_disable_gpio_jtag()
+{
+ local regidx=0x4054
+
+ [ -f /sys/kernel/debug/ieee80211/$1/ath9k/regidx ] && {
+ echo $regidx > /sys/kernel/debug/ieee80211/$1/ath9k/regidx
+ regval=`cat /sys/kernel/debug/ieee80211/$1/ath9k/regval`
+ regval=$((regval | 0x20000))
+ echo regval $regval
+ echo $regval > /sys/kernel/debug/ieee80211/$1/ath9k/regval
+ }
+}
+
+if [ $phyname -a $ACTION = "add" ]; then
+
+ . /lib/ar71xx.sh
+
+ case $(ar71xx_board_name) in
+ wzr-hp-ag300h)
+ ar922x_disable_gpio_jtag $phyname
+ ;;
+ esac;
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh
+. /lib/functions.sh
+. /lib/netifd/netifd-proto.sh
+
+find_3g_iface() {
+ local cfg="$1"
+ local tty="$2"
+
+ local proto
+ config_get proto "$cfg" proto
+ [ "$proto" = 3g ] || return 0
+
+ # bypass state vars here because 00-netstate could clobber .device
+ local dev=$(uci_get network "$cfg" device)
+
+ if [ "${dev##*/}" = "${tty##*/}" ]; then
+ if [ "$ACTION" = add ]; then
+ available=1
+ else
+ available=0
+ fi
+ proto_set_available "$cfg" $available
+ fi
+}
+
+case "$DEVICENAME" in
+ tty*)
+ [ -e "/dev/$DEVICENAME" ] || [ "$ACTION" = remove ] || exit 0
+ config_load network
+ config_foreach find_3g_iface interface "/dev/$DEVICENAME"
+ ;;
+esac
+
--- /dev/null
+/etc/init.d/usbmode start
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "and",
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME",
+ [ "null", "full", "ptmx", "zero" ],
+ ],
+ [ "regex", "DEVNAME",
+ [ "^gpio", "^hvc", "^tty" ],
+ ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0666" ],
+ [ "return" ],
+ ]
+ ],
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME", "mapper/control" ],
+ [ "regex", "DEVPATH", "^ppp" ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0600" ],
+ [ "return" ],
+ ],
+ ],
+ [ "if",
+ [ "has", "DEVNAME" ],
+ [ "makedev", "/dev/%DEVNAME%", "0644" ],
+ ],
+ ],
+ ],
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ "remove" : [
+ [ "if",
+ [ "and",
+ [ "has", "DEVNAME" ],
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [ "rm", "/dev/%DEVNAME%" ]
+ ]
+ ]
+ } ],
+ [ "if",
+ [ "eq", "SUBSYSTEM", "platform" ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "has", "BUTTON" ],
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/%BUTTON%" ]
+ ],
+ [ "if",
+ [ "eq", "SUBSYSTEM",
+ [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]
+ ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM",
+ [ "tty", "usb-serial" ]
+ ],
+ [ "regex", "DEVNAME", "^ttyUSB" ],
+ ],
+ [ "exec", "/sbin/hotplug-call", "tty" ]
+ ],
+]
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ config_get hostname "$cfg" hostname 'OpenWrt'
+ echo "$hostname" > /proc/sys/kernel/hostname
+
+ config_get conloglevel "$cfg" conloglevel
+ config_get buffersize "$cfg" buffersize
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+
+ config_get timezone "$cfg" timezone 'UTC'
+ echo "$timezone" > /tmp/TZ
+
+ config_get zonename "$cfg" zonename
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+apply_uci_config() {
+ sh -c '. /lib/functions.sh; include /lib/config; uci_apply_defaults'
+}
+
+start() {
+ config_load system
+ config_foreach system_config system
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ apply_uci_config
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && {
+ lock /tmp/.switch2jffs
+ switch2jffs
+ lock -u /tmp/.switch2jffs
+ }
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${interface}" ] && network_get_device interface "${interface}"
+ append_ports "${interface}" "${Port}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ fw3 -q start
+}
+
+start() {
+ fw3 start
+}
+
+stop() {
+ fw3 flush
+}
+
+restart() {
+ fw3 restart
+}
+
+reload() {
+ fw3 reload
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# (C) 2008 openwrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P ${log_prefix}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_config_trigger "system" "/etc/init.d/log" "start"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_set_param respawn
+ procd_close_instance
+
+ config_load system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=59
+
+boot() {
+ if [ -f /etc/config/luci_ethers ]; then
+ logger -t luci_dhcp_migrate "Migrating luci_ethers configuration ..."
+
+ lua -lluci.model.uci -e '
+ x=luci.model.uci.cursor()
+ x:foreach("luci_ethers", "static_lease",
+ function(s)
+ x:section("dhcp", "host", nil, {mac=s.macaddr, ip=s.ipaddr})
+ end)
+ x:save("dhcp")
+ x:commit("dhcp")
+ '
+
+ rm -f /etc/config/luci_ethers
+ fi
+
+ if [ -f /etc/config/luci_hosts ]; then
+ logger -t luci_dhcp_migrate "Migrating luci_hosts configuration ..."
+
+ lua -lluci.model.uci -e '
+ x=luci.model.uci.cursor()
+ x:foreach("luci_hosts", "host",
+ function(s)
+ x:section("dhcp", "domain", nil, {name=s.hostname, ip=s.ipaddr})
+ end)
+ x:save("dhcp")
+ x:commit("dhcp")
+ '
+
+ rm -f /etc/config/luci_hosts
+ fi
+}
+
+start() { :; }
+stop() { :; }
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=05
+STOP=95
+
+start() {
+ cat <<' EOF' | lua -l luci.fs -l luci.util -
+ if (os.time() < 1000000000) then
+ os.execute('date -s ' .. os.date('%Y%m%d%H%M', luci.fs.mtime("/etc/init.d/luci_fixtime")))
+ end
+ EOF
+}
+
+stop() {
+ [[ -w /etc/init.d/luci_fixtime ]] && cat /dev/null >> /etc/init.d/luci_fixtime && touch /etc/init.d/luci_fixtime
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ sleep 5
+ /sbin/wifi reload_legacy
+}
+
+service_triggers()
+{
+ procd_open_trigger
+ procd_add_config_trigger "config.change" "network" /etc/init.d/network reload
+ procd_add_config_trigger "config.change" "wireless" /etc/init.d/network reload
+ procd_close_trigger
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2013 OpenWrt.org
+# Copyright (C) 2008 Jo-Philipp Wich
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+START=90
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/sbin/openvpn
+
+LIST_SEP="
+"
+
+append_param() {
+ local s="$1"
+ local v="$2"
+ case "$v" in
+ *_*_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;;
+ *_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;;
+ *_*) v=${v%%_*}-${v#*_} ;;
+ esac
+ echo -n "$v" >> "/var/etc/openvpn-$s.conf"
+ return 0
+}
+
+append_bools() {
+ local p; local v; local s="$1"; shift
+ for p in $*; do
+ config_get_bool v "$s" "$p"
+ [ "$v" == 1 ] && append_param "$s" "$p" && echo >> "/var/etc/openvpn-$s.conf"
+ done
+}
+
+append_params() {
+ local p; local v; local s="$1"; shift
+ for p in $*; do
+ config_get v "$s" "$p"
+ IFS="$LIST_SEP"
+ for v in $v; do
+ [ -n "$v" ] && append_param "$s" "$p" && echo " $v" >> "/var/etc/openvpn-$s.conf"
+ done
+ unset IFS
+ done
+}
+
+section_enabled() {
+ config_get_bool enable "$1" 'enable' 0
+ config_get_bool enabled "$1" 'enabled' 0
+ [ $enable -gt 0 ] || [ $enabled -gt 0 ]
+}
+
+openvpn_add_instance() {
+ local name="$1"
+ local dir="$2"
+ local conf="$3"
+
+ procd_open_instance
+ procd_set_param command "$PROG" \
+ --syslog "openvpn($name)" \
+ --cd "$dir" \
+ --config "$conf"
+ procd_set_param file "$dir/$conf"
+ procd_close_instance
+}
+
+start_instance() {
+ local s="$1"
+
+ section_enabled "$s" || return 1
+
+ config_get config "$s" config
+
+ [ ! -d "/var/run" ] && mkdir -p "/var/run"
+
+ if [ ! -z "$config" ]; then
+ openvpn_add_instance "$s" "$(dirname "$config")" "$(basename "$config")"
+ return
+ fi
+
+ [ ! -d "/var/etc" ] && mkdir -p "/var/etc"
+ [ -f "/var/etc/openvpn-$s.conf" ] && rm "/var/etc/openvpn-$s.conf"
+
+ # append flags
+ append_bools "$s" \
+ auth_nocache auth_retry auth_user_pass_optional bind ccd_exclusive client client_cert_not_required \
+ client_to_client comp_noadapt disable \
+ disable_occ down_pre duplicate_cn fast_io float http_proxy_retry \
+ ifconfig_noexec ifconfig_nowarn ifconfig_pool_linear management_forget_disconnect management_hold \
+ management_query_passwords management_signal mktun mlock mtu_test multihome mute_replay_warnings \
+ nobind no_iv no_name_remapping no_replay opt_verify passtos persist_key persist_local_ip \
+ persist_remote_ip persist_tun ping_timer_rem pull push_reset \
+ remote_random rmtun route_noexec route_nopull single_session socks_proxy_retry \
+ suppress_timestamps tcp_nodelay test_crypto tls_client tls_exit tls_server \
+ tun_ipv6 up_delay up_restart username_as_common_name
+
+ # append params
+ append_params "$s" \
+ cd askpass auth auth_user_pass auth_user_pass_verify bcast_buffers ca cert \
+ chroot cipher client_config_dir client_connect client_disconnect comp_lzo connect_freq \
+ connect_retry connect_timeout connect_retry_max crl_verify dev dev_node dev_type dh \
+ echo engine explicit_exit_notify fragment group hand_window hash_size \
+ http_proxy http_proxy_option http_proxy_timeout ifconfig ifconfig_pool \
+ ifconfig_pool_persist ifconfig_push inactive ipchange iroute keepalive \
+ key key_method keysize learn_address link_mtu lladdr local log log_append \
+ lport management management_log_cache max_clients \
+ max_routes_per_client mode mssfix mtu_disc mute nice ns_cert_type ping \
+ ping_exit ping_restart pkcs12 plugin port port_share prng proto rcvbuf \
+ redirect_gateway remap_usr1 remote remote_cert_eku remote_cert_ku remote_cert_tls \
+ reneg_bytes reneg_pkts reneg_sec \
+ replay_persist replay_window resolv_retry route route_delay route_gateway \
+ route_metric route_up rport script_security secret server server_bridge setenv shaper sndbuf \
+ socks_proxy status status_version syslog tcp_queue_limit tls_auth \
+ tls_cipher tls_remote tls_timeout tls_verify tmp_dir topology tran_window \
+ tun_mtu tun_mtu_extra txqueuelen user verb down push up
+
+ openvpn_add_instance "$s" "/var/etc" "openvpn-$s.conf"
+}
+
+start_service() {
+ config_load 'openvpn'
+ config_foreach start_instance 'openvpn'
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=50
+
+boot() {
+ /usr/lib/qos/generate.sh firewall | sh
+}
+
+start() {
+ qos-start
+}
+
+stop() {
+ qos-stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (c) 2011-2012 OpenWrt.org
+
+START=80
+
+USE_PROCD=1
+PROG=/usr/sbin/relayd
+
+resolve_ifname() {
+ grep -qs "^ *$1:" /proc/net/dev && {
+ procd_append_param command -I "$1"
+ append ifaces "$1"
+ }
+}
+
+resolve_network() {
+ local ifn
+ fixup_interface "$1"
+ config_get ifn "$1" ifname
+ [ -z "$ifn" ] && return 1
+ resolve_ifname "$ifn"
+}
+
+start_relay() {
+ local cfg="$1"
+
+ local args=""
+ local ifaces=""
+
+ config_get proto "$cfg" proto
+ [[ "$proto" == relay ]] || return 0
+
+ SERVICE_DAEMONIZE=1
+ SERVICE_WRITE_PID=1
+ SERVICE_PID_FILE="/var/run/relay-$cfg.pid"
+ [ -f "$SERVICE_PID_FILE" ] && {
+ if grep -q relayd "/proc/$(cat $SERVICE_PID_FILE)/cmdline"; then
+ return 0
+ else
+ rm -f "$SERVICE_PID_FILE"
+ fi
+ }
+
+ procd_open_instance
+ procd_set_param command "$PROG"
+
+ local net networks
+ config_get networks "$cfg" network
+ for net in $networks; do
+ resolve_network "$net" || {
+ return 1
+ }
+ done
+
+ local ifn ifnames
+ config_get ifnames "$cfg" ifname
+ for ifn in $ifnames; do
+ resolve_ifname "$ifn"
+ done
+
+ local ipaddr
+ config_get ipaddr "$cfg" ipaddr
+ [ -n "$ipaddr" ] && procd_append_param command -L "$ipaddr"
+
+ local gateway
+ config_get gateway "$cfg" gateway
+ [ -n "$gateway" ] && procd_append_param command -G "$gateway"
+
+ local expiry # = 30
+ config_get expiry "$cfg" expiry
+ [ -n "$expiry" ] && procd_append_param command "$expiry"
+
+ local retry # = 5
+ config_get retry "$cfg" retry
+ [ -n "$retry" ] && procd_append_param command -p "$retry"
+
+ local table # = 16800
+ config_get table "$cfg" table
+ [ -n "$table" ] && procd_append_param command -T "$table"
+
+ local fwd_bcast # = 1
+ config_get_bool fwd_bcast "$cfg" forward_bcast 1
+ [ $fwd_bcast -eq 1 ] && procd_append_param command "-B"
+
+ local fwd_dhcp # = 1
+ config_get_bool fwd_dhcp "$cfg" forward_dhcp 1
+ [ $fwd_dhcp -eq 1 ] && procd_append_param command "-D"
+
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "network"
+}
+
+start_service() {
+ include /lib/network
+ config_load network
+ config_foreach start_relay interface
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date +%s -r {} \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && \
+ date -s @$maxtime && \
+ logger -t sysfixtime -p daemon.notice "Time fixed"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enable_server:bool:0'
+}
+
+start_service() {
+ local server enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in "$server"; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 Jo-Philipp Wich
+
+START=50
+
+USE_PROCD=1
+
+UHTTPD_BIN="/usr/sbin/uhttpd"
+PX5G_BIN="/usr/sbin/px5g"
+
+append_arg() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get val "$cfg" "$var"
+ [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
+}
+
+append_bool() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+generate_keys() {
+ local cfg="$1"
+ local key="$2"
+ local crt="$3"
+ local days bits country state location commonname
+
+ config_get days "$cfg" days
+ config_get bits "$cfg" bits
+ config_get country "$cfg" country
+ config_get state "$cfg" state
+ config_get location "$cfg" location
+ config_get commonname "$cfg" commonname
+
+ [ -x "$PX5G_BIN" ] && {
+ $PX5G_BIN selfsigned -der \
+ -days ${days:-730} -newkey rsa:${bits:-1024} -keyout "$UHTTPD_KEY" -out "$UHTTPD_CERT" \
+ -subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/CN="${commonname:-OpenWrt}"
+ }
+}
+
+start_instance()
+{
+ UHTTPD_CERT=""
+ UHTTPD_KEY=""
+
+ local cfg="$1"
+ local realm="$(uci_get system.@system[0].hostname)"
+ local listen http https interpreter indexes path
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command "$UHTTPD_BIN" -f
+
+ append_arg "$cfg" home "-h"
+ append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
+ append_arg "$cfg" config "-c"
+ append_arg "$cfg" cgi_prefix "-x"
+ [ -f /usr/lib/uhttpd_lua.so ] && {
+ append_arg "$cfg" lua_prefix "-l"
+ append_arg "$cfg" lua_handler "-L"
+ }
+ [ -f /usr/lib/uhttpd_ubus.so ] && {
+ append_arg "$cfg" ubus_prefix "-u"
+ append_arg "$cfg" ubus_socket "-U"
+ }
+ append_arg "$cfg" script_timeout "-t"
+ append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" http_keepalive "-k"
+ append_arg "$cfg" tcp_keepalive "-A"
+ append_arg "$cfg" error_page "-E"
+ append_arg "$cfg" max_requests "-n" 3
+ append_arg "$cfg" max_connections "-N"
+
+ append_bool "$cfg" no_ubusauth "-a" 0
+ append_bool "$cfg" no_symlinks "-S" 0
+ append_bool "$cfg" no_dirlists "-D" 0
+ append_bool "$cfg" rfc1918_filter "-R" 0
+
+ config_get http "$cfg" listen_http
+ for listen in $http; do
+ procd_append_param command -p "$listen"
+ done
+
+ config_get interpreter "$cfg" interpreter
+ for path in $interpreter; do
+ procd_append_param command -i "$path"
+ done
+
+ config_get indexes "$cfg" index_page
+ for path in $indexes; do
+ procd_append_param command -I "$path"
+ done
+
+ config_get https "$cfg" listen_https
+ config_get UHTTPD_KEY "$cfg" key /etc/uhttpd.key
+ config_get UHTTPD_CERT "$cfg" cert /etc/uhttpd.crt
+
+ [ -n "$https" ] && {
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] || {
+ config_foreach generate_keys cert
+ }
+
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] && {
+ append_arg "$cfg" cert "-C"
+ append_arg "$cfg" key "-K"
+
+ for listen in $https; do
+ procd_append_param command -s "$listen"
+ done
+ }
+ }
+
+ procd_close_instance
+
+ # Check if daemon is running, if not then
+ # re-execute in foreground to display error.
+# sleep 1 && service_check $UHTTPD_BIN || \
+# $UHTTPD_BIN -f $UHTTPD_ARGS
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "uhttpd"
+}
+
+start_service() {
+ config_load uhttpd
+ config_foreach start_instance uhttpd
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+START=20
+USE_PROCD=1
+
+start_service()
+{
+ procd_open_instance
+ procd_set_param command "/sbin/usbmode" -s
+ procd_close_instance
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=45
+start() {
+ wshaper.htb
+}
+
+stop() {
+ wshaper.htb stop
+}
--- /dev/null
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+::askconsole:/bin/ash --login
--- /dev/null
+#
+# reserved values
+#
+255 local
+254 main
+253 default
+0 unspec
+#
+# local
+#
+#1 inr.ruhep
--- /dev/null
+# AIM - AOL instant messenger (OSCAR and TOC)
+# Pattern attributes: good slow notsofast
+# Protocol groups: chat proprietary
+# Wiki: http://www.protocolinfo.org/wiki/AIM
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# Usually runs on port 5190
+#
+# This may also match ICQ traffic.
+#
+# This pattern has been tested and is believed to work well.
+
+aim
+# See http://gridley.res.carleton.edu/~straitm/final (and various other places)
+# The first bit matches OSCAR signon and data commands, but not sure what
+# \x03\x0b matches, but it works apparently.
+# The next three bits match various parts of the TOC signon process.
+# The third one is the magic number "*", then 0x01 for "signon", then up to four
+# bytes ("up to" because l7-filter strips out nulls) which contain a sequence
+# number (2 bytes) the data length (2 more) and 3 nulls (which don't count),
+# then 0x01 for the version number (not sure if there ever has been another
+# version)
+# The fourth one is a command string, followed by some stuff, then the
+# beginning of the "roasted" password
+
+# This pattern is too slow!
+
+^(\*[\x01\x02].*\x03\x0b|\*\x01.?.?.?.?\x01)|flapon|toc_signon.*0x
--- /dev/null
+# Bittorrent - P2P filesharing / publishing tool - http://www.bittorrent.com
+# Pattern attributes: good slow594 notsofast undermatch
+# Protocol groups: p2p open_source
+# Wiki: http://www.protocolinfo.org/wiki/Bittorrent
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# This pattern has been tested and is believed to work well.
+# It will, however, not work on bittorrent streams that are encrypted, since
+# it's impossible to match (well) encrypted data.
+
+bittorrent
+
+# Does not attempt to match the HTTP download of the tracker
+# 0x13 is the length of "bittorrent protocol"
+# Second two bits match UDP wierdness
+# Next bit matches something Azureus does
+# Ditto on the next bit. Could also match on "user-agent: azureus", but that's in the next
+# packet and perhaps this will match multiple clients.
+# bitcomet-specific strings contributed by liangjun.
+
+# This is not a valid GNU basic regular expression (but that's ok).
+^(\x13bittorrent protocol|azver\x01$|get /scrape\?info_hash=get /announce\?info_hash=|get /client/bitcomet/|GET /data\?fid=)|d1:ad2:id20:|\x08'7P\)[RP]
+
+# This pattern is "fast", but won't catch as much
+#^(\x13bittorrent protocol|azver\x01$|get /scrape\?info_hash=)
--- /dev/null
+# eDonkey2000 - P2P filesharing - http://edonkey2000.com and others
+# Pattern attributes: good veryfast fast overmatch
+# Protocol groups: p2p
+# Wiki: http://www.protocolinfo.org/wiki/EDonkey
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# Tested recently (April/May 2006) with eMule 0.47a and eDonkey2000 1.4
+# and a long time ago with something else.
+#
+# In addition to matching what you might expect, this matches much of
+# what eMule does when you tell it to only connect to the KAD network.
+# I don't quite know what to make of this.
+
+# Thanks to Matt Skidmore <fox AT woozle.org>
+
+edonkey
+
+# http://gd.tuwien.ac.at/opsys/linux/sf/p/pdonkey/eDonkey-protocol-0.6
+#
+# In addition to \xe3, \xc5 and \xd4, I see a lot of \xe5.
+# As of April 2006, I also see some \xe4.
+#
+# God this is a mess. What an irritating protocol.
+# This will match about 2% of streams with random data in them!
+# (But fortunately much fewer than 2% of streams that are other protocols.
+# You can test this with the data in ../testing/)
+
+^[\xc5\xd4\xe3-\xe5].?.?.?.?([\x01\x02\x05\x14\x15\x16\x18\x19\x1a\x1b\x1c\x20\x21\x32\x33\x34\x35\x36\x38\x40\x41\x42\x43\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58[\x60\x81\x82\x90\x91\x93\x96\x97\x98\x99\x9a\x9b\x9c\x9e\xa0\xa1\xa2\xa3\xa4]|\x59................?[ -~]|\x96....$)
+
+# matches everything and too much
+# ^(\xe3|\xc5|\xd4)
+
+# ipp2p essentially uses "\xe3....\x47", which doesn't seem at all right to me.
+
+# bandwidtharbitrator uses
+# e0.*@.*6[a-z].*p$|e0.*@.*[a-z]6[a-z].*p0$|e.*@.*[0-9]6.*p$|emule|edonkey
+# no comments to explain what all the mush is, of course...
--- /dev/null
+# FastTrack - P2P filesharing (Kazaa, Morpheus, iMesh, Grokster, etc)
+# Pattern attributes: good slow notsofast
+# Protocol groups: p2p
+# Wiki: http://www.protocolinfo.org/wiki/Fasttrack
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# Tested with Kazaa Lite Resurrection 0.0.7.6F
+#
+# This appears to match the download connections well, but not the search
+# connections (I think they are encrypted :-( ).
+
+fasttrack
+# while this is a valid http request, this will be caught because
+# the http pattern matches the response (and therefore the next packet)
+# Even so, it's best to put this match earlier in the chain.
+# http://cvs.berlios.de/cgi-bin/viewcvs.cgi/gift-fasttrack/giFT-FastTrack/PROTOCOL?rev=HEAD&content-type=text/vnd.viewcvs-markup
+
+# This pattern is kinda slow, but not too bad.
+^get (/.download/[ -~]*|/.supernode[ -~]|/.status[ -~]|/.network[ -~]*|/.files|/.hash=[0-9a-f]*/[ -~]*) http/1.1|user-agent: kazaa|x-kazaa(-username|-network|-ip|-supernodeip|-xferid|-xferuid|tag)|^give [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]?[0-9]?[0-9]?
+
+# This isn't much faster:
+#^get (/.download/.*|/.supernode.|/.status.|/.network.*|/.files|/.hash=[0-9a-f]*/.*) http/1.1|user-agent: kazaa|x-kazaa(-username|-network|-ip|-supernodeip|-xferid|-xferuid|tag)|^give [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]?[0-9]?[0-9]?
+
--- /dev/null
+# FTP - File Transfer Protocol - RFC 959
+# Pattern attributes: great notsofast fast
+# Protocol groups: document_retrieval ietf_internet_standard
+# Wiki: http://protocolinfo.org/wiki/FTP
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# Usually runs on port 21. Note that the data stream is on a dynamically
+# assigned port, which means that you will need the FTP connection
+# tracking module in your kernel to usefully match FTP data transfers.
+#
+# This pattern is well tested.
+#
+# Handles the first two things a server should say:
+#
+# First, the server says it's ready by sending "220". Most servers say
+# something after 220, even though they don't have to, and it usually
+# includes the string "ftp" (l7-filter is case insensitive). This
+# includes proftpd, vsftpd, wuftpd, warftpd, pureftpd, Bulletproof FTP
+# Server, and whatever ftp.microsoft.com uses. Almost all servers use only
+# ASCII printable characters between the "220" and the "FTP", but non-English
+# ones might use others.
+#
+# The next thing the server sends is a 331. All the above servers also
+# send something including "password" after this code. By default, we
+# do not match on this because it takes another packet and is more work
+# for regexec.
+
+ftp
+# by default, we allow only ASCII
+^220[\x09-\x0d -~]*ftp
+
+# This covers UTF-8 as well
+#^220[\x09-\x0d -~\x80-\xfd]*ftp
+
+# This allows any characters and is about 4x faster than either of the above
+# (which are about the same as each other)
+#^220.*ftp
+
+# This is much slower
+#^220[\x09-\x0d -~]*ftp|331[\x09-\x0d -~]*password
+
+# This pattern is more precise, but takes longer to match. (3 packets vs. 1)
+#^220[\x09-\x0d -~]*\x0d\x0aUSER[\x09-\x0d -~]*\x0d\x0a331
+
+# same as above, but slightly less precise and only takes 2 packets.
+#^220[\x09-\x0d -~]*\x0d\x0aUSER[\x09-\x0d -~]*\x0d\x0a
--- /dev/null
+# Gnutella - P2P filesharing
+# Pattern attributes: good notsofast notsofast
+# Protocol groups: p2p open_source
+# Wiki: http://www.protocolinfo.org/wiki/Gnutella
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# This should match both Gnutella and "Gnutella2" ("Mike's protocol")
+#
+# Various clients use this protocol including Mactella, Shareaza,
+# GTK-gnutella, Gnucleus, Gnotella, LimeWire, iMesh and BearShare.
+#
+# This is tested with gtk-gnutella and Shareaza.
+
+# http://www.gnutella2.com/tiki-index.php?page=UDP%20Transceiver
+# http://rfc-gnutella.sf.net/
+# http://www.gnutella2.com/tiki-index.php?page=Gnutella2%20Specification
+# http://en.wikipedia.org/wiki/Shareaza
+
+gnutella
+
+# The first part matches UDP messages - All start with "GND", then have
+# a flag byte which is either \x00, \x01 or \x02, then two sequence bytes
+# that can be anything, then a fragment number, which must start at 1.
+# The rest matches TCP first client message or first server message (in case
+# we can't see client messages). Some parts of this are empirical rather than
+# document based. Assumes version is between 0.0 and 2.9. (usually is
+# 0.4 or 0.6). I'm guessing at many of the user-agents.
+# The last bit is emprical and probably only matches Limewire.
+^(gnd[\x01\x02]?.?.?\x01|gnutella connect/[012]\.[0-9]\x0d\x0a|get /uri-res/n2r\?urn:sha1:|get /.*user-agent: (gtk-gnutella|bearshare|mactella|gnucleus|gnotella|limewire|imesh)|get /.*content-type: application/x-gnutella-packets|giv [0-9]*:[0-9a-f]*/|queue [0-9a-f]* [1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?:[1-9][0-9]?[0-9]?[0-9]?|gnutella.*content-type: application/x-gnutella|...................?lime)
+
+# Needlessly precise, at the expense of time
+#^(gnd[\x01\x02]?.?.?\x01|gnutella connect/[012]\.[0-9]\x0d\x0a|get /uri-res/n2r\?urn:sha1:|get /[\x09-\x0d -~]*user-agent: (gtk-gnutella|bearshare|mactella|gnucleus|gnotella|limewire|imesh)|get /[\x09-\x0d -~]*content-type: application/x-gnutella-packets|giv [0-9]*:[0-9a-f]*/|queue [0-9a-f]* [1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?:[1-9][0-9]?[0-9]?[0-9]?|gnutella[\x09-\x0d -~]*content-type: application/x-gnutella|..................lime)
+
+
--- /dev/null
+# HTTP - HyperText Transfer Protocol - RFC 2616
+# Pattern attributes: great slow notsofast superset
+# Protocol groups: document_retrieval ietf_draft_standard
+# Wiki: http://protocolinfo.org/wiki/HTTP
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# Usually runs on port 80
+#
+# This pattern has been tested and is believed to work well.
+#
+# this intentionally catches the response from the server rather than
+# the request so that other protocols which use http (like kazaa) can be
+# caught based on specific http requests regardless of the ordering of
+# filters... also matches posts
+
+# Sites that serve really long cookies may break this by pushing the
+# server response too far away from the beginning of the connection. To
+# fix this, increase the kernel's data buffer length.
+
+http
+# Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF (rfc 2616)
+# As specified in rfc 2616 a status code is preceeded and followed by a
+# space.
+http/(0\.9|1\.0|1\.1) [1-5][0-9][0-9] [\x09-\x0d -~]*(connection:|content-type:|content-length:|date:)|post [\x09-\x0d -~]* http/[01]\.[019]
+# A slightly faster version that might be good enough:
+#http/(0\.9|1\.0|1\.1) [1-5][0-9][0-9]|post [\x09-\x0d -~]* http/[01]\.[019]
+# old pattern(s):
+#(http[\x09-\x0d -~]*(200 ok|302 |304 )[\x09-\x0d -~]*(connection:|content-type:|content-length:))|^(post [\x09-\x0d -~]* http/)
--- /dev/null
+# Ident - Identification Protocol - RFC 1413
+# Pattern attributes: good fast fast
+# Protocol groups: networking ietf_proposed_standard
+# Wiki: http://www.protocolinfo.org/wiki/Ident
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# Usually runs on port 113
+#
+# This pattern is believed to work.
+
+ident
+# "number , numberCRLF" possibly without the CR and/or LF.
+# ^$ is appropriate because the first packet should never have anything
+# else in it.
+^[1-9][0-9]?[0-9]?[0-9]?[0-9]?[\x09-\x0d]*,[\x09-\x0d]*[1-9][0-9]?[0-9]?[0-9]?[0-9]?(\x0d\x0a|[\x0d\x0a])?$
--- /dev/null
+# IRC - Internet Relay Chat - RFC 1459
+# Pattern attributes: great veryfast fast
+# Protocol groups: chat ietf_proposed_standard
+# Wiki: http://www.protocolinfo.org/wiki/IRC
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# Usually runs on port 6666 or 6667
+# Note that chat traffic runs on these ports, but IRC-DCC traffic (which
+# can use much more bandwidth) uses a dynamically assigned port, so you
+# must have the IRC connection tracking module in your kernel to classify
+# this.
+#
+# This pattern has been tested and is believed to work well.
+
+irc
+# First thing that happens is that the client sends NICK and USER, in
+# either order. This allows MIRC color codes (\x02-\x0d instead of
+# \x09-\x0d).
+^(nick[\x09-\x0d -~]*user[\x09-\x0d -~]*:|user[\x09-\x0d -~]*:[\x02-\x0d -~]*nick[\x09-\x0d -~]*\x0d\x0a)
+
--- /dev/null
+# Jabber (XMPP) - open instant messenger protocol - RFC 3920 - http://jabber.org
+# Pattern attributes: good notsofast notsofast
+# Protocol groups: chat ietf_proposed_standard
+# Wiki: http://www.protocolinfo.org/wiki/Jabber
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# This pattern has been tested with Gaim and Gabber. It is only tested
+# with non-SSL mode Jabber with no proxies.
+
+# Thanks to Jan Hudec for some improvements.
+
+# Jabber seems to take a long time to set up a connection. I'm
+# connecting with Gabber 0.8.8 to 12jabber.org and the first 8 packets
+# is this:
+# <stream:stream to='12jabber.com' xmlns='jabber:client'
+# xmlns:stream='http://etherx.jabber.org/streams'><?xml
+# version='1.0'?><stream:stream
+# xmlns:stream='http://etherx.jabber.org/streams' id='3f73e951'
+# xmlns='jabber:client' from='12jabber.com'>
+#
+# No mention of my username or password yet, you'll note.
+
+jabber
+<stream:stream[\x09-\x0d ][ -~]*[\x09-\x0d ]xmlns=['"]jabber
--- /dev/null
+# MSN Messenger - Microsoft Network chat client
+# Pattern attributes: good slow notsofast
+# Protocol groups: chat proprietary
+# Wiki: http://www.protocolinfo.org/wiki/MSN_Messenger
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# Usually uses TCP port 1863
+# http://www.hypothetic.org/docs/msn/index.php
+# http://msnpiki.msnfanatic.com/
+#
+# This pattern has been tested and is believed to work well.
+
+msnmessenger
+
+# First branch: login
+# ver: allow versions up to 99.
+# I've never seen a cvr other than cvr0. Maybe this will be trouble later?
+# Can't anchor at the beginning because sometimes this is encapsulated in
+# HTTP. But either way, the first packet ends like this.
+# Second/Third branches: accepting/sending a message
+# I will assume that these can also be encapsulated in HTTP, although I have
+# not checked. Example of each direction:
+# ANS 1 quadong@hotmail.com 1139803431.29427 17522047
+# USR 1 quadong@hotmail.com 530423708.968145.366138
+
+# Branches are written entirely separately for better performance.
+ver [0-9]+ msnp[1-9][0-9]? [\x09-\x0d -~]*cvr0\x0d\x0a$|usr 1 [!-~]+ [0-9. ]+\x0d\x0a$|ans 1 [!-~]+ [0-9. ]+\x0d\x0a$
+
--- /dev/null
+# (S)NTP - (Simple) Network Time Protocol - RFCs 1305 and 2030
+# Pattern attributes: good fast fast overmatch
+# Protocol groups: time_synchronization ietf_draft_standard
+# Wiki: http://www.protocolinfo.org/wiki/NTP
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# This pattern is tested and is believed to work.
+
+# client|server
+# Requires the server's timestamp to be in the present or future (of 2005).
+# Tested with ntpdate on Linux.
+# Assumes version 2, 3 or 4.
+
+# Note that ntp packets are always 48 bytes, so you should match on that too.
+
+ntp
+^([\x13\x1b\x23\xd3\xdb\xe3]|[\x14\x1c$].......?.?.?.?.?.?.?.?.?[\xc6-\xff])
--- /dev/null
+# POP3 - Post Office Protocol version 3 (popular e-mail protocol) - RFC 1939
+# Pattern attributes: great veryfast fast
+# Protocol groups: mail ietf_internet_standard
+# Wiki: http://www.protocolinfo.org/wiki/POP
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# This pattern has been tested somewhat.
+
+# this is a difficult protocol to match because of the relative lack of
+# distinguishing information. Read on.
+pop3
+
+# this the most conservative pattern. It should definitely work.
+#^(\+ok|-err)
+
+# this pattern assumes that the server says _something_ after +ok or -err
+# I think this is probably the way to go.
+^(\+ok |-err )
+
+# more that 90% of servers seem to say "pop" after "+ok", but not all.
+#^(\+ok .*pop)
+
+# Here's another tack. I think this is my second favorite.
+#^(\+ok [\x09-\x0d -~]*(ready|hello|pop|starting)|-err [\x09-\x0d -~]*(invalid|unknown|unimplemented|unrecognized|command))
+
+# this matches the server saying "you have N messages that are M bytes",
+# which the client probably asks for early in the session (not tested)
+#\+ok [0-9]+ [0-9]+
+
+# some sample servers:
+# RFC example: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
+# mail.dreamhost.com: +OK Hello there.
+# pop.carleton.edu: +OK POP3D(*) Server PMDFV6.2.2 at Fri, 12 Sep 2003 19:28:10 -0500 (CDT) (APOP disabled)
+# mail.earthlink.net: +OK NGPopper vEL_4_38 at earthlink.net ready <25509.1063412951@falcon>
+# *.email.umn.edu: +OK Cubic Circle's v1.22 1998/04/11 POP3 ready <7d1e0000da67623f@aquamarine.tc.umn.edu>
+# mail.yale.edu: +OK POP3 pantheon-po01 v2002.81 server ready
+# mail.gustavus.edu: +OK POP3 solen v2001.78 server ready
+# mail.reed.edu: +OK POP3 letra.reed.edu v2002.81 server ready
+# mail.bowdoin.edu: +OK mail.bowdoin.edu POP3 service (iPlanet Messaging Server 5.2 HotFix 1.15 (built Apr 28 2003))
+# pop.colby.edu: +OK Qpopper (version 4.0.5) at basalt starting.
+# mail.mac.com: +OK Netscape Messaging Multiplexor ready
+
+# various error strings:
+#-ERR Invalid command.
+#-ERR invalid command
+#-ERR unimplemented
+#-ERR Invalid command, try one of: USER name, PASS string, QUIT
+#-ERR Unknown AUTHORIZATION state command
+#-ERR Unrecognized command
+#-ERR Unknown command: "sadf'".
--- /dev/null
+# SMTP - Simple Mail Transfer Protocol - RFC 2821 (See also RFC 1869)
+# Pattern attributes: great notsofast fast
+# Protocol groups: mail ietf_internet_standard
+# Wiki: http://www.protocolinfo.org/wiki/SMTP
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# usually runs on port 25
+#
+# This pattern has been tested and is believed to work well.
+
+# As usual, no text is required after "220", but all known servers have some
+# there. It (almost?) always has string "smtp" in it. The RFC examples
+# does not, so we match those too, just in case anyone has copied them
+# literally.
+#
+# Some examples:
+# 220 mail.stalker.com ESMTP CommuniGate Pro 4.1.3
+# 220 mail.vieodata.com ESMTP Merak 6.1.0; Mon, 15 Sep 2003 13:48:11 -0400
+# 220 mail.ut.caldera.com ESMTP
+# 220 persephone.pmail.gen.nz ESMTP server ready.
+# 220 smtp1.superb.net ESMTP
+# 220 mail.kerio.com Kerio MailServer 5.6.7 ESMTP ready
+# 220-mail.deerfield.com ESMTP VisNetic.MailServer.v6.0.9.0; Mon, 15 Sep 2003 13:4
+# 220 altn.com ESMTP MDaemon 6.8.5; Mon, 15 Sep 2003 12:46:42 -0500
+# 220 X1 NT-ESMTP Server ipsmin0165atl2.interland.net (IMail 6.06 73062-3)
+# 220 mail.icewarp.com ESMTP Merak 6.1.1; Mon, 15 Sep 2003 19:43:23 +0200
+# 220-mail.email-scan.com ESMTP
+# 220 smaug.dreamhost.com ESMTP
+# 220 kona.carleton.edu -- Server ESMTP (PMDF V6.2#30648)
+# 220 letra.reed.edu ESMTP Sendmail 8.12.9/8.12.9; Mon, 15 Sep 2003 10:35:57 -0700 (PDT)
+# 220-swan.mail.pas.earthlink.net ESMTP Exim 3.33 #1 Mon, 15 Sep 2003 10:32:15 -0700
+#
+# RFC examples:
+# 220 xyz.com Simple Mail Transfer Service Ready (RFC example)
+# 220 dbc.mtview.ca.us SMTP service ready
+
+smtp
+^220[\x09-\x0d -~]* (e?smtp|simple mail)
+userspace pattern=^220[\x09-\x0d -~]* (E?SMTP|[Ss]imple [Mm]ail)
+userspace flags=REG_NOSUB REG_EXTENDED
--- /dev/null
+# SSL and TLS - Secure Socket Layer / Transport Layer Security - RFC 2246
+# Pattern attributes: good notsofast fast superset
+# Protocol groups: secure ietf_proposed_standard
+# Wiki: http://www.protocolinfo.org/wiki/SSL
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# Usually runs on port 443
+#
+# This is a superset of validcertssl. For it to match, it must be first.
+#
+# This pattern has been tested and is believed to work well.
+
+ssl
+# Server Hello with certificate | Client Hello
+# This allows SSL 3.X, which includes TLS 1.0, known internally as SSL 3.1
+^(.?.?\x16\x03.*\x16\x03|.?.?\x01\x03\x01?.*\x0b)
--- /dev/null
+# VNC - Virtual Network Computing. Also known as RFB - Remote Frame Buffer
+# Pattern attributes: great veryfast fast
+# Protocol groups: remote_access
+# Wiki: http://www.protocolinfo.org/wiki/VNC
+# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
+#
+# http://www.realvnc.com/documentation.html
+#
+# This pattern has been verified with vnc v3.3.7 on WinXP and Linux
+#
+# Thanks to Trevor Paskett <tpaskett AT cymphonix.com> for this pattern.
+
+vnc
+# Assumes single digit major and minor version numbers
+# This message should be all alone in the first packet, so ^$ is appropriate
+^rfb 00[1-9]\.00[0-9]\x0a$
+
+# This is a more restrictive version which assumes the version numbers
+# are ones actually in existance at the time of this writing, i.e. 3.3,
+# 3.7 and 3.8 (with some clients wrongly reporting 3.5). It should be
+# slightly faster, but probably not worth the extra maintenance.
+# ^rfb 003\.00[3578]\x0a$
+
--- /dev/null
+crypto_hash
--- /dev/null
+usb-common
+usbcore
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+ehci-hcd
+ehci-platform
--- /dev/null
+ledtrig-default-on
--- /dev/null
+ledtrig-timer
--- /dev/null
+usb-storage
--- /dev/null
+crypto_hash
--- /dev/null
+usb-common
+usbcore
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+ehci-hcd
+ehci-platform
--- /dev/null
+nf_defrag_ipv6
+nf_conntrack_ipv6
+ip6_tables
+ip6table_filter
+ip6table_mangle
+ip6table_raw
+ip6t_ah
+ip6t_eui64
+ip6t_frag
+ip6t_ipv6header
+ip6t_mh
+ip6t_hbh
+ip6t_rt
+ip6t_REJECT
--- /dev/null
+ledtrig-default-on
--- /dev/null
+ledtrig-netdev
--- /dev/null
+ledtrig-timer
--- /dev/null
+ledtrig-usbdev
--- /dev/null
+sch_ingress
+sch_hfsc
+cls_fw
+cls_route
+cls_flow
+cls_tcindex
+cls_u32
+em_u32
+act_mirred
+act_skbedit
--- /dev/null
+act_connmark
--- /dev/null
+act_ipt
+act_police
+cls_basic
+em_cmp
+em_meta
+em_nbyte
+em_text
+sch_codel
+sch_dsmark
+sch_gred
+sch_htb
+sch_prio
+sch_red
+sch_sfq
+sch_tbf
+sch_teql
--- /dev/null
+nf_conntrack
+nf_defrag_ipv4
+nf_conntrack_ipv4
+xt_state
+iptable_raw
+xt_CT
+xt_conntrack
--- /dev/null
+xt_connbytes
+xt_connmark
+xt_helper
+xt_recent
--- /dev/null
+x_tables
+xt_tcpudp
+ip_tables
+iptable_filter
+iptable_mangle
+xt_limit
+xt_mac
+xt_multiport
+xt_comment
+xt_LOG
+xt_TCPMSS
+ipt_REJECT
+xt_time
+xt_mark
--- /dev/null
+xt_dscp
+xt_DSCP
+xt_length
+xt_statistic
+xt_tcpmss
+xt_CLASSIFY
+ipt_ECN
+xt_ecn
+xt_hl
+xt_HL
--- /dev/null
+nf_nat
+xt_nat
+nf_nat_ipv4
+iptable_nat
+ipt_MASQUERADE
+xt_REDIRECT
--- /dev/null
+nf_conntrack_ftp
+nf_conntrack_irc
+nf_nat_ftp
+nf_nat_irc
--- /dev/null
+lzo_compress
+lzo_decompress
--- /dev/null
+ts_kmp
+ts_bm
+ts_fsm
--- /dev/null
+zlib_deflate
+zlib_inflate
--- /dev/null
+usb-storage
--- /dev/null
+ums-alauda
+ums-cypress
+ums-datafab
+ums-freecom
+ums-isd200
+ums-jumpshot
+ums-karma
+ums-sddr09
+ums-sddr55
+ums-usbat
--- /dev/null
+DISTRIB_ID="OpenWrt"
+DISTRIB_RELEASE="Bleeding Edge"
+DISTRIB_REVISION="r39502"
+DISTRIB_CODENAME="barrier_breaker"
+DISTRIB_TARGET="ar71xx/generic"
+DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r39502"
+DISTRIB_TAINTS="no-all"
--- /dev/null
+src/gz barrier_breaker http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
+dest root /
+dest ram /tmp
+lists_dir ext /var/opkg-lists
+option overlay_root /overlay
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+#USERNAME PROVIDER PASSWORD IPADDRESS
--- /dev/null
+#
+# Expression: outbound and not icmp[0] != 8 and not tcp[13] & 4 != 0
+#
+19
+48 0 0 0
+21 0 16 1
+40 0 0 2
+21 0 13 33
+48 0 0 13
+21 0 5 1
+40 0 0 10
+69 9 0 8191
+177 0 0 4
+80 0 0 4
+21 6 7 8
+21 0 5 6
+40 0 0 10
+69 3 0 8191
+177 0 0 4
+80 0 0 17
+69 1 0 4
+6 0 0 4
+6 0 0 0
--- /dev/null
+#debug
+logfile /dev/null
+noipdefault
+noaccomp
+nopcomp
+nocrtscts
+lock
+maxfail 0
+lcp-echo-failure 5
+lcp-echo-interval 1
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2010 Vertical Communications
+
+[ -z "$PREINIT" ] && exec /sbin/init
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+pi_ifname=
+pi_ip=192.168.1.1
+pi_broadcast=192.168.1.255
+pi_netmask=255.255.255.0
+
+fs_failsafe_ifname=
+fs_failsafe_ip=192.168.1.1
+fs_failsafe_broadcast=192.168.1.255
+fs_failsafe_netmask=255.255.255.0
+
+fs_failsafe_wait_timeout=2
+
+pi_suppress_stderr="y"
+pi_init_suppress_stderr="y"
+pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
+pi_init_cmd="/sbin/init"
+
+. /lib/functions.sh
+
+boot_hook_init preinit_essential
+boot_hook_init preinit_main
+boot_hook_init failsafe
+boot_hook_init initramfs
+boot_hook_init preinit_mount_root
+
+for pi_source_file in /lib/preinit/*; do
+ . $pi_source_file
+done
+
+boot_run_hook preinit_essential
+
+pi_mount_skip_next=false
+pi_jffs2_mount_success=false
+pi_failsafe_net_message=false
+
+boot_run_hook preinit_main
--- /dev/null
+#!/bin/sh
+[ -f /etc/banner ] && cat /etc/banner
+
+export PATH=/usr/bin:/usr/sbin:/bin:/sbin
+export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
+export HOME=${HOME:-/root}
+export PS1='\u@\h:\w\$ '
+
+[ -x /bin/more ] || alias more=less
+[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
+
+[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
+
+[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
+[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
--- /dev/null
+# Internet (IP) protocols
+#
+# Updated from http://www.iana.org/assignments/protocol-numbers and other
+# sources.
+# New protocols will be added on request if they have been officially
+# assigned by IANA and are not historical.
+# If you need a huge list of used numbers please install the nmap package.
+
+ip 0 IP # internet protocol, pseudo protocol number
+#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+ggp 3 GGP # gateway-gateway protocol
+ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
+st 5 ST # ST datagram mode
+tcp 6 TCP # transmission control protocol
+egp 8 EGP # exterior gateway protocol
+igp 9 IGP # any private interior gateway (Cisco)
+pup 12 PUP # PARC universal packet protocol
+udp 17 UDP # user datagram protocol
+hmp 20 HMP # host monitoring protocol
+xns-idp 22 XNS-IDP # Xerox NS IDP
+rdp 27 RDP # "reliable datagram" protocol
+iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
+xtp 36 XTP # Xpress Transfer Protocol
+ddp 37 DDP # Datagram Delivery Protocol
+idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
+ipv6 41 IPv6 # Internet Protocol, version 6
+ipv6-route 43 IPv6-Route # Routing Header for IPv6
+ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
+idrp 45 IDRP # Inter-Domain Routing Protocol
+rsvp 46 RSVP # Reservation Protocol
+gre 47 GRE # General Routing Encapsulation
+esp 50 IPSEC-ESP # Encap Security Payload [RFC2046]
+ah 51 IPSEC-AH # Authentication Header [RFC2402]
+skip 57 SKIP # SKIP
+ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
+ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
+ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
+rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
+vmtp 81 VMTP # Versatile Message Transport
+eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
+ospf 89 OSPFIGP # Open Shortest Path First IGP
+ax.25 93 AX.25 # AX.25 frames
+ipip 94 IPIP # IP-within-IP Encapsulation Protocol
+etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
+encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
+# 99 # any private encryption scheme
+pim 103 PIM # Protocol Independent Multicast
+ipcomp 108 IPCOMP # IP Payload Compression Protocol
+vrrp 112 VRRP # Virtual Router Redundancy Protocol
+l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
+isis 124 ISIS # IS-IS over IPv4
+sctp 132 SCTP # Stream Control Transmission Protocol
+fc 133 FC # Fibre Channel
+
--- /dev/null
+#!/bin/sh
+
+[ "${TYPE}" = "switch" ] || echo ${BUTTON} > /tmp/failsafe_button
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" ] || exit 0
+
+. /lib/functions.sh
+
+logger "$BUTTON pressed for $SEEN seconds"
+
+if [ "$SEEN" -lt 1 ]
+then
+ echo "REBOOT" > /dev/console
+ sync
+ reboot
+elif [ "$SEEN" -gt 5 ]
+then
+ echo "FACTORY RESET" > /dev/console
+ jffs2reset -y && reboot &
+fi
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" -o -n "${TYPE}" ] || exit 0
+
+. /lib/functions.sh
+
+local rfkill_state=0
+
+wifi_rfkill_set() {
+ uci set wireless.$1.disabled=$rfkill_state
+}
+
+wifi_rfkill_check() {
+ local disabled
+ config_get disabled $1 disabled
+ [ "$disabled" = "1" ] || rfkill_state=1
+}
+
+config_load wireless
+case "${TYPE}" in
+"switch")
+ [ "${ACTION}" = "released" ] && rfkill_state=1
+ ;;
+*)
+ config_foreach wifi_rfkill_check wifi-device
+ ;;
+esac
+config_foreach wifi_rfkill_set wifi-device
+uci commit wireless
+wifi up
--- /dev/null
+#!/bin/sh
+
+for dir in /var/run/hostapd-*; do
+ [ -d "$dir" ] || continue
+ hostapd_cli -p "$dir" wps_pbc
+done
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006-2012 OpenWrt.org
+
+. $IPKG_INSTROOT/lib/functions.sh
+. $IPKG_INSTROOT/lib/functions/service.sh
+
+initscript=$1
+action=${2:-help}
+shift 2
+
+start() {
+ return 0
+}
+
+stop() {
+ return 0
+}
+
+reload() {
+ return 1
+}
+
+restart() {
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+boot() {
+ start "$@"
+}
+
+shutdown() {
+ stop
+}
+
+disable() {
+ name="$(basename "${initscript}")"
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/K??$name
+}
+
+enable() {
+ name="$(basename "${initscript}")"
+ disable
+ [ -n "$START" -o -n "$STOP" ] || {
+ echo "/etc/init.d/$name does not have a START or STOP value"
+ return 1
+ }
+ [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
+ [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
+}
+
+enabled() {
+ name="$(basename "${initscript}")"
+ [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ]
+}
+
+depends() {
+ return 0
+}
+
+help() {
+ cat <<EOF
+Syntax: $initscript [command]
+
+Available commands:
+ start Start the service
+ stop Stop the service
+ restart Restart the service
+ reload Reload configuration files (or restart if that fails)
+ enable Enable service autostart
+ disable Disable service autostart
+$EXTRA_HELP
+EOF
+}
+
+# for procd
+start_service() {
+ return 0
+}
+
+stop_service() {
+ return 0
+}
+
+service_triggers() {
+ return 0
+}
+
+service_running() {
+ return 0
+}
+
+stop_service() {
+ return 0
+}
+
+${INIT_TRACE:+set -x}
+
+. "$initscript"
+
+[ -n "$USE_PROCD" ] && {
+ EXTRA_COMMANDS="${EXTRA_COMMANDS} running"
+
+ . $IPKG_INSTROOT/lib/functions/procd.sh
+ basescript=$(readlink "$initscript")
+ rc_procd() {
+ procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
+ "$@"
+ procd_close_service
+ }
+
+ start() {
+ rc_procd start_service "$@"
+ }
+
+ stop() {
+ procd_kill "$(basename ${basescript:-$initscript})" "$1"
+ stop_service "$@"
+ }
+
+ reload() {
+ if eval "type reload_service" 2>/dev/null >/dev/null; then
+ reload_service "$@"
+ else
+ restart
+ fi
+ }
+
+ running() {
+ service_running "$@"
+ }
+}
+
+ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
+list_contains ALL_COMMANDS "$action" || action=help
+[ "$action" = "reload" ] && action='eval reload "$@" || restart "$@" && :'
+$action "$@"
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2013 OpenWrt.org
+# Copyright (C) 2008 Jo-Philipp Wich
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+START=90
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/sbin/openvpn
+
+LIST_SEP="
+"
+
+append_param() {
+ local s="$1"
+ local v="$2"
+ case "$v" in
+ *_*_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;;
+ *_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;;
+ *_*) v=${v%%_*}-${v#*_} ;;
+ esac
+ echo -n "$v" >> "/var/etc/openvpn-$s.conf"
+ return 0
+}
+
+append_bools() {
+ local p; local v; local s="$1"; shift
+ for p in $*; do
+ config_get_bool v "$s" "$p"
+ [ "$v" == 1 ] && append_param "$s" "$p" && echo >> "/var/etc/openvpn-$s.conf"
+ done
+}
+
+append_params() {
+ local p; local v; local s="$1"; shift
+ for p in $*; do
+ config_get v "$s" "$p"
+ IFS="$LIST_SEP"
+ for v in $v; do
+ [ -n "$v" ] && append_param "$s" "$p" && echo " $v" >> "/var/etc/openvpn-$s.conf"
+ done
+ unset IFS
+ done
+}
+
+section_enabled() {
+ config_get_bool enable "$1" 'enable' 0
+ config_get_bool enabled "$1" 'enabled' 0
+ [ $enable -gt 0 ] || [ $enabled -gt 0 ]
+}
+
+openvpn_add_instance() {
+ local name="$1"
+ local dir="$2"
+ local conf="$3"
+
+ procd_open_instance
+ procd_set_param command "$PROG" \
+ --syslog "openvpn($name)" \
+ --cd "$dir" \
+ --config "$conf"
+ procd_set_param file "$dir/$conf"
+ procd_close_instance
+}
+
+start_instance() {
+ local s="$1"
+
+ section_enabled "$s" || return 1
+
+ config_get config "$s" config
+
+ [ ! -d "/var/run" ] && mkdir -p "/var/run"
+
+ if [ ! -z "$config" ]; then
+ openvpn_add_instance "$s" "$(dirname "$config")" "$(basename "$config")"
+ return
+ fi
+
+ [ ! -d "/var/etc" ] && mkdir -p "/var/etc"
+ [ -f "/var/etc/openvpn-$s.conf" ] && rm "/var/etc/openvpn-$s.conf"
+
+ # append flags
+ append_bools "$s" \
+ auth_nocache auth_retry auth_user_pass_optional bind ccd_exclusive client client_cert_not_required \
+ client_to_client comp_noadapt disable \
+ disable_occ down_pre duplicate_cn fast_io float http_proxy_retry \
+ ifconfig_noexec ifconfig_nowarn ifconfig_pool_linear management_forget_disconnect management_hold \
+ management_query_passwords management_signal mktun mlock mtu_test multihome mute_replay_warnings \
+ nobind no_iv no_name_remapping no_replay opt_verify passtos persist_key persist_local_ip \
+ persist_remote_ip persist_tun ping_timer_rem pull push_reset \
+ remote_random rmtun route_noexec route_nopull single_session socks_proxy_retry \
+ suppress_timestamps tcp_nodelay test_crypto tls_client tls_exit tls_server \
+ tun_ipv6 up_delay up_restart username_as_common_name
+
+ # append params
+ append_params "$s" \
+ cd askpass auth auth_user_pass auth_user_pass_verify bcast_buffers ca cert \
+ chroot cipher client_config_dir client_connect client_disconnect comp_lzo connect_freq \
+ connect_retry connect_timeout connect_retry_max crl_verify dev dev_node dev_type dh \
+ echo engine explicit_exit_notify fragment group hand_window hash_size \
+ http_proxy http_proxy_option http_proxy_timeout ifconfig ifconfig_pool \
+ ifconfig_pool_persist ifconfig_push inactive ipchange iroute keepalive \
+ key key_method keysize learn_address link_mtu lladdr local log log_append \
+ lport management management_log_cache max_clients \
+ max_routes_per_client mode mssfix mtu_disc mute nice ns_cert_type ping \
+ ping_exit ping_restart pkcs12 plugin port port_share prng proto rcvbuf \
+ redirect_gateway remap_usr1 remote remote_cert_eku remote_cert_ku remote_cert_tls \
+ reneg_bytes reneg_pkts reneg_sec \
+ replay_persist replay_window resolv_retry route route_delay route_gateway \
+ route_metric route_up rport script_security secret server server_bridge setenv shaper sndbuf \
+ socks_proxy status status_version syslog tcp_queue_limit tls_auth \
+ tls_cipher tls_remote tls_timeout tls_verify tmp_dir topology tran_window \
+ tun_mtu tun_mtu_extra txqueuelen user verb down push up
+
+ openvpn_add_instance "$s" "/var/etc" "openvpn-$s.conf"
+}
+
+start_service() {
+ config_load 'openvpn'
+ config_foreach start_instance 'openvpn'
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${interface}" ] && network_get_device interface "${interface}"
+ append_ports "${interface}" "${Port}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P ${log_prefix}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_config_trigger "system" "/etc/init.d/log" "start"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_set_param respawn
+ procd_close_instance
+
+ config_load system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ sleep 5
+ /sbin/wifi reload_legacy
+}
+
+service_triggers()
+{
+ procd_open_trigger
+ procd_add_config_trigger "config.change" "network" /etc/init.d/network reload
+ procd_add_config_trigger "config.change" "wireless" /etc/init.d/network reload
+ procd_close_trigger
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=05
+STOP=95
+
+start() {
+ cat <<' EOF' | lua -l luci.fs -l luci.util -
+ if (os.time() < 1000000000) then
+ os.execute('date -s ' .. os.date('%Y%m%d%H%M', luci.fs.mtime("/etc/init.d/luci_fixtime")))
+ end
+ EOF
+}
+
+stop() {
+ [[ -w /etc/init.d/luci_fixtime ]] && cat /dev/null >> /etc/init.d/luci_fixtime && touch /etc/init.d/luci_fixtime
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ config_get hostname "$cfg" hostname 'OpenWrt'
+ echo "$hostname" > /proc/sys/kernel/hostname
+
+ config_get conloglevel "$cfg" conloglevel
+ config_get buffersize "$cfg" buffersize
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+
+ config_get timezone "$cfg" timezone 'UTC'
+ echo "$timezone" > /tmp/TZ
+
+ config_get zonename "$cfg" zonename
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+apply_uci_config() {
+ sh -c '. /lib/functions.sh; include /lib/config; uci_apply_defaults'
+}
+
+start() {
+ config_load system
+ config_foreach system_config system
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ apply_uci_config
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date +%s -r {} \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && \
+ date -s @$maxtime && \
+ logger -t sysfixtime -p daemon.notice "Time fixed"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=05
+STOP=95
+
+start() {
+ cat <<' EOF' | lua -l luci.fs -l luci.util -
+ if (os.time() < 1000000000) then
+ os.execute('date -s ' .. os.date('%Y%m%d%H%M', luci.fs.mtime("/etc/init.d/luci_fixtime")))
+ end
+ EOF
+}
+
+stop() {
+ [[ -w /etc/init.d/luci_fixtime ]] && cat /dev/null >> /etc/init.d/luci_fixtime && touch /etc/init.d/luci_fixtime
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ config_get hostname "$cfg" hostname 'OpenWrt'
+ echo "$hostname" > /proc/sys/kernel/hostname
+
+ config_get conloglevel "$cfg" conloglevel
+ config_get buffersize "$cfg" buffersize
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+
+ config_get timezone "$cfg" timezone 'UTC'
+ echo "$timezone" > /tmp/TZ
+
+ config_get zonename "$cfg" zonename
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+apply_uci_config() {
+ sh -c '. /lib/functions.sh; include /lib/config; uci_apply_defaults'
+}
+
+start() {
+ config_load system
+ config_foreach system_config system
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ apply_uci_config
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P ${log_prefix}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_config_trigger "system" "/etc/init.d/log" "start"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_set_param respawn
+ procd_close_instance
+
+ config_load system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ fw3 -q start
+}
+
+start() {
+ fw3 start
+}
+
+stop() {
+ fw3 flush
+}
+
+restart() {
+ fw3 restart
+}
+
+reload() {
+ fw3 reload
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ sleep 5
+ /sbin/wifi reload_legacy
+}
+
+service_triggers()
+{
+ procd_open_trigger
+ procd_add_config_trigger "config.change" "network" /etc/init.d/network reload
+ procd_add_config_trigger "config.change" "wireless" /etc/init.d/network reload
+ procd_close_trigger
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+START=20
+USE_PROCD=1
+
+start_service()
+{
+ procd_open_instance
+ procd_set_param command "/sbin/usbmode" -s
+ procd_close_instance
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=45
+start() {
+ wshaper.htb
+}
+
+stop() {
+ wshaper.htb stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${interface}" ] && network_get_device interface "${interface}"
+ append_ports "${interface}" "${Port}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=50
+
+boot() {
+ /usr/lib/qos/generate.sh firewall | sh
+}
+
+start() {
+ qos-start
+}
+
+stop() {
+ qos-stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 Jo-Philipp Wich
+
+START=50
+
+USE_PROCD=1
+
+UHTTPD_BIN="/usr/sbin/uhttpd"
+PX5G_BIN="/usr/sbin/px5g"
+
+append_arg() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get val "$cfg" "$var"
+ [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
+}
+
+append_bool() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+generate_keys() {
+ local cfg="$1"
+ local key="$2"
+ local crt="$3"
+ local days bits country state location commonname
+
+ config_get days "$cfg" days
+ config_get bits "$cfg" bits
+ config_get country "$cfg" country
+ config_get state "$cfg" state
+ config_get location "$cfg" location
+ config_get commonname "$cfg" commonname
+
+ [ -x "$PX5G_BIN" ] && {
+ $PX5G_BIN selfsigned -der \
+ -days ${days:-730} -newkey rsa:${bits:-1024} -keyout "$UHTTPD_KEY" -out "$UHTTPD_CERT" \
+ -subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/CN="${commonname:-OpenWrt}"
+ }
+}
+
+start_instance()
+{
+ UHTTPD_CERT=""
+ UHTTPD_KEY=""
+
+ local cfg="$1"
+ local realm="$(uci_get system.@system[0].hostname)"
+ local listen http https interpreter indexes path
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command "$UHTTPD_BIN" -f
+
+ append_arg "$cfg" home "-h"
+ append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
+ append_arg "$cfg" config "-c"
+ append_arg "$cfg" cgi_prefix "-x"
+ [ -f /usr/lib/uhttpd_lua.so ] && {
+ append_arg "$cfg" lua_prefix "-l"
+ append_arg "$cfg" lua_handler "-L"
+ }
+ [ -f /usr/lib/uhttpd_ubus.so ] && {
+ append_arg "$cfg" ubus_prefix "-u"
+ append_arg "$cfg" ubus_socket "-U"
+ }
+ append_arg "$cfg" script_timeout "-t"
+ append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" http_keepalive "-k"
+ append_arg "$cfg" tcp_keepalive "-A"
+ append_arg "$cfg" error_page "-E"
+ append_arg "$cfg" max_requests "-n" 3
+ append_arg "$cfg" max_connections "-N"
+
+ append_bool "$cfg" no_ubusauth "-a" 0
+ append_bool "$cfg" no_symlinks "-S" 0
+ append_bool "$cfg" no_dirlists "-D" 0
+ append_bool "$cfg" rfc1918_filter "-R" 0
+
+ config_get http "$cfg" listen_http
+ for listen in $http; do
+ procd_append_param command -p "$listen"
+ done
+
+ config_get interpreter "$cfg" interpreter
+ for path in $interpreter; do
+ procd_append_param command -i "$path"
+ done
+
+ config_get indexes "$cfg" index_page
+ for path in $indexes; do
+ procd_append_param command -I "$path"
+ done
+
+ config_get https "$cfg" listen_https
+ config_get UHTTPD_KEY "$cfg" key /etc/uhttpd.key
+ config_get UHTTPD_CERT "$cfg" cert /etc/uhttpd.crt
+
+ [ -n "$https" ] && {
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] || {
+ config_foreach generate_keys cert
+ }
+
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] && {
+ append_arg "$cfg" cert "-C"
+ append_arg "$cfg" key "-K"
+
+ for listen in $https; do
+ procd_append_param command -s "$listen"
+ done
+ }
+ }
+
+ procd_close_instance
+
+ # Check if daemon is running, if not then
+ # re-execute in foreground to display error.
+# sleep 1 && service_check $UHTTPD_BIN || \
+# $UHTTPD_BIN -f $UHTTPD_ARGS
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "uhttpd"
+}
+
+start_service() {
+ config_load uhttpd
+ config_foreach start_instance uhttpd
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=59
+
+boot() {
+ if [ -f /etc/config/luci_ethers ]; then
+ logger -t luci_dhcp_migrate "Migrating luci_ethers configuration ..."
+
+ lua -lluci.model.uci -e '
+ x=luci.model.uci.cursor()
+ x:foreach("luci_ethers", "static_lease",
+ function(s)
+ x:section("dhcp", "host", nil, {mac=s.macaddr, ip=s.ipaddr})
+ end)
+ x:save("dhcp")
+ x:commit("dhcp")
+ '
+
+ rm -f /etc/config/luci_ethers
+ fi
+
+ if [ -f /etc/config/luci_hosts ]; then
+ logger -t luci_dhcp_migrate "Migrating luci_hosts configuration ..."
+
+ lua -lluci.model.uci -e '
+ x=luci.model.uci.cursor()
+ x:foreach("luci_hosts", "host",
+ function(s)
+ x:section("dhcp", "domain", nil, {name=s.hostname, ip=s.ipaddr})
+ end)
+ x:save("dhcp")
+ x:commit("dhcp")
+ '
+
+ rm -f /etc/config/luci_hosts
+ fi
+}
+
+start() { :; }
+stop() { :; }
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (c) 2011-2012 OpenWrt.org
+
+START=80
+
+USE_PROCD=1
+PROG=/usr/sbin/relayd
+
+resolve_ifname() {
+ grep -qs "^ *$1:" /proc/net/dev && {
+ procd_append_param command -I "$1"
+ append ifaces "$1"
+ }
+}
+
+resolve_network() {
+ local ifn
+ fixup_interface "$1"
+ config_get ifn "$1" ifname
+ [ -z "$ifn" ] && return 1
+ resolve_ifname "$ifn"
+}
+
+start_relay() {
+ local cfg="$1"
+
+ local args=""
+ local ifaces=""
+
+ config_get proto "$cfg" proto
+ [[ "$proto" == relay ]] || return 0
+
+ SERVICE_DAEMONIZE=1
+ SERVICE_WRITE_PID=1
+ SERVICE_PID_FILE="/var/run/relay-$cfg.pid"
+ [ -f "$SERVICE_PID_FILE" ] && {
+ if grep -q relayd "/proc/$(cat $SERVICE_PID_FILE)/cmdline"; then
+ return 0
+ else
+ rm -f "$SERVICE_PID_FILE"
+ fi
+ }
+
+ procd_open_instance
+ procd_set_param command "$PROG"
+
+ local net networks
+ config_get networks "$cfg" network
+ for net in $networks; do
+ resolve_network "$net" || {
+ return 1
+ }
+ done
+
+ local ifn ifnames
+ config_get ifnames "$cfg" ifname
+ for ifn in $ifnames; do
+ resolve_ifname "$ifn"
+ done
+
+ local ipaddr
+ config_get ipaddr "$cfg" ipaddr
+ [ -n "$ipaddr" ] && procd_append_param command -L "$ipaddr"
+
+ local gateway
+ config_get gateway "$cfg" gateway
+ [ -n "$gateway" ] && procd_append_param command -G "$gateway"
+
+ local expiry # = 30
+ config_get expiry "$cfg" expiry
+ [ -n "$expiry" ] && procd_append_param command "$expiry"
+
+ local retry # = 5
+ config_get retry "$cfg" retry
+ [ -n "$retry" ] && procd_append_param command -p "$retry"
+
+ local table # = 16800
+ config_get table "$cfg" table
+ [ -n "$table" ] && procd_append_param command -T "$table"
+
+ local fwd_bcast # = 1
+ config_get_bool fwd_bcast "$cfg" forward_bcast 1
+ [ $fwd_bcast -eq 1 ] && procd_append_param command "-B"
+
+ local fwd_dhcp # = 1
+ config_get_bool fwd_dhcp "$cfg" forward_dhcp 1
+ [ $fwd_dhcp -eq 1 ] && procd_append_param command "-D"
+
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "network"
+}
+
+start_service() {
+ include /lib/network
+ config_load network
+ config_foreach start_relay interface
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2013 OpenWrt.org
+# Copyright (C) 2008 Jo-Philipp Wich
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+START=90
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/sbin/openvpn
+
+LIST_SEP="
+"
+
+append_param() {
+ local s="$1"
+ local v="$2"
+ case "$v" in
+ *_*_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;;
+ *_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;;
+ *_*) v=${v%%_*}-${v#*_} ;;
+ esac
+ echo -n "$v" >> "/var/etc/openvpn-$s.conf"
+ return 0
+}
+
+append_bools() {
+ local p; local v; local s="$1"; shift
+ for p in $*; do
+ config_get_bool v "$s" "$p"
+ [ "$v" == 1 ] && append_param "$s" "$p" && echo >> "/var/etc/openvpn-$s.conf"
+ done
+}
+
+append_params() {
+ local p; local v; local s="$1"; shift
+ for p in $*; do
+ config_get v "$s" "$p"
+ IFS="$LIST_SEP"
+ for v in $v; do
+ [ -n "$v" ] && append_param "$s" "$p" && echo " $v" >> "/var/etc/openvpn-$s.conf"
+ done
+ unset IFS
+ done
+}
+
+section_enabled() {
+ config_get_bool enable "$1" 'enable' 0
+ config_get_bool enabled "$1" 'enabled' 0
+ [ $enable -gt 0 ] || [ $enabled -gt 0 ]
+}
+
+openvpn_add_instance() {
+ local name="$1"
+ local dir="$2"
+ local conf="$3"
+
+ procd_open_instance
+ procd_set_param command "$PROG" \
+ --syslog "openvpn($name)" \
+ --cd "$dir" \
+ --config "$conf"
+ procd_set_param file "$dir/$conf"
+ procd_close_instance
+}
+
+start_instance() {
+ local s="$1"
+
+ section_enabled "$s" || return 1
+
+ config_get config "$s" config
+
+ [ ! -d "/var/run" ] && mkdir -p "/var/run"
+
+ if [ ! -z "$config" ]; then
+ openvpn_add_instance "$s" "$(dirname "$config")" "$(basename "$config")"
+ return
+ fi
+
+ [ ! -d "/var/etc" ] && mkdir -p "/var/etc"
+ [ -f "/var/etc/openvpn-$s.conf" ] && rm "/var/etc/openvpn-$s.conf"
+
+ # append flags
+ append_bools "$s" \
+ auth_nocache auth_retry auth_user_pass_optional bind ccd_exclusive client client_cert_not_required \
+ client_to_client comp_noadapt disable \
+ disable_occ down_pre duplicate_cn fast_io float http_proxy_retry \
+ ifconfig_noexec ifconfig_nowarn ifconfig_pool_linear management_forget_disconnect management_hold \
+ management_query_passwords management_signal mktun mlock mtu_test multihome mute_replay_warnings \
+ nobind no_iv no_name_remapping no_replay opt_verify passtos persist_key persist_local_ip \
+ persist_remote_ip persist_tun ping_timer_rem pull push_reset \
+ remote_random rmtun route_noexec route_nopull single_session socks_proxy_retry \
+ suppress_timestamps tcp_nodelay test_crypto tls_client tls_exit tls_server \
+ tun_ipv6 up_delay up_restart username_as_common_name
+
+ # append params
+ append_params "$s" \
+ cd askpass auth auth_user_pass auth_user_pass_verify bcast_buffers ca cert \
+ chroot cipher client_config_dir client_connect client_disconnect comp_lzo connect_freq \
+ connect_retry connect_timeout connect_retry_max crl_verify dev dev_node dev_type dh \
+ echo engine explicit_exit_notify fragment group hand_window hash_size \
+ http_proxy http_proxy_option http_proxy_timeout ifconfig ifconfig_pool \
+ ifconfig_pool_persist ifconfig_push inactive ipchange iroute keepalive \
+ key key_method keysize learn_address link_mtu lladdr local log log_append \
+ lport management management_log_cache max_clients \
+ max_routes_per_client mode mssfix mtu_disc mute nice ns_cert_type ping \
+ ping_exit ping_restart pkcs12 plugin port port_share prng proto rcvbuf \
+ redirect_gateway remap_usr1 remote remote_cert_eku remote_cert_ku remote_cert_tls \
+ reneg_bytes reneg_pkts reneg_sec \
+ replay_persist replay_window resolv_retry route route_delay route_gateway \
+ route_metric route_up rport script_security secret server server_bridge setenv shaper sndbuf \
+ socks_proxy status status_version syslog tcp_queue_limit tls_auth \
+ tls_cipher tls_remote tls_timeout tls_verify tmp_dir topology tran_window \
+ tun_mtu tun_mtu_extra txqueuelen user verb down push up
+
+ openvpn_add_instance "$s" "/var/etc" "openvpn-$s.conf"
+}
+
+start_service() {
+ config_load 'openvpn'
+ config_foreach start_instance 'openvpn'
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && {
+ lock /tmp/.switch2jffs
+ switch2jffs
+ lock -u /tmp/.switch2jffs
+ }
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# (C) 2008 openwrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enable_server:bool:0'
+}
+
+start_service() {
+ local server enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in "$server"; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+exit 0
--- /dev/null
+search lan
+nameserver 127.0.0.1
--- /dev/null
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+daytime 13/tcp
+daytime 13/udp
+netstat 15/tcp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp 21/tcp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+smtp 25/tcp
+time 37/tcp
+time 37/udp
+whois 43/tcp
+domain 53/tcp
+domain 53/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/udp
+finger 79/tcp
+www 80/tcp http
+kerberos 88/tcp kerberos5 krb5 kerberos-sec
+kerberos 88/udp kerberos5 krb5 kerberos-sec
+pop3 110/tcp
+pop3 110/udp
+sunrpc 111/tcp
+sunrpc 111/udp
+auth 113/tcp ident
+sftp 115/tcp
+nntp 119/tcp
+ntp 123/tcp
+ntp 123/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap2 143/tcp imap
+imap2 143/udp imap
+snmp 161/tcp
+snmp 161/udp
+snmp-trap 162/tcp snmptrap
+snmp-trap 162/udp snmptrap
+xdmcp 177/tcp
+xdmcp 177/udp
+bgp 179/tcp
+bgp 179/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+https 443/tcp
+https 443/udp
+microsoft-ds 445/tcp
+microsoft-ds 445/udp
+isakmp 500/tcp
+isakmp 500/udp
+rtsp 554/tcp
+rtsp 554/udp
+ipp 631/tcp
+ipp 631/udp
+syslog 514/udp
+printer 515/tcp spooler
+dhcpv6-client 546/tcp
+dhcpv6-client 546/udp
+dhcpv6-server 547/tcp
+dhcpv6-server 547/udp
+afpovertcp 548/tcp
+afpovertcp 548/udp
+nntps 563/tcp snntp
+nntps 563/udp snntp
+ldaps 636/tcp
+ldaps 636/udp
+tinc 655/tcp
+tinc 655/udp
+rsync 873/tcp
+rsync 873/udp
+ftps-data 989/tcp
+ftps 990/tcp
+imaps 993/tcp
+imaps 993/udp
+ircs 994/tcp
+ircs 994/udp
+pop3s 995/tcp
+pop3s 995/udp
+socks 1080/tcp
+socks 1080/udp
+openvpn 1194/tcp
+openvpn 1194/udp
+l2f 1701/tcp l2tp
+l2f 1701/udp l2tp
+radius 1812/tcp
+radius 1812/udp
+radius-acct 1813/tcp radacct
+radius-acct 1813/udp radacct
+nfs 2049/tcp
+nfs 2049/udp
+dict 2628/tcp
+dict 2628/udp
+gpsd 2947/tcp
+gpsd 2947/udp
+icpv2 3130/tcp icp
+icpv2 3130/udp icp
+mysql 3306/tcp
+mysql 3306/udp
+nut 3493/tcp
+nut 3493/udp
+distcc 3632/tcp
+distcc 3632/udp
+daap 3689/tcp
+daap 3689/udp
+svn 3690/tcp subversion
+svn 3690/udp subversion
+epmd 4369/tcp
+epmd 4369/udp
+iax 4569/tcp
+iax 4569/udp
+mtn 4691/tcp
+mtn 4691/udp
+munin 4949/tcp
+sip 5060/tcp
+sip 5060/udp
+sip-tls 5061/tcp
+sip-tls 5061/udp
+xmpp-client 5222/tcp jabber-client
+xmpp-client 5222/udp jabber-client
+xmpp-server 5269/tcp jabber-server
+xmpp-server 5269/udp jabber-server
+mdns 5353/tcp
+mdns 5353/udp
+postgresql 5432/tcp postgres
+postgresql 5432/udp postgres
+x11 6000/tcp
+x11 6000/udp
+mysql-proxy 6446/tcp
+mysql-proxy 6446/udp
+bacula-dir 9101/tcp
+bacula-dir 9101/udp
+bacula-fd 9102/tcp
+bacula-fd 9102/udp
+bacula-sd 9103/tcp
+bacula-sd 9103/udp
+nbd 10809/tcp
+zabbix-agent 10050/tcp
+zabbix-agent 10050/udp
+zabbix-trapper 10051/tcp
+zabbix-trapper 10051/udp
+hkp 11371/tcp
+hkp 11371/udp
+ssmtp 465/tcp smtps
+spamd 783/tcp
+zebrasrv 2600/tcp
+zebra 2601/tcp
+ripd 2602/tcp
+ripngd 2603/tcp
+ospfd 2604/tcp
+bgpd 2605/tcp
+ospf6d 2606/tcp
+ospfapi 2607/tcp
+isisd 2608/tcp
+sane-port 6566/tcp sane saned
+ircd 6667/tcp
+git 9418/tcp
+
--- /dev/null
+root:$1$p7il4xFP$5hZPM1w9kT6Ez18MPnFH60:16108:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+root:x:0:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+/bin/ash
+/bin/bash
+/bin/rbash
--- /dev/null
+kernel.panic=3
+net.ipv4.conf.default.arp_ignore=1
+net.ipv4.conf.all.arp_ignore=1
+net.ipv4.ip_forward=1
+net.ipv4.icmp_echo_ignore_broadcasts=1
+net.ipv4.icmp_ignore_bogus_error_responses=1
+net.ipv4.tcp_ecn=0
+net.ipv4.tcp_fin_timeout=30
+net.ipv4.tcp_keepalive_time=120
+net.ipv4.tcp_syncookies=1
+net.ipv4.tcp_timestamps=1
+net.ipv4.tcp_sack=1
+net.ipv4.tcp_dsack=1
+
+net.ipv6.conf.default.forwarding=1
+net.ipv6.conf.all.forwarding=1
+
+net.netfilter.nf_conntrack_acct=1
+net.netfilter.nf_conntrack_checksum=0
+net.netfilter.nf_conntrack_max=16384
+net.netfilter.nf_conntrack_tcp_timeout_established=3600
+net.netfilter.nf_conntrack_udp_timeout=60
+net.netfilter.nf_conntrack_udp_timeout_stream=180
+
+# disable bridge firewalling by default
+net.bridge.bridge-nf-call-arptables=0
+net.bridge.bridge-nf-call-ip6tables=0
+net.bridge.bridge-nf-call-iptables=0
--- /dev/null
+## This file contains files and directories that should
+## be preserved during an upgrade.
+
+# /etc/example.conf
+# /etc/openvpn/
--- /dev/null
+{
+ "messages" : [
+ "555342431234567800000000000006d0000000000000000000000000000000",
+ "5553424312345678000000000000061b000000020000000000000000000000",
+ "5553424312345678000000000000061b004600000000000000000000000000",
+ "5553424312345678000000000000061b000000030000000000000000000000",
+ "55534243f0298d8124000000800006bc626563240000000000000000000000",
+ "0902200001010080fa0904000002080650000705010200020007058102000200",
+ "55534243785634120100000080000601000000000000000000000000000000",
+ "55534243123456780000000000000616000000000000000000000000000000",
+ "5553424312345678000000000000061b000000ff0000000000000000000000",
+ "55534243123456780000000000000601000000000000000000000000000000",
+ "5553424368032c882400000080000612000000240000000000000000000000",
+ "5553424312345678c00000008000069f140000000000000000000000000000",
+ "01b0000000000000000000000000000000000000000000000000000000000000",
+ "1b5a01",
+ "5553424312345678c000000080010606f50402527000000000000000000000",
+ "5553424329000000000000000000061b000000020000000000000000000000",
+ "555342431234567800000000000006f0010300000000000000000000000000",
+ "5553424312345678000000000000061e000000000000000000000000000000",
+ "5553424312345679000000000000061b000000020000000000000000000000",
+ "55534243123456780000000000000aff554d53434847000000000000000000",
+ "555342431234567803000000800006f1010100000000000000000000000000",
+ "555342431234567800000000000005f1010100000000000000000000000000",
+ "555342431234567824000000800008ff024445564348470000000000000000",
+ "555342431234567824000000800008ff020000000000000000000000000000",
+ "55534243b82e238c24000000800008ff020000000000000000000000000000",
+ "5553424387654321000000000000061b000000020000000000000000000000",
+ "55534243123456780000000000000011062000000100000000000000000000",
+ "55534243123456780600000080010a11060000000000000000000000000000",
+ "55534243123456780600000080000601000000000000000000000000000000",
+ "55534243123456780000000000000a11062000000000000100000000000000",
+ "55534243123456780002000080000a11062000000000000100000000000000",
+ "55534243908ecd89000000000000061b000000020000000000000000000000",
+ "555342431234567824000000800008ff524445564348470000000000000000",
+ "555342431234567824000000800008ff524445564348473100000000000000",
+ "55534243123456782400000080000dfe524445564348473d4e444953000000",
+ "55534243d85dd88524000000800008ff524445564348470000000000000000",
+ "5553424302000000000000000000061b000000020000000000000000000000",
+ "55534243123456702000000080000c85010101180101010101000000000000",
+ "55534243123456782400000080000685000000240000000000000000000000",
+ "555342430800498200000000000010ff000000000000000000000000000000",
+ "5553424348c4758600000000000010ff000000000000000000000000000000",
+ "555342431234567824000000800006bc626563240000000000000000000000",
+ "5553424330f4cf8124000000800108df200000000000000000000000000000",
+ "5553424312345678c00000008000069f030000000000000000000000000000",
+ "555342431234567824000000800008FF05B112AEE102000000000000000000",
+ "55534243123456788000000080000606f50402527000000000000000000000",
+ "55534243123456780000000000000606f50402527000000000000000000000",
+ "55534243123456780000000080000606f50402527000000000000000000000",
+ "55534243123456781200000080000603000000020000000000000000000000",
+ "55534243123456780000000000000cff020000000000000000000000000000",
+ "555342431234567800000000000006bd000000020000000000000000000000",
+ "5553424312345678800000008000060619181a207000000000000000000000",
+ "555342431234567800000000000010ff000000000000000000000000000000",
+ "555342431234567800000000000008ff000000000000030000000000000000",
+ "555342431234567800000000000008FF000000000000030000000000000000",
+ "555342431234567824000000800108df200000000000000000000000000000",
+ "5553424308407086000000000000061b000000020000000000000000000000",
+ "555342431234567800000000000003f0010100000000000000000000000000",
+ "55534243123456780000000000000600000000000000000000000000000000",
+ "5553424312345679c000000080000671030000000000000000000000000000",
+ "555342430820298900000000000003f0010100000000000000000000000000",
+ "5553424308902082000000000000061b000000020000000000000000000000",
+ "5553424312345678c000000080000671010000000000000000000000000000",
+ "555342439f000000000000000000061b000000020000000000000000000000",
+ "5553424398e2c4812400000080000bff524445564348473d43440000000000"
+ ],
+
+ "devices" : {
+ "03f0:002a": {
+ "*": {
+ "t_class": 7,
+ "msg": [ 0 ],
+ "response": true
+ }
+ },
+ "0408:ea17": {
+ "*": {
+ "t_vendor": 1032,
+ "t_product": [ 59926 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0408:ea25": {
+ "*": {
+ "t_vendor": 1032,
+ "t_product": [ 59942 ],
+ "msg": [ ]
+ }
+ },
+ "0408:ea43": {
+ "*": {
+ "t_vendor": 1032,
+ "t_product": [ 59975 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0408:f000": {
+ "*": {
+ "t_vendor": 1032,
+ "t_product": [ 53257 ],
+ "msg": [ 2 ]
+ }
+ },
+ "0421:060c": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1550 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0421:0610": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1554 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0421:0618": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1561 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0421:061d": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1566 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0421:0622": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1571 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0421:0627": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1554, 1577 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0421:062c": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1581 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0421:0632": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1586 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0421:0637": {
+ "*": {
+ "t_vendor": 1057,
+ "t_product": [ 1592 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0471:1210": {
+ ":uMa=Philips": {
+ "t_class": 255,
+ "msg": [ 1 ],
+ "response": true
+ },
+ ":uMa=Wisue": {
+ "t_vendor": 7612,
+ "t_product": [ 5 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "0471:1237": {
+ "*": {
+ "t_vendor": 1137,
+ "t_product": [ 4614, 4660 ],
+ "msg": [ 3 ],
+ "response": true
+ }
+ },
+ "0482:024d": {
+ "*": {
+ "t_class": 2,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "04bb:bccd": {
+ "*": {
+ "t_vendor": 1211,
+ "t_product": [ 2377 ],
+ "msg": [ 4 ]
+ }
+ },
+ "04cc:225c": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "04e8:680c": {
+ "*": {
+ "t_vendor": 1256,
+ "t_product": [ 26514 ],
+ "msg": [ 5 ]
+ }
+ },
+ "04e8:689a": {
+ "*": {
+ "t_vendor": 1256,
+ "t_product": [ 26761 ],
+ "msg": [ 6 ]
+ }
+ },
+ "04e8:f000": {
+ ":sMo=U209": {
+ "t_vendor": 1256,
+ "t_product": [ 26113 ],
+ "msg": [ 7 ]
+ }
+ },
+ "057c:62ff": {
+ "*": {
+ "t_vendor": 1404,
+ "t_product": [ 34049 ],
+ "no_driver": true,
+ "msg": [ 8 ]
+ }
+ },
+ "057c:84ff": {
+ "*": {
+ "t_vendor": 1404,
+ "t_product": [ 33793 ],
+ "no_driver": true,
+ "msg": [ 8 ]
+ }
+ },
+ "05c6:0010": {
+ "*": {
+ "t_vendor": 1478,
+ "t_product": [ 160 ],
+ "msg": [ 1 ]
+ }
+ },
+ "05c6:1000": {
+ ":sVe=Option": {
+ "t_vendor": 2800,
+ "t_product": [ 26881, 26369, 26112 ],
+ "msg": [ 9 ],
+ "response": true
+ },
+ ":uMa=AnyDATA": {
+ "t_vendor": 5845,
+ "t_product": [ 25858 ],
+ "msg": [ 1 ]
+ },
+ ":uMa=CELOT": {
+ "t_vendor": 8479,
+ "t_product": [ 26625 ],
+ "msg": [ 1 ]
+ },
+ ":uMa=DGT": {
+ "t_vendor": 8479,
+ "t_product": [ 26626 ],
+ "msg": [ 1 ]
+ },
+ ":uMa=Option": {
+ "t_vendor": 2800,
+ "t_product": [ 26881 ],
+ "msg": [ 9 ],
+ "response": true
+ },
+ ":uMa=SAMSUNG": {
+ "t_vendor": 1256,
+ "t_product": [ 26113 ],
+ "msg": [ 7 ]
+ },
+ ":uMa=SSE": {
+ "t_vendor": 1478,
+ "t_product": [ 24576 ],
+ "msg": [ 1 ],
+ "response": true
+ },
+ ":uMa=StrongRising": {
+ "t_vendor": 650,
+ "t_product": [ 4102 ],
+ "msg": [ 1 ]
+ },
+ ":uMa=Vertex": {
+ "t_vendor": 8167,
+ "t_product": [ 256 ],
+ "msg": [ 1 ]
+ }
+ },
+ "05c6:2000": {
+ "*": {
+ "t_vendor": 1478,
+ "t_product": [ 21 ],
+ "msg": [ 10 ],
+ "response": true,
+ "check": true
+ }
+ },
+ "05c6:2001": {
+ "*": {
+ "t_vendor": 7694,
+ "t_product": [ 52758, 52990 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "05c6:6503": {
+ "*": {
+ "t_vendor": 5845,
+ "t_product": [ 25858 ],
+ "msg": [ 1 ]
+ }
+ },
+ "05c6:9024": {
+ "*": {
+ "t_vendor": 1478,
+ "t_product": [ 36901 ],
+ "msg": [ 1 ]
+ }
+ },
+ "05c6:f000": {
+ "*": {
+ "t_vendor": 1478,
+ "t_product": [ 36864 ],
+ "msg": [ 1 ]
+ }
+ },
+ "05c7:1000": {
+ "*": {
+ "t_vendor": 1479,
+ "t_product": [ 24576 ],
+ "msg": [ 11 ]
+ }
+ },
+ "072f:100d": {
+ "*": {
+ "t_vendor": 1839,
+ "t_product": [ 37068 ],
+ "no_driver": true,
+ "msg_endpoint": 2,
+ "msg": [ 12 ]
+ }
+ },
+ "07d1:a800": {
+ "*": {
+ "t_vendor": 2001,
+ "t_product": [ 15874 ],
+ "msg": [ 1 ]
+ }
+ },
+ "07d1:a804": {
+ "*": {
+ "t_vendor": 2001,
+ "t_product": [ 32273 ],
+ "msg": [ 1 ]
+ }
+ },
+ "0922:1001": {
+ "*": {
+ "t_vendor": 2338,
+ "t_product": [ 4098 ],
+ "no_driver": true,
+ "msg_endpoint": 1,
+ "msg": [ 13 ],
+ "response_endpoint": 1
+ }
+ },
+ "0930:0d46": {
+ "*": {
+ "t_vendor": 2352,
+ "t_product": [ 3397 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "0ace:2011": {
+ "*": {
+ "no_driver": true,
+ "msg": [ 1 ]
+ }
+ },
+ "0ace:20ff": {
+ "*": {
+ "no_driver": true,
+ "msg": [ 1 ]
+ }
+ },
+ "0af0:4007": {
+ "*": {
+ "t_vendor": 2800,
+ "t_product": [ 16389 ],
+ "mode": "Sierra",
+ "no_driver": true,
+ "msg": [ ]
+ }
+ },
+ "0af0:6711": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6731": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6751": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6771": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6791": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6811": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6911": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6951": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:6971": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7011": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7031": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7051": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7071": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7111": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7211": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7251": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7271": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7301": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7311": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7361": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7381": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7401": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7501": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7601": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7701": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7706": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7801": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7901": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:7a01": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 9 ]
+ }
+ },
+ "0af0:7a05": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 9 ]
+ }
+ },
+ "0af0:8006": {
+ "*": {
+ "t_vendor": 2800,
+ "t_product": [ 37120 ],
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8200": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8201": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8300": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8302": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8304": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8400": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8600": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8700": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8800": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:8900": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:9000": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:9200": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:c031": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:c100": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d001": {
+ "*": {
+ "t_vendor": 2800,
+ "t_product": [ 53591 ],
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d013": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d031": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d033": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d035": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d055": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d057": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d058": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d155": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d157": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d255": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d257": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0af0:d357": {
+ "*": {
+ "t_class": 255,
+ "no_driver": true,
+ "msg": [ 6 ]
+ }
+ },
+ "0b3c:c700": {
+ "*": {
+ "t_vendor": 2876,
+ "t_product": [ 49152, 49153, 49154 ],
+ "msg": [ 3 ],
+ "response": true
+ }
+ },
+ "0b3c:f000": {
+ "*": {
+ "t_vendor": 2876,
+ "t_product": [ 49155, 49156 ],
+ "msg": [ 14 ],
+ "response": true
+ }
+ },
+ "0cf3:20ff": {
+ "*": {
+ "t_vendor": 3315,
+ "t_product": [ 28688 ],
+ "no_driver": true,
+ "msg": [ 15 ],
+ "response": true
+ }
+ },
+ "0d46:45a1": {
+ "*": {
+ "t_vendor": 3398,
+ "t_product": [ 17833 ],
+ "mode": "Kobil",
+ "msg": [ ]
+ }
+ },
+ "0d46:45a5": {
+ "*": {
+ "t_vendor": 3398,
+ "t_product": [ 17837 ],
+ "mode": "Kobil",
+ "msg": [ ]
+ }
+ },
+ "0df7:0800": {
+ "*": {
+ "t_class": 255,
+ "mode": "MobileAction",
+ "no_driver": true,
+ "msg": [ ]
+ }
+ },
+ "0e8d:0002": {
+ ":uPr=MT": {
+ "t_vendor": 3725,
+ "t_product": [ 161, 162 ],
+ "msg": [ 16 ]
+ }
+ },
+ "0e8d:7109": {
+ "*": {
+ "t_vendor": 3725,
+ "t_product": [ 28952 ],
+ "no_driver": true,
+ "msg": [ 17, 18 ]
+ }
+ },
+ "0fca:8020": {
+ "*": {
+ "t_vendor": 4042,
+ "t_product": [ 32786 ],
+ "msg": [ ]
+ }
+ },
+ "0fce:d0cf": {
+ "*": {
+ "t_class": 2,
+ "detach_storage": true,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "0fce:d0e1": {
+ "*": {
+ "t_class": 2,
+ "mode": "Sony",
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "0fce:d103": {
+ "*": {
+ "t_class": 2,
+ "mode": "Sony",
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "0fd1:1000": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "1004:1000": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 19 ]
+ }
+ },
+ "1004:607f": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24576, 24852 ],
+ "msg": [ 20 ],
+ "response": true
+ }
+ },
+ "1004:613a": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24868 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "1004:613f": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24897 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "1004:614e": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24885 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "1004:6156": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24919 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "1004:6190": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24999 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1004:61aa": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24999 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1004:61dd": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 24975 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "1004:61e7": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 25062 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1004:61eb": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 25066 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "1004:6327": {
+ "*": {
+ "t_vendor": 4100,
+ "t_product": [ 25382 ],
+ "msg": [ 21 ]
+ }
+ },
+ "1033:0035": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4099 ],
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "106c:3b03": {
+ "*": {
+ "t_vendor": 4204,
+ "t_product": [ 14101 ],
+ "msg": [ 22 ]
+ }
+ },
+ "106c:3b05": {
+ "*": {
+ "t_vendor": 4204,
+ "t_product": [ 14102 ],
+ "msg": [ 23 ]
+ }
+ },
+ "106c:3b06": {
+ "*": {
+ "t_vendor": 4204,
+ "t_product": [ 14103 ],
+ "msg": [ 24 ]
+ }
+ },
+ "106c:3b11": {
+ "*": {
+ "t_vendor": 4204,
+ "t_product": [ 14104 ],
+ "msg": [ 1 ]
+ }
+ },
+ "106c:3b14": {
+ "*": {
+ "t_vendor": 4204,
+ "t_product": [ 14113 ],
+ "no_driver": true,
+ "msg": [ 22 ]
+ }
+ },
+ "1076:7f40": {
+ "*": {
+ "t_vendor": 4214,
+ "t_product": [ 32512 ],
+ "mode": "GCT",
+ "msg": [ ]
+ }
+ },
+ "109b:f009": {
+ "*": {
+ "t_vendor": 4251,
+ "t_product": [ 37140 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "10a9:6080": {
+ "*": {
+ "t_vendor": 4265,
+ "t_product": [ 24709 ],
+ "msg": [ ]
+ }
+ },
+ "1199:0fff": {
+ "*": {
+ "t_vendor": 4505,
+ "t_product": [ 23, 24, 25, 32, 33, 34, 36, 38, 39, 40, 41, 274, 288, 536, 544, 548, 769, 26626, 26627, 26628, 26629, 26632, 26633, 26642, 26643, 26645, 26646, 26656, 26657, 26658, 26674, 26675, 26676, 26677, 26680, 26681, 26682, 26683, 26684, 26685, 26686, 26704, 26705, 26706, 26707, 26709, 26710, 26713, 26714, 26787 ],
+ "mode": "Sierra",
+ "no_driver": true,
+ "msg": [ ]
+ }
+ },
+ "1266:1000": {
+ "*": {
+ "t_vendor": 4710,
+ "t_product": [ 4098, 4099, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4113, 4114 ],
+ "msg": [ 17, 25 ],
+ "response": true
+ }
+ },
+ "12d1:1001": {
+ "*": {
+ "t_class": 255,
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:1003": {
+ "*": {
+ "t_class": 255,
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:1009": {
+ "*": {
+ "t_class": 255,
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:101e": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1030": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4148 ],
+ "no_driver": true,
+ "msg": [ 27 ]
+ }
+ },
+ "12d1:1031": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4149 ],
+ "no_driver": true,
+ "msg": [ 27 ]
+ }
+ },
+ "12d1:1414": {
+ "*": {
+ "t_class": 255,
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:1446": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4097, 5126, 5131, 5132, 5138, 5147, 5170, 5171, 5174, 5292, 5382, 5388, 5393 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1449": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5188 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14ad": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5294 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14b5": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5288, 5290 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14b7": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5324 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14ba": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5330 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14c1": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5318 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14c3": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5320 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14c4": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5322 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14c5": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5323 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14d1": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5321 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:14fe": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5382, 5391, 5405 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1505": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5131, 5382, 5391, 5386 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:151a": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5403, 5405 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1520": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5221 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1521": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5220 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1523": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5265 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1526": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5327 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1553": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4097 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1557": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5285 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:155b": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5382 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:156a": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5483, 5484 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1805": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 28 ]
+ }
+ },
+ "12d1:1c0b": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 7173, 7175, 7176, 7184 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1c1b": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5382 ],
+ "no_driver": true,
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1c24": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 7186 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1d50": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "12d1:1da1": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 7433 ],
+ "mode": "Huawei",
+ "msg": [ ]
+ }
+ },
+ "12d1:1f01": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5339 ],
+ "no_driver": true,
+ "msg": [ 29 ]
+ }
+ },
+ "12d1:1f03": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5339 ],
+ "no_driver": true,
+ "msg": [ 29 ]
+ }
+ },
+ "12d1:1f11": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5308 ],
+ "msg": [ 26 ]
+ }
+ },
+ "12d1:1f15": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5120, 5367 ],
+ "msg": [ 30 ]
+ }
+ },
+ "12d1:1f16": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5368, 5493 ],
+ "msg": [ 30 ]
+ }
+ },
+ "12d1:1f17": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5494 ],
+ "msg": [ 30 ]
+ }
+ },
+ "12d1:1f18": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5495 ],
+ "msg": [ 30 ]
+ }
+ },
+ "12d1:1f19": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 5370, 5493, 5496 ],
+ "msg": [ 30 ]
+ }
+ },
+ "12d1:380b": {
+ "*": {
+ "t_class": 2,
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "1307:1169": {
+ "*": {
+ "t_vendor": 5041,
+ "t_product": [ 49 ],
+ "mode": "Cisco",
+ "no_driver": true,
+ "msg": [ ]
+ }
+ },
+ "1410:5010": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 16640, 17408, 28720 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1410:5020": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 24576, 28673 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1410:5023": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 28720 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1410:5030": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 24576 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1410:5031": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 24578 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1410:5041": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 28673, 28675 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1410:5059": {
+ "*": {
+ "t_vendor": 5136,
+ "t_product": [ 28721, 28738 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "1410:7001": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 1 ]
+ }
+ },
+ "148e:a000": {
+ "*": {
+ "t_class": 2,
+ "mode": "Sequans",
+ "msg": [ ]
+ }
+ },
+ "148f:2578": {
+ "*": {
+ "t_vendor": 5263,
+ "t_product": [ 36897 ],
+ "no_driver": true,
+ "msg": [ 31 ]
+ }
+ },
+ "15eb:7153": {
+ "*": {
+ "t_vendor": 5611,
+ "t_product": [ 29010 ],
+ "msg": [ 1 ]
+ }
+ },
+ "16d8:6281": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 32 ]
+ }
+ },
+ "16d8:6803": {
+ "*": {
+ "t_class": 2,
+ "msg": [ 33 ]
+ }
+ },
+ "16d8:6804": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 32 ]
+ }
+ },
+ "16d8:700a": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 34 ]
+ }
+ },
+ "16d8:700b": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 34 ]
+ }
+ },
+ "16d8:f000": {
+ "*": {
+ "t_vendor": 5848,
+ "t_product": [ 24582 ],
+ "msg": [ 35 ]
+ }
+ },
+ "1726:f00e": {
+ "*": {
+ "t_vendor": 5926,
+ "t_product": [ 40960 ],
+ "msg": [ 1 ]
+ }
+ },
+ "198a:0003": {
+ "*": {
+ "t_vendor": 6538,
+ "t_product": [ 2 ],
+ "msg": [ 1 ]
+ }
+ },
+ "198f:bccd": {
+ "*": {
+ "t_vendor": 6543,
+ "t_product": [ 544 ],
+ "no_driver": true,
+ "msg": [ 4 ]
+ }
+ },
+ "19d2:0003": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 17, 18 ]
+ }
+ },
+ "19d2:0026": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 148, 338 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:0040": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 34 ],
+ "msg": [ 3 ]
+ }
+ },
+ "19d2:0053": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 49 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:0083": {
+ ":uPr=WCDMA": {
+ "t_vendor": 6610,
+ "t_product": [ 292 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:0101": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 260 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:0103": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 49 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:0110": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 289 ],
+ "msg": [ 36 ],
+ "response": true
+ }
+ },
+ "19d2:0115": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 278 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:0120": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 121 ],
+ "detach_storage": false,
+ "msg": [ 1 ],
+ "response": false,
+ "interface": 0
+ }
+ },
+ "19d2:0146": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 323 ],
+ "msg": [ 18 ],
+ "response": true
+ }
+ },
+ "19d2:0149": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 292 ],
+ "msg": [ 17, 18, 37 ],
+ "response": true
+ }
+ },
+ "19d2:0150": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 292 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:0154": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 23, 279 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:0166": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 359 ],
+ "msg": [ 38 ]
+ }
+ },
+ "19d2:0169": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 368 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:0266": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 613 ],
+ "msg": [ 1 ]
+ }
+ },
+ "19d2:0304": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 841 ],
+ "msg": [ 1 ]
+ }
+ },
+ "19d2:0325": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 806 ],
+ "msg": [ 1 ]
+ }
+ },
+ "19d2:1001": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4099 ],
+ "no_driver": true,
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1007": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4104 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1009": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4112 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1013": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4117 ],
+ "no_driver": true,
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1017": {
+ "*": {
+ "t_vendor": 4817,
+ "t_product": [ 4120 ],
+ "msg": [ 1 ]
+ }
+ },
+ "19d2:1171": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4467 ],
+ "no_driver": true,
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1175": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4471 ],
+ "no_driver": true,
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1179": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4481 ],
+ "no_driver": true,
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1201": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4611 ],
+ "msg": [ 1 ]
+ }
+ },
+ "19d2:1216": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4631 ],
+ "msg": [ 39 ]
+ }
+ },
+ "19d2:1224": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 130 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:1225": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5125 ],
+ "msg": [ 1 ]
+ }
+ },
+ "19d2:1227": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 4690 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1514": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5397 ],
+ "msg": [ 40 ]
+ }
+ },
+ "19d2:1517": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5401 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:1520": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 322 ],
+ "msg": [ 18 ],
+ "response": true
+ }
+ },
+ "19d2:1523": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5413 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1528": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5415 ],
+ "msg": [ 1 ],
+ "response": true
+ }
+ },
+ "19d2:1542": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5444 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "19d2:2000": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 1, 2, 21, 22, 23, 25, 49, 55, 82, 85, 97, 99, 100, 102, 145, 264, 279, 296, 343, 375, 5122, 8194, 8195 ],
+ "msg": [ 17, 18, 37 ],
+ "response": true
+ }
+ },
+ "19d2:2004": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 5122 ],
+ "msg": [ 1 ]
+ }
+ },
+ "19d2:bccd": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 370 ],
+ "no_driver": true,
+ "msg": [ 41 ]
+ }
+ },
+ "19d2:ffde": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 65501 ],
+ "msg": [ 1 ]
+ }
+ },
+ "19d2:ffe6": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 65509 ],
+ "msg": [ 42 ]
+ }
+ },
+ "19d2:fff5": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 65521, 65534, 65535 ],
+ "msg": [ 43 ]
+ }
+ },
+ "19d2:fff6": {
+ "*": {
+ "t_vendor": 6610,
+ "t_product": [ 65521 ],
+ "msg": [ 43 ]
+ }
+ },
+ "1a8d:1000": {
+ "*": {
+ "t_vendor": 6797,
+ "t_product": [ 4098, 4105, 4109, 8198 ],
+ "msg": [ 17, 18 ],
+ "release_delay": 4000,
+ "response": true
+ }
+ },
+ "1a8d:2000": {
+ "*": {
+ "t_vendor": 6797,
+ "t_product": [ 8198 ],
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "1ab7:5700": {
+ "*": {
+ "t_vendor": 6839,
+ "t_product": [ 8192, 22321 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1b7d:0700": {
+ "*": {
+ "t_vendor": 7037,
+ "t_product": [ 1 ],
+ "msg": [ 44 ]
+ }
+ },
+ "1bbb:000f": {
+ "*": {
+ "t_vendor": 7099,
+ "t_product": [ 15 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1bbb:00ca": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 45 ]
+ }
+ },
+ "1bbb:011f": {
+ "*": {
+ "t_vendor": 7099,
+ "t_product": [ 287 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1bbb:f000": {
+ "*": {
+ "t_vendor": 7099,
+ "t_product": [ 0, 23, 183 ],
+ "msg": [ 45 ]
+ }
+ },
+ "1bbb:f017": {
+ "*": {
+ "t_vendor": 7099,
+ "t_product": [ 23, 286 ],
+ "msg": [ 45 ]
+ }
+ },
+ "1bbb:f052": {
+ "*": {
+ "t_vendor": 7099,
+ "t_product": [ 82 ],
+ "msg": [ 45 ]
+ }
+ },
+ "1c9e:1001": {
+ "*": {
+ "t_vendor": 7326,
+ "t_product": [ 24673 ],
+ "msg": [ 46 ]
+ }
+ },
+ "1c9e:6061": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 46 ]
+ }
+ },
+ "1c9e:9200": {
+ "*": {
+ "t_vendor": 7326,
+ "t_product": [ 37378 ],
+ "msg": [ 46 ]
+ }
+ },
+ "1c9e:9800": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 45 ]
+ }
+ },
+ "1c9e:98ff": {
+ "*": {
+ "t_vendor": 7326,
+ "t_product": [ 38913, 26625 ],
+ "msg": [ 47 ]
+ }
+ },
+ "1c9e:9e00": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 46 ]
+ }
+ },
+ "1c9e:9e08": {
+ "*": {
+ "t_vendor": 7326,
+ "t_product": [ 40472 ],
+ "mode": "Sierra",
+ "no_driver": true,
+ "msg": [ ]
+ }
+ },
+ "1c9e:f000": {
+ "*": {
+ "t_vendor": 7326,
+ "t_product": [ 36864, 38403, 38405, 38407 ],
+ "msg": [ 45 ]
+ }
+ },
+ "1da5:f000": {
+ "*": {
+ "t_vendor": 7589,
+ "t_product": [ 17682 ],
+ "mode": "Qisda",
+ "msg": [ ]
+ }
+ },
+ "1dd6:1000": {
+ "*": {
+ "t_vendor": 7638,
+ "t_product": [ 4098 ],
+ "msg": [ 48 ],
+ "response": true
+ }
+ },
+ "1de1:1101": {
+ "*": {
+ "t_vendor": 8679,
+ "t_product": [ 14 ],
+ "msg": [ 49 ]
+ }
+ },
+ "1e0e:f000": {
+ "*": {
+ "t_vendor": 7694,
+ "t_product": [ 37376, 36864 ],
+ "msg": [ 50 ],
+ "response": true
+ }
+ },
+ "1e89:f000": {
+ "*": {
+ "t_vendor": 7817,
+ "t_product": [ 6688 ],
+ "msg": [ 51 ]
+ }
+ },
+ "1edf:6003": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "1ee8:0009": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 11 ],
+ "msg": [ 52 ],
+ "response": true
+ }
+ },
+ "1ee8:0013": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 18, 20 ],
+ "msg": [ 52 ],
+ "response": true
+ }
+ },
+ "1ee8:0040": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 62, 63 ],
+ "msg": [ 52 ],
+ "response": true
+ }
+ },
+ "1ee8:004a": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 73 ],
+ "msg": [ 52 ]
+ }
+ },
+ "1ee8:0054": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 83 ],
+ "msg": [ 52 ],
+ "response": true
+ }
+ },
+ "1ee8:0060": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 95 ],
+ "msg": [ 53 ]
+ }
+ },
+ "1ee8:0063": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 100 ],
+ "msg": [ 54 ]
+ }
+ },
+ "1ee8:0068": {
+ "*": {
+ "t_vendor": 7912,
+ "t_product": [ 105 ],
+ "msg": [ 1 ]
+ }
+ },
+ "1f28:0021": {
+ "*": {
+ "t_vendor": 7976,
+ "t_product": [ 32 ],
+ "msg": [ 55 ]
+ }
+ },
+ "1fac:0032": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "1fac:0130": {
+ "*": {
+ "t_vendor": 8108,
+ "t_product": [ 305 ],
+ "msg": [ 55 ]
+ }
+ },
+ "1fac:0150": {
+ "*": {
+ "t_vendor": 8108,
+ "t_product": [ 337 ],
+ "msg": [ 55 ]
+ }
+ },
+ "1fac:0151": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "2001:a706": {
+ "*": {
+ "t_vendor": 8193,
+ "t_product": [ 32001 ],
+ "msg": [ 1 ]
+ }
+ },
+ "2001:a707": {
+ "*": {
+ "t_vendor": 8193,
+ "t_product": [ 32002 ],
+ "msg": [ 1 ]
+ }
+ },
+ "2001:a708": {
+ "*": {
+ "t_vendor": 8193,
+ "t_product": [ 32003 ],
+ "msg": [ 1 ]
+ }
+ },
+ "2001:a805": {
+ "*": {
+ "t_vendor": 8193,
+ "t_product": [ 32274 ],
+ "msg": [ 56 ]
+ }
+ },
+ "2001:a80b": {
+ "*": {
+ "t_vendor": 8193,
+ "t_product": [ 32000 ],
+ "msg": [ 57 ]
+ }
+ },
+ "201e:1023": {
+ "*": {
+ "t_vendor": 8222,
+ "t_product": [ 4130 ],
+ "msg": [ 58, 59 ],
+ "response": true
+ }
+ },
+ "201e:2009": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 17, 18 ],
+ "response": true
+ }
+ },
+ "2020:0002": {
+ "*": {
+ "t_vendor": 8224,
+ "t_product": [ 8192 ],
+ "msg": [ 60 ]
+ }
+ },
+ "2020:f00e": {
+ "*": {
+ "t_vendor": 8224,
+ "t_product": [ 4101, 4104 ],
+ "msg": [ 1 ],
+ "wait": 2
+ }
+ },
+ "2077:1000": {
+ "*": {
+ "t_vendor": 8311,
+ "t_product": [ 28673 ],
+ "msg": [ 1 ]
+ }
+ },
+ "2077:f000": {
+ "*": {
+ "t_vendor": 8311,
+ "t_product": [ 36864 ],
+ "msg": [ 61 ]
+ }
+ },
+ "21f5:1000": {
+ "*": {
+ "t_vendor": 8693,
+ "t_product": [ 8200 ],
+ "msg": [ 62 ]
+ }
+ },
+ "22de:6801": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 17, 18 ]
+ }
+ },
+ "22de:6803": {
+ "*": {
+ "t_vendor": 8926,
+ "t_product": [ 26625 ],
+ "msg": [ 17, 18 ]
+ }
+ },
+ "22f4:0021": {
+ "*": {
+ "t_class": 255,
+ "msg": [ 63 ]
+ }
+ },
+ "230d:0001": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "230d:0007": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 3
+ }
+ },
+ "230d:0101": {
+ "*": {
+ "t_class": 255,
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "230d:0103": {
+ "*": {
+ "msg": [ ],
+ "config": 2
+ }
+ },
+ "2357:0200": {
+ "*": {
+ "t_vendor": 9047,
+ "t_product": [ 513 ],
+ "msg": [ 1 ]
+ }
+ },
+ "2357:f000": {
+ "*": {
+ "t_vendor": 9047,
+ "t_product": [ 36864 ],
+ "msg": [ 1 ]
+ }
+ },
+ "8888:6500": {
+ "*": {
+ "t_vendor": 5848,
+ "t_product": [ 25907 ],
+ "msg": [ 64 ]
+ }
+ }
+ }
+}
--- /dev/null
+package wireless
+
+config wifi-device 'radio0'
+ option channel '11'
+ option hwmode '11ng'
+ option disabled '0'
+
+config wifi-iface
+ option device 'radio0'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'chemnitz.freifunk.net'
+ option encryption 'none'
+
+config wifi-iface
+ option device 'radio0'
+ option networt 'batmesh'
+ option mode 'adhoc'
+ option ssid 'peer.chemnitz.freifunk.net'
+ option bssid '02:ff:c0:00:00:00'
+ option encryption 'none'
+
+config wifi-device 'radio1'
+ option channel '36'
+ option hwmode '11na'
+ option disabled '0'
+
+config wifi-iface
+ option device 'radio1'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'chemnitz.freifunk.net'
+ option encryption 'none'
+
+config wifi-iface
+ option device 'radio1'
+ option network 'batmesh'
+ option mode 'adhoc'
+ option ssid 'peer.chemnitz.freifunk.net'
+ option bssid '02:ff:c0:00:00:00'
+ option encryption 'none'
--- /dev/null
+config wifi-device radio0
+ option type mac80211
+ option macaddr 'F8:1A:67:4D:6E:D1'
+ option channel 11
+ option hwmode 11ng
+ option path 'platform/ar933x_wmac'
+ option htmode HT20
+ list ht_capab SHORT-GI-20
+ list ht_capab SHORT-GI-40
+ list ht_capab RX-STBC1
+ list ht_capab DSSS_CCK-40
+ # REMOVE THIS LINE TO ENABLE WIFI:
+ option disabled 0
+
+config wifi-iface wifi1
+ option device radio0
+ option network lan
+ option mode 'sta'
+ option ssid 'blub'
+ option encryption 'psk-mixed+tkip+ccmp'
+ option key 'qwertz123456789'
+ option wds '1'
+
+config wifi-iface wifi2
+ option device radio0
+ option network lan
+ option mode 'ap'
+ option ssid 'blub'
+ option encryption 'psk-mixed+tkip+ccmp'
+ option key 'qwertz123456789'
--- /dev/null
+onfig dnsmasq
+ option domainneeded 1
+ option boguspriv 1
+ option filterwin2k 0 # enable for dial on demand
+ option localise_queries 1
+ option rebind_protection 1 # disable if upstream must serve RFC1918 addresses
+ option rebind_localhost 1 # enable for RBL checking and similar services
+ #list rebind_domain example.lan # whitelist RFC1918 responses for domains
+ option local '/lan/'
+ option domain 'lan'
+ option expandhosts 1
+ option nonegcache 0
+ option authoritative 1
+ option readethers 1
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/tmp/resolv.conf.auto'
+ #list server '/mycompany.local/1.2.3.4'
+ #option nonwildcard 1
+ #list interface br-lan
+ #list notinterface lo
+ #list bogusnxdomain '64.94.110.11'
+
+config dhcp lan
+ option interface lan
+ option start 100
+ option limit 150
+ option leasetime 12h
+
+config dhcp wan
+ option interface wan
+ option proto 'dhcp'
+ option ignore 0
--- /dev/null
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config interface 'lan'
+ option ifname 'eth0'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.1'
+ option netmask '255.255.255.0'
+
+config interface 'wan'
+ option ifname wlan0-1
+ option proto 'dhcp'
+
--- /dev/null
+config wifi-device radio0
+ option type mac80211
+ option channel 11
+ option hwmode 11ng
+ option path 'platform/ar933x_wmac'
+ option htmode HT20
+ list ht_capab SHORT-GI-20
+ list ht_capab SHORT-GI-40
+ list ht_capab RX-STBC1
+ list ht_capab DSSS_CCK-40
+ # REMOVE THIS LINE TO ENABLE WIFI:
+ option disabled 0
+
+config wifi-iface wifi1
+ option device radio0
+ option network lan
+ option mode ap
+ option ssid 'test'
+ option encryption 'psk'
+ option key 'testtest'
+
+config wifi-iface wifi2
+ option device radio0
+ option network wan
+ option mode sta
+ option ssid 'WLAN-141942'
+ option encryption 'psk'
+ option key 'SP-4329D4453'
+
--- /dev/null
+ _______ ________ __
+ | |.-----.-----.-----.| | | |.----.| |_
+ | - || _ | -__| || | | || _|| _|
+ |_______|| __|_____|__|__||________||__| |____|
+ |__| W I R E L E S S F R E E D O M
+ -----------------------------------------------------
+ BARRIER BREAKER (Bleeding Edge, r41425)
+ -----------------------------------------------------
+ * 1/2 oz Galliano Pour all ingredients into
+ * 4 oz cold Coffee an irish coffee mug filled
+ * 1 1/2 oz Dark Rum with crushed ice. Stir.
+ * 2 tsp. Creme de Cacao
+ -----------------------------------------------------
--- /dev/null
+
+config dnsmasq
+ option domainneeded '1'
+ option boguspriv '1'
+ option localise_queries '1'
+ option rebind_protection '1'
+ option rebind_localhost '1'
+ option local '/lan/'
+ option domain 'lan'
+ option expandhosts '1'
+ option authoritative '1'
+ option readethers '1'
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/tmp/resolv.conf.auto'
+
+config dhcp 'lan'
+ option interface 'lan'
+ option start '100'
+ option limit '150'
+ option leasetime '12h'
+ option dhcpv6 'server'
+ option ra 'server'
+
+config dhcp 'wan'
+ option interface 'wan'
+ option ignore '1'
+
+config odhcpd 'odhcpd'
+ option maindhcp '0'
+ option leasefile '/tmp/hosts/odhcpd'
+ option leasetrigger '/usr/sbin/odhcpd-update'
+
+config host
+ option name 'router2'
+ option mac 'e8:94:f6:62:76:3f'
+ option ip '192.168.1.2'
+
--- /dev/null
+config dropbear
+ option PasswordAuth 'on'
+ option RootPasswordAuth 'on'
+ option Port '22'
+# option BannerFile '/etc/banner'
--- /dev/null
+config defaults
+ option syn_flood 1
+ option input ACCEPT
+ option output ACCEPT
+ option forward REJECT
+# Uncomment this line to disable ipv6 rules
+# option disable_ipv6 1
+
+config zone
+ option name lan
+ list network 'lan'
+ option input ACCEPT
+ option output ACCEPT
+ option forward ACCEPT
+
+config zone
+ option name wan
+ list network 'wan'
+ list network 'wan6'
+ option input REJECT
+ option output ACCEPT
+ option forward REJECT
+ option masq 1
+ option mtu_fix 1
+
+config forwarding
+ option src lan
+ option dest wan
+
+# We need to accept udp packets on port 68,
+# see https://dev.openwrt.org/ticket/4108
+config rule
+ option name Allow-DHCP-Renew
+ option src wan
+ option proto udp
+ option dest_port 68
+ option target ACCEPT
+ option family ipv4
+
+# Allow IPv4 ping
+config rule
+ option name Allow-Ping
+ option src wan
+ option proto icmp
+ option icmp_type echo-request
+ option family ipv4
+ option target ACCEPT
+
+# Allow DHCPv6 replies
+# see https://dev.openwrt.org/ticket/10381
+config rule
+ option name Allow-DHCPv6
+ option src wan
+ option proto udp
+ option src_ip fe80::/10
+ option src_port 547
+ option dest_ip fe80::/10
+ option dest_port 546
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential incoming IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Input
+ option src wan
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ list icmp_type router-solicitation
+ list icmp_type neighbour-solicitation
+ list icmp_type router-advertisement
+ list icmp_type neighbour-advertisement
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential forwarded IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Forward
+ option src wan
+ option dest *
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# include a file with users custom iptables rules
+config include
+ option path /etc/firewall.user
+
+
+### EXAMPLE CONFIG SECTIONS
+# do not allow a specific ip to access wan
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option dest wan
+# option proto tcp
+# option target REJECT
+
+# block a specific mac on wan
+#config rule
+# option dest wan
+# option src_mac 00:11:22:33:44:66
+# option target REJECT
+
+# block incoming ICMP traffic on a zone
+#config rule
+# option src lan
+# option proto ICMP
+# option target DROP
+
+# port redirect port coming in on wan to lan
+#config redirect
+# option src wan
+# option src_dport 80
+# option dest lan
+# option dest_ip 192.168.16.235
+# option dest_port 80
+# option proto tcp
+
+# port redirect of remapped ssh port (22001) on wan
+#config redirect
+# option src wan
+# option src_dport 22001
+# option dest lan
+# option dest_port 22
+# option proto tcp
+
+# allow IPsec/ESP and ISAKMP passthrough
+#config rule
+# option src wan
+# option dest lan
+# option protocol esp
+# option target ACCEPT
+
+#config rule
+# option src wan
+# option dest lan
+# option src_port 500
+# option dest_port 500
+# option proto udp
+# option target ACCEPT
+
+### FULL CONFIG SECTIONS
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 80
+# option dest wan
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
+# option target REJECT
+
+#config redirect
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 1024
+# option src_dport 80
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
--- /dev/null
+
+config core 'main'
+ option lang 'auto'
+ option mediaurlbase '/luci-static/openwrt.org'
+ option resourcebase '/luci-static/resources'
+
+config extern 'flash_keep'
+ option uci '/etc/config/'
+ option dropbear '/etc/dropbear/'
+ option openvpn '/etc/openvpn/'
+ option passwd '/etc/passwd'
+ option opkg '/etc/opkg.conf'
+ option firewall '/etc/firewall.user'
+ option uploads '/lib/uci/upload/'
+
+config internal 'languages'
+
+config internal 'sauth'
+ option sessionpath '/tmp/luci-sessions'
+ option sessiontime '3600'
+
+config internal 'ccache'
+ option enable '1'
+
+config internal 'themes'
+ option Bootstrap '/luci-static/bootstrap'
+
--- /dev/null
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config globals 'globals'
+ option ula_prefix 'fdc6:cb4f:c705::/48'
+
+config interface 'lan'
+ option ifname 'eth0'
+ option force_link '1'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.1'
+ option netmask '255.255.255.0'
+ option ip6assign '60'
+
+config interface 'wan'
+ option ifname 'eth1'
+ option _orig_ifname 'eth1'
+ option _orig_bridge 'false'
+ option proto 'pppoe'
+ option username '8509-001'
+ option password 'V0aFqWkQ'
+
+config interface 'wan6'
+ option ifname '@wan'
+ option proto 'dhcpv6'
+
+config switch
+ option name 'switch0'
+ option reset '1'
+ option enable_vlan '1'
+
+config switch_vlan
+ option device 'switch0'
+ option vlan '1'
+ option ports '0 1 2 3 4'
+
--- /dev/null
+
+config system
+ option hostname 'OpenWrt'
+ option timezone 'UTC'
+
+config timeserver 'ntp'
+ list server '0.openwrt.pool.ntp.org'
+ list server '1.openwrt.pool.ntp.org'
+ list server '2.openwrt.pool.ntp.org'
+ list server '3.openwrt.pool.ntp.org'
+ option enabled '1'
+ option enable_server '0'
+
+config led 'led_wan'
+ option name 'WAN'
+ option sysfs 'tp-link:green:wan'
+ option trigger 'netdev'
+ option dev 'eth1'
+ option mode 'link tx rx'
+
+config led 'led_lan1'
+ option name 'LAN1'
+ option sysfs 'tp-link:green:lan1'
+ option trigger 'switch0'
+ option port_mask '0x10'
+
+config led 'led_lan2'
+ option name 'LAN2'
+ option sysfs 'tp-link:green:lan2'
+ option trigger 'switch0'
+ option port_mask '0x08'
+
+config led 'led_lan3'
+ option name 'LAN3'
+ option sysfs 'tp-link:green:lan3'
+ option trigger 'switch0'
+ option port_mask '0x04'
+
+config led 'led_lan4'
+ option name 'LAN4'
+ option sysfs 'tp-link:green:lan4'
+ option trigger 'switch0'
+ option port_mask '0x02'
+
+config led 'led_wlan'
+ option name 'WLAN'
+ option sysfs 'tp-link:green:wlan'
+ option trigger 'phy0tpt'
+
--- /dev/null
+config network
+ option init network
+ list affects dhcp
+ list affects radvd
+
+config wireless
+ list affects network
+
+config firewall
+ option init firewall
+ list affects luci-splash
+ list affects qos
+ list affects miniupnpd
+
+config olsr
+ option init olsrd
+
+config dhcp
+ option init dnsmasq
+
+config dropbear
+ option init dropbear
+
+config httpd
+ option init httpd
+
+config fstab
+ option init fstab
+
+config qos
+ option init qos
+
+config system
+ option init led
+ list affects luci_statistics
+
+config luci_splash
+ option init luci_splash
+
+config upnpd
+ option init miniupnpd
+
+config ntpclient
+ option init ntpclient
+
+config samba
+ option init samba
+
+config tinyproxy
+ option init tinyproxy
+
+config 6relayd
+ option init 6relayd
--- /dev/null
+
+config uhttpd 'main'
+ list listen_http '0.0.0.0:80'
+ list listen_http '[::]:80'
+ list listen_https '0.0.0.0:443'
+ list listen_https '[::]:443'
+ option home '/www'
+ option rfc1918_filter '1'
+ option max_requests '3'
+ option max_connections '100'
+ option cert '/etc/uhttpd.crt'
+ option key '/etc/uhttpd.key'
+ option cgi_prefix '/cgi-bin'
+ option script_timeout '60'
+ option network_timeout '30'
+ option http_keepalive '20'
+ option tcp_keepalive '1'
+ option ubus_prefix '/ubus'
+
+config cert 'px5g'
+ option days '730'
+ option bits '1024'
+ option country 'DE'
+ option state 'Berlin'
+ option location 'Berlin'
+ option commonname 'OpenWrt'
+
--- /dev/null
+
+config wifi-device 'radio0'
+ option type 'mac80211'
+ option channel '11'
+ option hwmode '11g'
+ option path 'platform/qca953x_wmac'
+ option htmode 'HT20'
+ option country 'US'
+ option txpower '20'
+
+config wifi-iface
+ option device 'radio0'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'zoller'
+ option wds '1'
+ option encryption 'psk-mixed'
+ option key 'a4b7ffdab4729cabb68'
+
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2009-2013 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/ar71xx.sh
+
+get_status_led() {
+ case $(ar71xx_board_name) in
+ alfa-nx)
+ status_led="alfa:green:led_8"
+ ;;
+ all0305)
+ status_led="eap7660d:green:ds4"
+ ;;
+ ap132)
+ status_led="ap132:green:status"
+ ;;
+ ap136-010|\
+ ap136-020)
+ status_led="ap136:green:status"
+ ;;
+ ap135-020)
+ status_led="ap135:green:status"
+ ;;
+ ap81)
+ status_led="ap81:green:status"
+ ;;
+ ap83)
+ status_led="ap83:green:power"
+ ;;
+ ap96)
+ status_led="ap96:green:led2"
+ ;;
+ aw-nr580)
+ status_led="aw-nr580:green:ready"
+ ;;
+ bullet-m | rocket-m | nano-m | nanostation-m)
+ status_led="ubnt:green:link4"
+ ;;
+ bxu2000n-2-a1)
+ status_led="bhu:green:status"
+ ;;
+ cap4200ag)
+ status_led="senao:green:pwr"
+ ;;
+ db120)
+ status_led="db120:green:status"
+ ;;
+ dir-505-a1 |\
+ dir-600-a1 |\
+ dir-615-e1 |\
+ dir-615-e4)
+ status_led="d-link:green:power"
+ ;;
+ dir-615-c1)
+ status_led="d-link:green:status"
+ ;;
+ dir-825-b1)
+ status_led="d-link:orange:power"
+ ;;
+ dir-825-c1 |\
+ dir-835-a1)
+ status_led="d-link:amber:power"
+ ;;
+ eap7660d)
+ status_led="eap7660d:green:ds4"
+ ;;
+ el-mini | \
+ el-m150)
+ status_led="EasyLink:green:system"
+ ;;
+ hiwifi-hc6361)
+ status_led="hiwifi:blue:system"
+ ;;
+ hornet-ub)
+ status_led="alfa:blue:wps"
+ ;;
+ ja76pf | \
+ ja76pf2)
+ status_led="jjplus:green:led1"
+ ;;
+ ls-sr71)
+ status_led="ubnt:green:d22"
+ ;;
+ mr600)
+ status_led="mr600:orange:power"
+ ;;
+ mr600v2)
+ status_led="mr600:blue:power"
+ ;;
+ mynet-n600 | \
+ mynet-n750)
+ status_led="wd:blue:power"
+ ;;
+ mynet-rext)
+ status_led="wd:blue:power"
+ ;;
+ mzk-w04nu | \
+ mzk-w300nh)
+ status_led="planex:green:status"
+ ;;
+ nbg460n_550n_550nh)
+ status_led="nbg460n:green:power"
+ ;;
+ nbg6716)
+ status_led="nbg6716:white:power"
+ ;;
+ om2p | \
+ om2pv2 | \
+ om2p-hs | \
+ om2p-hsv2 | \
+ om2p-lc)
+ status_led="om2p:blue:power"
+ ;;
+ pb44)
+ status_led="pb44:amber:jump1"
+ ;;
+ rb-2011l|\
+ rb-2011uas|\
+ rb-2011uas-2hnd)
+ status_led="rb:green:usr"
+ ;;
+ rb-411 | rb-411u | rb-433 | rb-433u | rb-450 | rb-450g | rb-493)
+ status_led="rb4xx:yellow:user"
+ ;;
+ rb-750)
+ status_led="rb750:green:act"
+ ;;
+ rb-911g-2hpnd|\
+ rb-911g-5hpnd|\
+ rb-912uag-2hpnd|\
+ rb-912uag-5hpnd)
+ status_led="rb:green:user"
+ ;;
+ rb-951ui-2hnd)
+ status_led="rb:green:act"
+ ;;
+ routerstation | routerstation-pro)
+ status_led="ubnt:green:rf"
+ ;;
+ rw2458n)
+ status_led="rw2458n:green:d3"
+ ;;
+ oolite)
+ status_led="oolite:red:system"
+ ;;
+ tew-632brp)
+ status_led="tew-632brp:green:status"
+ ;;
+ tew-673gru)
+ status_led="trendnet:blue:wps"
+ ;;
+ tew-712br|\
+ tew-732br)
+ status_led="trendnet:green:power"
+ ;;
+ tl-mr3020)
+ status_led="tp-link:green:wps"
+ ;;
+ tl-wa750re)
+ status_led="tp-link:orange:re"
+ ;;
+ tl-wa850re)
+ status_led="tp-link:blue:re"
+ ;;
+ tl-mr3220 | \
+ tl-mr3220-v2 | \
+ tl-mr3420 | \
+ tl-mr3420-v2 | \
+ tl-wa801nd-v2 | \
+ tl-wa901nd | \
+ tl-wa901nd-v2 | \
+ tl-wa901nd-v3 | \
+ tl-wdr3500 | \
+ tl-wr1041n-v2 | \
+ tl-wr1043nd | \
+ tl-wr1043nd-v2 | \
+ tl-wr741nd | \
+ tl-wr741nd-v4 | \
+ tl-wr841n-v1 | \
+ tl-wr841n-v7 | \
+ tl-wr841n-v8 | \
+ tl-wr842n-v2 | \
+ tl-wr941nd)
+ status_led="tp-link:green:system"
+ ;;
+ archer-c7 | \
+ tl-wdr4900-v2 | \
+ tl-mr10u | \
+ tl-mr13u | \
+ tl-wdr4300 | \
+ tl-wr703n | \
+ tl-wr710n | \
+ tl-wr720n-v3)
+ status_led="tp-link:blue:system"
+ ;;
+ tl-wr841n-v9)
+ status_led="tp-link:green:qss"
+ ;;
+ tl-wr2543n)
+ status_led="tp-link:green:wps"
+ ;;
+ unifi)
+ status_led="ubnt:green:dome"
+ ;;
+ uap-pro)
+ status_led="ubnt:white:dome"
+ ;;
+ whr-g301n | \
+ whr-hp-g300n | \
+ whr-hp-gn | \
+ wzr-hp-g300nh)
+ status_led="buffalo:green:router"
+ ;;
+ wlae-ag300n)
+ status_led="buffalo:green:status"
+ ;;
+ wzr-hp-ag300h | \
+ wzr-hp-g300nh2)
+ status_led="buffalo:red:diag"
+ ;;
+ wndap360 | \
+ wndr3700 | \
+ wndr4300 | \
+ wnr2000 | \
+ wnr2200 |\
+ wnr612-v2)
+ status_led="netgear:green:power"
+ ;;
+ wp543)
+ status_led="wp543:green:diag"
+ ;;
+ wrt400n)
+ status_led="wrt400n:blue:wps"
+ ;;
+ wrt160nl)
+ status_led="wrt160nl:blue:wps"
+ ;;
+ zcn-1523h-2 | zcn-1523h-5)
+ status_led="zcn-1523h:amber:init"
+ ;;
+ wlr8100)
+ status_led="sitecom:amber:status"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}
--- /dev/null
+# Change the following lines if you want dnsmasq to serve SRV
+# records.
+# You may add multiple srv-host lines.
+# The fields are <name>,<target>,<port>,<priority>,<weight>
+
+# A SRV record sending LDAP for the example.com domain to
+# ldapserver.example.com port 289
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
+
+# Two SRV records for LDAP, each with different priorities
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
+
+# A SRV record indicating that there is no LDAP server for the domain
+# example.com
+#srv-host=_ldap._tcp.example.com
+
+# The following line shows how to make dnsmasq serve an arbitrary PTR
+# record. This is useful for DNS-SD.
+# The fields are <name>,<target>
+#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"
+
+# Change the following lines to enable dnsmasq to serve TXT records.
+# These are used for things like SPF and zeroconf.
+# The fields are <name>,<text>,<text>...
+
+#Example SPF.
+#txt-record=example.com,"v=spf1 a -all"
+
+#Example zeroconf
+#txt-record=_http._tcp.example.com,name=value,paper=A4
+
+# Provide an alias for a "local" DNS name. Note that this _only_ works
+# for targets which are names from DHCP or /etc/hosts. Give host
+# "bert" another name, bertrand
+# The fields are <cname>,<target>
+#cname=bertand,bert
--- /dev/null
+# This file is interpreted as shell script.
+# Put your custom iptables rules here, they will
+# be executed with each firewall (re-)start.
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
--- /dev/null
+root:x:0:
+daemon:x:1:
+adm:x:4:
+mail:x:8:
+audio:x:29:
+www-data:x:33:
+ftp:x:55:
+users:x:100:
+network:x:101:
+nogroup:x:65534:
--- /dev/null
+127.0.0.1 localhost
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ }, ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/failsafe" ]
+ ],
+]
--- /dev/null
+#!/bin/sh
+
+ath9k_eeprom_die() {
+ echo "ath9k eeprom: " "$*"
+ exit 1
+}
+
+ath9k_eeprom_extract() {
+ local part=$1
+ local offset=$2
+ local count=$3
+ local mtd
+
+ mtd=$(find_mtd_chardev $part)
+ [ -n "$mtd" ] || \
+ ath9k_eeprom_die "no mtd device found for partition $part"
+
+ dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
+ ath9k_eeprom_die "failed to extract from $mtd"
+}
+
+ath9k_patch_firmware_mac() {
+ local mac=$1
+
+ [ -z "$mac" ] && return
+
+ macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
+}
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+. /lib/ar71xx.sh
+. /lib/functions.sh
+. /lib/functions/system.sh
+
+board=$(ar71xx_board_name)
+
+case "$FIRMWARE" in
+"soc_wmac.eeprom")
+ case $board in
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 4096 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 0)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+
+"pci_wmac0.eeprom")
+ case $board in
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 20480 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 12)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+esac
--- /dev/null
+[ ifup = "$ACTION" ] && {
+ uci_toggle_state network "$INTERFACE" up 1
+ [ -n "$DEVICE" ] && {
+ uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)"
+ uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
+ }
+}
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
+[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0
+
+/etc/init.d/firewall enabled || exit 0
+
+fw3 -q network "$INTERFACE" >/dev/null || exit 0
+
+logger -t firewall "Reloading firewall due to $ACTION of $INTERFACE ($DEVICE)"
+fw3 -q reload
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup ] || exit 0
+
+/etc/init.d/dnsmasq enabled && /etc/init.d/dnsmasq start
--- /dev/null
+#!/bin/sh
+
+if [ -f /etc/sysctl.conf ] && [ "$ACTION" = add ]; then
+ sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" /etc/sysctl.conf | \
+ sysctl -e -p - | logger -t sysctl
+fi
--- /dev/null
+#!/bin/sh
+
+# For AR9220 and AR9223, GPIO JTAG must explicit be disabled
+# before LEDs start working. Do this when wifi device is
+# detected.
+
+#
+# $DEVPATH is not valid for some boards (including WZR-HP-AG300H).
+# Manipulate the $DEVPATH to reach the corresponding phyN.
+#
+
+devdir=`dirname $DEVPATH`
+devdir=`dirname $devdir`
+phydir=/sys$devdir/ieee80211
+phyname=`cat $phydir/phy*/name`
+
+if [ -z $phyname -o $ACTION != "add" ]; then exit 0; fi
+
+#
+# ar922x_disable_gpio_jtag():
+#
+# Emulate
+# REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
+# for AR9220 and AR9223.
+#
+
+ar922x_disable_gpio_jtag()
+{
+ local regidx=0x4054
+
+ [ -f /sys/kernel/debug/ieee80211/$1/ath9k/regidx ] && {
+ echo $regidx > /sys/kernel/debug/ieee80211/$1/ath9k/regidx
+ regval=`cat /sys/kernel/debug/ieee80211/$1/ath9k/regval`
+ regval=$((regval | 0x20000))
+ echo regval $regval
+ echo $regval > /sys/kernel/debug/ieee80211/$1/ath9k/regval
+ }
+}
+
+if [ $phyname -a $ACTION = "add" ]; then
+
+ . /lib/ar71xx.sh
+
+ case $(ar71xx_board_name) in
+ wzr-hp-ag300h)
+ ar922x_disable_gpio_jtag $phyname
+ ;;
+ esac;
+fi
+
+exit 0
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "and",
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME",
+ [ "null", "full", "ptmx", "zero" ],
+ ],
+ [ "regex", "DEVNAME",
+ [ "^gpio", "^hvc" ],
+ ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0666" ],
+ [ "return" ],
+ ]
+ ],
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME", "mapper/control" ],
+ [ "regex", "DEVPATH", "^ppp" ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0600" ],
+ [ "return" ],
+ ],
+ ],
+ [ "if",
+ [ "has", "DEVNAME" ],
+ [ "makedev", "/dev/%DEVNAME%", "0644" ],
+ ],
+ ],
+ ],
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ "remove" : [
+ [ "if",
+ [ "and",
+ [ "has", "DEVNAME" ],
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [ "rm", "/dev/%DEVNAME%" ]
+ ]
+ ]
+ } ],
+ [ "if",
+ [ "eq", "SUBSYSTEM", "platform" ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "has", "BUTTON" ],
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/%BUTTON%" ]
+ ],
+ [ "if",
+ [ "eq", "SUBSYSTEM",
+ [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]
+ ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "usb-serial" ],
+ [ "regex", "DEVNAME",
+ [ "^ttyUSB", "^ttyACM" ]
+ ],
+ ],
+ [ "exec", "/sbin/hotplug-call", "tty" ]
+ ],
+]
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+HOSTFILE="/tmp/hosts/dhcp"
+TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ config_get_bool dnssec "$cfg" dnssec 0
+ [ "$dnssec" -gt 0 ] && {
+ xappend "--conf-file=$TRUSTANCHORSFILE"
+ xappend "--dnssec"
+ append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+
+ config_get_bool dns "$cfg" dns 0
+ [ "$dns" = "1" ] && {
+ echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE
+ }
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+ echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && mount_root done
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+USE_PROCD=1
+QUIET=""
+
+validate_firewall_redirect()
+{
+ uci_validate_section firewall redirect "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
+ 'dest:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
+ 'target:or("SNAT", "DNAT")'
+
+ return $?
+}
+
+validate_firewall_rule()
+{
+ uci_validate_section firewall rule "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'dest:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
+ 'target:string'
+
+ return $?
+}
+
+service_triggers() {
+ procd_add_reload_trigger firewall
+
+ procd_open_validate
+ validate_firewall_redirect
+ validate_firewall_rule
+ procd_close_validate
+}
+
+restart() {
+ fw3 restart
+}
+
+start_service() {
+ fw3 ${QUIET} start
+}
+
+stop_service() {
+ fw3 flush
+}
+
+reload_service() {
+ fw3 reload
+}
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ QUIET=1
+ start
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && date -s @$maxtime
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
+ return $?
+}
+
+start_service() {
+ local server enabled enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ $enabled = 0 ] && return
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in $server; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+
+START=10
+USE_PROCD=1
+
+validate_system_section()
+{
+ uci_validate_section system system "${1}" \
+ 'hostname:string:OpenWrt' \
+ 'conloglevel:uinteger' \
+ 'buffersize:uinteger' \
+ 'timezone:string:UTC' \
+ 'zonename:string'
+
+ return $?
+}
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ validate_system_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ echo "$hostname" > /proc/sys/kernel/hostname
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+ echo "$timezone" > /tmp/TZ
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+reload_service() {
+ config_load system
+ config_foreach system_config system
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_system_section
+}
+
+start_service() {
+ reload_service
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 Jo-Philipp Wich
+
+START=50
+
+USE_PROCD=1
+
+UHTTPD_BIN="/usr/sbin/uhttpd"
+PX5G_BIN="/usr/sbin/px5g"
+
+append_arg() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get val "$cfg" "$var"
+ [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
+}
+
+append_bool() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+generate_keys() {
+ local cfg="$1"
+ local key="$2"
+ local crt="$3"
+ local days bits country state location commonname
+
+ config_get days "$cfg" days
+ config_get bits "$cfg" bits
+ config_get country "$cfg" country
+ config_get state "$cfg" state
+ config_get location "$cfg" location
+ config_get commonname "$cfg" commonname
+
+ [ -x "$PX5G_BIN" ] && {
+ $PX5G_BIN selfsigned -der \
+ -days ${days:-730} -newkey rsa:${bits:-1024} -keyout "$UHTTPD_KEY" -out "$UHTTPD_CERT" \
+ -subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/CN="${commonname:-OpenWrt}"
+ }
+}
+
+start_instance()
+{
+ UHTTPD_CERT=""
+ UHTTPD_KEY=""
+
+ local cfg="$1"
+ local realm="$(uci_get system.@system[0].hostname)"
+ local listen http https interpreter indexes path handler
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command "$UHTTPD_BIN" -f
+
+ append_arg "$cfg" home "-h"
+ append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
+ append_arg "$cfg" config "-c"
+ append_arg "$cfg" cgi_prefix "-x"
+ [ -f /usr/lib/uhttpd_lua.so ] && {
+ config_get handler "$cfg" lua_handler
+ [ -f "$handler" ] && append_arg "$cfg" lua_prefix "-l" && {
+ procd_append_param command "-L" "$handler"
+ }
+ }
+ [ -f /usr/lib/uhttpd_ubus.so ] && {
+ append_arg "$cfg" ubus_prefix "-u"
+ append_arg "$cfg" ubus_socket "-U"
+ }
+ append_arg "$cfg" script_timeout "-t"
+ append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" http_keepalive "-k"
+ append_arg "$cfg" tcp_keepalive "-A"
+ append_arg "$cfg" error_page "-E"
+ append_arg "$cfg" max_requests "-n" 3
+ append_arg "$cfg" max_connections "-N"
+
+ append_bool "$cfg" no_ubusauth "-a" 0
+ append_bool "$cfg" no_symlinks "-S" 0
+ append_bool "$cfg" no_dirlists "-D" 0
+ append_bool "$cfg" rfc1918_filter "-R" 0
+
+ config_get http "$cfg" listen_http
+ for listen in $http; do
+ procd_append_param command -p "$listen"
+ done
+
+ config_get interpreter "$cfg" interpreter
+ for path in $interpreter; do
+ procd_append_param command -i "$path"
+ done
+
+ config_get indexes "$cfg" index_page
+ for path in $indexes; do
+ procd_append_param command -I "$path"
+ done
+
+ config_get https "$cfg" listen_https
+ config_get UHTTPD_KEY "$cfg" key /etc/uhttpd.key
+ config_get UHTTPD_CERT "$cfg" cert /etc/uhttpd.crt
+
+ [ -n "$https" ] && {
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] || {
+ config_foreach generate_keys cert
+ }
+
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] && {
+ append_arg "$cfg" cert "-C"
+ append_arg "$cfg" key "-K"
+
+ for listen in $https; do
+ procd_append_param command -s "$listen"
+ done
+ }
+ }
+
+ procd_close_instance
+
+ # Check if daemon is running, if not then
+ # re-execute in foreground to display error.
+# sleep 1 && service_check $UHTTPD_BIN || \
+# $UHTTPD_BIN -f $UHTTPD_ARGS
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "uhttpd"
+}
+
+start_service() {
+ config_load uhttpd
+ config_foreach start_instance uhttpd
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+::askconsole:/bin/ash --login
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+nf_defrag_ipv6
+nf_conntrack_ipv6
+ip6_tables
+ip6table_filter
+ip6table_mangle
+ip6table_raw
+ip6t_REJECT
--- /dev/null
+nf_conntrack
+nf_defrag_ipv4
+nf_conntrack_ipv4
+xt_state
+iptable_raw
+xt_CT
+xt_conntrack
--- /dev/null
+x_tables
+xt_tcpudp
+ip_tables
+iptable_filter
+iptable_mangle
+xt_limit
+xt_mac
+xt_multiport
+xt_comment
+xt_LOG
+xt_TCPMSS
+ipt_REJECT
+xt_time
+xt_mark
--- /dev/null
+nf_nat
+xt_nat
+nf_nat_ipv4
+iptable_nat
+ipt_MASQUERADE
+xt_REDIRECT
--- /dev/null
+nf_conntrack_ftp
+nf_conntrack_irc
+nf_nat_ftp
+nf_nat_irc
--- /dev/null
+DISTRIB_ID="OpenWrt"
+DISTRIB_RELEASE="Bleeding Edge"
+DISTRIB_REVISION="r41425"
+DISTRIB_CODENAME="barrier_breaker"
+DISTRIB_TARGET="ar71xx/generic"
+DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r41425"
+DISTRIB_TAINTS="no-all"
--- /dev/null
+src/gz barrier_breaker http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
+dest root /
+dest ram /tmp
+lists_dir ext /var/opkg-lists
+option overlay_root /overlay
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+#USERNAME PROVIDER PASSWORD IPADDRESS
--- /dev/null
+#
+# Expression: outbound and not icmp[0] != 8 and not tcp[13] & 4 != 0
+#
+19
+48 0 0 0
+21 0 16 1
+40 0 0 2
+21 0 13 33
+48 0 0 13
+21 0 5 1
+40 0 0 10
+69 9 0 8191
+177 0 0 4
+80 0 0 4
+21 6 7 8
+21 0 5 6
+40 0 0 10
+69 3 0 8191
+177 0 0 4
+80 0 0 17
+69 1 0 4
+6 0 0 4
+6 0 0 0
--- /dev/null
+#debug
+logfile /dev/null
+noipdefault
+noaccomp
+nopcomp
+nocrtscts
+lock
+maxfail 0
+lcp-echo-failure 5
+lcp-echo-interval 1
--- /dev/null
+nameserver 46.243.104.6
+nameserver 83.218.160.2
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2010 Vertical Communications
+
+[ -z "$PREINIT" ] && exec /sbin/init
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+pi_ifname=
+pi_ip=192.168.1.1
+pi_broadcast=192.168.1.255
+pi_netmask=255.255.255.0
+
+fs_failsafe_ifname=
+fs_failsafe_ip=192.168.1.1
+fs_failsafe_broadcast=192.168.1.255
+fs_failsafe_netmask=255.255.255.0
+
+fs_failsafe_wait_timeout=2
+
+pi_suppress_stderr="y"
+pi_init_suppress_stderr="y"
+pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
+pi_init_cmd="/sbin/init"
+
+. /lib/functions.sh
+. /lib/functions/preinit.sh
+. /lib/functions/system.sh
+
+boot_hook_init preinit_essential
+boot_hook_init preinit_main
+boot_hook_init failsafe
+boot_hook_init initramfs
+boot_hook_init preinit_mount_root
+
+for pi_source_file in /lib/preinit/*; do
+ . $pi_source_file
+done
+
+boot_run_hook preinit_essential
+
+pi_mount_skip_next=false
+pi_jffs2_mount_success=false
+pi_failsafe_net_message=false
+
+boot_run_hook preinit_main
--- /dev/null
+#!/bin/sh
+[ -f /etc/banner ] && cat /etc/banner
+
+export PATH=/usr/bin:/usr/sbin:/bin:/sbin
+export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
+export HOME=${HOME:-/root}
+export PS1='\u@\h:\w\$ '
+
+[ -x /bin/more ] || alias more=less
+[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
+
+[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
+
+[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
+[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
--- /dev/null
+# Internet (IP) protocols
+#
+# Updated from http://www.iana.org/assignments/protocol-numbers and other
+# sources.
+# New protocols will be added on request if they have been officially
+# assigned by IANA and are not historical.
+# If you need a huge list of used numbers please install the nmap package.
+
+ip 0 IP # internet protocol, pseudo protocol number
+#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+ggp 3 GGP # gateway-gateway protocol
+ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
+st 5 ST # ST datagram mode
+tcp 6 TCP # transmission control protocol
+egp 8 EGP # exterior gateway protocol
+igp 9 IGP # any private interior gateway (Cisco)
+pup 12 PUP # PARC universal packet protocol
+udp 17 UDP # user datagram protocol
+hmp 20 HMP # host monitoring protocol
+xns-idp 22 XNS-IDP # Xerox NS IDP
+rdp 27 RDP # "reliable datagram" protocol
+iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
+xtp 36 XTP # Xpress Transfer Protocol
+ddp 37 DDP # Datagram Delivery Protocol
+idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
+ipv6 41 IPv6 # Internet Protocol, version 6
+ipv6-route 43 IPv6-Route # Routing Header for IPv6
+ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
+idrp 45 IDRP # Inter-Domain Routing Protocol
+rsvp 46 RSVP # Reservation Protocol
+gre 47 GRE # General Routing Encapsulation
+esp 50 IPSEC-ESP # Encap Security Payload [RFC2046]
+ah 51 IPSEC-AH # Authentication Header [RFC2402]
+skip 57 SKIP # SKIP
+ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
+ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
+ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
+rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
+vmtp 81 VMTP # Versatile Message Transport
+eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
+ospf 89 OSPFIGP # Open Shortest Path First IGP
+ax.25 93 AX.25 # AX.25 frames
+ipip 94 IPIP # IP-within-IP Encapsulation Protocol
+etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
+encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
+# 99 # any private encryption scheme
+pim 103 PIM # Protocol Independent Multicast
+ipcomp 108 IPCOMP # IP Payload Compression Protocol
+vrrp 112 VRRP # Virtual Router Redundancy Protocol
+l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
+isis 124 ISIS # IS-IS over IPv4
+sctp 132 SCTP # Stream Control Transmission Protocol
+fc 133 FC # Fibre Channel
+
--- /dev/null
+#!/bin/sh
+
+[ "${TYPE}" = "switch" ] || echo ${BUTTON} > /tmp/failsafe_button
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" ] || exit 0
+
+exec /sbin/poweroff
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" ] || exit 0
+
+. /lib/functions.sh
+
+logger "$BUTTON pressed for $SEEN seconds"
+
+if [ "$SEEN" -lt 1 ]
+then
+ echo "REBOOT" > /dev/console
+ sync
+ reboot
+elif [ "$SEEN" -gt 5 ]
+then
+ echo "FACTORY RESET" > /dev/console
+ jffs2reset -y && reboot &
+fi
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" -o -n "${TYPE}" ] || exit 0
+
+. /lib/functions.sh
+
+local rfkill_state=0
+
+wifi_rfkill_set() {
+ uci set wireless.$1.disabled=$rfkill_state
+}
+
+wifi_rfkill_check() {
+ local disabled
+ config_get disabled $1 disabled
+ [ "$disabled" = "1" ] || rfkill_state=1
+}
+
+config_load wireless
+case "${TYPE}" in
+"switch")
+ [ "${ACTION}" = "released" ] && rfkill_state=1
+ ;;
+*)
+ config_foreach wifi_rfkill_check wifi-device
+ ;;
+esac
+config_foreach wifi_rfkill_set wifi-device
+uci commit wireless
+wifi up
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006-2012 OpenWrt.org
+
+. $IPKG_INSTROOT/lib/functions.sh
+. $IPKG_INSTROOT/lib/functions/service.sh
+
+initscript=$1
+action=${2:-help}
+shift 2
+
+start() {
+ return 0
+}
+
+stop() {
+ return 0
+}
+
+reload() {
+ return 1
+}
+
+restart() {
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+boot() {
+ start "$@"
+}
+
+shutdown() {
+ stop
+}
+
+disable() {
+ name="$(basename "${initscript}")"
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/K??$name
+}
+
+enable() {
+ name="$(basename "${initscript}")"
+ disable
+ [ -n "$START" -o -n "$STOP" ] || {
+ echo "/etc/init.d/$name does not have a START or STOP value"
+ return 1
+ }
+ [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
+ [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
+}
+
+enabled() {
+ name="$(basename "${initscript}")"
+ [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ]
+}
+
+depends() {
+ return 0
+}
+
+help() {
+ cat <<EOF
+Syntax: $initscript [command]
+
+Available commands:
+ start Start the service
+ stop Stop the service
+ restart Restart the service
+ reload Reload configuration files (or restart if that fails)
+ enable Enable service autostart
+ disable Disable service autostart
+$EXTRA_HELP
+EOF
+}
+
+# for procd
+start_service() {
+ return 0
+}
+
+stop_service() {
+ return 0
+}
+
+service_triggers() {
+ return 0
+}
+
+service_running() {
+ return 0
+}
+
+${INIT_TRACE:+set -x}
+
+. "$initscript"
+
+[ -n "$USE_PROCD" ] && {
+ EXTRA_COMMANDS="${EXTRA_COMMANDS} running"
+
+ . $IPKG_INSTROOT/lib/functions/procd.sh
+ basescript=$(readlink "$initscript")
+ rc_procd() {
+ procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
+ "$@"
+ procd_close_service
+ }
+
+ start() {
+ rc_procd start_service "$@"
+ if eval "type service_started" 2>/dev/null >/dev/null; then
+ service_started
+ fi
+ }
+
+ stop() {
+ stop_service "$@"
+ procd_kill "$(basename ${basescript:-$initscript})" "$1"
+ }
+
+ reload() {
+ if eval "type reload_service" 2>/dev/null >/dev/null; then
+ reload_service "$@"
+ else
+ restart
+ fi
+ }
+
+ running() {
+ service_running "$@"
+ }
+}
+
+ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
+list_contains ALL_COMMANDS "$action" || action=help
+[ "$action" = "reload" ] && action='eval reload "$@" || restart "$@" && :'
+$action "$@"
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && date -s @$maxtime
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+
+START=10
+USE_PROCD=1
+
+validate_system_section()
+{
+ uci_validate_section system system "${1}" \
+ 'hostname:string:OpenWrt' \
+ 'conloglevel:uinteger' \
+ 'buffersize:uinteger' \
+ 'timezone:string:UTC' \
+ 'zonename:string'
+
+ return $?
+}
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ validate_system_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ echo "$hostname" > /proc/sys/kernel/hostname
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+ echo "$timezone" > /tmp/TZ
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+reload_service() {
+ config_load system
+ config_foreach system_config system
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_system_section
+}
+
+start_service() {
+ reload_service
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+USE_PROCD=1
+QUIET=""
+
+validate_firewall_redirect()
+{
+ uci_validate_section firewall redirect "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
+ 'dest:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
+ 'target:or("SNAT", "DNAT")'
+
+ return $?
+}
+
+validate_firewall_rule()
+{
+ uci_validate_section firewall rule "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'dest:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
+ 'target:string'
+
+ return $?
+}
+
+service_triggers() {
+ procd_add_reload_trigger firewall
+
+ procd_open_validate
+ validate_firewall_redirect
+ validate_firewall_rule
+ procd_close_validate
+}
+
+restart() {
+ fw3 restart
+}
+
+start_service() {
+ fw3 ${QUIET} start
+}
+
+stop_service() {
+ fw3 flush
+}
+
+reload_service() {
+ fw3 reload
+}
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ QUIET=1
+ start
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 Jo-Philipp Wich
+
+START=50
+
+USE_PROCD=1
+
+UHTTPD_BIN="/usr/sbin/uhttpd"
+PX5G_BIN="/usr/sbin/px5g"
+
+append_arg() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get val "$cfg" "$var"
+ [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
+}
+
+append_bool() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+generate_keys() {
+ local cfg="$1"
+ local key="$2"
+ local crt="$3"
+ local days bits country state location commonname
+
+ config_get days "$cfg" days
+ config_get bits "$cfg" bits
+ config_get country "$cfg" country
+ config_get state "$cfg" state
+ config_get location "$cfg" location
+ config_get commonname "$cfg" commonname
+
+ [ -x "$PX5G_BIN" ] && {
+ $PX5G_BIN selfsigned -der \
+ -days ${days:-730} -newkey rsa:${bits:-1024} -keyout "$UHTTPD_KEY" -out "$UHTTPD_CERT" \
+ -subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/CN="${commonname:-OpenWrt}"
+ }
+}
+
+start_instance()
+{
+ UHTTPD_CERT=""
+ UHTTPD_KEY=""
+
+ local cfg="$1"
+ local realm="$(uci_get system.@system[0].hostname)"
+ local listen http https interpreter indexes path handler
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command "$UHTTPD_BIN" -f
+
+ append_arg "$cfg" home "-h"
+ append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
+ append_arg "$cfg" config "-c"
+ append_arg "$cfg" cgi_prefix "-x"
+ [ -f /usr/lib/uhttpd_lua.so ] && {
+ config_get handler "$cfg" lua_handler
+ [ -f "$handler" ] && append_arg "$cfg" lua_prefix "-l" && {
+ procd_append_param command "-L" "$handler"
+ }
+ }
+ [ -f /usr/lib/uhttpd_ubus.so ] && {
+ append_arg "$cfg" ubus_prefix "-u"
+ append_arg "$cfg" ubus_socket "-U"
+ }
+ append_arg "$cfg" script_timeout "-t"
+ append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" http_keepalive "-k"
+ append_arg "$cfg" tcp_keepalive "-A"
+ append_arg "$cfg" error_page "-E"
+ append_arg "$cfg" max_requests "-n" 3
+ append_arg "$cfg" max_connections "-N"
+
+ append_bool "$cfg" no_ubusauth "-a" 0
+ append_bool "$cfg" no_symlinks "-S" 0
+ append_bool "$cfg" no_dirlists "-D" 0
+ append_bool "$cfg" rfc1918_filter "-R" 0
+
+ config_get http "$cfg" listen_http
+ for listen in $http; do
+ procd_append_param command -p "$listen"
+ done
+
+ config_get interpreter "$cfg" interpreter
+ for path in $interpreter; do
+ procd_append_param command -i "$path"
+ done
+
+ config_get indexes "$cfg" index_page
+ for path in $indexes; do
+ procd_append_param command -I "$path"
+ done
+
+ config_get https "$cfg" listen_https
+ config_get UHTTPD_KEY "$cfg" key /etc/uhttpd.key
+ config_get UHTTPD_CERT "$cfg" cert /etc/uhttpd.crt
+
+ [ -n "$https" ] && {
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] || {
+ config_foreach generate_keys cert
+ }
+
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] && {
+ append_arg "$cfg" cert "-C"
+ append_arg "$cfg" key "-K"
+
+ for listen in $https; do
+ procd_append_param command -s "$listen"
+ done
+ }
+ }
+
+ procd_close_instance
+
+ # Check if daemon is running, if not then
+ # re-execute in foreground to display error.
+# sleep 1 && service_check $UHTTPD_BIN || \
+# $UHTTPD_BIN -f $UHTTPD_ARGS
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "uhttpd"
+}
+
+start_service() {
+ config_load uhttpd
+ config_foreach start_instance uhttpd
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+HOSTFILE="/tmp/hosts/dhcp"
+TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ config_get_bool dnssec "$cfg" dnssec 0
+ [ "$dnssec" -gt 0 ] && {
+ xappend "--conf-file=$TRUSTANCHORSFILE"
+ xappend "--dnssec"
+ append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+
+ config_get_bool dns "$cfg" dns 0
+ [ "$dns" = "1" ] && {
+ echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE
+ }
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+ echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && mount_root done
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
+ return $?
+}
+
+start_service() {
+ local server enabled enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ $enabled = 0 ] && return
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in $server; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+exit 0
--- /dev/null
+search lan
+nameserver 127.0.0.1
--- /dev/null
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+daytime 13/tcp
+daytime 13/udp
+netstat 15/tcp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp 21/tcp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+smtp 25/tcp
+time 37/tcp
+time 37/udp
+whois 43/tcp
+domain 53/tcp
+domain 53/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/udp
+finger 79/tcp
+www 80/tcp http
+kerberos 88/tcp kerberos5 krb5 kerberos-sec
+kerberos 88/udp kerberos5 krb5 kerberos-sec
+pop3 110/tcp
+pop3 110/udp
+sunrpc 111/tcp
+sunrpc 111/udp
+auth 113/tcp ident
+sftp 115/tcp
+nntp 119/tcp
+ntp 123/tcp
+ntp 123/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap2 143/tcp imap
+imap2 143/udp imap
+snmp 161/tcp
+snmp 161/udp
+snmp-trap 162/tcp snmptrap
+snmp-trap 162/udp snmptrap
+xdmcp 177/tcp
+xdmcp 177/udp
+bgp 179/tcp
+bgp 179/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+https 443/tcp
+https 443/udp
+microsoft-ds 445/tcp
+microsoft-ds 445/udp
+isakmp 500/tcp
+isakmp 500/udp
+rtsp 554/tcp
+rtsp 554/udp
+ipp 631/tcp
+ipp 631/udp
+syslog 514/udp
+printer 515/tcp spooler
+dhcpv6-client 546/tcp
+dhcpv6-client 546/udp
+dhcpv6-server 547/tcp
+dhcpv6-server 547/udp
+afpovertcp 548/tcp
+afpovertcp 548/udp
+nntps 563/tcp snntp
+nntps 563/udp snntp
+ldaps 636/tcp
+ldaps 636/udp
+tinc 655/tcp
+tinc 655/udp
+rsync 873/tcp
+rsync 873/udp
+ftps-data 989/tcp
+ftps 990/tcp
+imaps 993/tcp
+imaps 993/udp
+ircs 994/tcp
+ircs 994/udp
+pop3s 995/tcp
+pop3s 995/udp
+socks 1080/tcp
+socks 1080/udp
+openvpn 1194/tcp
+openvpn 1194/udp
+l2f 1701/tcp l2tp
+l2f 1701/udp l2tp
+radius 1812/tcp
+radius 1812/udp
+radius-acct 1813/tcp radacct
+radius-acct 1813/udp radacct
+nfs 2049/tcp
+nfs 2049/udp
+dict 2628/tcp
+dict 2628/udp
+gpsd 2947/tcp
+gpsd 2947/udp
+icpv2 3130/tcp icp
+icpv2 3130/udp icp
+mysql 3306/tcp
+mysql 3306/udp
+nut 3493/tcp
+nut 3493/udp
+distcc 3632/tcp
+distcc 3632/udp
+daap 3689/tcp
+daap 3689/udp
+svn 3690/tcp subversion
+svn 3690/udp subversion
+epmd 4369/tcp
+epmd 4369/udp
+iax 4569/tcp
+iax 4569/udp
+mtn 4691/tcp
+mtn 4691/udp
+munin 4949/tcp
+sip 5060/tcp
+sip 5060/udp
+sip-tls 5061/tcp
+sip-tls 5061/udp
+xmpp-client 5222/tcp jabber-client
+xmpp-client 5222/udp jabber-client
+xmpp-server 5269/tcp jabber-server
+xmpp-server 5269/udp jabber-server
+mdns 5353/tcp
+mdns 5353/udp
+postgresql 5432/tcp postgres
+postgresql 5432/udp postgres
+x11 6000/tcp
+x11 6000/udp
+mysql-proxy 6446/tcp
+mysql-proxy 6446/udp
+bacula-dir 9101/tcp
+bacula-dir 9101/udp
+bacula-fd 9102/tcp
+bacula-fd 9102/udp
+bacula-sd 9103/tcp
+bacula-sd 9103/udp
+nbd 10809/tcp
+zabbix-agent 10050/tcp
+zabbix-agent 10050/udp
+zabbix-trapper 10051/tcp
+zabbix-trapper 10051/udp
+hkp 11371/tcp
+hkp 11371/udp
+ssmtp 465/tcp smtps
+spamd 783/tcp
+zebrasrv 2600/tcp
+zebra 2601/tcp
+ripd 2602/tcp
+ripngd 2603/tcp
+ospfd 2604/tcp
+bgpd 2605/tcp
+ospf6d 2606/tcp
+ospfapi 2607/tcp
+isisd 2608/tcp
+sane-port 6566/tcp sane saned
+ircd 6667/tcp
+git 9418/tcp
+
--- /dev/null
+root:$1$458QMEXZ$3Btqh6KbKhzUUMRipNbos/:16263:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+root::0:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+kernel.panic=3
+net.ipv4.conf.default.arp_ignore=1
+net.ipv4.conf.all.arp_ignore=1
+net.ipv4.ip_forward=1
+net.ipv4.icmp_echo_ignore_broadcasts=1
+net.ipv4.icmp_ignore_bogus_error_responses=1
+net.ipv4.tcp_ecn=0
+net.ipv4.tcp_fin_timeout=30
+net.ipv4.tcp_keepalive_time=120
+net.ipv4.tcp_syncookies=1
+net.ipv4.tcp_timestamps=1
+net.ipv4.tcp_sack=1
+net.ipv4.tcp_dsack=1
+
+net.ipv6.conf.default.forwarding=1
+net.ipv6.conf.all.forwarding=1
+
+net.netfilter.nf_conntrack_acct=1
+net.netfilter.nf_conntrack_checksum=0
+net.netfilter.nf_conntrack_max=16384
+net.netfilter.nf_conntrack_tcp_timeout_established=3600
+net.netfilter.nf_conntrack_udp_timeout=60
+net.netfilter.nf_conntrack_udp_timeout_stream=180
+
+# disable bridge firewalling by default
+net.bridge.bridge-nf-call-arptables=0
+net.bridge.bridge-nf-call-ip6tables=0
+net.bridge.bridge-nf-call-iptables=0
--- /dev/null
+## This file contains files and directories that should
+## be preserved during an upgrade.
+
+# /etc/example.conf
+# /etc/openvpn/
--- /dev/null
+ _______ ________ __
+ | |.-----.-----.-----.| | | |.----.| |_
+ | - || _ | -__| || | | || _|| _|
+ |_______|| __|_____|__|__||________||__| |____|
+ |__| W I R E L E S S F R E E D O M
+ -----------------------------------------------------
+ BARRIER BREAKER (Bleeding Edge, r41425)
+ -----------------------------------------------------
+ * 1/2 oz Galliano Pour all ingredients into
+ * 4 oz cold Coffee an irish coffee mug filled
+ * 1 1/2 oz Dark Rum with crushed ice. Stir.
+ * 2 tsp. Creme de Cacao
+ -----------------------------------------------------
--- /dev/null
+#################################################################
+# In order to enable dynamic dns you need at least one section,
+# and in that seciton the "enabled" option must be set to one
+#
+# Each section represents an update to a different service
+#
+# You specify your domain name, your username and your password
+# with the optins "domain", "username" and "password" respectively
+#
+# Next you need to specify the name of the service you are
+# connecting to "eg. dyndns.org". The format of the update
+# urls for several different dynamic dns services is specified
+# in the /usr/lib/ddns/services file. This list is hardly complete
+# as there are many, many different dynamic dns services. If your
+# service is on the list you can merely specify it with the
+# "service_name" option. Otherwise you will need to determine
+# the format of the url to update with. You can either add an
+# entry to the /usr/lib/ddns/services file or specify this with
+# the "update_url" option.
+#
+# We also need to specify the source of the ip address to associate with
+# your domain. The "ip_source" option can be "network", "interface"
+# or "web", with "network" as the default.
+#
+# If "ip_source" is "network" you specify a network section in your
+# /etc/network config file (e.g. "wan", which is the default) with
+# the "ip_network" option. If you specify "wan", you will update
+# with whatever the ip for your wan is.
+#
+# If "ip_source" is "interface" you specify a hardware interface
+# (e.g. "eth1") and whatever the current ip of this interface is
+# will be associated with the domain when an update is performed.
+#
+# If "ip_source" is "script" you specify a script to obtain ip address.
+# The "ip_script" option should contain path to your script.
+#
+# The last possibility is that "ip_source" is "web", which means
+# that in order to obtain our ip address we will connect to a
+# website, and the first valid ip address listed on that page
+# will be assumed to be ours. If you are behind another firewall
+# this is the best option since none of the local networks or
+# interfaces will have the external ip. The website to connect
+# to is specified by the "ip_url" option. You may specify multiple
+# urls in the option, separated by whitespace.
+#
+# Finally we need to specify how often to check whether we need
+# to check whether the ip address has changed (and if so update
+# it) and how often we need to force an update ( many services
+# will expire your domain if you don't connect and do an update
+# every so often). Use the "check_interval" to specify how
+# often to check whether an update is necessary, the "retry_interval"
+# to specify how often to retry in case the update has failed, and
+# the "force_interval" option to specify how often to force an
+# update. Specify the units for these values with the "check_unit",
+# the "retry_init" and the "force_unit" options. Units can be
+# "days", "hours", "minutes" or "seconds". The default force_unit
+# is hours, the default retry_unit is seconds and the default
+# check_unit is seconds. The default check_interval is 600 seconds,
+# or ten minutes. The default retry_interval is 60 seconds, or one
+# minute. The default force_interval is 72 hours or 3 days.
+#
+#
+#########################################################
+
+config service "myddns"
+ option enabled "1"
+ #option interface "wan"
+ #option use_syslog "1"
+
+ option service_name "dyndns.org"
+ option domain "zoller.homeip.net"
+ option username "moellein"
+ option password "telefon1"
+ option use_https "0"
+
+ option force_interval "72"
+ option force_unit "hours"
+ option check_interval "10"
+ option check_unit "minutes"
+ option retry_interval "60"
+ option retry_unit "seconds"
+
+ #option ip_source "network"
+ #option ip_network "wan"
+
+ option ip_source "interface"
+ option ip_interface "pppoe-wan"
+
+ #option ip_source "script"
+ #option ip_script "path to your scrip"
+
+ #option ip_source "web"
+ #option ip_url "http://checkip.dyndns.com/"
+
+ #option update_url "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
+
+
--- /dev/null
+
+config dnsmasq
+ option domainneeded '1'
+ option boguspriv '1'
+ option localise_queries '1'
+ option rebind_protection '1'
+ option rebind_localhost '1'
+ option local '/lan/'
+ option domain 'lan'
+ option expandhosts '1'
+ option authoritative '1'
+ option readethers '1'
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/tmp/resolv.conf.auto'
+ list 'interface' lan
+ list 'interface' fewo
+
+config 'dhcp' 'fewo'
+ option 'interface' 'fewo'
+ option 'start' '50'
+ option 'limit' '100'
+ option 'leasetime' '1h'
+
+config dhcp 'lan'
+ option interface 'lan'
+ option start '100'
+ option limit '150'
+ option leasetime '12h'
+ option dhcpv6 'server'
+ option ra 'server'
+
+config dhcp 'wan'
+ option interface 'wan'
+ option ignore '1'
+
+config odhcpd 'odhcpd'
+ option maindhcp '0'
+ option leasefile '/tmp/hosts/odhcpd'
+ option leasetrigger '/usr/sbin/odhcpd-update'
+
--- /dev/null
+config dropbear
+ option PasswordAuth 'on'
+ option RootPasswordAuth 'on'
+ option Port '22'
+# option BannerFile '/etc/banner'
--- /dev/null
+config defaults
+ option syn_flood 1
+ option input ACCEPT
+ option output ACCEPT
+ option forward REJECT
+# Uncomment this line to disable ipv6 rules
+# option disable_ipv6 1
+
+config zone
+ option 'name' 'fewo'
+ list 'network' 'fewo'
+ option 'input' 'REJECT'
+ option 'forward' 'REJECT'
+ option 'output' 'ACCEPT'
+
+config zone
+ option name lan
+ list network 'lan'
+ option input ACCEPT
+ option output ACCEPT
+ option forward ACCEPT
+
+config zone
+ option name wan
+ list network 'wan'
+ list network 'wan6'
+ option input REJECT
+ option output ACCEPT
+ option forward REJECT
+ option masq 1
+ option mtu_fix 1
+
+config forwarding
+ option src 'fewo'
+ option dest 'wan'
+
+config forwarding
+ option src lan
+ option dest wan
+
+config 'rule'
+ option 'name' 'Allow DNS Queries'
+ option 'src' 'fewo'
+ option 'dest_port' '53'
+ option 'proto' 'tcpudp'
+ option 'target' 'ACCEPT'
+
+config 'rule'
+ option 'name' 'Allow DHCP request'
+ option 'src' 'fewo'
+ option 'src_port' '67-68'
+ option 'dest_port' '67-68'
+ option 'proto' 'udp'
+ option 'target' 'ACCEPT'
+
+config rule
+ option src 'fewo'
+ option dest 'lan'
+ option name 'Deny Guest -> LAN'
+ option proto 'all'
+ option target 'DROP'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN http'
+ option proto 'tcp'
+ option dest_port '80'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN https'
+ option proto 'tcp'
+ option dest_port '443'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '25'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '587'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '995'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '143'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '993'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '110'
+
+config rule
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Deny Guest -> WAN'
+ option proto 'all'
+ option target 'DROP'
+
+# We need to accept udp packets on port 68,
+# see https://dev.openwrt.org/ticket/4108
+config rule
+ option name Allow-DHCP-Renew
+ option src wan
+ option proto udp
+ option dest_port 68
+ option target ACCEPT
+ option family ipv4
+
+# Allow IPv4 ping
+config rule
+ option name Allow-Ping
+ option src wan
+ option proto icmp
+ option icmp_type echo-request
+ option family ipv4
+ option target ACCEPT
+
+# Allow DHCPv6 replies
+# see https://dev.openwrt.org/ticket/10381
+config rule
+ option name Allow-DHCPv6
+ option src wan
+ option proto udp
+ option src_ip fe80::/10
+ option src_port 547
+ option dest_ip fe80::/10
+ option dest_port 546
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential incoming IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Input
+ option src wan
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ list icmp_type router-solicitation
+ list icmp_type neighbour-solicitation
+ list icmp_type router-advertisement
+ list icmp_type neighbour-advertisement
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential forwarded IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Forward
+ option src wan
+ option dest *
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# include a file with users custom iptables rules
+config include
+ option path /etc/firewall.user
+
+
+### EXAMPLE CONFIG SECTIONS
+# do not allow a specific ip to access wan
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option dest wan
+# option proto tcp
+# option target REJECT
+
+# block a specific mac on wan
+#config rule
+# option dest wan
+# option src_mac 00:11:22:33:44:66
+# option target REJECT
+
+# block incoming ICMP traffic on a zone
+#config rule
+# option src lan
+# option proto ICMP
+# option target DROP
+
+# port redirect port coming in on wan to lan
+#config redirect
+# option src wan
+# option src_dport 80
+# option dest lan
+# option dest_ip 192.168.16.235
+# option dest_port 80
+# option proto tcp
+
+# port redirect of remapped ssh port (22001) on wan
+config redirect
+ option src wan
+ option src_dport 22001
+ option dest lan
+ option dest_port 22
+ option proto tcp
+
+# allow IPsec/ESP and ISAKMP passthrough
+#config rule
+# option src wan
+# option dest lan
+# option protocol esp
+# option target ACCEPT
+
+#config rule
+# option src wan
+# option dest lan
+# option src_port 500
+# option dest_port 500
+# option proto udp
+# option target ACCEPT
+
+### FULL CONFIG SECTIONS
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 80
+# option dest wan
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
+# option target REJECT
+
+#config redirect
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 1024
+# option src_dport 80
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
--- /dev/null
+
+config core 'main'
+ option lang 'auto'
+ option mediaurlbase '/luci-static/openwrt.org'
+ option resourcebase '/luci-static/resources'
+
+config extern 'flash_keep'
+ option uci '/etc/config/'
+ option dropbear '/etc/dropbear/'
+ option openvpn '/etc/openvpn/'
+ option passwd '/etc/passwd'
+ option opkg '/etc/opkg.conf'
+ option firewall '/etc/firewall.user'
+ option uploads '/lib/uci/upload/'
+
+config internal 'languages'
+
+config internal 'sauth'
+ option sessionpath '/tmp/luci-sessions'
+ option sessiontime '3600'
+
+config internal 'ccache'
+ option enable '1'
+
+config internal 'themes'
+ option Bootstrap '/luci-static/bootstrap'
+
--- /dev/null
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config globals 'globals'
+ option ula_prefix 'fdc6:cb4f:c705::/48'
+
+config interface 'fewo'
+ option 'proto' 'static'
+ option 'ipaddr' '10.0.0.1'
+ option 'netmask' '255.255.255.0'
+
+config interface 'lan'
+ option ifname 'eth0'
+ option force_link '1'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.1'
+ option netmask '255.255.255.0'
+ option ip6assign '60'
+
+config interface 'wan'
+ option ifname 'eth1'
+ option _orig_ifname 'eth1'
+ option _orig_bridge 'false'
+ option proto 'pppoe'
+ option username '8509-001'
+ option password 'V0aFqWkQ'
+
+config interface 'wan6'
+ option ifname '@wan'
+ option proto 'dhcpv6'
+
+config switch
+ option name 'switch0'
+ option reset '1'
+ option enable_vlan '1'
+
+config switch_vlan
+ option device 'switch0'
+ option vlan '1'
+ option ports '0 1 2 3 4'
+
--- /dev/null
+
+config system
+ option hostname 'OpenWrt'
+ option timezone 'UTC'
+
+config timeserver 'ntp'
+ list server '0.openwrt.pool.ntp.org'
+ list server '1.openwrt.pool.ntp.org'
+ list server '2.openwrt.pool.ntp.org'
+ list server '3.openwrt.pool.ntp.org'
+ option enabled '1'
+ option enable_server '0'
+
+config led 'led_wan'
+ option name 'WAN'
+ option sysfs 'tp-link:green:wan'
+ option trigger 'netdev'
+ option dev 'eth1'
+ option mode 'link tx rx'
+
+config led 'led_lan1'
+ option name 'LAN1'
+ option sysfs 'tp-link:green:lan1'
+ option trigger 'switch0'
+ option port_mask '0x10'
+
+config led 'led_lan2'
+ option name 'LAN2'
+ option sysfs 'tp-link:green:lan2'
+ option trigger 'switch0'
+ option port_mask '0x08'
+
+config led 'led_lan3'
+ option name 'LAN3'
+ option sysfs 'tp-link:green:lan3'
+ option trigger 'switch0'
+ option port_mask '0x04'
+
+config led 'led_lan4'
+ option name 'LAN4'
+ option sysfs 'tp-link:green:lan4'
+ option trigger 'switch0'
+ option port_mask '0x02'
+
+config led 'led_wlan'
+ option name 'WLAN'
+ option sysfs 'tp-link:green:wlan'
+ option trigger 'phy0tpt'
+
--- /dev/null
+config network
+ option init network
+ list affects dhcp
+ list affects radvd
+
+config wireless
+ list affects network
+
+config firewall
+ option init firewall
+ list affects luci-splash
+ list affects qos
+ list affects miniupnpd
+
+config olsr
+ option init olsrd
+
+config dhcp
+ option init dnsmasq
+
+config dropbear
+ option init dropbear
+
+config httpd
+ option init httpd
+
+config fstab
+ option init fstab
+
+config qos
+ option init qos
+
+config system
+ option init led
+ list affects luci_statistics
+
+config luci_splash
+ option init luci_splash
+
+config upnpd
+ option init miniupnpd
+
+config ntpclient
+ option init ntpclient
+
+config samba
+ option init samba
+
+config tinyproxy
+ option init tinyproxy
+
+config 6relayd
+ option init 6relayd
--- /dev/null
+
+config uhttpd 'main'
+ list listen_http '0.0.0.0:80'
+ list listen_http '[::]:80'
+ list listen_https '0.0.0.0:443'
+ list listen_https '[::]:443'
+ option home '/www'
+ option rfc1918_filter '1'
+ option max_requests '3'
+ option max_connections '100'
+ option cert '/etc/uhttpd.crt'
+ option key '/etc/uhttpd.key'
+ option cgi_prefix '/cgi-bin'
+ option script_timeout '60'
+ option network_timeout '30'
+ option http_keepalive '20'
+ option tcp_keepalive '1'
+ option ubus_prefix '/ubus'
+
+config cert 'px5g'
+ option days '730'
+ option bits '1024'
+ option country 'DE'
+ option state 'Berlin'
+ option location 'Berlin'
+ option commonname 'OpenWrt'
+
--- /dev/null
+
+config wifi-device 'radio0'
+ option type 'mac80211'
+ option channel '11'
+ option hwmode '11g'
+ option path 'platform/qca953x_wmac'
+ option htmode 'HT20'
+ option country 'US'
+ option txpower '20'
+
+config wifi-iface
+ option device 'radio0'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'zoller'
+ option wds '1'
+ option encryption 'psk-mixed'
+ option key 'a4b7ffdab4729cabb68'
+
+config wifi-iface
+ option device 'radio0'
+ option network 'fewo'
+ option mode 'ap'
+ option ssid 'fewo'
+ option encryption 'psk-mixed'
+ option key 'a8b4f0814d93c92'
+
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2009-2013 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/ar71xx.sh
+
+get_status_led() {
+ case $(ar71xx_board_name) in
+ alfa-nx)
+ status_led="alfa:green:led_8"
+ ;;
+ all0305)
+ status_led="eap7660d:green:ds4"
+ ;;
+ ap132)
+ status_led="ap132:green:status"
+ ;;
+ ap136-010|\
+ ap136-020)
+ status_led="ap136:green:status"
+ ;;
+ ap135-020)
+ status_led="ap135:green:status"
+ ;;
+ ap81)
+ status_led="ap81:green:status"
+ ;;
+ ap83)
+ status_led="ap83:green:power"
+ ;;
+ ap96)
+ status_led="ap96:green:led2"
+ ;;
+ aw-nr580)
+ status_led="aw-nr580:green:ready"
+ ;;
+ bullet-m | rocket-m | nano-m | nanostation-m)
+ status_led="ubnt:green:link4"
+ ;;
+ bxu2000n-2-a1)
+ status_led="bhu:green:status"
+ ;;
+ cap4200ag)
+ status_led="senao:green:pwr"
+ ;;
+ db120)
+ status_led="db120:green:status"
+ ;;
+ dir-505-a1 |\
+ dir-600-a1 |\
+ dir-615-e1 |\
+ dir-615-e4)
+ status_led="d-link:green:power"
+ ;;
+ dir-615-c1)
+ status_led="d-link:green:status"
+ ;;
+ dir-825-b1)
+ status_led="d-link:orange:power"
+ ;;
+ dir-825-c1 |\
+ dir-835-a1)
+ status_led="d-link:amber:power"
+ ;;
+ eap7660d)
+ status_led="eap7660d:green:ds4"
+ ;;
+ el-mini | \
+ el-m150)
+ status_led="EasyLink:green:system"
+ ;;
+ hiwifi-hc6361)
+ status_led="hiwifi:blue:system"
+ ;;
+ hornet-ub)
+ status_led="alfa:blue:wps"
+ ;;
+ ja76pf | \
+ ja76pf2)
+ status_led="jjplus:green:led1"
+ ;;
+ ls-sr71)
+ status_led="ubnt:green:d22"
+ ;;
+ mr600)
+ status_led="mr600:orange:power"
+ ;;
+ mr600v2)
+ status_led="mr600:blue:power"
+ ;;
+ mynet-n600 | \
+ mynet-n750)
+ status_led="wd:blue:power"
+ ;;
+ mynet-rext)
+ status_led="wd:blue:power"
+ ;;
+ mzk-w04nu | \
+ mzk-w300nh)
+ status_led="planex:green:status"
+ ;;
+ nbg460n_550n_550nh)
+ status_led="nbg460n:green:power"
+ ;;
+ nbg6716)
+ status_led="nbg6716:white:power"
+ ;;
+ om2p | \
+ om2pv2 | \
+ om2p-hs | \
+ om2p-hsv2 | \
+ om2p-lc)
+ status_led="om2p:blue:power"
+ ;;
+ pb44)
+ status_led="pb44:amber:jump1"
+ ;;
+ rb-2011l|\
+ rb-2011uas|\
+ rb-2011uas-2hnd)
+ status_led="rb:green:usr"
+ ;;
+ rb-411 | rb-411u | rb-433 | rb-433u | rb-450 | rb-450g | rb-493)
+ status_led="rb4xx:yellow:user"
+ ;;
+ rb-750)
+ status_led="rb750:green:act"
+ ;;
+ rb-911g-2hpnd|\
+ rb-911g-5hpnd|\
+ rb-912uag-2hpnd|\
+ rb-912uag-5hpnd)
+ status_led="rb:green:user"
+ ;;
+ rb-951ui-2hnd)
+ status_led="rb:green:act"
+ ;;
+ routerstation | routerstation-pro)
+ status_led="ubnt:green:rf"
+ ;;
+ rw2458n)
+ status_led="rw2458n:green:d3"
+ ;;
+ oolite)
+ status_led="oolite:red:system"
+ ;;
+ tew-632brp)
+ status_led="tew-632brp:green:status"
+ ;;
+ tew-673gru)
+ status_led="trendnet:blue:wps"
+ ;;
+ tew-712br|\
+ tew-732br)
+ status_led="trendnet:green:power"
+ ;;
+ tl-mr3020)
+ status_led="tp-link:green:wps"
+ ;;
+ tl-wa750re)
+ status_led="tp-link:orange:re"
+ ;;
+ tl-wa850re)
+ status_led="tp-link:blue:re"
+ ;;
+ tl-mr3220 | \
+ tl-mr3220-v2 | \
+ tl-mr3420 | \
+ tl-mr3420-v2 | \
+ tl-wa801nd-v2 | \
+ tl-wa901nd | \
+ tl-wa901nd-v2 | \
+ tl-wa901nd-v3 | \
+ tl-wdr3500 | \
+ tl-wr1041n-v2 | \
+ tl-wr1043nd | \
+ tl-wr1043nd-v2 | \
+ tl-wr741nd | \
+ tl-wr741nd-v4 | \
+ tl-wr841n-v1 | \
+ tl-wr841n-v7 | \
+ tl-wr841n-v8 | \
+ tl-wr842n-v2 | \
+ tl-wr941nd)
+ status_led="tp-link:green:system"
+ ;;
+ archer-c7 | \
+ tl-wdr4900-v2 | \
+ tl-mr10u | \
+ tl-mr13u | \
+ tl-wdr4300 | \
+ tl-wr703n | \
+ tl-wr710n | \
+ tl-wr720n-v3)
+ status_led="tp-link:blue:system"
+ ;;
+ tl-wr841n-v9)
+ status_led="tp-link:green:qss"
+ ;;
+ tl-wr2543n)
+ status_led="tp-link:green:wps"
+ ;;
+ unifi)
+ status_led="ubnt:green:dome"
+ ;;
+ uap-pro)
+ status_led="ubnt:white:dome"
+ ;;
+ whr-g301n | \
+ whr-hp-g300n | \
+ whr-hp-gn | \
+ wzr-hp-g300nh)
+ status_led="buffalo:green:router"
+ ;;
+ wlae-ag300n)
+ status_led="buffalo:green:status"
+ ;;
+ wzr-hp-ag300h | \
+ wzr-hp-g300nh2)
+ status_led="buffalo:red:diag"
+ ;;
+ wndap360 | \
+ wndr3700 | \
+ wndr4300 | \
+ wnr2000 | \
+ wnr2200 |\
+ wnr612-v2)
+ status_led="netgear:green:power"
+ ;;
+ wp543)
+ status_led="wp543:green:diag"
+ ;;
+ wrt400n)
+ status_led="wrt400n:blue:wps"
+ ;;
+ wrt160nl)
+ status_led="wrt160nl:blue:wps"
+ ;;
+ zcn-1523h-2 | zcn-1523h-5)
+ status_led="zcn-1523h:amber:init"
+ ;;
+ wlr8100)
+ status_led="sitecom:amber:status"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}
--- /dev/null
+# Change the following lines if you want dnsmasq to serve SRV
+# records.
+# You may add multiple srv-host lines.
+# The fields are <name>,<target>,<port>,<priority>,<weight>
+
+# A SRV record sending LDAP for the example.com domain to
+# ldapserver.example.com port 289
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
+
+# Two SRV records for LDAP, each with different priorities
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
+
+# A SRV record indicating that there is no LDAP server for the domain
+# example.com
+#srv-host=_ldap._tcp.example.com
+
+# The following line shows how to make dnsmasq serve an arbitrary PTR
+# record. This is useful for DNS-SD.
+# The fields are <name>,<target>
+#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"
+
+# Change the following lines to enable dnsmasq to serve TXT records.
+# These are used for things like SPF and zeroconf.
+# The fields are <name>,<text>,<text>...
+
+#Example SPF.
+#txt-record=example.com,"v=spf1 a -all"
+
+#Example zeroconf
+#txt-record=_http._tcp.example.com,name=value,paper=A4
+
+# Provide an alias for a "local" DNS name. Note that this _only_ works
+# for targets which are names from DHCP or /etc/hosts. Give host
+# "bert" another name, bertrand
+# The fields are <cname>,<target>
+#cname=bertand,bert
--- /dev/null
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDhvRcN5sQUdGGEChpcQtYjbE6yTSJShFADGysnJcg2tvbwx2UDQMsNLUL2gNZstmSBsoKzghVtwSudL6PQXw5HDz7ybKSX4dCBK6H4VLj6K9x2KgedCI3th4wdxQqSxbhkz7eyr2bRm9Ppl2rzrQuxCmG7FvkfAo9cvWfohYZaG4pvfrL/yG8xwfhqRss9YphRda6uMawOryWoGi/Cgjsfzh9fFHU956SxhcdhAKBOLPRzlSndtlgyLNUCXse23JuZTN+TJ7mU2IBzTo7EV3QvHBrrPD/tysI7TxRq0yw7nrGengepDiczh+4/oeRpLkFuMe10QjkSza1aJ5x36Fmz mhoellein@alienware
--- /dev/null
+# This file is interpreted as shell script.
+# Put your custom iptables rules here, they will
+# be executed with each firewall (re-)start.
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
--- /dev/null
+root:x:0:
+daemon:x:1:
+adm:x:4:
+mail:x:8:
+audio:x:29:
+www-data:x:33:
+ftp:x:55:
+users:x:100:
+network:x:101:
+nogroup:x:65534:
--- /dev/null
+127.0.0.1 localhost
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ }, ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/failsafe" ]
+ ],
+]
--- /dev/null
+#!/bin/sh
+
+ath9k_eeprom_die() {
+ echo "ath9k eeprom: " "$*"
+ exit 1
+}
+
+ath9k_eeprom_extract() {
+ local part=$1
+ local offset=$2
+ local count=$3
+ local mtd
+
+ mtd=$(find_mtd_chardev $part)
+ [ -n "$mtd" ] || \
+ ath9k_eeprom_die "no mtd device found for partition $part"
+
+ dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
+ ath9k_eeprom_die "failed to extract from $mtd"
+}
+
+ath9k_patch_firmware_mac() {
+ local mac=$1
+
+ [ -z "$mac" ] && return
+
+ macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
+}
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+. /lib/ar71xx.sh
+. /lib/functions.sh
+. /lib/functions/system.sh
+
+board=$(ar71xx_board_name)
+
+case "$FIRMWARE" in
+"soc_wmac.eeprom")
+ case $board in
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 4096 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 0)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+
+"pci_wmac0.eeprom")
+ case $board in
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 20480 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 12)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+esac
--- /dev/null
+[ ifup = "$ACTION" ] && {
+ uci_toggle_state network "$INTERFACE" up 1
+ [ -n "$DEVICE" ] && {
+ uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)"
+ uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
+ }
+}
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
+[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0
+
+/etc/init.d/firewall enabled || exit 0
+
+fw3 -q network "$INTERFACE" >/dev/null || exit 0
+
+logger -t firewall "Reloading firewall due to $ACTION of $INTERFACE ($DEVICE)"
+fw3 -q reload
--- /dev/null
+#!/bin/sh
+
+. /usr/lib/ddns/dynamic_dns_functions.sh
+
+if [ "$ACTION" = "ifup" ]; then
+ start_daemon_for_all_ddns_sections "$INTERFACE"
+fi
+
+
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup ] || exit 0
+
+/etc/init.d/dnsmasq enabled && /etc/init.d/dnsmasq start
--- /dev/null
+#!/bin/sh
+
+if [ -f /etc/sysctl.conf ] && [ "$ACTION" = add ]; then
+ sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" /etc/sysctl.conf | \
+ sysctl -e -p - | logger -t sysctl
+fi
--- /dev/null
+#!/bin/sh
+
+# For AR9220 and AR9223, GPIO JTAG must explicit be disabled
+# before LEDs start working. Do this when wifi device is
+# detected.
+
+#
+# $DEVPATH is not valid for some boards (including WZR-HP-AG300H).
+# Manipulate the $DEVPATH to reach the corresponding phyN.
+#
+
+devdir=`dirname $DEVPATH`
+devdir=`dirname $devdir`
+phydir=/sys$devdir/ieee80211
+phyname=`cat $phydir/phy*/name`
+
+if [ -z $phyname -o $ACTION != "add" ]; then exit 0; fi
+
+#
+# ar922x_disable_gpio_jtag():
+#
+# Emulate
+# REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
+# for AR9220 and AR9223.
+#
+
+ar922x_disable_gpio_jtag()
+{
+ local regidx=0x4054
+
+ [ -f /sys/kernel/debug/ieee80211/$1/ath9k/regidx ] && {
+ echo $regidx > /sys/kernel/debug/ieee80211/$1/ath9k/regidx
+ regval=`cat /sys/kernel/debug/ieee80211/$1/ath9k/regval`
+ regval=$((regval | 0x20000))
+ echo regval $regval
+ echo $regval > /sys/kernel/debug/ieee80211/$1/ath9k/regval
+ }
+}
+
+if [ $phyname -a $ACTION = "add" ]; then
+
+ . /lib/ar71xx.sh
+
+ case $(ar71xx_board_name) in
+ wzr-hp-ag300h)
+ ar922x_disable_gpio_jtag $phyname
+ ;;
+ esac;
+fi
+
+exit 0
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "and",
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME",
+ [ "null", "full", "ptmx", "zero" ],
+ ],
+ [ "regex", "DEVNAME",
+ [ "^gpio", "^hvc" ],
+ ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0666" ],
+ [ "return" ],
+ ]
+ ],
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME", "mapper/control" ],
+ [ "regex", "DEVPATH", "^ppp" ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0600" ],
+ [ "return" ],
+ ],
+ ],
+ [ "if",
+ [ "has", "DEVNAME" ],
+ [ "makedev", "/dev/%DEVNAME%", "0644" ],
+ ],
+ ],
+ ],
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ "remove" : [
+ [ "if",
+ [ "and",
+ [ "has", "DEVNAME" ],
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [ "rm", "/dev/%DEVNAME%" ]
+ ]
+ ]
+ } ],
+ [ "if",
+ [ "eq", "SUBSYSTEM", "platform" ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "has", "BUTTON" ],
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/%BUTTON%" ]
+ ],
+ [ "if",
+ [ "eq", "SUBSYSTEM",
+ [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]
+ ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "usb-serial" ],
+ [ "regex", "DEVNAME",
+ [ "^ttyUSB", "^ttyACM" ]
+ ],
+ ],
+ [ "exec", "/sbin/hotplug-call", "tty" ]
+ ],
+]
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+START=95
+
+start() {
+ . /usr/lib/ddns/dynamic_dns_functions.sh
+ start_daemon_for_all_ddns_sections
+}
+
+stop() {
+ killall -9 dynamic_dns_updater.sh
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+HOSTFILE="/tmp/hosts/dhcp"
+TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ config_get_bool dnssec "$cfg" dnssec 0
+ [ "$dnssec" -gt 0 ] && {
+ xappend "--conf-file=$TRUSTANCHORSFILE"
+ xappend "--dnssec"
+ append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+
+ config_get_bool dns "$cfg" dns 0
+ [ "$dns" = "1" ] && {
+ echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE
+ }
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+ echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && mount_root done
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+USE_PROCD=1
+QUIET=""
+
+validate_firewall_redirect()
+{
+ uci_validate_section firewall redirect "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
+ 'dest:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
+ 'target:or("SNAT", "DNAT")'
+
+ return $?
+}
+
+validate_firewall_rule()
+{
+ uci_validate_section firewall rule "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'dest:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
+ 'target:string'
+
+ return $?
+}
+
+service_triggers() {
+ procd_add_reload_trigger firewall
+
+ procd_open_validate
+ validate_firewall_redirect
+ validate_firewall_rule
+ procd_close_validate
+}
+
+restart() {
+ fw3 restart
+}
+
+start_service() {
+ fw3 ${QUIET} start
+}
+
+stop_service() {
+ fw3 flush
+}
+
+reload_service() {
+ fw3 reload
+}
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ QUIET=1
+ start
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && date -s @$maxtime
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
+ return $?
+}
+
+start_service() {
+ local server enabled enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ $enabled = 0 ] && return
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in $server; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+
+START=10
+USE_PROCD=1
+
+validate_system_section()
+{
+ uci_validate_section system system "${1}" \
+ 'hostname:string:OpenWrt' \
+ 'conloglevel:uinteger' \
+ 'buffersize:uinteger' \
+ 'timezone:string:UTC' \
+ 'zonename:string'
+
+ return $?
+}
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ validate_system_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ echo "$hostname" > /proc/sys/kernel/hostname
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+ echo "$timezone" > /tmp/TZ
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+reload_service() {
+ config_load system
+ config_foreach system_config system
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_system_section
+}
+
+start_service() {
+ reload_service
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 Jo-Philipp Wich
+
+START=50
+
+USE_PROCD=1
+
+UHTTPD_BIN="/usr/sbin/uhttpd"
+PX5G_BIN="/usr/sbin/px5g"
+
+append_arg() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get val "$cfg" "$var"
+ [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
+}
+
+append_bool() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+generate_keys() {
+ local cfg="$1"
+ local key="$2"
+ local crt="$3"
+ local days bits country state location commonname
+
+ config_get days "$cfg" days
+ config_get bits "$cfg" bits
+ config_get country "$cfg" country
+ config_get state "$cfg" state
+ config_get location "$cfg" location
+ config_get commonname "$cfg" commonname
+
+ [ -x "$PX5G_BIN" ] && {
+ $PX5G_BIN selfsigned -der \
+ -days ${days:-730} -newkey rsa:${bits:-1024} -keyout "$UHTTPD_KEY" -out "$UHTTPD_CERT" \
+ -subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/CN="${commonname:-OpenWrt}"
+ }
+}
+
+start_instance()
+{
+ UHTTPD_CERT=""
+ UHTTPD_KEY=""
+
+ local cfg="$1"
+ local realm="$(uci_get system.@system[0].hostname)"
+ local listen http https interpreter indexes path handler
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command "$UHTTPD_BIN" -f
+
+ append_arg "$cfg" home "-h"
+ append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
+ append_arg "$cfg" config "-c"
+ append_arg "$cfg" cgi_prefix "-x"
+ [ -f /usr/lib/uhttpd_lua.so ] && {
+ config_get handler "$cfg" lua_handler
+ [ -f "$handler" ] && append_arg "$cfg" lua_prefix "-l" && {
+ procd_append_param command "-L" "$handler"
+ }
+ }
+ [ -f /usr/lib/uhttpd_ubus.so ] && {
+ append_arg "$cfg" ubus_prefix "-u"
+ append_arg "$cfg" ubus_socket "-U"
+ }
+ append_arg "$cfg" script_timeout "-t"
+ append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" http_keepalive "-k"
+ append_arg "$cfg" tcp_keepalive "-A"
+ append_arg "$cfg" error_page "-E"
+ append_arg "$cfg" max_requests "-n" 3
+ append_arg "$cfg" max_connections "-N"
+
+ append_bool "$cfg" no_ubusauth "-a" 0
+ append_bool "$cfg" no_symlinks "-S" 0
+ append_bool "$cfg" no_dirlists "-D" 0
+ append_bool "$cfg" rfc1918_filter "-R" 0
+
+ config_get http "$cfg" listen_http
+ for listen in $http; do
+ procd_append_param command -p "$listen"
+ done
+
+ config_get interpreter "$cfg" interpreter
+ for path in $interpreter; do
+ procd_append_param command -i "$path"
+ done
+
+ config_get indexes "$cfg" index_page
+ for path in $indexes; do
+ procd_append_param command -I "$path"
+ done
+
+ config_get https "$cfg" listen_https
+ config_get UHTTPD_KEY "$cfg" key /etc/uhttpd.key
+ config_get UHTTPD_CERT "$cfg" cert /etc/uhttpd.crt
+
+ [ -n "$https" ] && {
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] || {
+ config_foreach generate_keys cert
+ }
+
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] && {
+ append_arg "$cfg" cert "-C"
+ append_arg "$cfg" key "-K"
+
+ for listen in $https; do
+ procd_append_param command -s "$listen"
+ done
+ }
+ }
+
+ procd_close_instance
+
+ # Check if daemon is running, if not then
+ # re-execute in foreground to display error.
+# sleep 1 && service_check $UHTTPD_BIN || \
+# $UHTTPD_BIN -f $UHTTPD_ARGS
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "uhttpd"
+}
+
+start_service() {
+ config_load uhttpd
+ config_foreach start_instance uhttpd
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+::askconsole:/bin/ash --login
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+nf_defrag_ipv6
+nf_conntrack_ipv6
+ip6_tables
+ip6table_filter
+ip6table_mangle
+ip6table_raw
+ip6t_REJECT
--- /dev/null
+nf_conntrack
+nf_defrag_ipv4
+nf_conntrack_ipv4
+xt_state
+iptable_raw
+xt_CT
+xt_conntrack
--- /dev/null
+x_tables
+xt_tcpudp
+ip_tables
+iptable_filter
+iptable_mangle
+xt_limit
+xt_mac
+xt_multiport
+xt_comment
+xt_LOG
+xt_TCPMSS
+ipt_REJECT
+xt_time
+xt_mark
--- /dev/null
+nf_nat
+xt_nat
+nf_nat_ipv4
+iptable_nat
+ipt_MASQUERADE
+xt_REDIRECT
--- /dev/null
+nf_conntrack_ftp
+nf_conntrack_irc
+nf_nat_ftp
+nf_nat_irc
--- /dev/null
+DISTRIB_ID="OpenWrt"
+DISTRIB_RELEASE="Bleeding Edge"
+DISTRIB_REVISION="r41425"
+DISTRIB_CODENAME="barrier_breaker"
+DISTRIB_TARGET="ar71xx/generic"
+DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r41425"
+DISTRIB_TAINTS="no-all"
--- /dev/null
+src/gz barrier_breaker http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
+dest root /
+dest ram /tmp
+lists_dir ext /var/opkg-lists
+option overlay_root /overlay
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+#USERNAME PROVIDER PASSWORD IPADDRESS
--- /dev/null
+#
+# Expression: outbound and not icmp[0] != 8 and not tcp[13] & 4 != 0
+#
+19
+48 0 0 0
+21 0 16 1
+40 0 0 2
+21 0 13 33
+48 0 0 13
+21 0 5 1
+40 0 0 10
+69 9 0 8191
+177 0 0 4
+80 0 0 4
+21 6 7 8
+21 0 5 6
+40 0 0 10
+69 3 0 8191
+177 0 0 4
+80 0 0 17
+69 1 0 4
+6 0 0 4
+6 0 0 0
--- /dev/null
+#debug
+logfile /dev/null
+noipdefault
+noaccomp
+nopcomp
+nocrtscts
+lock
+maxfail 0
+lcp-echo-failure 5
+lcp-echo-interval 1
--- /dev/null
+nameserver 46.243.104.6
+nameserver 83.218.160.2
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2010 Vertical Communications
+
+[ -z "$PREINIT" ] && exec /sbin/init
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+pi_ifname=
+pi_ip=192.168.1.1
+pi_broadcast=192.168.1.255
+pi_netmask=255.255.255.0
+
+fs_failsafe_ifname=
+fs_failsafe_ip=192.168.1.1
+fs_failsafe_broadcast=192.168.1.255
+fs_failsafe_netmask=255.255.255.0
+
+fs_failsafe_wait_timeout=2
+
+pi_suppress_stderr="y"
+pi_init_suppress_stderr="y"
+pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
+pi_init_cmd="/sbin/init"
+
+. /lib/functions.sh
+. /lib/functions/preinit.sh
+. /lib/functions/system.sh
+
+boot_hook_init preinit_essential
+boot_hook_init preinit_main
+boot_hook_init failsafe
+boot_hook_init initramfs
+boot_hook_init preinit_mount_root
+
+for pi_source_file in /lib/preinit/*; do
+ . $pi_source_file
+done
+
+boot_run_hook preinit_essential
+
+pi_mount_skip_next=false
+pi_jffs2_mount_success=false
+pi_failsafe_net_message=false
+
+boot_run_hook preinit_main
--- /dev/null
+#!/bin/sh
+[ -f /etc/banner ] && cat /etc/banner
+
+export PATH=/usr/bin:/usr/sbin:/bin:/sbin
+export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
+export HOME=${HOME:-/root}
+export PS1='\u@\h:\w\$ '
+
+[ -x /bin/more ] || alias more=less
+[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
+
+[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
+
+[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
+[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
--- /dev/null
+# Internet (IP) protocols
+#
+# Updated from http://www.iana.org/assignments/protocol-numbers and other
+# sources.
+# New protocols will be added on request if they have been officially
+# assigned by IANA and are not historical.
+# If you need a huge list of used numbers please install the nmap package.
+
+ip 0 IP # internet protocol, pseudo protocol number
+#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+ggp 3 GGP # gateway-gateway protocol
+ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
+st 5 ST # ST datagram mode
+tcp 6 TCP # transmission control protocol
+egp 8 EGP # exterior gateway protocol
+igp 9 IGP # any private interior gateway (Cisco)
+pup 12 PUP # PARC universal packet protocol
+udp 17 UDP # user datagram protocol
+hmp 20 HMP # host monitoring protocol
+xns-idp 22 XNS-IDP # Xerox NS IDP
+rdp 27 RDP # "reliable datagram" protocol
+iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
+xtp 36 XTP # Xpress Transfer Protocol
+ddp 37 DDP # Datagram Delivery Protocol
+idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
+ipv6 41 IPv6 # Internet Protocol, version 6
+ipv6-route 43 IPv6-Route # Routing Header for IPv6
+ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
+idrp 45 IDRP # Inter-Domain Routing Protocol
+rsvp 46 RSVP # Reservation Protocol
+gre 47 GRE # General Routing Encapsulation
+esp 50 IPSEC-ESP # Encap Security Payload [RFC2046]
+ah 51 IPSEC-AH # Authentication Header [RFC2402]
+skip 57 SKIP # SKIP
+ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
+ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
+ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
+rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
+vmtp 81 VMTP # Versatile Message Transport
+eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
+ospf 89 OSPFIGP # Open Shortest Path First IGP
+ax.25 93 AX.25 # AX.25 frames
+ipip 94 IPIP # IP-within-IP Encapsulation Protocol
+etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
+encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
+# 99 # any private encryption scheme
+pim 103 PIM # Protocol Independent Multicast
+ipcomp 108 IPCOMP # IP Payload Compression Protocol
+vrrp 112 VRRP # Virtual Router Redundancy Protocol
+l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
+isis 124 ISIS # IS-IS over IPv4
+sctp 132 SCTP # Stream Control Transmission Protocol
+fc 133 FC # Fibre Channel
+
--- /dev/null
+#!/bin/sh
+
+[ "${TYPE}" = "switch" ] || echo ${BUTTON} > /tmp/failsafe_button
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" ] || exit 0
+
+exec /sbin/poweroff
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" ] || exit 0
+
+. /lib/functions.sh
+
+logger "$BUTTON pressed for $SEEN seconds"
+
+if [ "$SEEN" -lt 1 ]
+then
+ echo "REBOOT" > /dev/console
+ sync
+ reboot
+elif [ "$SEEN" -gt 5 ]
+then
+ echo "FACTORY RESET" > /dev/console
+ jffs2reset -y && reboot &
+fi
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" -o -n "${TYPE}" ] || exit 0
+
+. /lib/functions.sh
+
+local rfkill_state=0
+
+wifi_rfkill_set() {
+ uci set wireless.$1.disabled=$rfkill_state
+}
+
+wifi_rfkill_check() {
+ local disabled
+ config_get disabled $1 disabled
+ [ "$disabled" = "1" ] || rfkill_state=1
+}
+
+config_load wireless
+case "${TYPE}" in
+"switch")
+ [ "${ACTION}" = "released" ] && rfkill_state=1
+ ;;
+*)
+ config_foreach wifi_rfkill_check wifi-device
+ ;;
+esac
+config_foreach wifi_rfkill_set wifi-device
+uci commit wireless
+wifi up
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006-2012 OpenWrt.org
+
+. $IPKG_INSTROOT/lib/functions.sh
+. $IPKG_INSTROOT/lib/functions/service.sh
+
+initscript=$1
+action=${2:-help}
+shift 2
+
+start() {
+ return 0
+}
+
+stop() {
+ return 0
+}
+
+reload() {
+ return 1
+}
+
+restart() {
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+boot() {
+ start "$@"
+}
+
+shutdown() {
+ stop
+}
+
+disable() {
+ name="$(basename "${initscript}")"
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/K??$name
+}
+
+enable() {
+ name="$(basename "${initscript}")"
+ disable
+ [ -n "$START" -o -n "$STOP" ] || {
+ echo "/etc/init.d/$name does not have a START or STOP value"
+ return 1
+ }
+ [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
+ [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
+}
+
+enabled() {
+ name="$(basename "${initscript}")"
+ [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ]
+}
+
+depends() {
+ return 0
+}
+
+help() {
+ cat <<EOF
+Syntax: $initscript [command]
+
+Available commands:
+ start Start the service
+ stop Stop the service
+ restart Restart the service
+ reload Reload configuration files (or restart if that fails)
+ enable Enable service autostart
+ disable Disable service autostart
+$EXTRA_HELP
+EOF
+}
+
+# for procd
+start_service() {
+ return 0
+}
+
+stop_service() {
+ return 0
+}
+
+service_triggers() {
+ return 0
+}
+
+service_running() {
+ return 0
+}
+
+${INIT_TRACE:+set -x}
+
+. "$initscript"
+
+[ -n "$USE_PROCD" ] && {
+ EXTRA_COMMANDS="${EXTRA_COMMANDS} running"
+
+ . $IPKG_INSTROOT/lib/functions/procd.sh
+ basescript=$(readlink "$initscript")
+ rc_procd() {
+ procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
+ "$@"
+ procd_close_service
+ }
+
+ start() {
+ rc_procd start_service "$@"
+ if eval "type service_started" 2>/dev/null >/dev/null; then
+ service_started
+ fi
+ }
+
+ stop() {
+ stop_service "$@"
+ procd_kill "$(basename ${basescript:-$initscript})" "$1"
+ }
+
+ reload() {
+ if eval "type reload_service" 2>/dev/null >/dev/null; then
+ reload_service "$@"
+ else
+ restart
+ fi
+ }
+
+ running() {
+ service_running "$@"
+ }
+}
+
+ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
+list_contains ALL_COMMANDS "$action" || action=help
+[ "$action" = "reload" ] && action='eval reload "$@" || restart "$@" && :'
+$action "$@"
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && date -s @$maxtime
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+
+START=10
+USE_PROCD=1
+
+validate_system_section()
+{
+ uci_validate_section system system "${1}" \
+ 'hostname:string:OpenWrt' \
+ 'conloglevel:uinteger' \
+ 'buffersize:uinteger' \
+ 'timezone:string:UTC' \
+ 'zonename:string'
+
+ return $?
+}
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ validate_system_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ echo "$hostname" > /proc/sys/kernel/hostname
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+ echo "$timezone" > /tmp/TZ
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+reload_service() {
+ config_load system
+ config_foreach system_config system
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_system_section
+}
+
+start_service() {
+ reload_service
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+USE_PROCD=1
+QUIET=""
+
+validate_firewall_redirect()
+{
+ uci_validate_section firewall redirect "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
+ 'dest:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
+ 'target:or("SNAT", "DNAT")'
+
+ return $?
+}
+
+validate_firewall_rule()
+{
+ uci_validate_section firewall rule "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'dest:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
+ 'target:string'
+
+ return $?
+}
+
+service_triggers() {
+ procd_add_reload_trigger firewall
+
+ procd_open_validate
+ validate_firewall_redirect
+ validate_firewall_rule
+ procd_close_validate
+}
+
+restart() {
+ fw3 restart
+}
+
+start_service() {
+ fw3 ${QUIET} start
+}
+
+stop_service() {
+ fw3 flush
+}
+
+reload_service() {
+ fw3 reload
+}
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ QUIET=1
+ start
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010 Jo-Philipp Wich
+
+START=50
+
+USE_PROCD=1
+
+UHTTPD_BIN="/usr/sbin/uhttpd"
+PX5G_BIN="/usr/sbin/px5g"
+
+append_arg() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get val "$cfg" "$var"
+ [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}"
+}
+
+append_bool() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+generate_keys() {
+ local cfg="$1"
+ local key="$2"
+ local crt="$3"
+ local days bits country state location commonname
+
+ config_get days "$cfg" days
+ config_get bits "$cfg" bits
+ config_get country "$cfg" country
+ config_get state "$cfg" state
+ config_get location "$cfg" location
+ config_get commonname "$cfg" commonname
+
+ [ -x "$PX5G_BIN" ] && {
+ $PX5G_BIN selfsigned -der \
+ -days ${days:-730} -newkey rsa:${bits:-1024} -keyout "$UHTTPD_KEY" -out "$UHTTPD_CERT" \
+ -subj /C="${country:-DE}"/ST="${state:-Saxony}"/L="${location:-Leipzig}"/CN="${commonname:-OpenWrt}"
+ }
+}
+
+start_instance()
+{
+ UHTTPD_CERT=""
+ UHTTPD_KEY=""
+
+ local cfg="$1"
+ local realm="$(uci_get system.@system[0].hostname)"
+ local listen http https interpreter indexes path handler
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command "$UHTTPD_BIN" -f
+
+ append_arg "$cfg" home "-h"
+ append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
+ append_arg "$cfg" config "-c"
+ append_arg "$cfg" cgi_prefix "-x"
+ [ -f /usr/lib/uhttpd_lua.so ] && {
+ config_get handler "$cfg" lua_handler
+ [ -f "$handler" ] && append_arg "$cfg" lua_prefix "-l" && {
+ procd_append_param command "-L" "$handler"
+ }
+ }
+ [ -f /usr/lib/uhttpd_ubus.so ] && {
+ append_arg "$cfg" ubus_prefix "-u"
+ append_arg "$cfg" ubus_socket "-U"
+ }
+ append_arg "$cfg" script_timeout "-t"
+ append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" http_keepalive "-k"
+ append_arg "$cfg" tcp_keepalive "-A"
+ append_arg "$cfg" error_page "-E"
+ append_arg "$cfg" max_requests "-n" 3
+ append_arg "$cfg" max_connections "-N"
+
+ append_bool "$cfg" no_ubusauth "-a" 0
+ append_bool "$cfg" no_symlinks "-S" 0
+ append_bool "$cfg" no_dirlists "-D" 0
+ append_bool "$cfg" rfc1918_filter "-R" 0
+
+ config_get http "$cfg" listen_http
+ for listen in $http; do
+ procd_append_param command -p "$listen"
+ done
+
+ config_get interpreter "$cfg" interpreter
+ for path in $interpreter; do
+ procd_append_param command -i "$path"
+ done
+
+ config_get indexes "$cfg" index_page
+ for path in $indexes; do
+ procd_append_param command -I "$path"
+ done
+
+ config_get https "$cfg" listen_https
+ config_get UHTTPD_KEY "$cfg" key /etc/uhttpd.key
+ config_get UHTTPD_CERT "$cfg" cert /etc/uhttpd.crt
+
+ [ -n "$https" ] && {
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] || {
+ config_foreach generate_keys cert
+ }
+
+ [ -f "$UHTTPD_CERT" -a -f "$UHTTPD_KEY" ] && {
+ append_arg "$cfg" cert "-C"
+ append_arg "$cfg" key "-K"
+
+ for listen in $https; do
+ procd_append_param command -s "$listen"
+ done
+ }
+ }
+
+ procd_close_instance
+
+ # Check if daemon is running, if not then
+ # re-execute in foreground to display error.
+# sleep 1 && service_check $UHTTPD_BIN || \
+# $UHTTPD_BIN -f $UHTTPD_ARGS
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "uhttpd"
+}
+
+start_service() {
+ config_load uhttpd
+ config_foreach start_instance uhttpd
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+HOSTFILE="/tmp/hosts/dhcp"
+TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ config_get_bool dnssec "$cfg" dnssec 0
+ [ "$dnssec" -gt 0 ] && {
+ xappend "--conf-file=$TRUSTANCHORSFILE"
+ xappend "--dnssec"
+ append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+
+ config_get_bool dns "$cfg" dns 0
+ [ "$dns" = "1" ] && {
+ echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE
+ }
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+ echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+START=95
+
+start() {
+ . /usr/lib/ddns/dynamic_dns_functions.sh
+ start_daemon_for_all_ddns_sections
+}
+
+stop() {
+ killall -9 dynamic_dns_updater.sh
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && mount_root done
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
+ return $?
+}
+
+start_service() {
+ local server enabled enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ $enabled = 0 ] && return
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in $server; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+exit 0
--- /dev/null
+search lan
+nameserver 127.0.0.1
--- /dev/null
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+daytime 13/tcp
+daytime 13/udp
+netstat 15/tcp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp 21/tcp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+smtp 25/tcp
+time 37/tcp
+time 37/udp
+whois 43/tcp
+domain 53/tcp
+domain 53/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/udp
+finger 79/tcp
+www 80/tcp http
+kerberos 88/tcp kerberos5 krb5 kerberos-sec
+kerberos 88/udp kerberos5 krb5 kerberos-sec
+pop3 110/tcp
+pop3 110/udp
+sunrpc 111/tcp
+sunrpc 111/udp
+auth 113/tcp ident
+sftp 115/tcp
+nntp 119/tcp
+ntp 123/tcp
+ntp 123/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap2 143/tcp imap
+imap2 143/udp imap
+snmp 161/tcp
+snmp 161/udp
+snmp-trap 162/tcp snmptrap
+snmp-trap 162/udp snmptrap
+xdmcp 177/tcp
+xdmcp 177/udp
+bgp 179/tcp
+bgp 179/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+https 443/tcp
+https 443/udp
+microsoft-ds 445/tcp
+microsoft-ds 445/udp
+isakmp 500/tcp
+isakmp 500/udp
+rtsp 554/tcp
+rtsp 554/udp
+ipp 631/tcp
+ipp 631/udp
+syslog 514/udp
+printer 515/tcp spooler
+dhcpv6-client 546/tcp
+dhcpv6-client 546/udp
+dhcpv6-server 547/tcp
+dhcpv6-server 547/udp
+afpovertcp 548/tcp
+afpovertcp 548/udp
+nntps 563/tcp snntp
+nntps 563/udp snntp
+ldaps 636/tcp
+ldaps 636/udp
+tinc 655/tcp
+tinc 655/udp
+rsync 873/tcp
+rsync 873/udp
+ftps-data 989/tcp
+ftps 990/tcp
+imaps 993/tcp
+imaps 993/udp
+ircs 994/tcp
+ircs 994/udp
+pop3s 995/tcp
+pop3s 995/udp
+socks 1080/tcp
+socks 1080/udp
+openvpn 1194/tcp
+openvpn 1194/udp
+l2f 1701/tcp l2tp
+l2f 1701/udp l2tp
+radius 1812/tcp
+radius 1812/udp
+radius-acct 1813/tcp radacct
+radius-acct 1813/udp radacct
+nfs 2049/tcp
+nfs 2049/udp
+dict 2628/tcp
+dict 2628/udp
+gpsd 2947/tcp
+gpsd 2947/udp
+icpv2 3130/tcp icp
+icpv2 3130/udp icp
+mysql 3306/tcp
+mysql 3306/udp
+nut 3493/tcp
+nut 3493/udp
+distcc 3632/tcp
+distcc 3632/udp
+daap 3689/tcp
+daap 3689/udp
+svn 3690/tcp subversion
+svn 3690/udp subversion
+epmd 4369/tcp
+epmd 4369/udp
+iax 4569/tcp
+iax 4569/udp
+mtn 4691/tcp
+mtn 4691/udp
+munin 4949/tcp
+sip 5060/tcp
+sip 5060/udp
+sip-tls 5061/tcp
+sip-tls 5061/udp
+xmpp-client 5222/tcp jabber-client
+xmpp-client 5222/udp jabber-client
+xmpp-server 5269/tcp jabber-server
+xmpp-server 5269/udp jabber-server
+mdns 5353/tcp
+mdns 5353/udp
+postgresql 5432/tcp postgres
+postgresql 5432/udp postgres
+x11 6000/tcp
+x11 6000/udp
+mysql-proxy 6446/tcp
+mysql-proxy 6446/udp
+bacula-dir 9101/tcp
+bacula-dir 9101/udp
+bacula-fd 9102/tcp
+bacula-fd 9102/udp
+bacula-sd 9103/tcp
+bacula-sd 9103/udp
+nbd 10809/tcp
+zabbix-agent 10050/tcp
+zabbix-agent 10050/udp
+zabbix-trapper 10051/tcp
+zabbix-trapper 10051/udp
+hkp 11371/tcp
+hkp 11371/udp
+ssmtp 465/tcp smtps
+spamd 783/tcp
+zebrasrv 2600/tcp
+zebra 2601/tcp
+ripd 2602/tcp
+ripngd 2603/tcp
+ospfd 2604/tcp
+bgpd 2605/tcp
+ospf6d 2606/tcp
+ospfapi 2607/tcp
+isisd 2608/tcp
+sane-port 6566/tcp sane saned
+ircd 6667/tcp
+git 9418/tcp
+
--- /dev/null
+root:$1$458QMEXZ$3Btqh6KbKhzUUMRipNbos/:16263:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+root::0:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+kernel.panic=3
+net.ipv4.conf.default.arp_ignore=1
+net.ipv4.conf.all.arp_ignore=1
+net.ipv4.ip_forward=1
+net.ipv4.icmp_echo_ignore_broadcasts=1
+net.ipv4.icmp_ignore_bogus_error_responses=1
+net.ipv4.tcp_ecn=0
+net.ipv4.tcp_fin_timeout=30
+net.ipv4.tcp_keepalive_time=120
+net.ipv4.tcp_syncookies=1
+net.ipv4.tcp_timestamps=1
+net.ipv4.tcp_sack=1
+net.ipv4.tcp_dsack=1
+
+net.ipv6.conf.default.forwarding=1
+net.ipv6.conf.all.forwarding=1
+
+net.netfilter.nf_conntrack_acct=1
+net.netfilter.nf_conntrack_checksum=0
+net.netfilter.nf_conntrack_max=16384
+net.netfilter.nf_conntrack_tcp_timeout_established=3600
+net.netfilter.nf_conntrack_udp_timeout=60
+net.netfilter.nf_conntrack_udp_timeout_stream=180
+
+# disable bridge firewalling by default
+net.bridge.bridge-nf-call-arptables=0
+net.bridge.bridge-nf-call-ip6tables=0
+net.bridge.bridge-nf-call-iptables=0
--- /dev/null
+## This file contains files and directories that should
+## be preserved during an upgrade.
+
+# /etc/example.conf
+# /etc/openvpn/
--- /dev/null
+ _______ ________ __
+ | |.-----.-----.-----.| | | |.----.| |_
+ | - || _ | -__| || | | || _|| _|
+ |_______|| __|_____|__|__||________||__| |____|
+ |__| W I R E L E S S F R E E D O M
+ -----------------------------------------------------
+ BARRIER BREAKER (Bleeding Edge, r41831)
+ -----------------------------------------------------
+ * 1/2 oz Galliano Pour all ingredients into
+ * 4 oz cold Coffee an irish coffee mug filled
+ * 1 1/2 oz Dark Rum with crushed ice. Stir.
+ * 2 tsp. Creme de Cacao
+ -----------------------------------------------------
--- /dev/null
+#################################################################
+# In order to enable dynamic dns you need at least one section,
+# and in that seciton the "enabled" option must be set to one
+#
+# Each section represents an update to a different service
+#
+# You specify your domain name, your username and your password
+# with the optins "domain", "username" and "password" respectively
+#
+# Next you need to specify the name of the service you are
+# connecting to "eg. dyndns.org". The format of the update
+# urls for several different dynamic dns services is specified
+# in the /usr/lib/ddns/services file. This list is hardly complete
+# as there are many, many different dynamic dns services. If your
+# service is on the list you can merely specify it with the
+# "service_name" option. Otherwise you will need to determine
+# the format of the url to update with. You can either add an
+# entry to the /usr/lib/ddns/services file or specify this with
+# the "update_url" option.
+#
+# We also need to specify the source of the ip address to associate with
+# your domain. The "ip_source" option can be "network", "interface"
+# or "web", with "network" as the default.
+#
+# If "ip_source" is "network" you specify a network section in your
+# /etc/network config file (e.g. "wan", which is the default) with
+# the "ip_network" option. If you specify "wan", you will update
+# with whatever the ip for your wan is.
+#
+# If "ip_source" is "interface" you specify a hardware interface
+# (e.g. "eth1") and whatever the current ip of this interface is
+# will be associated with the domain when an update is performed.
+#
+# If "ip_source" is "script" you specify a script to obtain ip address.
+# The "ip_script" option should contain path to your script.
+#
+# The last possibility is that "ip_source" is "web", which means
+# that in order to obtain our ip address we will connect to a
+# website, and the first valid ip address listed on that page
+# will be assumed to be ours. If you are behind another firewall
+# this is the best option since none of the local networks or
+# interfaces will have the external ip. The website to connect
+# to is specified by the "ip_url" option. You may specify multiple
+# urls in the option, separated by whitespace.
+#
+# Finally we need to specify how often to check whether we need
+# to check whether the ip address has changed (and if so update
+# it) and how often we need to force an update ( many services
+# will expire your domain if you don't connect and do an update
+# every so often). Use the "check_interval" to specify how
+# often to check whether an update is necessary, the "retry_interval"
+# to specify how often to retry in case the update has failed, and
+# the "force_interval" option to specify how often to force an
+# update. Specify the units for these values with the "check_unit",
+# the "retry_init" and the "force_unit" options. Units can be
+# "days", "hours", "minutes" or "seconds". The default force_unit
+# is hours, the default retry_unit is seconds and the default
+# check_unit is seconds. The default check_interval is 600 seconds,
+# or ten minutes. The default retry_interval is 60 seconds, or one
+# minute. The default force_interval is 72 hours or 3 days.
+#
+#
+#########################################################
+
+config service "myddns"
+ option enabled "1"
+ #option interface "wan"
+ #option use_syslog "1"
+
+ option service_name "dyndns.org"
+ option domain "zoller.homeip.net"
+ option username "moellein"
+ option password "telefon1"
+ option use_https "0"
+
+ option force_interval "72"
+ option force_unit "hours"
+ option check_interval "10"
+ option check_unit "minutes"
+ option retry_interval "60"
+ option retry_unit "seconds"
+
+ #option ip_source "network"
+ #option ip_network "wan"
+
+ option ip_source "interface"
+ option ip_interface "pppoe-wan"
+
+ #option ip_source "script"
+ #option ip_script "path to your scrip"
+
+ #option ip_source "web"
+ #option ip_url "http://checkip.dyndns.com/"
+
+ #option update_url "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
+
+
--- /dev/null
+
+config dnsmasq
+ option domainneeded '1'
+ option boguspriv '1'
+ option localise_queries '1'
+ option rebind_protection '1'
+ option rebind_localhost '1'
+ option local '/lan/'
+ option domain 'lan'
+ option expandhosts '1'
+ option authoritative '1'
+ option readethers '1'
+ option leasefile '/tmp/dhcp.leases'
+ option resolvfile '/tmp/resolv.conf.auto'
+ list 'interface' lan
+ list 'interface' fewo
+
+config 'dhcp' 'fewo'
+ option 'interface' 'fewo'
+ option 'start' '50'
+ option 'limit' '100'
+ option 'leasetime' '1h'
+
+config dhcp 'lan'
+ option interface 'lan'
+ option start '100'
+ option limit '150'
+ option leasetime '12h'
+ option dhcpv6 'server'
+ option ra 'server'
+
+config dhcp 'wan'
+ option interface 'wan'
+ option ignore '1'
+
+config odhcpd 'odhcpd'
+ option maindhcp '0'
+ option leasefile '/tmp/hosts/odhcpd'
+ option leasetrigger '/usr/sbin/odhcpd-update'
+
--- /dev/null
+config dropbear
+ option PasswordAuth 'on'
+ option RootPasswordAuth 'on'
+ option Port '22'
+# option BannerFile '/etc/banner'
--- /dev/null
+config defaults
+ option syn_flood 1
+ option input ACCEPT
+ option output ACCEPT
+ option forward REJECT
+# Uncomment this line to disable ipv6 rules
+# option disable_ipv6 1
+
+config zone
+ option 'name' 'fewo'
+ list 'network' 'fewo'
+ option 'input' 'REJECT'
+ option 'forward' 'REJECT'
+ option 'output' 'ACCEPT'
+
+config zone
+ option name lan
+ list network 'lan'
+ option input ACCEPT
+ option output ACCEPT
+ option forward ACCEPT
+
+config zone
+ option name wan
+ list network 'wan'
+ list network 'wan6'
+ option input REJECT
+ option output ACCEPT
+ option forward REJECT
+ option masq 1
+ option mtu_fix 1
+
+config forwarding
+ option src 'fewo'
+ option dest 'wan'
+
+config forwarding
+ option src lan
+ option dest wan
+
+config 'rule'
+ option 'name' 'Allow DNS Queries'
+ option 'src' 'fewo'
+ option 'dest_port' '53'
+ option 'proto' 'tcpudp'
+ option 'target' 'ACCEPT'
+
+config 'rule'
+ option 'name' 'Allow DHCP request'
+ option 'src' 'fewo'
+ option 'src_port' '67-68'
+ option 'dest_port' '67-68'
+ option 'proto' 'udp'
+ option 'target' 'ACCEPT'
+
+config rule
+ option src 'fewo'
+ option dest 'lan'
+ option name 'Deny Guest -> LAN'
+ option proto 'all'
+ option target 'DROP'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN http'
+ option proto 'tcp'
+ option dest_port '80'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN https'
+ option proto 'tcp'
+ option dest_port '443'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '25'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '587'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '995'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '143'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '993'
+
+config rule
+ option target 'ACCEPT'
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Allow Guest -> WAN Mail'
+ option proto 'tcp'
+ option dest_port '110'
+
+config rule
+ option src 'fewo'
+ option dest 'wan'
+ option name 'Deny Guest -> WAN'
+ option proto 'all'
+ option target 'DROP'
+
+# We need to accept udp packets on port 68,
+# see https://dev.openwrt.org/ticket/4108
+config rule
+ option name Allow-DHCP-Renew
+ option src wan
+ option proto udp
+ option dest_port 68
+ option target ACCEPT
+ option family ipv4
+
+# Allow IPv4 ping
+config rule
+ option name Allow-Ping
+ option src wan
+ option proto icmp
+ option icmp_type echo-request
+ option family ipv4
+ option target ACCEPT
+
+# Allow DHCPv6 replies
+# see https://dev.openwrt.org/ticket/10381
+config rule
+ option name Allow-DHCPv6
+ option src wan
+ option proto udp
+ option src_ip fe80::/10
+ option src_port 547
+ option dest_ip fe80::/10
+ option dest_port 546
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential incoming IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Input
+ option src wan
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ list icmp_type router-solicitation
+ list icmp_type neighbour-solicitation
+ list icmp_type router-advertisement
+ list icmp_type neighbour-advertisement
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# Allow essential forwarded IPv6 ICMP traffic
+config rule
+ option name Allow-ICMPv6-Forward
+ option src wan
+ option dest *
+ option proto icmp
+ list icmp_type echo-request
+ list icmp_type echo-reply
+ list icmp_type destination-unreachable
+ list icmp_type packet-too-big
+ list icmp_type time-exceeded
+ list icmp_type bad-header
+ list icmp_type unknown-header-type
+ option limit 1000/sec
+ option family ipv6
+ option target ACCEPT
+
+# include a file with users custom iptables rules
+config include
+ option path /etc/firewall.user
+
+
+### EXAMPLE CONFIG SECTIONS
+# do not allow a specific ip to access wan
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option dest wan
+# option proto tcp
+# option target REJECT
+
+# block a specific mac on wan
+#config rule
+# option dest wan
+# option src_mac 00:11:22:33:44:66
+# option target REJECT
+
+# block incoming ICMP traffic on a zone
+#config rule
+# option src lan
+# option proto ICMP
+# option target DROP
+
+# port redirect port coming in on wan to lan
+#config redirect
+# option src wan
+# option src_dport 80
+# option dest lan
+# option dest_ip 192.168.16.235
+# option dest_port 80
+# option proto tcp
+
+# port redirect of remapped ssh port (22001) on wan
+config redirect
+ option src wan
+ option src_dport 22001
+ option dest lan
+ option dest_port 22
+ option proto tcp
+
+# allow IPsec/ESP and ISAKMP passthrough
+#config rule
+# option src wan
+# option dest lan
+# option protocol esp
+# option target ACCEPT
+
+#config rule
+# option src wan
+# option dest lan
+# option src_port 500
+# option dest_port 500
+# option proto udp
+# option target ACCEPT
+
+### FULL CONFIG SECTIONS
+#config rule
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 80
+# option dest wan
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
+# option target REJECT
+
+#config redirect
+# option src lan
+# option src_ip 192.168.45.2
+# option src_mac 00:11:22:33:44:55
+# option src_port 1024
+# option src_dport 80
+# option dest_ip 194.25.2.129
+# option dest_port 120
+# option proto tcp
--- /dev/null
+
+config interface 'loopback'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
+
+config globals 'globals'
+ option ula_prefix 'fdc6:cb4f:c705::/48'
+
+config interface 'fewo'
+ option 'proto' 'static'
+ option 'ipaddr' '10.0.0.1'
+ option 'netmask' '255.255.255.0'
+
+config interface 'lan'
+ option ifname 'eth0'
+ option force_link '1'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '192.168.1.1'
+ option netmask '255.255.255.0'
+ option ip6assign '60'
+
+config interface 'wan'
+ option ifname 'eth1'
+ option _orig_ifname 'eth1'
+ option _orig_bridge 'false'
+ option proto 'pppoe'
+ option username '8509-001'
+ option password 'V0aFqWkQ'
+
+config interface 'wan6'
+ option ifname '@wan'
+ option proto 'dhcpv6'
+
+config switch
+ option name 'switch0'
+ option reset '1'
+ option enable_vlan '1'
+
+config switch_vlan
+ option device 'switch0'
+ option vlan '1'
+ option ports '0 1 2 3 4'
+
--- /dev/null
+
+config system
+ option hostname 'OpenWrt'
+ option timezone 'UTC'
+
+config timeserver 'ntp'
+ list server '0.openwrt.pool.ntp.org'
+ list server '1.openwrt.pool.ntp.org'
+ list server '2.openwrt.pool.ntp.org'
+ list server '3.openwrt.pool.ntp.org'
+ option enabled '1'
+ option enable_server '0'
+
+config led 'led_wan'
+ option name 'WAN'
+ option sysfs 'tp-link:green:wan'
+ option trigger 'netdev'
+ option dev 'eth1'
+ option mode 'link tx rx'
+
+config led 'led_lan1'
+ option name 'LAN1'
+ option sysfs 'tp-link:green:lan1'
+ option trigger 'switch0'
+ option port_mask '0x10'
+
+config led 'led_lan2'
+ option name 'LAN2'
+ option sysfs 'tp-link:green:lan2'
+ option trigger 'switch0'
+ option port_mask '0x08'
+
+config led 'led_lan3'
+ option name 'LAN3'
+ option sysfs 'tp-link:green:lan3'
+ option trigger 'switch0'
+ option port_mask '0x04'
+
+config led 'led_lan4'
+ option name 'LAN4'
+ option sysfs 'tp-link:green:lan4'
+ option trigger 'switch0'
+ option port_mask '0x02'
+
+config led 'led_wlan'
+ option name 'WLAN'
+ option sysfs 'tp-link:green:wlan'
+ option trigger 'phy0tpt'
+
--- /dev/null
+config network
+ option init network
+ list affects dhcp
+ list affects radvd
+
+config wireless
+ list affects network
+
+config firewall
+ option init firewall
+ list affects luci-splash
+ list affects qos
+ list affects miniupnpd
+
+config olsr
+ option init olsrd
+
+config dhcp
+ option init dnsmasq
+
+config dropbear
+ option init dropbear
+
+config httpd
+ option init httpd
+
+config fstab
+ option init fstab
+
+config qos
+ option init qos
+
+config system
+ option init led
+ list affects luci_statistics
+
+config luci_splash
+ option init luci_splash
+
+config upnpd
+ option init miniupnpd
+
+config ntpclient
+ option init ntpclient
+
+config samba
+ option init samba
+
+config tinyproxy
+ option init tinyproxy
+
+config 6relayd
+ option init 6relayd
--- /dev/null
+
+config uhttpd 'main'
+ list listen_http '0.0.0.0:80'
+ list listen_http '[::]:80'
+ list listen_https '0.0.0.0:443'
+ list listen_https '[::]:443'
+ option home '/www'
+ option rfc1918_filter '1'
+ option max_requests '3'
+ option max_connections '100'
+ option cert '/etc/uhttpd.crt'
+ option key '/etc/uhttpd.key'
+ option cgi_prefix '/cgi-bin'
+ option script_timeout '60'
+ option network_timeout '30'
+ option http_keepalive '20'
+ option tcp_keepalive '1'
+ option ubus_prefix '/ubus'
+
+config cert 'px5g'
+ option days '730'
+ option bits '1024'
+ option country 'DE'
+ option state 'Berlin'
+ option location 'Berlin'
+ option commonname 'OpenWrt'
+
--- /dev/null
+
+config wifi-device 'radio0'
+ option type 'mac80211'
+ option channel '11'
+ option hwmode '11g'
+ option path 'platform/qca953x_wmac'
+ option htmode 'HT20'
+ option country 'US'
+ option txpower '20'
+
+config wifi-iface
+ option device 'radio0'
+ option network 'lan'
+ option mode 'ap'
+ option ssid 'zoller'
+ option wds '1'
+ option encryption 'psk-mixed'
+ option key 'a4b7ffdab4729cabb68'
+
+config wifi-iface
+ option device 'radio0'
+ option network 'fewo'
+ option mode 'ap'
+ option ssid 'fewo'
+ option encryption 'psk-mixed'
+ option key 'a8b4f0814d93c92'
+
--- /dev/null
+config 'wshaper' 'settings'
+ option 'network' 'wan'
+ option 'downlink' '6000'
+ option 'uplink' '6000'
+
+config wshaper 'settings'
+ option network 'fewo'
+ option downlink '128'
+ option uplink '768'
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2009-2013 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/ar71xx.sh
+
+get_status_led() {
+ case $(ar71xx_board_name) in
+ alfa-nx)
+ status_led="alfa:green:led_8"
+ ;;
+ all0305)
+ status_led="eap7660d:green:ds4"
+ ;;
+ ap132)
+ status_led="ap132:green:status"
+ ;;
+ ap136-010|\
+ ap136-020)
+ status_led="ap136:green:status"
+ ;;
+ ap135-020)
+ status_led="ap135:green:status"
+ ;;
+ ap81)
+ status_led="ap81:green:status"
+ ;;
+ ap83)
+ status_led="ap83:green:power"
+ ;;
+ ap96)
+ status_led="ap96:green:led2"
+ ;;
+ aw-nr580)
+ status_led="aw-nr580:green:ready"
+ ;;
+ bullet-m | rocket-m | nano-m | nanostation-m | nanostation-m-xw)
+ status_led="ubnt:green:link4"
+ ;;
+ bxu2000n-2-a1)
+ status_led="bhu:green:status"
+ ;;
+ cap4200ag)
+ status_led="senao:green:pwr"
+ ;;
+ db120)
+ status_led="db120:green:status"
+ ;;
+ dir-505-a1 |\
+ dir-600-a1 |\
+ dir-615-e1 |\
+ dir-615-e4)
+ status_led="d-link:green:power"
+ ;;
+ dir-615-c1)
+ status_led="d-link:green:status"
+ ;;
+ dir-825-b1)
+ status_led="d-link:orange:power"
+ ;;
+ dir-825-c1 |\
+ dir-835-a1)
+ status_led="d-link:amber:power"
+ ;;
+ eap300v2)
+ status_led="engenius:blue:power"
+ ;;
+ eap7660d)
+ status_led="eap7660d:green:ds4"
+ ;;
+ el-mini | \
+ el-m150)
+ status_led="EasyLink:green:system"
+ ;;
+ gl-inet)
+ status_led="gl-connect:green:lan"
+ ;;
+ esr1750)
+ status_led="esr1750:amber:power"
+ ;;
+ esr900)
+ status_led="engenius:amber:power"
+ ;;
+ hiwifi-hc6361)
+ status_led="hiwifi:blue:system"
+ ;;
+ hornet-ub)
+ status_led="alfa:blue:wps"
+ ;;
+ ja76pf | \
+ ja76pf2)
+ status_led="jjplus:green:led1"
+ ;;
+ ls-sr71)
+ status_led="ubnt:green:d22"
+ ;;
+ mr600)
+ status_led="mr600:orange:power"
+ ;;
+ mr600v2)
+ status_led="mr600:blue:power"
+ ;;
+ mynet-n600 | \
+ mynet-n750)
+ status_led="wd:blue:power"
+ ;;
+ mynet-rext)
+ status_led="wd:blue:power"
+ ;;
+ mzk-w04nu | \
+ mzk-w300nh)
+ status_led="planex:green:status"
+ ;;
+ nbg460n_550n_550nh)
+ status_led="nbg460n:green:power"
+ ;;
+ nbg6716)
+ status_led="nbg6716:white:power"
+ ;;
+ om2p | \
+ om2pv2 | \
+ om2p-hs | \
+ om2p-hsv2 | \
+ om2p-lc)
+ status_led="om2p:blue:power"
+ ;;
+ om5p)
+ status_led="om5p:blue:power"
+ ;;
+ pb44)
+ status_led="pb44:amber:jump1"
+ ;;
+ rb-2011l|\
+ rb-2011uas|\
+ rb-2011uas-2hnd)
+ status_led="rb:green:usr"
+ ;;
+ rb-411 | rb-411u | rb-433 | rb-433u | rb-450 | rb-450g | rb-493)
+ status_led="rb4xx:yellow:user"
+ ;;
+ rb-750)
+ status_led="rb750:green:act"
+ ;;
+ rb-911g-2hpnd|\
+ rb-911g-5hpnd|\
+ rb-912uag-2hpnd|\
+ rb-912uag-5hpnd)
+ status_led="rb:green:user"
+ ;;
+ rb-951ui-2hnd)
+ status_led="rb:green:act"
+ ;;
+ rb-sxt2n|\
+ rb-sxt5n)
+ status_led="rb:green:power"
+ ;;
+ routerstation | routerstation-pro)
+ status_led="ubnt:green:rf"
+ ;;
+ rw2458n)
+ status_led="rw2458n:green:d3"
+ ;;
+ oolite)
+ status_led="oolite:red:system"
+ ;;
+ tew-632brp)
+ status_led="tew-632brp:green:status"
+ ;;
+ tew-673gru)
+ status_led="trendnet:blue:wps"
+ ;;
+ tew-712br|\
+ tew-732br)
+ status_led="trendnet:green:power"
+ ;;
+ tl-mr3020)
+ status_led="tp-link:green:wps"
+ ;;
+ tl-wa750re)
+ status_led="tp-link:orange:re"
+ ;;
+ tl-wa850re)
+ status_led="tp-link:blue:re"
+ ;;
+ tl-wa860re)
+ status_led="tp-link:green:power"
+ ;;
+ tl-mr3220 | \
+ tl-mr3220-v2 | \
+ tl-mr3420 | \
+ tl-mr3420-v2 | \
+ tl-wa801nd-v2 | \
+ tl-wa901nd | \
+ tl-wa901nd-v2 | \
+ tl-wa901nd-v3 | \
+ tl-wdr3500 | \
+ tl-wr1041n-v2 | \
+ tl-wr1043nd | \
+ tl-wr1043nd-v2 | \
+ tl-wr741nd | \
+ tl-wr741nd-v4 | \
+ tl-wr841n-v1 | \
+ tl-wr841n-v7 | \
+ tl-wr841n-v8 | \
+ tl-wa830re-v2 | \
+ tl-wr842n-v2 | \
+ tl-wr941nd)
+ status_led="tp-link:green:system"
+ ;;
+ archer-c5 | \
+ archer-c7 | \
+ tl-wdr4900-v2 | \
+ tl-mr10u | \
+ tl-mr13u | \
+ tl-wdr4300 | \
+ tl-wr703n | \
+ tl-wr710n | \
+ tl-wr720n-v3)
+ status_led="tp-link:blue:system"
+ ;;
+ tl-wr841n-v9)
+ status_led="tp-link:green:qss"
+ ;;
+ tl-wr2543n)
+ status_led="tp-link:green:wps"
+ ;;
+ tube2h)
+ status_led="alfa:green:signal4"
+ ;;
+ unifi)
+ status_led="ubnt:green:dome"
+ ;;
+ uap-pro)
+ status_led="ubnt:white:dome"
+ ;;
+ airgateway)
+ status_led="ubnt:white:status"
+ ;;
+ whr-g301n | \
+ whr-hp-g300n | \
+ whr-hp-gn | \
+ wzr-hp-g300nh)
+ status_led="buffalo:green:router"
+ ;;
+ wlae-ag300n)
+ status_led="buffalo:green:status"
+ ;;
+ wzr-hp-ag300h | \
+ wzr-hp-g300nh2)
+ status_led="buffalo:red:diag"
+ ;;
+ wndap360 | \
+ wndr3700 | \
+ wndr3700v4 | \
+ wndr4300 | \
+ wnr2000 | \
+ wnr2200 |\
+ wnr612-v2)
+ status_led="netgear:green:power"
+ ;;
+ wp543)
+ status_led="wp543:green:diag"
+ ;;
+ wrt400n)
+ status_led="wrt400n:blue:wps"
+ ;;
+ wrt160nl)
+ status_led="wrt160nl:blue:wps"
+ ;;
+ zcn-1523h-2 | zcn-1523h-5)
+ status_led="zcn-1523h:amber:init"
+ ;;
+ wlr8100)
+ status_led="sitecom:amber:status"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}
--- /dev/null
+# Change the following lines if you want dnsmasq to serve SRV
+# records.
+# You may add multiple srv-host lines.
+# The fields are <name>,<target>,<port>,<priority>,<weight>
+
+# A SRV record sending LDAP for the example.com domain to
+# ldapserver.example.com port 289
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
+
+# Two SRV records for LDAP, each with different priorities
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
+#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
+
+# A SRV record indicating that there is no LDAP server for the domain
+# example.com
+#srv-host=_ldap._tcp.example.com
+
+# The following line shows how to make dnsmasq serve an arbitrary PTR
+# record. This is useful for DNS-SD.
+# The fields are <name>,<target>
+#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"
+
+# Change the following lines to enable dnsmasq to serve TXT records.
+# These are used for things like SPF and zeroconf.
+# The fields are <name>,<text>,<text>...
+
+#Example SPF.
+#txt-record=example.com,"v=spf1 a -all"
+
+#Example zeroconf
+#txt-record=_http._tcp.example.com,name=value,paper=A4
+
+# Provide an alias for a "local" DNS name. Note that this _only_ works
+# for targets which are names from DHCP or /etc/hosts. Give host
+# "bert" another name, bertrand
+# The fields are <cname>,<target>
+#cname=bertand,bert
--- /dev/null
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDhvRcN5sQUdGGEChpcQtYjbE6yTSJShFADGysnJcg2tvbwx2UDQMsNLUL2gNZstmSBsoKzghVtwSudL6PQXw5HDz7ybKSX4dCBK6H4VLj6K9x2KgedCI3th4wdxQqSxbhkz7eyr2bRm9Ppl2rzrQuxCmG7FvkfAo9cvWfohYZaG4pvfrL/yG8xwfhqRss9YphRda6uMawOryWoGi/Cgjsfzh9fFHU956SxhcdhAKBOLPRzlSndtlgyLNUCXse23JuZTN+TJ7mU2IBzTo7EV3QvHBrrPD/tysI7TxRq0yw7nrGengepDiczh+4/oeRpLkFuMe10QjkSza1aJ5x36Fmz mhoellein@alienware
--- /dev/null
+# This file is interpreted as shell script.
+# Put your custom iptables rules here, they will
+# be executed with each firewall (re-)start.
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
--- /dev/null
+root:x:0:
+daemon:x:1:
+adm:x:4:
+mail:x:8:
+audio:x:29:
+www-data:x:33:
+ftp:x:55:
+users:x:100:
+network:x:101:
+nogroup:x:65534:
--- /dev/null
+127.0.0.1 localhost
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ }, ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/failsafe" ]
+ ],
+]
--- /dev/null
+#!/bin/sh
+
+ath9k_eeprom_die() {
+ echo "ath9k eeprom: " "$*"
+ exit 1
+}
+
+ath9k_eeprom_extract() {
+ local part=$1
+ local offset=$2
+ local count=$3
+ local mtd
+
+ mtd=$(find_mtd_chardev $part)
+ [ -n "$mtd" ] || \
+ ath9k_eeprom_die "no mtd device found for partition $part"
+
+ dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
+ ath9k_eeprom_die "failed to extract from $mtd"
+}
+
+ath9k_patch_firmware_mac() {
+ local mac=$1
+
+ [ -z "$mac" ] && return
+
+ macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
+}
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+. /lib/ar71xx.sh
+. /lib/functions.sh
+. /lib/functions/system.sh
+
+board=$(ar71xx_board_name)
+
+case "$FIRMWARE" in
+"soc_wmac.eeprom")
+ case $board in
+ wndr3700v4 | \
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 4096 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 0)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+
+"pci_wmac0.eeprom")
+ case $board in
+ wndr3700v4 | \
+ wndr4300)
+ ath9k_eeprom_extract "caldata" 20480 2048
+ ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 12)
+ ;;
+ *)
+ ath9k_eeprom_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
+esac
--- /dev/null
+[ ifup = "$ACTION" ] && {
+ uci_toggle_state network "$INTERFACE" up 1
+ [ -n "$DEVICE" ] && {
+ uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)"
+ uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
+ }
+}
--- /dev/null
+#!/bin/sh
+
+. /lib/functions.sh
+
+if [ "$ACTION" != "ifup" ]; then
+ exit
+fi
+
+config_load network
+
+config_get teql $INTERFACE teql
+
+if [ "$teql" != "" ]; then
+ logger Adding device $DEVICE to TEQL master $teql
+ insmod sch_teql
+ tc qdisc add dev $DEVICE root $teql
+
+ # The kernel doesn't let us bring it up until it has at least one
+ # slave. So bring it up now, if it isn't already.
+ if ! cat /sys/class/net/$teql/carrier &>/dev/null; then
+ ifup $teql &
+ fi
+fi
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
+[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0
+
+/etc/init.d/firewall enabled || exit 0
+
+fw3 -q network "$INTERFACE" >/dev/null || exit 0
+
+logger -t firewall "Reloading firewall due to $ACTION of $INTERFACE ($DEVICE)"
+fw3 -q reload
--- /dev/null
+#!/bin/sh
+
+. /usr/lib/ddns/dynamic_dns_functions.sh
+
+if [ "$ACTION" = "ifup" ]; then
+ start_daemon_for_all_ddns_sections "$INTERFACE"
+fi
+
+
--- /dev/null
+#!/bin/sh
+
+[ "$ACTION" = ifup ] || exit 0
+
+/etc/init.d/dnsmasq enabled && /etc/init.d/dnsmasq start
--- /dev/null
+#!/bin/sh
+
+if [ -f /etc/sysctl.conf ] && [ "$ACTION" = add ]; then
+ sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" /etc/sysctl.conf | \
+ sysctl -e -p - | logger -t sysctl
+fi
--- /dev/null
+#!/bin/sh
+
+# For AR9220 and AR9223, GPIO JTAG must explicit be disabled
+# before LEDs start working. Do this when wifi device is
+# detected.
+
+#
+# $DEVPATH is not valid for some boards (including WZR-HP-AG300H).
+# Manipulate the $DEVPATH to reach the corresponding phyN.
+#
+
+devdir=`dirname $DEVPATH`
+devdir=`dirname $devdir`
+phydir=/sys$devdir/ieee80211
+phyname=`cat $phydir/phy*/name`
+
+if [ -z $phyname -o $ACTION != "add" ]; then exit 0; fi
+
+#
+# ar922x_disable_gpio_jtag():
+#
+# Emulate
+# REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
+# for AR9220 and AR9223.
+#
+
+ar922x_disable_gpio_jtag()
+{
+ local regidx=0x4054
+
+ [ -f /sys/kernel/debug/ieee80211/$1/ath9k/regidx ] && {
+ echo $regidx > /sys/kernel/debug/ieee80211/$1/ath9k/regidx
+ regval=`cat /sys/kernel/debug/ieee80211/$1/ath9k/regval`
+ regval=$((regval | 0x20000))
+ echo regval $regval
+ echo $regval > /sys/kernel/debug/ieee80211/$1/ath9k/regval
+ }
+}
+
+if [ $phyname -a $ACTION = "add" ]; then
+
+ . /lib/ar71xx.sh
+
+ case $(ar71xx_board_name) in
+ wzr-hp-ag300h)
+ ar922x_disable_gpio_jtag $phyname
+ ;;
+ esac;
+fi
+
+exit 0
--- /dev/null
+[
+ [ "case", "ACTION", {
+ "add": [
+ [ "if",
+ [ "and",
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME",
+ [ "null", "full", "ptmx", "zero" ],
+ ],
+ [ "regex", "DEVNAME",
+ [ "^gpio", "^hvc" ],
+ ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0666" ],
+ [ "return" ],
+ ]
+ ],
+ [ "if",
+ [ "or",
+ [ "eq", "DEVNAME", "mapper/control" ],
+ [ "regex", "DEVPATH", "^ppp" ],
+ ],
+ [
+ [ "makedev", "/dev/%DEVNAME%", "0600" ],
+ [ "return" ],
+ ],
+ ],
+ [ "if",
+ [ "has", "DEVNAME" ],
+ [ "makedev", "/dev/%DEVNAME%", "0644" ],
+ ],
+ ],
+ ],
+ [ "if",
+ [ "has", "FIRMWARE" ],
+ [
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
+ [ "load-firmware", "/lib/firmware" ],
+ [ "return" ]
+ ]
+ ],
+ ],
+ "remove" : [
+ [ "if",
+ [ "and",
+ [ "has", "DEVNAME" ],
+ [ "has", "MAJOR" ],
+ [ "has", "MINOR" ],
+ ],
+ [ "rm", "/dev/%DEVNAME%" ]
+ ]
+ ]
+ } ],
+ [ "if",
+ [ "eq", "SUBSYSTEM", "platform" ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "has", "BUTTON" ],
+ [ "eq", "SUBSYSTEM", "button" ],
+ ],
+ [ "exec", "/etc/rc.button/%BUTTON%" ]
+ ],
+ [ "if",
+ [ "eq", "SUBSYSTEM",
+ [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]
+ ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ],
+ [ "if",
+ [ "and",
+ [ "eq", "SUBSYSTEM", "usb-serial" ],
+ [ "regex", "DEVNAME",
+ [ "^ttyUSB", "^ttyACM" ]
+ ],
+ ],
+ [ "exec", "/sbin/hotplug-call", "tty" ]
+ ],
+]
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+START=95
+
+start() {
+ . /usr/lib/ddns/dynamic_dns_functions.sh
+ start_daemon_for_all_ddns_sections
+}
+
+stop() {
+ killall -9 dynamic_dns_updater.sh
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+HOSTFILE="/tmp/hosts/dhcp"
+TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ config_get_bool dnssec "$cfg" dnssec 0
+ [ "$dnssec" -gt 0 ] && {
+ xappend "--conf-file=$TRUSTANCHORSFILE"
+ xappend "--dnssec"
+ append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+
+ config_get_bool dns "$cfg" dns 0
+ [ "$dns" = "1" ] && {
+ echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE
+ }
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+ echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && mount_root done
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+USE_PROCD=1
+QUIET=""
+
+validate_firewall_redirect()
+{
+ uci_validate_section firewall redirect "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
+ 'dest:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
+ 'target:or("SNAT", "DNAT")'
+
+ return $?
+}
+
+validate_firewall_rule()
+{
+ uci_validate_section firewall rule "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'dest:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
+ 'target:string'
+
+ return $?
+}
+
+service_triggers() {
+ procd_add_reload_trigger firewall
+
+ procd_open_validate
+ validate_firewall_redirect
+ validate_firewall_rule
+ procd_close_validate
+}
+
+restart() {
+ fw3 restart
+}
+
+start_service() {
+ fw3 ${QUIET} start
+}
+
+stop_service() {
+ fw3 flush
+}
+
+reload_service() {
+ fw3 reload
+}
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ QUIET=1
+ start
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_remote:bool:1' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix log_remote
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ "${log_remote}" -ne 0 ] || return
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && date -s @$maxtime
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
+ return $?
+}
+
+start_service() {
+ local server enabled enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ $enabled = 0 ] && return
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in $server; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+
+START=10
+USE_PROCD=1
+
+validate_system_section()
+{
+ uci_validate_section system system "${1}" \
+ 'hostname:string:OpenWrt' \
+ 'conloglevel:uinteger' \
+ 'buffersize:uinteger' \
+ 'timezone:string:UTC' \
+ 'zonename:string'
+
+ return $?
+}
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ validate_system_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ echo "$hostname" > /proc/sys/kernel/hostname
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+ echo "$timezone" > /tmp/TZ
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+reload_service() {
+ config_load system
+ config_foreach system_config system
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_system_section
+}
+
+start_service() {
+ reload_service
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=45
+start() {
+ wshaper.htb
+}
+
+stop() {
+ wshaper.htb stop
+}
--- /dev/null
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+::askconsole:/bin/ash --login
--- /dev/null
+#
+# reserved values
+#
+255 local
+254 main
+253 default
+0 unspec
+#
+# local
+#
+#1 inr.ruhep
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+gpio-button-hotplug
--- /dev/null
+nf_defrag_ipv6
+nf_conntrack_ipv6
+ip6_tables
+ip6table_filter
+ip6table_mangle
+ip6table_raw
+ip6t_REJECT
--- /dev/null
+sch_ingress
+sch_hfsc
+cls_fw
+cls_route
+cls_flow
+cls_tcindex
+cls_u32
+em_u32
+act_mirred
+act_skbedit
--- /dev/null
+act_ipt
+act_police
+cls_basic
+em_cmp
+em_meta
+em_nbyte
+em_text
+sch_codel
+sch_dsmark
+sch_gred
+sch_htb
+sch_prio
+sch_red
+sch_sfq
+sch_tbf
+sch_teql
--- /dev/null
+nf_conntrack
+nf_defrag_ipv4
+nf_conntrack_ipv4
+xt_state
+iptable_raw
+xt_CT
+xt_conntrack
--- /dev/null
+x_tables
+xt_tcpudp
+ip_tables
+iptable_filter
+iptable_mangle
+xt_limit
+xt_mac
+xt_multiport
+xt_comment
+xt_LOG
+xt_TCPMSS
+ipt_REJECT
+xt_time
+xt_mark
--- /dev/null
+nf_nat
+xt_nat
+nf_nat_ipv4
+iptable_nat
+ipt_MASQUERADE
+xt_REDIRECT
--- /dev/null
+nf_conntrack_ftp
+nf_conntrack_irc
+nf_nat_ftp
+nf_nat_irc
--- /dev/null
+DISTRIB_ID="OpenWrt"
+DISTRIB_RELEASE="Bleeding Edge"
+DISTRIB_REVISION="r41831"
+DISTRIB_CODENAME="barrier_breaker"
+DISTRIB_TARGET="ar71xx/generic"
+DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r41831"
+DISTRIB_TAINTS="no-all"
--- /dev/null
+src/gz barrier_breaker http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
+dest root /
+dest ram /tmp
+lists_dir ext /var/opkg-lists
+option overlay_root /overlay
--- /dev/null
+root:x:0:0:root:/root:/bin/ash
+daemon:*:1:1:daemon:/var:/bin/false
+ftp:*:55:55:ftp:/home/ftp:/bin/false
+network:*:101:101:network:/var:/bin/false
+nobody:*:65534:65534:nobody:/var:/bin/false
--- /dev/null
+#USERNAME PROVIDER PASSWORD IPADDRESS
--- /dev/null
+#
+# Expression: outbound and not icmp[0] != 8 and not tcp[13] & 4 != 0
+#
+19
+48 0 0 0
+21 0 16 1
+40 0 0 2
+21 0 13 33
+48 0 0 13
+21 0 5 1
+40 0 0 10
+69 9 0 8191
+177 0 0 4
+80 0 0 4
+21 6 7 8
+21 0 5 6
+40 0 0 10
+69 3 0 8191
+177 0 0 4
+80 0 0 17
+69 1 0 4
+6 0 0 4
+6 0 0 0
--- /dev/null
+#debug
+logfile /dev/null
+noipdefault
+noaccomp
+nopcomp
+nocrtscts
+lock
+maxfail 0
+lcp-echo-failure 5
+lcp-echo-interval 1
--- /dev/null
+nameserver 46.243.104.6
+nameserver 83.218.160.2
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2010 Vertical Communications
+
+[ -z "$PREINIT" ] && exec /sbin/init
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+pi_ifname=
+pi_ip=192.168.1.1
+pi_broadcast=192.168.1.255
+pi_netmask=255.255.255.0
+
+fs_failsafe_ifname=
+fs_failsafe_ip=192.168.1.1
+fs_failsafe_broadcast=192.168.1.255
+fs_failsafe_netmask=255.255.255.0
+
+fs_failsafe_wait_timeout=2
+
+pi_suppress_stderr="y"
+pi_init_suppress_stderr="y"
+pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
+pi_init_cmd="/sbin/init"
+
+. /lib/functions.sh
+. /lib/functions/preinit.sh
+. /lib/functions/system.sh
+
+boot_hook_init preinit_essential
+boot_hook_init preinit_main
+boot_hook_init failsafe
+boot_hook_init initramfs
+boot_hook_init preinit_mount_root
+
+for pi_source_file in /lib/preinit/*; do
+ . $pi_source_file
+done
+
+boot_run_hook preinit_essential
+
+pi_mount_skip_next=false
+pi_jffs2_mount_success=false
+pi_failsafe_net_message=false
+
+boot_run_hook preinit_main
--- /dev/null
+#!/bin/sh
+[ -f /etc/banner ] && cat /etc/banner
+
+export PATH=/usr/bin:/usr/sbin:/bin:/sbin
+export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
+export HOME=${HOME:-/root}
+export PS1='\u@\h:\w\$ '
+
+[ -x /bin/more ] || alias more=less
+[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
+
+[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
+
+[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
+[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
--- /dev/null
+# Internet (IP) protocols
+#
+# Updated from http://www.iana.org/assignments/protocol-numbers and other
+# sources.
+# New protocols will be added on request if they have been officially
+# assigned by IANA and are not historical.
+# If you need a huge list of used numbers please install the nmap package.
+
+ip 0 IP # internet protocol, pseudo protocol number
+#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+ggp 3 GGP # gateway-gateway protocol
+ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
+st 5 ST # ST datagram mode
+tcp 6 TCP # transmission control protocol
+egp 8 EGP # exterior gateway protocol
+igp 9 IGP # any private interior gateway (Cisco)
+pup 12 PUP # PARC universal packet protocol
+udp 17 UDP # user datagram protocol
+hmp 20 HMP # host monitoring protocol
+xns-idp 22 XNS-IDP # Xerox NS IDP
+rdp 27 RDP # "reliable datagram" protocol
+iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
+xtp 36 XTP # Xpress Transfer Protocol
+ddp 37 DDP # Datagram Delivery Protocol
+idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
+ipv6 41 IPv6 # Internet Protocol, version 6
+ipv6-route 43 IPv6-Route # Routing Header for IPv6
+ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
+idrp 45 IDRP # Inter-Domain Routing Protocol
+rsvp 46 RSVP # Reservation Protocol
+gre 47 GRE # General Routing Encapsulation
+esp 50 IPSEC-ESP # Encap Security Payload [RFC2046]
+ah 51 IPSEC-AH # Authentication Header [RFC2402]
+skip 57 SKIP # SKIP
+ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
+ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
+ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
+rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
+vmtp 81 VMTP # Versatile Message Transport
+eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
+ospf 89 OSPFIGP # Open Shortest Path First IGP
+ax.25 93 AX.25 # AX.25 frames
+ipip 94 IPIP # IP-within-IP Encapsulation Protocol
+etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
+encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
+# 99 # any private encryption scheme
+pim 103 PIM # Protocol Independent Multicast
+ipcomp 108 IPCOMP # IP Payload Compression Protocol
+vrrp 112 VRRP # Virtual Router Redundancy Protocol
+l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
+isis 124 ISIS # IS-IS over IPv4
+sctp 132 SCTP # Stream Control Transmission Protocol
+fc 133 FC # Fibre Channel
+
--- /dev/null
+#!/bin/sh
+
+[ "${TYPE}" = "switch" ] || echo ${BUTTON} > /tmp/failsafe_button
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" ] || exit 0
+
+exec /sbin/poweroff
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" ] || exit 0
+
+. /lib/functions.sh
+
+logger "$BUTTON pressed for $SEEN seconds"
+
+if [ "$SEEN" -lt 1 ]
+then
+ echo "REBOOT" > /dev/console
+ sync
+ reboot
+elif [ "$SEEN" -gt 5 ]
+then
+ echo "FACTORY RESET" > /dev/console
+ jffs2reset -y && reboot &
+fi
--- /dev/null
+#!/bin/sh
+
+[ "${ACTION}" = "released" -o -n "${TYPE}" ] || exit 0
+
+. /lib/functions.sh
+
+local rfkill_state=0
+
+wifi_rfkill_set() {
+ uci set wireless.$1.disabled=$rfkill_state
+}
+
+wifi_rfkill_check() {
+ local disabled
+ config_get disabled $1 disabled
+ [ "$disabled" = "1" ] || rfkill_state=1
+}
+
+config_load wireless
+case "${TYPE}" in
+"switch")
+ [ "${ACTION}" = "released" ] && rfkill_state=1
+ ;;
+*)
+ config_foreach wifi_rfkill_check wifi-device
+ ;;
+esac
+config_foreach wifi_rfkill_set wifi-device
+uci commit wireless
+wifi up
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2006-2012 OpenWrt.org
+
+. $IPKG_INSTROOT/lib/functions.sh
+. $IPKG_INSTROOT/lib/functions/service.sh
+
+initscript=$1
+action=${2:-help}
+shift 2
+
+start() {
+ return 0
+}
+
+stop() {
+ return 0
+}
+
+reload() {
+ return 1
+}
+
+restart() {
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+boot() {
+ start "$@"
+}
+
+shutdown() {
+ stop
+}
+
+disable() {
+ name="$(basename "${initscript}")"
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name
+ rm -f "$IPKG_INSTROOT"/etc/rc.d/K??$name
+}
+
+enable() {
+ name="$(basename "${initscript}")"
+ disable
+ [ -n "$START" -o -n "$STOP" ] || {
+ echo "/etc/init.d/$name does not have a START or STOP value"
+ return 1
+ }
+ [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
+ [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
+}
+
+enabled() {
+ name="$(basename "${initscript}")"
+ [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ]
+}
+
+depends() {
+ return 0
+}
+
+help() {
+ cat <<EOF
+Syntax: $initscript [command]
+
+Available commands:
+ start Start the service
+ stop Stop the service
+ restart Restart the service
+ reload Reload configuration files (or restart if that fails)
+ enable Enable service autostart
+ disable Disable service autostart
+$EXTRA_HELP
+EOF
+}
+
+# for procd
+start_service() {
+ return 0
+}
+
+stop_service() {
+ return 0
+}
+
+service_triggers() {
+ return 0
+}
+
+service_running() {
+ return 0
+}
+
+${INIT_TRACE:+set -x}
+
+. "$initscript"
+
+[ -n "$USE_PROCD" ] && {
+ EXTRA_COMMANDS="${EXTRA_COMMANDS} running"
+
+ . $IPKG_INSTROOT/lib/functions/procd.sh
+ basescript=$(readlink "$initscript")
+ rc_procd() {
+ procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
+ "$@"
+ procd_close_service
+ }
+
+ start() {
+ rc_procd start_service "$@"
+ if eval "type service_started" 2>/dev/null >/dev/null; then
+ service_started
+ fi
+ }
+
+ stop() {
+ stop_service "$@"
+ procd_kill "$(basename ${basescript:-$initscript})" "$1"
+ }
+
+ reload() {
+ if eval "type reload_service" 2>/dev/null >/dev/null; then
+ reload_service "$@"
+ else
+ start
+ fi
+ }
+
+ running() {
+ service_running "$@"
+ }
+}
+
+ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
+list_contains ALL_COMMANDS "$action" || action=help
+[ "$action" = "reload" ] && action='eval reload "$@" || restart "$@" && :'
+$action "$@"
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_remote:bool:1' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix log_remote
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ "${log_remote}" -ne 0 ] || return
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+STOP=99
+stop() {
+ sync
+ /bin/umount -a -d -r
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013-2014 OpenWrt.org
+
+START=00
+
+boot() {
+ local curtime="$(date +%s)"
+ local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
+ [ $curtime -lt $maxtime ] && date -s @$maxtime
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+uci_apply_defaults() {
+ . /lib/functions/system.sh
+
+ cd /etc/uci-defaults || return 0
+ files="$(ls)"
+ [ -z "$files" ] && return 0
+ mkdir -p /tmp/.uci
+ for file in $files; do
+ ( . "./$(basename $file)" ) && rm -f "$file"
+ done
+ uci commit
+}
+
+boot() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ /sbin/kmodloader
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ uci_apply_defaults
+
+ # temporary hack until configd exists
+ /sbin/reload_config
+
+ start
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+
+START=10
+USE_PROCD=1
+
+validate_system_section()
+{
+ uci_validate_section system system "${1}" \
+ 'hostname:string:OpenWrt' \
+ 'conloglevel:uinteger' \
+ 'buffersize:uinteger' \
+ 'timezone:string:UTC' \
+ 'zonename:string'
+
+ return $?
+}
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel buffersize timezone zonename
+
+ validate_system_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ echo "$hostname" > /proc/sys/kernel/hostname
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+ echo "$timezone" > /tmp/TZ
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+}
+
+reload_service() {
+ config_load system
+ config_foreach system_config system
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_system_section
+}
+
+start_service() {
+ reload_service
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=11
+start() {
+ [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2013 OpenWrt.org
+
+# start after and stop before networking
+START=12
+STOP=89
+PIDCOUNT=0
+
+USE_PROCD=1
+PROG=/sbin/logread
+
+validate_log_section()
+{
+ uci_validate_section system system "${1}" \
+ 'log_file:string' \
+ 'log_size:uinteger' \
+ 'log_ip:ipaddr' \
+ 'log_remote:bool:1' \
+ 'log_port:port:514' \
+ 'log_proto:or("tcp", "udp"):udp' \
+ 'log_prefix:string'
+ return $?
+}
+
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_size:uinteger:0' \
+ 'log_buffer_size:uinteger:0'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size log_size
+ validate_log_daemon "${1}"
+ [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size
+ [ $log_buffer_size -eq 0 ] && log_buffer_size=16
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
+start_service_file()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_file log_size
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ -z "${log_file}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ procd_close_instance
+}
+
+start_service_remote()
+{
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/logread.${PIDCOUNT}.pid"
+ local log_ip log_port log_proto log_prefix log_remote
+
+ validate_log_section "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+ [ "${log_remote}" -ne 0 ] || return
+ [ -z "${log_ip}" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_log_section
+}
+
+start_service()
+{
+ config_load system
+ config_foreach start_service_daemon system
+ config_foreach start_service_file system
+ config_foreach start_service_remote system
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=19
+USE_PROCD=1
+QUIET=""
+
+validate_firewall_redirect()
+{
+ uci_validate_section firewall redirect "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'src_ip:cidr' \
+ 'src_dport:or(port, portrange)' \
+ 'dest:string' \
+ 'dest_ip:cidr' \
+ 'dest_port:or(port, portrange)' \
+ 'target:or("SNAT", "DNAT")'
+
+ return $?
+}
+
+validate_firewall_rule()
+{
+ uci_validate_section firewall rule "${1}" \
+ 'proto:or(uinteger, string)' \
+ 'src:string' \
+ 'dest:string' \
+ 'src_port:or(port, portrange)' \
+ 'dest_port:or(port, portrange)' \
+ 'target:string'
+
+ return $?
+}
+
+service_triggers() {
+ procd_add_reload_trigger firewall
+
+ procd_open_validate
+ validate_firewall_redirect
+ validate_firewall_rule
+ procd_close_validate
+}
+
+restart() {
+ fw3 restart
+}
+
+start_service() {
+ fw3 ${QUIET} start
+}
+
+stop_service() {
+ fw3 flush
+}
+
+reload_service() {
+ fw3 reload
+}
+
+boot() {
+ # Be silent on boot, firewall might be started by hotplug already,
+ # so don't complain in syslog.
+ QUIET=1
+ start
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=20
+STOP=90
+
+USE_PROCD=1
+
+init_switch() {
+ setup_switch() { return 0; }
+
+ include /lib/network
+ setup_switch
+}
+
+start_service() {
+ init_switch
+
+ procd_open_instance
+ procd_set_param command /sbin/netifd
+ procd_set_param respawn
+ procd_set_param watch network.interface
+ [ -e /proc/sys/kernel/core_pattern ] && {
+ procd_set_param limits core="unlimited"
+ echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
+ }
+ procd_close_instance
+}
+
+reload_service() {
+ init_switch
+ ubus call network reload
+ /sbin/wifi reload_legacy
+}
+
+stop_service() {
+ /sbin/wifi down
+}
+
+service_running() {
+ ubus -t 30 wait_for network.interface
+ /sbin/wifi reload_legacy
+}
+
+validate_atm_bridge_section()
+{
+ uci_validate_section network "atm-bridge" "${1}" \
+ 'unit:uinteger:0' \
+ 'vci:range(32, 65535):35' \
+ 'vpi:range(0, 255):8' \
+ 'atmdev:uinteger:0' \
+ 'encaps:or("llc", "vc"):llc' \
+ 'payload:or("bridged", "routed"):bridged'
+
+ return $?
+}
+
+validate_route_section()
+{
+ uci_validate_section network route "${1}" \
+ 'interface:string' \
+ 'target:cidr4' \
+ 'netmask:netmask4' \
+ 'gateway:ip4addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_route6_section()
+{
+ uci_validate_section network route6 "${1}" \
+ 'interface:string' \
+ 'target:cidr6' \
+ 'gateway:ip6addr' \
+ 'metric:uinteger' \
+ 'mtu:uinteger' \
+ 'table:or(range(0,65535),string)'
+
+ return $?
+}
+
+validate_rule_section()
+{
+ uci_validate_section network rule "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr4' \
+ 'dest:cidr4' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_rule6_section()
+{
+ uci_validate_section network rule6 "${1}" \
+ 'in:string' \
+ 'out:string' \
+ 'src:cidr6' \
+ 'dest:cidr6' \
+ 'tos:range(0,31)' \
+ 'mark:string' \
+ 'invert:bool' \
+ 'lookup:or(range(0,65535),string)' \
+ 'goto:range(0,65535)' \
+ 'action:or("prohibit", "unreachable", "blackhole", "throw")'
+
+ return $?
+}
+
+validate_switch_section()
+{
+ uci_validate_section network switch "${1}" \
+ 'name:string' \
+ 'enable:bool' \
+ 'enable_vlan:bool' \
+ 'reset:bool'
+
+ return $?
+}
+
+validate_switch_vlan()
+{
+ uci_validate_section network switch_vlan "${1}" \
+ 'device:string' \
+ 'vlan:uinteger' \
+ 'ports:list(ports)'
+
+ return $?
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger network wireless
+
+ procd_open_validate
+ validate_atm_bridge_section
+ validate_route_section
+ validate_route6_section
+ validate_rule_section
+ validate_rule6_section
+ validate_switch_section
+ validate_switch_vlan
+ procd_close_validate
+}
+
+restart() {
+ ifdown -a
+ sleep 1
+ trap '' TERM
+ stop "$@"
+ start "$@"
+}
+
+shutdown() {
+ ifdown -a
+ stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=35
+STOP=85
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /usr/sbin/odhcpd
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=45
+start() {
+ wshaper.htb
+}
+
+stop() {
+ wshaper.htb stop
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/crond
+
+validate_cron_section() {
+ uci_validate_section system system "${1}" \
+ 'cronloglevel:uinteger'
+}
+
+start_service () {
+ [ -z "$(ls /etc/crontabs/)" ] && return 1
+
+ loglevel=$(uci_get "system.@system[0].cronloglevel")
+
+ [ -z "${loglevel}" ] || {
+ /sbin/validate_data uinteger "${loglevel}"
+ [ "$?" -eq 0 ] || {
+ echo "validation failed"
+ return 1
+ }
+ }
+
+ mkdir -p /var/spool/cron
+ ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
+
+ procd_open_instance
+ procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_validation validate_cron_section
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006 Carlos Sobrinho
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/dropbear
+NAME=dropbear
+PIDCOUNT=0
+EXTRA_COMMANDS="killclients"
+EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
+
+append_ports()
+{
+ local ifname="$1"
+ local port="$2"
+
+ grep -qs "^ *$ifname:" /proc/net/dev || {
+ procd_append_param command -p "$port"
+ return
+ }
+
+ for addr in $(
+ ifconfig "$ifname" | sed -ne '
+ /addr: *fe[89ab][0-9a-f]:/d
+ s/.* addr: *\([0-9a-f:\.]*\).*/\1/p
+ '
+ ); do
+ procd_append_param command -p "$addr:$port"
+ done
+}
+
+validate_section_dropbear()
+{
+ uci_validate_section dropbear dropbear "${1}" \
+ 'PasswordAuth:bool:1' \
+ 'enable:bool:1' \
+ 'Interface:string' \
+ 'GatewayPorts:bool:0' \
+ 'RootPasswordAuth:bool:1' \
+ 'RootLogin:bool:1' \
+ 'rsakeyfile:file' \
+ 'dsskeyfile:file' \
+ 'BannerFile:file' \
+ 'Port:list(port):22' \
+ 'SSHKeepAlive:uinteger:300' \
+ 'IdleTimeout:uinteger:0'
+ return $?
+}
+
+dropbear_instance()
+{
+ local PasswordAuth enable Interface GatewayPorts \
+ RootPasswordAuth RootLogin rsakeyfile \
+ dsskeyfile BannerFile Port SSHKeepAlive IdleTimeout
+
+ validate_section_dropbear "${1}" || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ "${enable}" = "0" ] && return 1
+ PIDCOUNT="$(( ${PIDCOUNT} + 1))"
+ local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
+
+ procd_open_instance
+ procd_set_param command "$PROG" -F -P "$pid_file"
+ [ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
+ [ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
+ [ "${RootLogin}" -eq 0 ] && procd_append_param command -w
+ [ -n "${rsakeyfile}" ] && procd_append_param command -r "${rsakeyfile}"
+ [ -n "${dsskeyfile}" ] && procd_append_param command -d "${dsskeyfile}"
+ [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
+ [ -n "${Interface}" ] && network_get_device Interface "${Interface}"
+ append_ports "${Interface}" "${Port}"
+ [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
+ [ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ procd_close_instance
+}
+
+keygen()
+{
+ for keytype in rsa dss; do
+ # check for keys
+ key=dropbear/dropbear_${keytype}_host_key
+ [ -f /tmp/$key -o -s /etc/$key ] || {
+ # generate missing keys
+ mkdir -p /tmp/dropbear
+ [ -x /usr/bin/dropbearkey ] && {
+ /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start
+ } &
+ exit 0
+ }
+ done
+
+ lock /tmp/.switch2jffs
+ mkdir -p /etc/dropbear
+ mv /tmp/dropbear/dropbear_* /etc/dropbear/
+ lock -u /tmp/.switch2jffs
+ chown root /etc/dropbear
+ chmod 0700 /etc/dropbear
+}
+
+start_service()
+{
+ [ -s /etc/dropbear/dropbear_rsa_host_key -a \
+ -s /etc/dropbear/dropbear_dss_host_key ] || keygen
+
+ . /lib/functions.sh
+ . /lib/functions/network.sh
+
+ config_load "${NAME}"
+ config_foreach dropbear_instance dropbear
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dropbear"
+ procd_add_validation validate_section_dropbear
+}
+
+killclients()
+{
+ local ignore=''
+ local server
+ local pid
+
+ # if this script is run from inside a client session, then ignore that session
+ pid="$$"
+ while [ "${pid}" -ne 0 ]
+ do
+ # get parent process id
+ pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ [ "${pid}" -eq 0 ] && break
+
+ # check if client connection
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" && {
+ append ignore "${pid}"
+ break
+ }
+ done
+
+ # get all server pids that should be ignored
+ for server in `cat /var/run/${NAME}.*.pid`
+ do
+ append ignore "${server}"
+ done
+
+ # get all running pids and kill client connections
+ local skip
+ for pid in `pidof "${NAME}"`
+ do
+ # check if correct program, otherwise process next pid
+ grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {
+ continue
+ }
+
+ # check if pid should be ignored (servers, ourself)
+ skip=0
+ for server in ${ignore}
+ do
+ if [ "${pid}" == "${server}" ]
+ then
+ skip=1
+ break
+ fi
+ done
+ [ "${skip}" -ne 0 ] && continue
+
+ # kill process
+ echo "${initscript}: Killing ${pid}..."
+ kill -KILL ${pid}
+ done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=50
+
+USE_PROCD=1
+PROG=/usr/sbin/telnetd
+
+has_root_pwd() {
+ local pwd=$([ -f "$1" ] && cat "$1")
+ pwd="${pwd#*root:}"
+ pwd="${pwd%%:*}"
+
+ test -n "${pwd#[\!x]}"
+}
+
+get_root_home() {
+ local homedir=$([ -f "$1" ] && cat "$1")
+ homedir="${homedir#*:*:0:0:*:}"
+
+ echo "${homedir%%:*}"
+}
+
+has_ssh_pubkey() {
+ ( /etc/init.d/dropbear enabled 2> /dev/null && grep -qs "^ssh-" /etc/dropbear/authorized_keys ) || \
+ ( /etc/init.d/sshd enabled 2> /dev/null && grep -qs "^ssh-" "$(get_root_home /etc/passwd)"/.ssh/authorized_keys )
+}
+
+start_service() {
+ if ( ! has_ssh_pubkey && \
+ ! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
+ ( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
+ then
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_close_instance
+ fi
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2007-2012 OpenWrt.org
+
+START=60
+
+USE_PROCD=1
+PROG=/usr/sbin/dnsmasq
+
+DNS_SERVERS=""
+DOMAIN=""
+
+ADD_LOCAL_DOMAIN=1
+ADD_LOCAL_HOSTNAME=1
+
+CONFIGFILE="/var/etc/dnsmasq.conf"
+HOSTFILE="/tmp/hosts/dhcp"
+TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf"
+
+xappend() {
+ local value="$1"
+
+ echo "${value#--}" >> $CONFIGFILE
+}
+
+dhcp_calc() {
+ local ip="$1"
+ local res=0
+
+ while [ -n "$ip" ]; do
+ part="${ip%%.*}"
+ res="$(($res * 256))"
+ res="$(($res + $part))"
+ [ "${ip%.*}" != "$ip" ] && ip="${ip#*.}" || ip=
+ done
+ echo "$res"
+}
+
+dhcp_check() {
+ local ifname="$1"
+ local stamp="/var/run/dnsmasq.$ifname.dhcp"
+ local rv=0
+
+ [ -s "$stamp" ] && return $(cat "$stamp")
+
+ udhcpc -n -q -s /bin/true -t 1 -i "$ifname" >&- && rv=1 || rv=0
+
+ [ $rv -eq 1 ] && \
+ logger -t dnsmasq \
+ "found already running DHCP-server on interface '$ifname'" \
+ "refusing to start, use 'option force 1' to override"
+
+ echo $rv > "$stamp"
+ return $rv
+}
+
+log_once() {
+ pidof dnsmasq >/dev/null || \
+ logger -t dnsmasq "$@"
+}
+
+append_bool() {
+ local section="$1"
+ local option="$2"
+ local value="$3"
+ local _loctmp
+ config_get_bool _loctmp "$section" "$option" 0
+ [ $_loctmp -gt 0 ] && xappend "$value"
+}
+
+append_parm() {
+ local section="$1"
+ local option="$2"
+ local switch="$3"
+ local _loctmp
+ config_get _loctmp "$section" "$option"
+ [ -z "$_loctmp" ] && return 0
+ xappend "$switch=$_loctmp"
+}
+
+append_server() {
+ xappend "--server=$1"
+}
+
+append_address() {
+ xappend "--address=$1"
+}
+
+append_interface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--interface=$ifname"
+}
+
+append_notinterface() {
+ local ifname=$(uci_get_state network "$1" ifname "$1")
+ xappend "--except-interface=$ifname"
+}
+
+append_addnhosts() {
+ xappend "--addn-hosts=$1"
+}
+
+append_bogusnxdomain() {
+ xappend "--bogus-nxdomain=$1"
+}
+
+dnsmasq() {
+ local cfg="$1"
+ append_bool "$cfg" authoritative "--dhcp-authoritative"
+ append_bool "$cfg" nodaemon "--no-daemon"
+ append_bool "$cfg" domainneeded "--domain-needed"
+ append_bool "$cfg" filterwin2k "--filterwin2k"
+ append_bool "$cfg" nohosts "--no-hosts"
+ append_bool "$cfg" nonegcache "--no-negcache"
+ append_bool "$cfg" strictorder "--strict-order"
+ append_bool "$cfg" logqueries "--log-queries"
+ append_bool "$cfg" noresolv "--no-resolv"
+ append_bool "$cfg" localise_queries "--localise-queries"
+ append_bool "$cfg" readethers "--read-ethers"
+ append_bool "$cfg" dbus "--enable-dbus"
+ append_bool "$cfg" boguspriv "--bogus-priv"
+ append_bool "$cfg" expandhosts "--expand-hosts"
+ append_bool "$cfg" enable_tftp "--enable-tftp"
+ append_bool "$cfg" nonwildcard "--bind-interfaces"
+ append_bool "$cfg" fqdn "--dhcp-fqdn"
+ append_bool "$cfg" proxydnssec "--proxy-dnssec"
+
+ append_parm "$cfg" dhcpscript "--dhcp-script"
+ append_parm "$cfg" cachesize "--cache-size"
+ append_parm "$cfg" dnsforwardmax "--dns-forward-max"
+ append_parm "$cfg" port "--port"
+ append_parm "$cfg" ednspacket_max "--edns-packet-max"
+ append_parm "$cfg" dhcpleasemax "--dhcp-lease-max"
+ append_parm "$cfg" "queryport" "--query-port"
+ append_parm "$cfg" "domain" "--domain"
+ append_parm "$cfg" "local" "--server"
+ config_list_foreach "$cfg" "server" append_server
+ config_list_foreach "$cfg" "address" append_address
+ config_list_foreach "$cfg" "interface" append_interface
+ config_list_foreach "$cfg" "notinterface" append_notinterface
+ config_list_foreach "$cfg" "addnhosts" append_addnhosts
+ config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
+ append_parm "$cfg" "leasefile" "--dhcp-leasefile"
+ append_parm "$cfg" "resolvfile" "--resolv-file"
+ append_parm "$cfg" "tftp_root" "--tftp-root"
+ append_parm "$cfg" "dhcp_boot" "--dhcp-boot"
+ append_parm "$cfg" "local_ttl" "--local-ttl"
+
+ config_get DOMAIN "$cfg" domain
+
+ config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1
+ config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1
+
+ config_get_bool readethers "$cfg" readethers
+ [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers
+
+ config_get leasefile $cfg leasefile
+ [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile"
+ config_get_bool cachelocal "$cfg" cachelocal 1
+
+ config_get hostsfile "$cfg" dhcphostsfile
+ [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+
+ mkdir -p /tmp/hosts /tmp/dnsmasq.d
+ xappend "--addn-hosts=/tmp/hosts"
+ xappend "--conf-dir=/tmp/dnsmasq.d"
+
+ local rebind
+ config_get_bool rebind "$cfg" rebind_protection 1
+ [ $rebind -gt 0 ] && {
+ log_once \
+ "DNS rebinding protection is active," \
+ "will discard upstream RFC1918 responses!"
+ xappend "--stop-dns-rebind"
+
+ local rebind_localhost
+ config_get_bool rebind_localhost "$cfg" rebind_localhost 0
+ [ $rebind_localhost -gt 0 ] && {
+ log_once "Allowing 127.0.0.0/8 responses"
+ xappend "--rebind-localhost-ok"
+ }
+
+ append_rebind_domain() {
+ log_once "Allowing RFC1918 responses for domain $1"
+ xappend "--rebind-domain-ok=$1"
+ }
+
+ config_list_foreach "$cfg" rebind_domain append_rebind_domain
+ }
+
+ config_get_bool dnssec "$cfg" dnssec 0
+ [ "$dnssec" -gt 0 ] && {
+ xappend "--conf-file=$TRUSTANCHORSFILE"
+ xappend "--dnssec"
+ append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
+ }
+
+ dhcp_option_add "$cfg" "" 0
+
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
+ echo >> $CONFIGFILE
+}
+
+dhcp_subscrid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get subscriberid "$cfg" subscriberid
+ [ -n "$subscriberid" ] || return 0
+
+ xappend "--dhcp-subscrid=$networkid,$subscriberid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_remoteid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ xappend "--dhcp-remoteid=$networkid,$remoteid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ xappend "--dhcp-circuitid=$networkid,$circuitid"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ xappend "--dhcp-userclass=$networkid,$userclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ xappend "--dhcp-vendorclass=$networkid,$vendorclass"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get_bool force "$cfg" force 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
+
+ config_get name "$cfg" name
+ config_get ip "$cfg" ip
+ [ -n "$ip" -o -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -z "$mac" ] && {
+ [ -n "$name" ] || return 0
+ mac="$name"
+ name=""
+ }
+
+ macs=""
+ for m in $mac; do append macs "$m" ","; done
+
+ config_get tag "$cfg" tag
+
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+
+ config_get_bool dns "$cfg" dns 0
+ [ "$dns" = "1" ] && {
+ echo "$ip $name${DOMAIN:+.$DOMAIN}" >> $HOSTFILE
+ }
+}
+
+dhcp_tag_add() {
+ local cfg="$1"
+
+ tag="$cfg"
+
+ [ -n "$tag" ] || return 0
+
+ config_get_bool force "$cfg" force 0
+ [ "$force" = "0" ] && force=
+
+ config_get option "$cfg" dhcp_option
+ for o in $option; do
+ xappend "--dhcp-option${force:+-force}=tag:$tag,$o"
+ done
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ xappend "--dhcp-mac=$networkid,$mac"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get networkid "$cfg" networkid
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
+}
+
+
+dhcp_add() {
+ local cfg="$1"
+ config_get net "$cfg" interface
+ [ -n "$net" ] || return 0
+
+ config_get networkid "$cfg" networkid
+ [ -n "$networkid" ] || networkid="$net"
+
+ network_get_subnet subnet "$net" || return 0
+ network_get_device ifname "$net" || return 0
+ network_get_protocol proto "$net" || return 0
+
+ [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
+ append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0
+
+ # Do not support non-static interfaces for now
+ [ static = "$proto" ] || return 0
+
+ # Override interface netmask with dhcp config if applicable
+ config_get netmask "$cfg" netmask "${subnet##*/}"
+
+ #check for an already active dhcp server on the interface, unless 'force' is set
+ config_get_bool force "$cfg" force 0
+ [ $force -gt 0 ] || dhcp_check "$ifname" || return 0
+
+ config_get start "$cfg" start
+ config_get limit "$cfg" limit
+ config_get leasetime "$cfg" leasetime
+ config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
+
+ leasetime="${leasetime:-12h}"
+ start="$(dhcp_calc "${start:-100}")"
+ limit="${limit:-150}"
+ [ "$limit" -gt 0 ] && limit=$((limit-1))
+ eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
+ xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+
+ dhcp_option_add "$cfg" "$networkid"
+}
+
+dhcp_option_add() {
+ local cfg="$1"
+ local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
+
+ config_get dhcp_option "$cfg" dhcp_option
+ for o in $dhcp_option; do
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
+ done
+
+}
+
+dhcp_domain_add() {
+ local cfg="$1"
+ local ip name names record
+
+ config_get names "$cfg" name "$2"
+ [ -n "$names" ] || return 0
+
+ config_get ip "$cfg" ip "$3"
+ [ -n "$ip" ] || return 0
+
+ for name in $names; do
+ [ "${name%.*}" == "$name" ] && \
+ name="$name${DOMAIN:+.$DOMAIN}"
+
+ record="${record:+$record/}$name"
+ done
+
+ xappend "--address=/$record/$ip"
+}
+
+dhcp_srv_add() {
+ local cfg="$1"
+
+ config_get srv "$cfg" srv
+ [ -n "$srv" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ config_get port "$cfg" port
+ [ -n "$port" ] || return 0
+
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
+
+ xappend "--srv-host=$service"
+}
+
+dhcp_mx_add() {
+ local cfg="$1"
+ local domain relay pref
+
+ config_get domain "$cfg" domain
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ xappend "--mx-host=$service"
+}
+
+dhcp_cname_add() {
+ local cfg="$1"
+ local cname target
+
+ config_get cname "$cfg" cname
+ [ -n "$cname" ] || return 0
+
+ config_get target "$cfg" target
+ [ -n "$target" ] || return 0
+
+ xappend "--cname=${cname},${target}"
+}
+
+dhcp_hostrecord_add() {
+ local cfg="$1"
+ local names addresses record val
+
+ config_get names "$cfg" name "$2"
+ if [ -z "$names" ]; then
+ return 0
+ fi
+
+ config_get addresses "$cfg" ip "$3"
+ if [ -z "$addresses" ]; then
+ return 0
+ fi
+
+ for val in $names $addresses; do
+ record="${record:+$record,}$val"
+ done
+
+ xappend "--host-record=$record"
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "dhcp"
+}
+
+boot() {
+ # Will be launched through hotplug
+ return 0
+}
+
+start_service() {
+ include /lib/functions
+
+ config_load dhcp
+
+ procd_open_instance
+ procd_set_param command $PROG -C $CONFIGFILE -k
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+
+ # before we can call xappend
+ mkdir -p $(dirname $CONFIGFILE)
+
+ echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
+ echo "# auto-generated config file from /etc/config/dhcp" > $HOSTFILE
+
+ # if we did this last, we could override auto-generated config
+ [ -f /etc/dnsmasq.conf ] && {
+ xappend "--conf-file=/etc/dnsmasq.conf"
+ }
+
+ args=""
+ config_foreach dnsmasq dnsmasq
+ config_foreach dhcp_host_add host
+ echo >> $CONFIGFILE
+ config_foreach dhcp_boot_add boot
+ config_foreach dhcp_mac_add mac
+ config_foreach dhcp_tag_add tag
+ config_foreach dhcp_vendorclass_add vendorclass
+ config_foreach dhcp_userclass_add userclass
+ config_foreach dhcp_circuitid_add circuitid
+ config_foreach dhcp_remoteid_add remoteid
+ config_foreach dhcp_subscrid_add subscrid
+ config_foreach dhcp_domain_add domain
+ config_foreach dhcp_hostrecord_add hostrecord
+
+ # add own hostname
+ local lanaddr
+ [ $ADD_LOCAL_HOSTNAME -eq 1 ] && network_get_ipaddr lanaddr "lan" && {
+ local hostname="$(uci_get system @system[0] hostname OpenWrt)"
+ dhcp_hostrecord_add "" "${hostname%.$DOMAIN}${DOMAIN:+.$DOMAIN ${hostname%.$DOMAIN}}" "$lanaddr"
+ }
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
+ echo >> $CONFIGFILE
+
+ config_get odhcpd_is_active odhcpd maindhcp
+ if [ "$odhcpd_is_active" != "1" ]; then
+ config_foreach dhcp_add dhcp
+ fi
+
+ echo >> $CONFIGFILE
+ config_foreach dhcp_cname_add cname
+ echo >> $CONFIGFILE
+
+ rm -f /tmp/resolv.conf
+ [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
+ echo "search $DOMAIN" >> /tmp/resolv.conf
+ }
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
+}
+
+reload_service() {
+ rc_procd start_service "$@"
+ return 0
+}
+
+stop_service() {
+ [ -f /tmp/resolv.conf ] && {
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
+ }
+ rm -f /var/run/dnsmasq.*.dhcp
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+START=95
+
+start() {
+ . /usr/lib/ddns/dynamic_dns_functions.sh
+ start_daemon_for_all_ddns_sections
+}
+
+stop() {
+ killall -9 dynamic_dns_updater.sh
+}
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=95
+boot() {
+ [ -d /tmp/root ] && mount_root done
+
+ # process user commands
+ [ -f /etc/rc.local ] && {
+ sh /etc/rc.local
+ }
+
+ # set leds to normal state
+ . /etc/diag.sh
+ set_state done
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008 OpenWrt.org
+
+START=96
+
+load_led() {
+ local name
+ local sysfs
+ local trigger
+ local dev
+ local mode
+ local default
+ local delayon
+ local delayoff
+ local interval
+
+ config_get sysfs $1 sysfs
+ config_get name $1 name "$sysfs"
+ config_get trigger $1 trigger "none"
+ config_get dev $1 dev
+ config_get mode $1 mode "link"
+ config_get_bool default $1 default "nil"
+ config_get delayon $1 delayon
+ config_get delayoff $1 delayoff
+ config_get interval $1 interval "50"
+ config_get port_state $1 port_state
+ config_get delay $1 delay "150"
+ config_get message $1 message ""
+
+ if [ "$trigger" = "rssi" ]; then
+ # handled by rssileds userspace process
+ return
+ fi
+
+ [ -e /sys/class/leds/${sysfs}/brightness ] && {
+ echo "setting up led ${name}"
+ [ "$default" != nil ] && {
+ [ $default -eq 1 ] &&
+ echo 1 >/sys/class/leds/${sysfs}/brightness
+ [ $default -eq 1 ] ||
+ echo 0 >/sys/class/leds/${sysfs}/brightness
+ }
+ echo $trigger > /sys/class/leds/${sysfs}/trigger
+ case "$trigger" in
+ "netdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $mode > /sys/class/leds/${sysfs}/mode
+ }
+ ;;
+
+ "timer")
+ [ -n "$delayon" ] && \
+ echo $delayon > /sys/class/leds/${sysfs}/delay_on
+ [ -n "$delayoff" ] && \
+ echo $delayoff > /sys/class/leds/${sysfs}/delay_off
+ ;;
+
+ "usbdev")
+ [ -n "$dev" ] && {
+ echo $dev > /sys/class/leds/${sysfs}/device_name
+ echo $interval > /sys/class/leds/${sysfs}/activity_interval
+ }
+ ;;
+
+ "port_state")
+ [ -n "$port_state" ] && \
+ echo $port_state > /sys/class/leds/${sysfs}/port_state
+ ;;
+
+ "morse")
+ echo $message > /sys/class/leds/${sysfs}/message
+ echo $delay > /sys/class/leds/${sysfs}/delay
+ ;;
+
+ switch[0-9]*)
+ local port_mask
+
+ config_get port_mask $1 port_mask
+ [ -n "$port_mask" ] && \
+ echo $port_mask > /sys/class/leds/${sysfs}/port_mask
+ ;;
+ esac
+ }
+}
+
+start() {
+ [ -e /sys/class/leds/ ] && {
+ config_load system
+ config_foreach load_led led
+ }
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+
+START=98
+
+USE_PROCD=1
+PROG=/usr/sbin/ntpd
+
+validate_ntp_section() {
+ uci_validate_section system timeserver "${1}" \
+ 'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0'
+ return $?
+}
+
+start_service() {
+ local server enabled enable_server peer
+
+ validate_ntp_section ntp || {
+ echo "validation failed"
+ return 1
+ }
+
+ [ $enabled = 0 ] && return
+
+ [ -z "$server" ] && return
+
+ procd_open_instance
+ procd_set_param command "$PROG" -n
+ [ "$enable_server" = "1" ] && procd_append_param command -l
+ for peer in $server; do
+ procd_append_param command -p $peer
+ done
+ procd_set_param respawn
+ procd_close_instance
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "system"
+ procd_add_validation validate_ntp_section
+}
--- /dev/null
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+exit 0
--- /dev/null
+search lan
+nameserver 127.0.0.1
--- /dev/null
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+daytime 13/tcp
+daytime 13/udp
+netstat 15/tcp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp 21/tcp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+smtp 25/tcp
+time 37/tcp
+time 37/udp
+whois 43/tcp
+domain 53/tcp
+domain 53/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/udp
+finger 79/tcp
+www 80/tcp http
+kerberos 88/tcp kerberos5 krb5 kerberos-sec
+kerberos 88/udp kerberos5 krb5 kerberos-sec
+pop3 110/tcp
+pop3 110/udp
+sunrpc 111/tcp
+sunrpc 111/udp
+auth 113/tcp ident
+sftp 115/tcp
+nntp 119/tcp
+ntp 123/tcp
+ntp 123/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap2 143/tcp imap
+imap2 143/udp imap
+snmp 161/tcp
+snmp 161/udp
+snmp-trap 162/tcp snmptrap
+snmp-trap 162/udp snmptrap
+xdmcp 177/tcp
+xdmcp 177/udp
+bgp 179/tcp
+bgp 179/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+https 443/tcp
+https 443/udp
+microsoft-ds 445/tcp
+microsoft-ds 445/udp
+isakmp 500/tcp
+isakmp 500/udp
+rtsp 554/tcp
+rtsp 554/udp
+ipp 631/tcp
+ipp 631/udp
+syslog 514/udp
+printer 515/tcp spooler
+dhcpv6-client 546/tcp
+dhcpv6-client 546/udp
+dhcpv6-server 547/tcp
+dhcpv6-server 547/udp
+afpovertcp 548/tcp
+afpovertcp 548/udp
+nntps 563/tcp snntp
+nntps 563/udp snntp
+ldaps 636/tcp
+ldaps 636/udp
+tinc 655/tcp
+tinc 655/udp
+rsync 873/tcp
+rsync 873/udp
+ftps-data 989/tcp
+ftps 990/tcp
+imaps 993/tcp
+imaps 993/udp
+ircs 994/tcp
+ircs 994/udp
+pop3s 995/tcp
+pop3s 995/udp
+socks 1080/tcp
+socks 1080/udp
+openvpn 1194/tcp
+openvpn 1194/udp
+l2f 1701/tcp l2tp
+l2f 1701/udp l2tp
+radius 1812/tcp
+radius 1812/udp
+radius-acct 1813/tcp radacct
+radius-acct 1813/udp radacct
+nfs 2049/tcp
+nfs 2049/udp
+dict 2628/tcp
+dict 2628/udp
+gpsd 2947/tcp
+gpsd 2947/udp
+icpv2 3130/tcp icp
+icpv2 3130/udp icp
+mysql 3306/tcp
+mysql 3306/udp
+nut 3493/tcp
+nut 3493/udp
+distcc 3632/tcp
+distcc 3632/udp
+daap 3689/tcp
+daap 3689/udp
+svn 3690/tcp subversion
+svn 3690/udp subversion
+epmd 4369/tcp
+epmd 4369/udp
+iax 4569/tcp
+iax 4569/udp
+mtn 4691/tcp
+mtn 4691/udp
+munin 4949/tcp
+sip 5060/tcp
+sip 5060/udp
+sip-tls 5061/tcp
+sip-tls 5061/udp
+xmpp-client 5222/tcp jabber-client
+xmpp-client 5222/udp jabber-client
+xmpp-server 5269/tcp jabber-server
+xmpp-server 5269/udp jabber-server
+mdns 5353/tcp
+mdns 5353/udp
+postgresql 5432/tcp postgres
+postgresql 5432/udp postgres
+x11 6000/tcp
+x11 6000/udp
+mysql-proxy 6446/tcp
+mysql-proxy 6446/udp
+bacula-dir 9101/tcp
+bacula-dir 9101/udp
+bacula-fd 9102/tcp
+bacula-fd 9102/udp
+bacula-sd 9103/tcp
+bacula-sd 9103/udp
+nbd 10809/tcp
+zabbix-agent 10050/tcp
+zabbix-agent 10050/udp
+zabbix-trapper 10051/tcp
+zabbix-trapper 10051/udp
+hkp 11371/tcp
+hkp 11371/udp
+ssmtp 465/tcp smtps
+spamd 783/tcp
+zebrasrv 2600/tcp
+zebra 2601/tcp
+ripd 2602/tcp
+ripngd 2603/tcp
+ospfd 2604/tcp
+bgpd 2605/tcp
+ospf6d 2606/tcp
+ospfapi 2607/tcp
+isisd 2608/tcp
+sane-port 6566/tcp sane saned
+ircd 6667/tcp
+git 9418/tcp
+
--- /dev/null
+root:$1$458QMEXZ$3Btqh6KbKhzUUMRipNbos/:16263:0:99999:7:::
+daemon:*:0:0:99999:7:::
+ftp:*:0:0:99999:7:::
+network:*:0:0:99999:7:::
+nobody:*:0:0:99999:7:::
--- /dev/null
+kernel.panic=3
+net.ipv4.conf.default.arp_ignore=1
+net.ipv4.conf.all.arp_ignore=1
+net.ipv4.ip_forward=1
+net.ipv4.icmp_echo_ignore_broadcasts=1
+net.ipv4.icmp_ignore_bogus_error_responses=1
+net.ipv4.tcp_ecn=0
+net.ipv4.tcp_fin_timeout=30
+net.ipv4.tcp_keepalive_time=120
+net.ipv4.tcp_syncookies=1
+net.ipv4.tcp_timestamps=1
+net.ipv4.tcp_sack=1
+net.ipv4.tcp_dsack=1
+
+net.ipv6.conf.default.forwarding=1
+net.ipv6.conf.all.forwarding=1
+
+net.netfilter.nf_conntrack_acct=1
+net.netfilter.nf_conntrack_checksum=0
+net.netfilter.nf_conntrack_max=16384
+net.netfilter.nf_conntrack_tcp_timeout_established=3600
+net.netfilter.nf_conntrack_udp_timeout=60
+net.netfilter.nf_conntrack_udp_timeout_stream=180
+
+# disable bridge firewalling by default
+net.bridge.bridge-nf-call-arptables=0
+net.bridge.bridge-nf-call-ip6tables=0
+net.bridge.bridge-nf-call-iptables=0
--- /dev/null
+## This file contains files and directories that should
+## be preserved during an upgrade.
+
+# /etc/example.conf
+# /etc/openvpn/
--- /dev/null
+#
+# VTun - Virtual Tunnel over TCP/IP network.
+# Copyright (C) 1998-2008 Maxim Krasnyansky <max_mk@yahoo.com>
+#
+# Cleanup of English and spelling by
+# Ted Rolle <ted@acacia.datacomm.com>
+#
+# Configuration file example
+# $Id: vtund.conf,v 1.4.2.2 2008/01/07 22:36:05 mtbishop Exp $
+#
+#
+# Lines which begin with '#' are comments
+#
+# File format:
+#
+# XXXXX {
+# option param; option param;
+# option param;
+# ......
+# }
+# Where XXXXX:
+# options - General options.
+# default - default session options.
+# session - Session options.
+#
+# Options _must_ be grouped by curly braces '{' '}'.
+# Each option _must_ end with ';'
+#
+# -----------
+# General options:
+#
+# type - Server type.
+# 'stand' - Stand alone server (default).
+# 'inetd' - Started by inetd.
+# Used only by the server.
+#
+# -----------
+# port - Server TCP port number.
+#
+# -----------
+# bindaddr - Server listen address. Used to force vtund to bind
+# to the specific address and port in server mode.
+# Format:
+# bindaddr {
+# option .....;
+# };
+#
+# 'bindaddr' options:
+#
+# iface - Use interface address as the listen address.
+# Format:
+# iface if_name;
+#
+# addr - Listen address.
+# Format:
+# addr ip_address;
+# addr host_name;
+#
+# -----------
+# syslog - Syslog facility.
+#
+# -----------
+# timeout - General VTun timeout.
+#
+# -----------
+# ppp - Program for the ppp initialization.
+#
+# -----------
+# ifconfig - Program for the net interface initialization.
+#
+# -----------
+# route - Program for the routing table manipulation.
+#
+# -----------
+# firewall - Program for the firewall setup.
+#
+# -----------
+#
+# Session options:
+#
+# passwd - Password for authentication.
+#
+# -----------
+# type - Tunnel type.
+# 'tun' - IP tunnel (No PPP,Ether,.. headers).
+# 'ether' - Ethernet tunnel.
+# 'tty' - Serial tunnel, PPP, SLIP, etc.
+# 'pipe' - Pipe tunnel.
+# Default type is 'tty'.
+# Ignored by the client.
+#
+# -----------
+# device - Network device.
+# 'tapXX' - for 'ether'
+# 'tunXX' - for 'tun'
+# By default VTun will automatically select available
+# device.
+#
+# -----------
+# proto - Protocol.
+# 'tcp' - TCP protocol.
+# 'udp' - UDP protocol.
+#
+# 'tcp' is default for all tunnel types.
+# 'udp' is recommended for 'ether' and 'tun' only.
+#
+# This option is ignored by the client.
+#
+# -----------
+# persist - Persist mode.
+# 'yes' - Reconnect to the server after connection
+# termination.
+# 'no' - Exit after connection termination (default).
+# Used only by the client.
+#
+# -----------
+# keepalive - Enable 'yes' or disable 'no' connection
+# keep-alive. Ignored by the client.
+#
+# -----------
+# timeout - Connect timeout.
+#
+# -----------
+# compress - Enable 'yes' or disable 'no' compression.
+# It is also possible to specify method:
+# 'zlib' - ZLIB compression
+# 'lzo' - LZO compression
+# and level:
+# from 1(best speed) to 9(best compression)
+# separated by ':'. Default method is 'zlib:1'.
+# Ignored by the client.
+#
+# -----------
+# encrypt - Enable 'yes' or disable 'no' encryption.
+# It is also possible to specify a method:
+# 'blowfish128ecb' - Blowfish cipher, 128 bit key, mode ECB
+# 'blowfish128cbc' - Blowfish cipher, 128 bit key, mode CBC
+# 'blowfish128cfb' - Blowfish cipher, 128 bit key, mode CFB
+# 'blowfish128ofb' - Blowfish cipher, 128 bit key, mode OFB
+# 'blowfish256ecb' - Blowfish cipher, 256 bit key, mode ECB
+# 'blowfish256cbc' - Blowfish cipher, 256 bit key, mode CBC
+# 'blowfish256cfb' - Blowfish cipher, 256 bit key, mode CFB
+# 'blowfish256ofb' - Blowfish cipher, 256 bit key, mode OFB
+# 'aes128ecb' - AES cipher, 128 bit key, mode ECB
+# 'aes128cbc' - AES cipher, 128 bit key, mode CBC
+# 'aes128cfb' - AES cipher, 128 bit key, mode CFB
+# 'aes128ofb' - AES cipher, 128 bit key, mode OFB
+# 'aes256ecb' - AES cipher, 256 bit key, mode ECB
+# 'aes256cbc' - AES cipher, 256 bit key, mode CBC
+# 'aes256cfb' - AES cipher, 256 bit key, mode CFB
+# 'aes256ofb' - AES cipher, 256 bit key, mode OFB
+# Default method is 'blowfish128ecb'.
+# Ignored by the client.
+#
+# -----------
+# stat - Enable 'yes' or disable 'no' statistics.
+# If enabled vtund will log statistic counters every
+# 5 minutes.
+#
+# -----------
+# speed - Speed of the connection in kilobits/second.
+# 8,16,32,64,128,256,etc.
+# 0 means maximum possible speed without shaping.
+# You can specify speed in form IN:OUT.
+# IN - to the client, OUT - from the client.
+# Single number means same speed for IN and OUT.
+# Ignored by the client.
+#
+# -----------
+# up - List of programs to run after connection has been
+# established. Used to initialize protocols, devices,
+# routing and firewall.
+# Format:
+# up {
+# option .....;
+# option .....;
+# };
+#
+# down - List of programs to run after connection has been
+# terminated. Used to reset protocols, devices, routing
+# and firewall.
+# Format:
+# down {
+# option .....;
+# option .....;
+# };
+#
+# 'up' and 'down' options:
+#
+# program - Run specified program.
+# Format:
+# program path arguments wait;
+#
+# path - Full path to the program.
+# '/bin/sh' will be used if path was omitted.
+#
+# arguments - Arguments to pass to the program.
+# Must be enclosed in double quotes.
+# Special characters and expansions:
+# ' (single quotes) - group arguments
+# \ (back slash) - escape character
+# %%(double percent) - same as %d
+# %d - TUN or TAP device or TTY port name
+# %A - Local IP address
+# %P - Local TCP or UDP port
+# %a - Remote IP address
+# %p - Remote TCP or UDP port
+#
+# wait - Wait for the program termination.
+#
+# ppp - Run program specified by 'ppp' statement in
+# 'options' section.
+# Format:
+# ppp arguments;
+#
+# ifconfig - Run program specified by 'ifconfig' statement in
+# 'options' section.
+# Format:
+# ifconfig arguments;
+#
+# route - Run program specified by 'route' statement in
+# 'options' section.
+# Format:
+# route arguments;
+#
+# firewall - Run program specified by 'firewall' statement in
+# 'options' section.
+# Format:
+# firewall arguments;
+#
+# -----------
+# srcaddr - Local (source) address. Used to force vtund to bind
+# to the specific address and port in client mode.
+# Format:
+# srcaddr {
+# option .....;
+# option .....;
+# };
+#
+# 'srcaddr' options:
+#
+# iface - Use interface address as the Source address.
+# Format:
+# iface if_name;
+#
+# addr - Source address.
+# Format:
+# addr ip_address;
+# addr host_name;
+#
+# port - Source port.
+# Format:
+# port port_no;
+#
+# -----------
+# multi - Multiple connections.
+# 'yes' or 'allow' - allow multiple connections.
+# 'no' or 'deny' - deny multiple connections.
+# 'killold' - allow new connection and kill old one.
+# Ignored by the client.
+#
+# -----------
+# Notes:
+# Options 'Ignored by the client' are provided by server
+# at the connection initialization.
+#
+# Option names cannot be abbreviated.
+#
+# ----- CUT HERE --- Server config --- CUT HERE -----
+#
+options {
+ port 5000; # Listen on this port.
+ bindaddr { iface lo; }; # Listen only on loopback device.
+
+ # Syslog facility
+ syslog daemon;
+
+ # Path to various programs
+ ppp /usr/sbin/pppd;
+ ifconfig /sbin/ifconfig;
+ route /sbin/route;
+ firewall /sbin/ipchains;
+ ip /sbin/ip;
+}
+
+# Default session options
+default {
+ compress no; # Compression is off by default
+ speed 0; # By default maximum speed, NO shaping
+}
+
+# TUN example. Session 'cobra'.
+cobra {
+ passwd Ma&^TU; # Password
+ type tun; # IP tunnel
+ proto udp; # UDP protocol
+ compress lzo:9; # LZO compression level 9
+ encrypt yes; # Encryption
+ keepalive yes; # Keep connection alive
+
+ up {
+ # Connection is Up
+
+ # 10.3.0.1 - local, 10.3.0.2 - remote
+ ifconfig "%% 10.3.0.1 pointopoint 10.3.0.2 mtu 1450";
+ };
+}
+
+# the same as above, but with iproute2 command
+cobra {
+ passwd Ma&^TU; # Password
+ type tun; # IP tunnel
+ proto udp; # UDP protocol
+ compress lzo:9; # LZO compression level 9
+ encrypt yes; # Encryption
+ keepalive yes; # Keep connection alive
+
+ up {
+ # Connection is Up
+
+ # 10.3.0.1 - local, 10.3.0.2 - remote
+ ip "link set %% up multicast off mtu 1450";
+ ip "-family inet addr add 10.3.0.1 peer 10.3.0.2 dev %%";
+ };
+}
+
+
+# Ethernet example. Session 'lion'.
+lion {
+ passwd Ma&^TU; # Password
+ type ether; # Ethernet tunnel
+ device tap0; # Device tap0
+ proto udp; # UDP protocol
+ compress lzo:1; # LZO compression level 1
+ encrypt yes; # Encryption
+ stat yes; # Log connection statistic
+ keepalive yes; # Keep connection alive
+
+ up {
+ # Connection is Up
+
+ # Assign IP address
+ ifconfig "%% 10.1.0.1 netmask 255.255.255.0";
+
+ # Add route to net 10.2.0.0/24
+ route "add -net 10.2.0.0 netmask 255.255.255.0 gw 10.1.0.2";
+
+ # Enable masquerading for net 10.2.0.0.0/24
+ firewall "-A forward -s 10.2.0.0/24 -d 0.0.0.0/0 -j MASQ";
+ };
+
+ down {
+ # Connection is Down
+
+ # Shutdown tap device.
+ ifconfig "%% down";
+
+ # Disable masquerading for net 10.2.0.0.0/24
+ firewall "-D forward -s 10.2.0.0/24 -d 0.0.0.0/0 -j MASQ";
+ };
+}
+
+# PPP example. Session 'viper'.
+viper {
+ passwd TTT$bio; # Password
+ compress yes; # ZLIB compression level 1
+ encrypt yes; # Encryption
+ up {
+ # Connection is Up (established)
+
+ # Assign IP addresses 10.0.0.1 - local, 10.0.0.2 - remote
+ ppp "10.0.0.1:10.0.0.2 proxyarp";
+ };
+}
+
+# Pipe example. Session 'backup'.
+backup {
+ passwd OnlyME; # Password
+ type pipe; # Pipe tunnel
+ speed 256:128; # Shaping speed 256K IN and 128K OUT.
+ encrypt yes; # Encryption
+ up {
+ # Connection is Up
+
+ # Start shell and tar '/etc' directory to
+ # the stdout (pipe tunnel).
+ program /bin/sh "-c 'tar cf - /etc/*'";
+ };
+}
+
+# TTY example. Session 'sz'.
+# Silly example to show that VTun can tunnel ALMOST
+# anything :-).
+sz {
+ passwd OnlyME; # Password
+ type tty; # TTY tunnel
+ speed 64; # Shaping speed 64K IN/OUT
+ encrypt yes; # Encryption
+ up {
+ # Connection is Up
+
+ # Send '/etc/profile' via ZMODEM to the
+ # stdout(tty tunnel).
+ program /bin/sh "-c 'sz /etc/termcap'";
+ };
+}
+#
+# ----- CUT HERE -------- End -------- CUT HERE -----
+#
+
+#
+# ----- CUT HERE --- Client config --- CUT HERE -----
+#
+options {
+ port 5000; # Connect to this port.
+ timeout 60; # General timeout
+
+ # Path to various programs
+ ppp /usr/sbin/pppd;
+ ifconfig /sbin/ifconfig;
+ route /sbin/route;
+ firewall /sbin/ipchains;
+ ip /sbin/ip;
+}
+
+# TUN example. Session 'cobra'.
+cobra {
+ passwd Ma&^TU; # Password
+ device tun1; # Device tun1
+ persist yes; # Persist mode
+ up {
+ # Connection is Up
+
+ # Assign IP addresses.
+ ifconfig "%% 10.3.0.2 pointopoint 10.3.0.1 mtu 1450";
+ };
+}
+# same as above, but with iproute2 command
+cobra {
+ passwd Ma&^TU; # Password
+ device tun1; # Device tun1
+ persist yes; # Persist mode
+ up {
+ # Connection is Up
+
+ # Assign IP addresses.
+ ip "link set %% up multicast off mtu 1450";
+ ip "-family inet addr add 10.3.0.2 peer 10.3.0.1 dev %%";
+ };
+}
+
+# Ethernet example. Session 'lion'.
+lion {
+ passwd Ma&^TU; # Password
+ type ether; # Ethernet tunnel
+ device tap1; # Device tap1
+ up {
+ # Connection is Up
+
+ # Assign IP address and netmask.
+ ifconfig "%% 10.1.0.2 netmask 255.255.255.0";
+ };
+ down {
+ # Connection is Down
+
+ # Shutdown tap device
+ ifconfig "%% down";
+ };
+}
+
+# PPP example. Session 'viper'.
+viper {
+ passwd TTT$bio; # Password
+ up {
+ # Connection is Up
+
+ # IP address will be assigned by the server
+ ppp "noipdefault";
+ };
+}
+
+# Pipe example. Session 'backup'.
+backup {
+ passwd OnlyME; # Password
+ up {
+ # Connection is Up
+
+ # Start shell and untar files from
+ # stdin(pipe tunnel).
+ program /bin/sh "-c 'cd /tmp; tar xf -";
+ };
+}
+
+# TTY example. Session 'sz'.
+# Silly example to show that VTun can tunnel ALMOST
+# anything :-).
+sz {
+ passwd OnlyME; # Password
+ up {
+ # Receive file via ZMODEM from the
+ # stdin(tty tunnel).
+ program /bin/sh "-c 'cd /tmp; rz'";
+ };
+}
--- /dev/null
+###ORF Keys für vdr-sc
+# *** ORF ****
+W 0D05 04 CC 0987CF2A611D; CardSystem Key
+W 0D05 04 20 00 A9D732F5E738E48A91C8638B12746661; OP key
+# *** AustriaSat ****
+W 0D05 10 CC 0987CF2A611D; CardSystem Key
+W 0D05 10 20 01 C229A4036100E81A42BAC3C70EBBC852; OP key
--- /dev/null
+#libusb in toolchain einfügen
+tar xjf libusb-1.0.9.tar.bz2
+cd libusb-1.0.9
+export TOOLCHAIN=/home/mhoellein/freetz-trunk/toolchain/target/
+export PATH="$TOOLCHAIN/bin/:$PATH"
+./configure --prefix=/ --host=mips-linux-uclibc
+make
+make DESTDIR=$TOOLCHAIN install
+###oscam.dvbapi
+CAID = Conditional Access Identification | numerische Kennung für den Verschlüsselungsanbieter
+ProviderID = ProviderID | numerische Kennung für den Pay TV Provider
+SID = ServiceID | numerische Kennung für den Sender
+Chid = ChannelID | numerische Senderkennung bei Irdet0
+ECM = Entitlement Control Message | Control Message zum errechnen des zu dieser Zeit gültigen Kontrollwortes
+#Syntax
+P: CAID:[ProviderID]:[ServiceID]:[ECM PID]:[Chid] [Wiederholung]
+ (priority) Priorisierung, Wiederholung = 1: Wiederhole die Priorisierung
+I: CAID:[ProviderID]:[ServiceID]:[ECM PID]
+ (ignore) Ignorierung von bestimmten Verschlüsselungsanbietern (CAID) oder Pay TV Providern (ProviderID)
+D: CAID:[ProviderID]:[ServiceID]:[ECM PID] delay
+ (delay) Verzögerung in Millisekunden, um das CW zu schreiben
+M: CAID,[ProviderID]:[ServiceID]:[ECM PID] CAID:[provider ID]
+ (mapping) Umleitung von Verschlüsselungsanbieter (CAID) oder Pay TV Provider (ProviderID)
+L: CAID:[provider ID]:[service ID]:[ECM PID] ECM length (decimal)
+ (length) Richtige ECM Länge festlegen um unerwünschte ECMs von falschen Providern mit selber CAID rauszufiltern.
+
+#Bsp.:
+* P:0100:123456 #CAID 0100 mit Provider 123456 priorisiert
+* P: 0100 1 #CAID 0100 priorisiert und festgesetzt, mit der "1" (continue) wechselt er nicht auf eine andere CAID sondern versucht es weiter bei der angegebenen CAID. Normal stoppt er die Anfragen nach 3 Fehlversuchen, was aber z.b. wenn man eine Karte freischalten möchte sehr ungünstig ist.
+* P: :::1234 #ECM mit Provider ID 1234 allgemein priorisiert
+* P: 0200 #CAID 0200 priorisiert
+* P: 0300:9ABC #CAID 0300 nur auf SID 9ABC priorisiert
+* M: 0400 0500:123456 #mapped CAID 0400 auf CAID 0500 mit ProviderID 123456
+* M: 1834:000000:007E 1722 #mapped CAID 1834 mit ProviderID 000000 und SID 007E auf CAID 1722
+* D: 0600 200 #wartet 200 ms bevor CW für CAID 0600 geschrieben wird, falls der Server zu schnell antwortet
+* I: :654321 #ignoriert die ProviderID 654321
+* I: 0 #ignoriert jede CAID, die nicht extra in dieser Datei angegeben wurde
+* L: 0D00 100 #ECM Länge für CAID 0D00 auf 100 (dezimal) festgelegt.
+P: 0100:123456 # CAID 0100 mit Provider 123456 hat Vorrang
+P: 0100 1 # CAID 0100 wird so lange versucht bis eine Karte ohne Freischaltung offen ist
+P: : 1 # Client hört nicht nach 3 Versuchen mit Anfragen auf (alle CAIDs)
+P: :1234 # ECM mit Provider ID 1234 hat auf jedem Service Vorrang
+P: 0200 # CAID 0200 hat Vorrang
+P: 0300::9ABC # CAID 0300 hat nur auf Service 9ABC Vorrang
+I: :654321 # Ignoriert Provider ID 654321 für jeden Service
+I: 0 # Ignoriert jede CAID, die nicht zuvor bearbeitet wurde
+D: 0600 200 # Wartet 200 ms bevor CW für CAID 0600 geschrieben wird
+L: 0700 8e # Läßt bei dieser CAID nur ECM der Länge 8e (hexa) zu; um z.B. kaputte Mappings zu filtern
+M: 0400 0500:123456 # Mapped CAID 0400 und 0500 ständig zu Provider ID 123456
+
+###v13 ecm whitelist
+ecmwhitelist = 09C4:46,58,90,95
+ecmwhitelist = 09C4@000000:46,58,90,95
+#oscam für fritz übersetzen
+make CROSS=/home/mhoellein/freetz-trunk/toolchain/target/bin/mips-linux-uclibc-
+#mit usblib
+make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- USE_LIBUSB=1
+#mit static usblib
+make CROSS=$TOOLCHAIN/bin/mipsel-linux-uclibc- USE_LIBUSB=1 LIBUSB_LIB="$TOOLCHAIN/lib/libusb-1.0.a"
+
+#oscam log erklärt - richtige ecm längen
+Client (1830&000000/EF10/92:0C4E): found (330 ms) by hdplus
+[CAID]&[ProvID]/[SID]/[ECM-Länge]:[PID]
+somit kann man die gültigen ecm längen herausfinden und jeweils für den
+reader nur die zulassen, dies dann in oscam.server eintragen unter reader
+ecmwhitelist = 92
+###emmcache Einstellung und Erklärung
+emmcache = <usecache>,<rewrite>,<logging>
+* <usecache> 0 = # cache aus (default)
+* <usecache> 1 = # cache ein
+* <rewrite> n = # Wie oft ein und das selbe Update-Kommando (EMM) geschrieben wird. Gilt nur bei <usecache> = 1
+
+* <logging> 0 = # Einträge im Logfile ausgeschaltet (default)
+* <logging> 1 = # Nur fehlerhafte EMM werden geloggt
+* <logging> 2 = # die geschriebenen (written) EMM werden geloggt
+* <logging> 4 = # die zurückgewiesenen (skipped) EMM werden geloggt
+* <logging> 8 = # die blockierten (blocked) EMM werden geloggt
+* <logging> 16 = # disabled AU werden geloggt
+###smargo Einstellungen
+T=0 -> character protocol
+T=1 -> block protocol
+Crpytoworks, Conax, Seca, NDS, Viacces, Nagra nutzen T=0
+Irdeto nutzen T=1
+###smartreader protocol
+device= Serial:Reader 74
+device= 001:003
+#ab 1.07er Firmware auf smargo
+device= Serial:avc342ed
+###
+
--- /dev/null
+#!/bin/bash
+
+###Define some variables
+verzeichnis="~/Documents/maps/osm_germany/"
+karte="germany.osm"
+
+### Change to working directory
+cd $verzeichnis
+
+###split to tiles
+java -Xmx2000M -jar ~/bin/splitter/splitter.jar --max-nodes=800000 $karte
+
+### mkgmap
+java -Xmx2000M -jar ~/bin/mkgmap-r899/mkgmap.jar --latin1 --family-id=3965 --product-id=1 --route --net --tdb-v4 --road-name-pois --gmapsupp --description="OSM Deutschland routingfähig" --country-name="GERMANY" --country-abbr="DE" -c template.args
--- /dev/null
+###Import einer planet Datei in eine lokale PostgreSQL (rails port) Datenbank.
+osmosis --read-xml file="planet.osm" --write-apidb host="x" database="x" user="x" password="x"
+###Export einer planet Datei von einer lokalen PostgreSQL database aus.
+osmosis --read-apidb host="x" database="x" user="x" password="x" --write-xml file="planet.osm"
+###Herleitung eines Änderungs-Datensatzes (change set) zwischen zwei planet Dateien.
+osmosis --read-xml file="planet1.osm" --read-xml file="planet2.osm" --derive-change --write-xml-change file="planetdiff-1-2.osc"
+###Herleitung eines Änderungs-Datensatzes (change set) zwischen einer planet Datei und einer lokalen PostgreSQL Datenbank.
+osmosis --read-xml file="planet1.osm" --read-apidb host="x" database="x" user="x" password="x" --derive-change --write-xml-change file="planetdiff-1-2.osc"
+###Anwendung eines Änderungs-Datensatzes (change set) auf eine planet Datei.
+osmosis --read-xml-change file="planetdiff-1-2.osc" --read-xml file="planet1.osm" --apply-change --write-xml file="planet2.osm" oder
+osmosis --read-xml file="planet1.osm" --read-xml-change file="planetdiff-1-2.osc" --apply-change --write-xml file="planet2.osm" for the older version
+###Sortieren des Inhalts einer planet Datei.
+osmosis --read-xml file="data.osm" '--sort type'="TypeThenId" --write-xml file="data-sorted.osm"
+###Extrahieren eines Gebiets (area) basierend auf einer Osmosis/Polygon Filter File Format Datei:
+osmosis --read-xml file="planet-latest.osm" --bounding-polygon file="country2pts.txt" --write-xml file="germany.osm"
+###Unter Ubuntu kann ein Gebiet aus der z.B. europe.osm.pbf Datei mit einem polygon d-dk.poly ausgeschitten werden. Der Befehl ist im Verzeichnis osmosis auszuführen und lautet z.B. für Deutschlad-Dänemark:
+osmosis --read-pbf europe.osm.pbf --bounding-polygon file="d-dk.poly" --write-pbf file="d-dk.osm.pbf"
+###Extrahieren nur der Wege, die spezifische Tags haben. Mit der Angabe von --used-node werden nur die Knoten aus den gefilterten Wegen extrahiert. Relationen bleiben unberührt
+osmosis --read-xml city.osm --way-key-value keyValueList="railway.tram,railway.tram_stop" --used-node --write-xml city_tram.osm
+###extrahieren eines Bereichs aus osm-Datei
+osmosis --read-xml enableDateParsing=no file=germany.osm.bz2 --bounding-box top=49.5138 left=10.9351 bottom=49.3866 right=11.201 --write-xml nürnberg.osm.bz2
+###extrahieren der 16 Bundesländer aus Planetdump
+osmosis \
+ --rx full/planet.osm.bz2 \
+ --tee 16 \
+ --bp file=polygons/europe/germany/baden-wuerttemberg.poly \
+ --wx baden-wuerttemberg.osm.bz2 \
+ --bp file=polygons/europe/germany/bayern.poly \
+ --wx bayern.osm.bz2 \
+ --bp file=polygons/europe/germany/berlin.poly \
+ --wx berlin.osm.bz2 \
+ --bp file=polygons/europe/germany/brandenburg.poly \
+ --wx brandenburg.osm.bz2 \
+ --bp file=polygons/europe/germany/bremen.poly \
+ --wx bremen.osm.bz2 \
+ --bp file=polygons/europe/germany/hamburg.poly \
+ --wx hamburg.osm.bz2 \
+ --bp file=polygons/europe/germany/hessen.poly \
+ --wx hessen.osm.bz2 \
+ --bp file=polygons/europe/germany/mecklenburg-vorpommern.poly \
+ --wx mecklenburg-vorpommern.osm.bz2 \
+ --bp file=polygons/europe/germany/niedersachsen.poly \
+ --wx niedersachsen.osm.bz2 \
+ --bp file=polygons/europe/germany/nordrhein-westfalen.poly \
+ --wx nordrhein-westfalen.osm.bz2 \
+ --bp file=polygons/europe/germany/rheinland-pfalz.poly \
+ --wx rheinland-pfalz.osm.bz2 \
+ --bp file=polygons/europe/germany/saarland.poly \
+ --wx saarland.osm.bz2 \
+ --bp file=polygons/europe/germany/sachsen-anhalt.poly \
+ --wx sachsen-anhalt.osm.bz2 \
+ --bp file=polygons/europe/germany/sachsen.poly \
+ --wx sachsen.osm.bz2 \
+ --bp file=polygons/europe/germany/schleswig-holstein.poly \
+ --wx schleswig-holstein.osm.bz2 \
+ --bp file=polygons/europe/germany/thueringen.poly \
+ --wx thueringen.osm.bz2
+###
--- /dev/null
+###generate an image
+partimage -z0 -d -f3 -b save /dev/hda1 /mnt/sda1/hda1.partimg
+###restoring an image to partition
+partimage -f3 -b restore /dev/hda1 /mnt/sda1/hda1.partimg.000
+###partimage via ssh
+#rechner a
+partimage save /dev/sda stdout | gzip -c | nc 127.0.0.1:5555
+#rechner b
+nc -l -p 5555 | ssh foo@bar.net 'split -d --bytes=650m - bkpimage.'
--- /dev/null
+###pdf jede Seite in einzelnes pdf
+pdftk input.pdf burst output outputpdf%02d.pdf
+###Seiten entfernen / Seiten 1-12 und 14-ende von in.pdf nach out.pdf
+pdftk in.pdf cat 1-12 14-end output out.pdf
+pdftk A=in.pdf cat A1-12 A14-end output out.pdf
+###mehrere pdf zu einem pdf, pdf in1.pdf und in2.pdf nach out.pdf
+pdftk in1.pdf in2.pdf cat output out.pdf
+pdftk A=in.pdf B=in.pdf cat A B output out.pdf
+###alle pdf nach combined.pdf
+pdftk *.pdf cat output combined.pdf
+###pdf übereinander / wasserzeichen
+pdftk beispiel.pdf background wasserzeichen.pdf output dokument.pdf
+
--- /dev/null
+###wählt den Benutzernamen bzw. das Benutzerkonto auf dem E-Mail-Server.
+USER xxx
+###übergibt das Passwort in Klartext.
+PASS xxx
+###liefert den Status der Mailbox, u.a. die Anzahl aller E-Mails im Postfach und deren Gesamtgröße (in Byte).
+STAT
+###liefert die Anzahl und die Größe der (n-ten) E-Mail(s).
+LIST (n)
+###holt die n-te E-Mail vom E-Mail-Server.
+RETR n
+###löscht die n-te E-Mail am E-Mail-Server.
+DELE n
+###keine Funktion, der Server antwortet mit +OK.
+NOOP
+###setzt alle DELE-Kommandos zurück.
+RSET
+###beendet die aktuelle POP3-Sitzung und führt alle DELE-Kommandos durch.
+QUIT
+
+###Optionale Kommandos (serverabhängig):
+###sichere Anmeldung, s.u.
+APOP
+###ruft den Header und die ersten x Zeilen der n-ten Mail ab.
+TOP n x
+###zeigt die eindeutige ID der E-Mail an.
+UIDL n
--- /dev/null
+###Mail-Queue ansehen
+mailq
+###Anzahl der Mails in der Queue:
+mailq | egrep '^--'
+###alle Mails der Queue löschen
+postsuper -d ALL
+###einzelne Mails aus der Queue löschen
+mailq | less
+#die entsprechende queue_id merken/kopieren
+postsuper -d ID
+###alle Mails auf "hold":
+postsuper -h ALL
+###einzelne Mails auf "hold":
+postsuper -h ID
+###alle Mails von "hold" wieder releasen:
+postsuper -H ALL
+###einzelne Mails "releasen":
+postsuper -H ID
+###postfix anweisen auslieferung zu starten
+postqueue -f
--- /dev/null
+###neue Tabelle anlegen
+create table va (ANLAGE int, WEGENR varchar(100), VERTRAG varchar(30), GPNAME varchar(100), PK_ANLAGE varchar(30), SPARTE int, VTR_NUMMER varchar(30), PLZ varchar(8), ORT varchar(40), STRASSE varchar(60), HNR varchar(20), HNRZ varchar(20), MASTERPK varchar(30), PK_GP varchar(30), SYSCRM_PROD_INSTALLATION_PK varchar(30), SYSCRM_PROD_CONTRACT_PK varchar(30));
+###neue Spalte volltext vom Typ tsvector anlegen
+alter table test add column volltext tsvector;
+###Volltext über bestimmte Spalten anlegen
+update test set volltext=to_tsvector( COALESCE(gpname,'') ||' '|| COALESCE(wegenr,'') ||' ' ||COALESCE(strasse,'') ||' ' ||COALESCE(ort,'') ||' '||COALESCE(plz,'') ||' '|| COALESCE(hnr,'') ||' '|| COALESCE(anlage,'') ||' '||COALESCE(vertrag,''));
+###normalen Index auf der Spalte volltext
+CREATE INDEX volltext_idx on test using gist(volltext);
+###
+VACUUM FULL ANALYZE;
+###Tabelle umbenennen
+ALTER TABLE oldname RENAME TO newname;
+###Nullwerte in spalte suchen
+SELECT * FROM tabelle WHERE spalte IS NULL;
+###Benutzer anlegen
+createuser -P serg
+###Datenbank anlegen
+#-h, --hostgibt den Namen des Zielhosts an, auf dem die Datenbank erzeugt werden soll
+#-p, --portdies ist die Nummer des Ports, den der Server nach Verbindungsanforderungen abhört
+#-U, --username der Benutzername, unter dem die Verbindung aufgebaut wird
+#-W,
+#--password diese Option erzwingt eine Passwortabfrage
+#dbname der Name der Datenbank, die erzeugt wird
+createdb -h myhost -p 1234 -U myname -W testdb
+###Liste der Dabenbanken aufrufen
+\l
+###Tabellen anzeigen
+\d
+###Zugriffsrechte anzeigen
+\z
+###Aliase MODARCH3
+#alle aliase anzeigen
+select * from modarch3_belegartalias;
+###Belegarten MODARCH3
+select * from modarch3_belegart;
+
--- /dev/null
+###verschiende Umwandlundmethoden für dateien nach ps
+#mittels acroread
+acroread -toPostScript -size A4 -expand PDF-File.pdf Postscript.ps
+#mittels gs
+gs -q -dNOPAUSE -dBATCH -sDEVICE=pcl3 -sOutputFile=Postscript.ps PDF-File.pdf
+#mittels convert
+convert PDF-File.pdf Postscript.ps
+#mittels pdf2ps
+pdf2ps PDF-File.pdf Postscript.ps
+###
+
--- /dev/null
+*PPD-Adobe: "4.3"
+*FormatVersion: "4.3"
+*FileVersion: "1.0"
+*LanguageVersion: English
+*LanguageEncoding: ISOLatin1
+*PCFileName: "CAPIFAX.PPD"
+*Manufacturer: "capifax"
+*Product: "(capifax)"
+*cupsFilter: "application/vnd.cups-postscript 0 -"
+*cupsVersion: 1.1
+*cupsManualCopies: True
+*ModelName: "capifax"
+*ShortNickName: "capifax"
+*NickName: "capifax"
+*PSVersion: "(3010.000) 550"
+*LanguageLevel: "3"
+*ColorDevice: False
+*FaxSupport: Base
+*FileSystem: False
+*Throughput: "1"
+*TTRasterizer: Type42
+*LandscapeOrientation: Plus90
+*VariablePaperSize: False
+
+*OpenUI *Resolution/Fax Resolution: PickOne
+*OrderDependency: 10 AnySetup *Resolution
+*DefaultResolution: 204x196dpi
+*Resolution 204x196dpi/204×196 dpi (high resolution): ""
+*Resolution 204x98dpi/204×98 dpi (low resolution): ""
+*CloseUI: *Resolution
+
+*OpenUI *PageSize/Media Size: PickOne
+*OrderDependency: 0 AnySetup *PageSize
+*DefaultPageSize: A4
+*PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
+*PageSize Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
+*PageSize Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
+*CloseUI: *PageSize
+
+*DefaultPageRegion: A4
+*PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
+*PageRegion Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
+*PageRegion Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
+
+*DefaultImageableArea: Unknown
+
+*DefaultPaperDimension: A4
+*PaperDimension A4: "595 842"
+*PaperDimension Letter: "612 792"
+*PaperDimension Legal: "612 1008"
+
+*OpenUI *Dial/Dial Method: PickOne
+*OrderDependency: 30 AnySetup *Dial
+*DefaultDial: JobName
+*Dial JobName/Job Name: ""
+*Dial Manually/Manually: ""
+*Dial Option/Option (obsolete): ""
+*CloseUI: *Dial
+
+*DefaultFont: Courier
+*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
+*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
+*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
+*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
+*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
+*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
+*Font Bookman-Light: Standard "(001.004S)" Standard ROM
+*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
+*Font Courier: Standard "(002.004S)" Standard ROM
+*Font Courier-Bold: Standard "(002.004S)" Standard ROM
+*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
+*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
+*Font Helvetica: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
+*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
+*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
+*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
+*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
+*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
+*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
+*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
+*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
+*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
+*Font Symbol: Special "(001.007S)" Special ROM
+*Font Times-Bold: Standard "(001.007S)" Standard ROM
+*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
+*Font Times-Italic: Standard "(001.007S)" Standard ROM
+*Font Times-Roman: Standard "(001.007S)" Standard ROM
+*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
+
+*% What follows is a pseudo-Foomatic driver to enable graphical
+*% specification of the phone number. Only the phone number is listed
+*% as option. It won't be used by Foomatic anyway.
+*%
+*% COMDATA #$VAR1 = {
+*% COMDATA # 'args_byname' => {
+*% COMDATA # 'phone' => {
+*% COMDATA # 'name' => 'phone',
+*% COMDATA # 'type' => 'string',
+*% COMDATA # 'comment' => 'Target Fax Number',
+*% COMDATA # 'default' => ''
+*% COMDATA # }
+*% COMDATA # },
+*% COMDATA # 'model' => 'Faxmodem',
+*% COMDATA # 'comment' => 'Faxmodem driver',
+*% COMDATA # 'make' => 'Faxmodem',
+*% COMDATA # 'color' => '0'
+*% COMDATA #};
+
--- /dev/null
+*PPD-Adobe: "4.3"
+*% PPD file for Modarch Archiv with CUPS.
+*% Created by the CUPS PPD Compiler v1.2.0.
+*FormatVersion: "4.3"
+*FileVersion: "53"
+*LanguageVersion: English
+*LanguageEncoding: ISOLatin1
+*PCFileName: "modarcha.ppd"
+*Product: "(ESP Ghostscript)"
+*Product: "(GPL Ghostscript)"
+*Product: "(GNU Ghostscript)"
+*Manufacturer: "TBZ-PARIV"
+*ModelName: "TBZ-PARIV Modarch Archiv"
+*ShortNickName: "TBZ-PARIV Modarch Archiv"
+*NickName: "TBZ-PARIV Modarch Archiv, 53"
+*PSVersion: "(3010.000) 705"
+*PSVersion: "(3010.000) 707"
+*PSVersion: "(3010.000) 815"
+*PSVersion: "(3010.000) 853"
+*LanguageLevel: "3"
+*ColorDevice: False
+*DefaultColorSpace: Gray
+*FileSystem: False
+*Throughput: "1"
+*LandscapeOrientation: Plus90
+*TTRasterizer: Type42
+*cupsVersion: 1.2
+*cupsModelNumber: 0
+*cupsManualCopies: False
+*cupsFilter: "application/vnd.cups-postscript 0 -"
+*cupsFilter: "application/vnd.cups-raw 0 -"
+*cupsFilter: "text/plain 0 -"
+*cupsFilter: "application/postscript 0 -"
+*cupsFilter: "application/octet-stream 0 -"
+*OpenUI *PageSize/Media Size: PickOne
+*OrderDependency: 10 AnySetup *PageSize
+*DefaultPageSize: A4
+*PageSize A4/A4 - 210x297mm: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
+*CloseUI: *PageSize
+*OpenUI *Company/Firma: PickOne
+*OrderDependency: 12.0 JCLSetup *Company
+*DefaultCompany: none
+*Company none/keine: ""
+*Company aan/AAN Abwasserentsorgung Ansbach AöR: ""
+*Company aeg/AEG aqua engineering gmbh: ""
+*Company awe/AWE Abwasserentsorgung Ansbach AöR: ""
+*Company aws/AWS Abwasserbetriebe Selb: ""
+*Company buv/BUV Ansbacher Bäder- und Verkehrs GmbH: ""
+*Company egs/EGS erdgas schwaben: ""
+*Company epg/EPG Erdgas Plauen GmbH: ""
+*Company erw/ERW E-Werk Reinbek-Wentorf: ""
+*Company esg/ESG Erdgas Südsachsen GmbH: ""
+*Company ems/EMS Energieversorgung Mittelsachsen GmbH: ""
+*Company esm/ESM Energieversorgung Selb-Marktredwitz GmbH: ""
+*Company esv/ESV Energie Stern GmbH: ""
+*Company evk/EVK Energieversorgung Lohr-Karlstadt und Umgebung GmbH & Co. KG: ""
+*Company guf/GUF Gasversorgung Unterfranken: ""
+*Company gsz/GSZ Gasstadtwerke Zerbst: ""
+*Company gws/GWS gemeindewerke Schirnding: ""
+*Company gvw/GVW Gemeinde Veitshöchheim: ""
+*Company gwt/GWT Gemeindewerke Thüngen: ""
+*Company gza/GZA Gemeinde Zellingen: ""
+*Company kwv/KWV Kom. Wärmevers. Auerbach: ""
+*Company lkw/LKW Licht-, Kraft- und Wasserwerke Kitzingen: ""
+*Company msw/MSW : ""
+*Company sng/SNG schwaben netz gmbh: ""
+*Company ssn/SSN Südsachsen Netz GmbH: ""
+*Company swa/SWA Stadtwerke Aue GmbH: ""
+*Company swg/SWG Stadtwerke Glauchau: ""
+*Company swh/SWH Stadtwerke Hohenberg an der Eger: ""
+*Company swme/SWME Stadtwerke Meerane GmbH: ""
+*Company swm/SWM Stadtwerke Marktleuthen: ""
+*Company tbz/TBZ TBZ-PARIV GmbH: ""
+*Company thv/THV Thüga AG: ""
+*Company zev/ZEV Zwickauer Energieversorgung: ""
+*Company vbz/VBZ Versorgungsbetrieb Zellingen: ""
+*Company zwv/ZWV Zwickauer Wärmeversorgung: ""
+*CloseUI: *Company
+*OpenUI *Output/Ordner: PickOne
+*OrderDependency: 12.0 JCLSetup *Output
+*DefaultOutput: archiv
+*Output archiv/nur Archiv: "%%%% Archiv"
+*Output print/Druck und Archiv: "%%%% Print VA"
+*Output printarchiv/Druck und Archiv (caps, u.ä.): "%%%% Printarchiv"
+*Output scan/Scan: "%%%% Scan"
+*Output test/Test: "%%%% Test"
+*CloseUI: *Output
+*OpenUI *Category/Kategorie: PickOne
+*OrderDependency: 12.0 JCLSetup *Category
+*DefaultCategory: misc
+*Category isu/IS-U: ""
+*Category misc/Sonstiges: ""
+*Category va/Verbrauchsabrechnung: ""
+*Category svk/Sonververträge/svk: ""
+*Category mahn/Mahnwesen: ""
+*Category sap/SAP: ""
+*Category hr/SAP HR: ""
+*Category kis/Kundeninformationssystem: ""
+*Category ja/Jahresabschluß: ""
+*Category kd/KADIS: ""
+*Category erech/eRech: ""
+*CloseUI: *Category
+*OpenUI *Hierarchic/Hierachie: PickOne
+*OrderDependency: 12.0 JCLSetup *Hierarchic
+*DefaultHierarchic: YMD
+*Hierarchic YMD/Jahr Monat Tag: ""
+*Hierarchic YM/Jahr Monat: ""
+*Hierarchic Y/Jahr: ""
+*Hierarchic Job: ""
+*Hierarchic none/keines: ""
+*CloseUI: *Hierarchic
+*OpenUI *JobMail/Benachrichtigung per Mail: PickOne
+*OrderDependency: 12.0 JCLSetup *JobMail
+*DefaultJobMail: mailno
+*JobMail mailno/keine: ""
+*JobMail mailyes/ja: ""
+*CloseUI: *JobMail
+*DefaultFont: Courier
+*% End of modarcha.ppd, 04212 bytes.
--- /dev/null
+###modem ip
+192.168.100.1
+###Basic lan
+http://192.168.100.1/BasicLan.asp
+###hardware info seite
+http://192.168.100.1/HardwareInfo.asp
+###event log
+http://192.168.100.1/EventLog_CM.asp
+###Cm state
+http://192.168.100.1/CmState.asp
+###Initial Scan
+http://192.168.100.1/InitialScan.asp
+###Modemwerte erklärt wie in D üblich (Modemwert + 60)
+Downstream: 60dbµV +/- 10dBµV
+Upstream: 100dbµV +/- 10dBµV
+Signal/Noise Ratio: >32dB
+#wie Modem das anzeigt
+Downstream: 0dBmV +/-10dBmV
+Upstream: 40dBmV +/- 10dBmV
+Signal/Noise Ratio: >32 dB
+
+
--- /dev/null
+###
+iptables -t nat -A PREROUTING -p tcp -i eth1 --dport pop3 -j REDIRECT --to 8110
+iptables -t nat -A PREROUTING -p tcp -s 192.168.0.33 -i eth1 --dport pop3 -j ACCEPT
+
+
+iptables -t nat -A PREROUTING -i eth1 -s ! 192.168.0.33 -p tcp --dport pop3 -j REDIRECT --to 8110
+
+
+###iptables proxy weiterleitung
+iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
+
+###komplett mit eigene squidrechner und firewall
+iptables -t nat -A PREROUTING -i eth0 -s ! squid-box -p tcp --dport 80 -j DNAT --to squid-box:3128
+iptables -t nat -A POSTROUTING -o eth0 -s local-network -d squid-box -j SNAT --to iptables-box
+iptables -A FORWARD -s local-network -d squid-box -i eth0 -o eth0 -p tcp --dport 3128 -j ACCEPT
+
+###wenn wechselnde ips dann
+iptables -t nat -A POSTROUTING -o eth0 -s local-network -d squid-box -j MASQUERADE
+
+
+###Squid einrichten
+vim /etc/squid/squid.conf
+
+###Folgende Konfigurationsoptionen dürften von Interesse sein:
+###Transparenz für dieses Interface aktivieren (ggf. IP/Port anpassen)
+http_port 192.168.0.2:3128 transparent
+###Grösse des Caches im Hauptspeicher
+cache_mem 8 MB
+###Maximale Grösse von zu cachenden Objekten
+maximum_object_size 4096 KB
+###Minimale Grösse ...
+minimum_object_size 0 KB
+###Dasselbe für den Speicher-Cache
+maximum_object_size_in_memory 8 KB
+###off vermindert die Sichtbarkeit des Clients von aussen, also ausschalten
+forwarded_for on/off
+###Damit lässt sich Caching auf der Festplatte vermeiden (im RAM wird weiterhin gecached)
+cache_dir null /tmp
+###Definiere 192.168.100.0/24 als unser Netzwerk (mehrere Netzwerke durch Leerschläge trennen)
+acl our_networks src 192.168.100.0/24
+###HTTP-Zugang für unsere Netzwerke erlauben
+http_access allow our_networks
+###HTTP-Zugang auf Dienste des Squid-Rechner (loopback-interface) unterbinden
+http_access deny to_localhost
+
+[bearbeiten]
+Squid testen
+
+Nun sollte Squid auf Port 3128 erreichbar sein und den Clients Internet-Zugang ermöglichen.
+
+
+[bearbeiten]
+Transparenz
+
+###Squid-Proxy transparent machen,alle Pakete auf Port 80 weitergeleitet auf den soeben eingerichteten Squid:
+iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
+
+
+Weitere Bemerkungen:
+
+SSL funktioniert nie über einen transparenten Proxy. Das liegt daran, dass bei einer SSL-Verbindung der Proxy die Header nicht lesen und damit den Request auch nicht weiter an den richtigen Server schicken kann. Bei normalem Proxy-Betrieb wird SSL mit einer speziellen Methode (CONNECT) durch den Proxy getunnelt; dafür muss der User aber den Proxy in seinem Browser eintragen. Ansonsten müsste der Proxy Server an Stelle des richtigen Webservers die HTTPS-Verbindung annehmen, was im Wesentlichen eine Man in the middle-Attacke ist und daher keine taugliche Lösung darstellt.
+
+Zu beachten ist auch, dass ein transparenter Proxy eine funktionierende DNS-Auflösung voraus setzt. Bei einem konventionellen Proxy wird die Namensauflösung vom Proxy-Server übernommen; sie muss also nur auf dem Rechner funktionieren, auf welchem der Proxy läuft. Bei einem transparenten Proxy dagegen löst der Client die DNS-Namen auf und erstellt dann eine Verbindung, die erst auf IP-Ebene zum Proxy-Server umgelenkt wird.
--- /dev/null
+###umleiten von sound unter linux
+pavucontrol installieren und paprefs
+#mittels paprefs - PulseAudio-Einstellungen kann man Soundserver freigebe...
+###pulseaudio beenden
+pulseaudio -k
+###pulseaudio als damon neustarten
+pulseaudio -D
+###auflisten der Ausgabedevices (sinks)
+pacmd list-sinks
+###maximale Lautstärke begrenzen
+pacmd set-sink-volume bluez_sink.00_00_02_06_16_C0 50000
+###automatischer connect nach reboot
+#add line: "load-module module-switch-on-connect" to /etc/pulse/default.pa
--- /dev/null
+###
+#beginScript
+#!/bin/sh
+
+#set -x
+iface=$(sudo /bin/tunctl -b -u $UID)
+#set +x
+
+QEMUBIN=qemu
+COMMONOPTS="-k de -localtime -m 1024 -std-vga"
+SMP=""
+
+# qemu < 8.0
+#NET1="-macaddr "
+#NET2=""
+
+# qemu > 8.0
+# siehe http://www.coffer.com/mac_find
+# Intel z.B. 00:AA:00
+# Unbekannt nicht zugeordnet 54:52:00
+# qemu-kvm -net nic,model=? /localhome/qemu/home/dos.im
+# qemu: Supported ISA NICs: ne2k_isa
+# qemu: Supported PCI NICs: i82551 i82557b i82559er ne2k_pci pcnet rtl8139 e1000 virtio
+
+NET1="-net nic,vlan=0,macaddr="
+NET2="-net tap,vlan=0,ifname=$iface"
+
+case "$1" in
+*SuSE64*)
+ shift
+ IMG="-hda /localhome/qemu/home/SuSE64.i386.devel.img"
+ NET="${NET1}54:52:00:01:64:00 ${NET2},model=ne2k-pci"
+ ;;
+*SuSE73*)
+ shift
+ IMG="-hda /localhome/qemu/home/SuSE73.i386.devel.img"
+ NET="${NET1}54:52:00:01:73:00 ${NET2}"
+ ;;
+*SuSE80*)
+ shift
+ IMG="-hda /localhome/qemu/home/SuSE80.i386.devel.img"
+ NET="${NET1}54:52:00:01:80:00 ${NET2}"
+ ;;
+*SuSE82*)
+ shift
+ IMG="-hda /localhome/qemu/home/SuSE82.i386.devel.img"
+ NET="${NET1}54:52:00:01:82:00 ${NET2}"
+ ;;
+*SuSE90*)
+ shift
+ IMG="-hda /localhome/qemu/home/SuSE90.i386.devel.img"
+ NET="${NET1}54:52:00:01:90:00 ${NET2}"
+ ;;
+*SuSE92*)
+ shift
+ echo
+ echo "bitte kqemu deaktivieren"
+ echo
+ echo
+ IMG="-hda /localhome/qemu/home/SuSE92.x86_64.devel.img"
+ NET="${NET1}54:52:00:01:92:00 ${NET2}"
+ QEMUBIN=qemu-system-x86_64
+ ;;
+*SuSE93*)
+ shift
+ IMG="-hda /localhome/qemu/home/SuSE93.i386.devel.img"
+ NET="${NET1}54:52:00:01:93:00 ${NET2}"
+ ;;
+*SuSE101*)
+ shift
+ IMG="-hda /localhome/qemu/home/SuSE101.i386.devel.img"
+ NET="${NET1}54:52:00:01:10:01 ${NET2}"
+ ;;
+*SUSE102.x86_64*)
+ shift
+ echo
+ echo
+ NET1="-net nic,model=e1000,vlan=0,macaddr="
+ IMG="-hda /localhome/qemu/home/openSUSE102.x86_64.devel.img"
+ NET="${NET1}54:52:00:64:10:02 ${NET2}"
+ QEMUBIN="qemu-system-x86_64 -no-kqemu -kernel vmlinuz-2.6.18.2-34-default -initrd initrd-2.6.18.2-34-default"
+
+ #QEMUBIN="qemu-system-x86_64 -no-kqemu -kernel vmlinuz-2.6.18.8-0.9-default -initrd initrd-2.6.18.8-0.5-default"
+ #QEMUBIN="qemu-system-x86_64 -no-kqemu "
+ QEMUBIN="qemu-kvm -kernel vmlinuz-2.6.18.2-34-default -initrd initrd-2.6.18.2-34-default"
+ ;;
+*SUSE103.x86_64*)
+ shift
+ echo
+ echo
+ NET1="-net nic,model=e1000,vlan=0,macaddr="
+ IMG="-hda /localhome/qemu/home/openSUSE103.x86_64.devel.img"
+ NET="${NET1}54:52:00:64:10:03 ${NET2}"
+ QEMUBIN="qemu-system-x86_64 -no-kqemu "
+ QEMUBIN="qemu-system-x86_64 -no-kqemu -kernel vmlinuz-2.6.22.5-31-default -initrd initrd-2.6.22.5-31-default"
+ QEMUBIN="qemu-kvm -kernel vmlinuz-2.6.22.5-31-default -initrd initrd-2.6.22.5-31-default"
+ ;;
+*SUSE110.x86_64*)
+ shift
+ echo
+ echo
+ NET1="-net nic,model=e1000,vlan=0,macaddr="
+ NET1="-net nic,model=virtio,vlan=0,macaddr="
+ NET2="-net tap,vlan=0,ifname=$iface"
+ IMG="-hda /localhome/qemu/home/openSUSE110.x86_64.devel.img"
+ IMG="-drive file=/localhome/qemu/home/openSUSE110.x86_64.devel.img,if=virtio,boot=on"
+ NET="${NET1}00:0C:F1:64:11:00 ${NET2}"
+ QEMUBIN="qemu-system-x86_64 -no-kqemu -kernel vmlinuz-2.6.25.5-1.1-default -initrd initrd-2.6.25.5-1.1-default "
+ QEMUBIN="qemu-kvm -kernel vmlinuz-2.6.25.5-1.1-default -initrd initrd-2.6.25.5-1.1-default "
+ QEMUBIN="qemu-kvm "
+ ;;
+*SUSE110*)
+ shift
+ echo
+ echo
+ IMG="-hda /localhome/qemu/home/openSUSE110.i386.devel.img"
+ NET="${NET1}54:52:00:32:11:00 ${NET2}"
+ ;;
+*egsarchiv*)
+ shift
+ echo
+ echo "bitte kqemu deaktivieren"
+ echo
+ echo
+ IMG="-hda /media/EGSDATA/egs-archiv.img"
+ NET="${NET1}00:E0:81:2B:A0:68 ${NET2}"
+ QEMUBIN="qemu-system-x86_64 -no-kqemu "
+ ;;
+*SUSE102*)
+ shift
+ IMG="-hda /localhome/qemu/home/openSUSE102.i386.devel.img"
+ NET="${NET1}54:52:00:32:10:02 ${NET2}"
+ ;;
+*SUSE103*)
+ shift
+ IMG="-hda /localhome/qemu/home/openSUSE103.i386.devel.img"
+ NET="${NET1}54:52:00:32:10:03 ${NET2}"
+ ;;
+*SuSE10d*)
+ shift
+ IMG="-hda /localhome/qemu/home/SuSE10.i386.devel.img"
+ NET="${NET1}54:52:00:01:10:00 ${NET2}"
+ ;;
+SLES10*)
+ shift
+ IMG="-hda /localhome/qemu/home/SLES10.i386.eval.img"
+ NET="${NET1}54:52:00:32:10:00 ${NET2}"
+ ;;
+*WinXP*)
+ shift
+ IMG="-hda /localhome/qemu/home/WinXPSP2devel.img"
+ NET="${NET1}54:52:00:02:04:00 ${NET2}"
+ ;;
+esac
+
+IMG_IN_USE=$(ps aww | grep -e "${IMG}" | grep -v grep)
+#echo "IMG_IN_USE:\"$IMG_IN_USE\""
+if [ -z "$IMG_IN_USE" ]; then
+ set -x
+ ${QEMUBIN} ${COMMONOPTS} ${SMP} ${NET} ${IMG} $*
+ sudo /bin/tunctl -d $iface &> /dev/null
+ set +x
+else
+ echo "ein QEMU für $IMG läuft schon"
+fi
+#endScript
+
+###beispiel aufruf
+qemu -k de -localtime -net nic,vlan=0,macaddr=54:52:00:02:04:00 -net tap,vlan=0 -m 128 -cdrom /dev/hda /localhome/mhoellein/WinXPSP2develMSVC_netto.img
+!! Achtung Wartezeit !!
+###beispiel aufruf
+qemu -k de -localtime -net nic,vlan=0,macaddr=54:52:00:02:04:00 -net tap,vlan=0 -m 128 -drive file=/dev/hda,if=ide,index=1,media=cdrom /localhome/mhoellein/tbz-archiv.img
+###beispiel aufruf
+qemu-kvm -k de -localtime -m 1024 -std-vga -net nic,vlan=0,macaddr=54:52:00:64:10:03 -net tap,vlan=0,ifname=tap2 -hda /localhome/mhoellein/tbz-archiv.img -cdrom /dev/cdrom
+###konvertieren von images
+qemu-img convert Ubuntu.vdi -O raw Ubuntu.raw
+###raw vergrössern
+qemu-img create -f raw temp.img 500M
+cat Platte-raw.img temp.img > Platte-groesser-raw.img
+#oder
+dd if=/dev/zero of=Ubuntu.raw bs=1M seek=10000 count=0
+
--- /dev/null
+###URL
+ http://www.lartc.org/
+ http://www.linuxtopia.org/Linux_Firewall_iptables/a6831.html#LARTC
+###tc kommandos
+#klassen anzeigen
+tc -s class show dev eth0
+#filter anzeigen
+tc -s filter show dev eth0
+
+
+###QoS - Bandbreitenregelung
+
+Es gibt eine Vielzahl Spezialdistributionen für Linux, die für ein Unternehmen eine Fertiglösung quasi sind, CD einlegen, warten, Firewall konfigurieren über Web-Interface. So z.B. IPCop Firewall Was den meisten Firewalls fehlt, ist eine vernünftige Bandbreiten - Regelung, QoS (Quality of Service) genannt. Dasselbe gilt auch für einfache Linux Distributionen, die als DSL - Router aufgebaut werden. Immer wieder kommt es aufgrund zu massiven FTP - Downloads, oder bei VoIP über SIPGATE oder SKYPE z.B. zu "Verklemmungen". Dasselbe gilt auch für Webserver, die so massiv mit Mail-Traffic zu tun haben, daß keine Bandbreite mehr für das Ausliefern von Webseiten übrig ist. Das folgende Tutorial behandelt ausführlich diese beiden Fälle, und bietet Skripte an, welche sich auf jedem Linux - Rechner nachrüsten lassen.
+
+Linux enthält seit Kernel 2.4.20 eine Bandbreitenregelung nach den Hierarchial Token Buckets (HTB). Im Gegensatz zu allen anderen Bandbreiten - Regelungen ist das HTB Verfahren sehr einfach zu verstehen und anzuwenden. Es basiert auf einem Baum, der die Bandbreiten auf die verschiedenen Protokolle (SMTP, WWW, TELNET, SSH, ...) aufteilt. Hierzu wird jedem Protokoll eine bestimmte Bandbreite garantiert. Wird diese nicht genutzt, so dürfen andere Protokolle, entsprechend der Aufteilung, proportional mehr Bandbreite nutzen. Es ist zwar ein starres Verfahren, jedoch sehr übersichtlich. Im Gegensatz hierzu sind die anderen Verfahren, z.B. CBQ (Class Based Queueing) zwar leistungsfähiger, jedoch viel schwieriger zu implementieren und zu überwachen. Angesichts der möglichen Wechselwirkungen der verschiedensten statistischen Verfahren (CBQ, CSZ, RED, GRED, SFQ, PRIO, TBF, BFIFO, PIFO, DSMARK, TEQL, HTB, WRR), die der Linux Kernel anbietet, ist dies eine Wissenschaft für sich. Tatsächlich wurden darüber schon Doktorarbeiten geschrieben, nach welchen die Linux Kernel - Module entworfen wurden. Diese sind jedoch nicht nur zur Bandbreitenregelung eines Interfaces gedacht, sondern in Verbindung mit dem Paket iproute, iproute2 zum Umschalten der Netzwerkrouten in Abhängigkeit vom Traffic, was z.B. für Ausfallrouten, für die Paketumsetzung zwischen Ethernet und ATM geeignet ist.
+
+Daher zunächst einmal ein einfaches Beispiel mit HTB. Hierzu müssen die Toolkits tc und iproute2, welche die Bedienungswerkzeuge für die Kernel - Module darstellen, auf dem System vorhanden sein. Nun wird die Bandbreiten - Regelung (queuing discipline) aktiviert:
+
+
+tc qdisc add dev eth0 root handle 1:0 htb default 10
+
+Hier wird für dem Interface eth0 ein root handle (Bezeichner) mit der Ziffer 1:0 (oft auch nur als 1: geschrieben) zugeordnet, auf welches im folgenden sich die (Traffic) - Klassen dann beziehen. Die root - Klasse aktiviert hierbei die Bandbreitenregelung nur. Löscht man diese, z.B. mit tc qdisc del dev eth0 root, so ist die Bandbreitenregelung wieder deaktiviert. htb gibt an, welches statistische Messverfahren zu verwenden ist (Kernel Modul), und default 10 gibt die Klasse an, in welche die Pakete umgeleitet werden, auf die die Bandbreitenreservierung nicht zutrifft, wie z.B. alle anderen Protokolle, die nicht explizit definiert wurden. So kann man z.B. Traffic für bestimmte Protokolle über andere Netzwerke übertragen lassen.
+
+Nun müssen dem root - Handle Traffic-Klassen zugeordnet werden, beginnend mit der parent - Klasse 1:0, die die Wurzel des Baumes der weiteren Traffic - Klassen darstellt:
+
+tc class add dev eth0 parent 1:0 classid 1:1 htb rate 100mbit ceil 100 mbit
+tc class add dev eth0 parent 1:1 classid 1:10 htb rate 80mbit ceil 100mbit
+tc class add dev eth0 parent 1:1 classid 1:11 htb rate 10mbit ceil 100mbit
+tc class add dev eth0 parent 1:1 classid 1:12 htb rate 10mbit ceil 100mbit
+
+Hier nun werden zuerst dem qdisc - root handle 1:0 Parent - Klassen zugeordnet, welche dann z.B. auch wieder ein parent 1:0 - Handle enthalten, welches sich auf das root handle bezieht.
+
+ 1: root qdisc
+ |
+ 1:1
+ / | \
+ / | \
+ / | \
+ / | \
+ 1:10 1:11 1:12
+ | | |
+ | 11: |
+ | |
+ 10: 12: qdisc
+ / \ / \
+ 10:1 10:2 12:1 12:2
+
+Es ist möglich, weitere qdisc root handles an z.B. der Klasse 1:12 anzufügen, um eine bestimmte Bandbreite, z.B. aus einem anderen Subnetz stammend, nochmals nach Protokollen, wie SMTP, FTP, HTTP zu unterteilen, z.B. auch mit SFQ:
+
+tc qdisc add dev eth0 parent 1:10 handle 12: sfq perturb 10
+tc qdisc add dev eth0 parent 1:12 handle 12: sfq perturb 10
+
+Die "Marker" (10,11,12) ist die Verbindung zum Linux Paketfilter der aus dem Datenstrom Pakete identifiziert und für QoS - Klassen markiert. Dies geschieht entweder durch das iptables - Kommando, oder mit ip:
+
+iptables -A POSTROUTING -t mangle -o eth0 -p tcp --sport 80 -j MARK --set-mark 11
+
+Hierbei werden die Pakete, die vom Port 80 ausgehen (--sport 80) markiert (-j MARK), und für die Bandbreitenklasse 10 MBit reserviert (--set-mark 11).
+
+ -------------- -----------
+ | PREROUTING | Routing | QoS |
+ ppp0-->| Markierung |---------------> | |-->eth0, lokale Rechner
+ | ipchains | Netzwerkmasken | Klassen |
+ -------------- -----------
+
+Die eigentliche Zuordnung der markierten Paketen zu den Klassen erfolgt erst mit noch einem weiteren Kommando:
+
+tc filter add dev eth0 parent 1: prio 0 protocol ip handle 11 fw flowid 1:11
+
+Hier erst werden die markierten Pakete aus dem Filter - Modul an die Bandbreitenregelung übergeben, bzw zugeordnet, wobei man noch verschiedene Prioritäten angeben kann. Da man ja mehrere Protokolle filtern lassen kann (IP, IPX, IPSec, ...), und einer Traffic - Klasse zuordnen können muß, ist dies notwendig. In dem Beispiel wird also das Protokoll ip mit dem Handle 11 der Klasse 1:11 zugeordnet. Nicht markierte Pakete landen dann automatisch in der Klasse 1:11 gebunden, an welche dann wieder zwei Unterklassen gebunden werden. Prinzipiell könnte man wohl den Traffic Port 80 an die Klasse 1:1 binden, was jedoch keinen Sinn macht. Man benötigt mindestens eine parent Klasse (1:1), die in zwei Unterklassen (1:10, 1:11) aufgeteilt ist, eine, für die iptables die Pakete aus dem Datenstrom herausfischt (1:11), und eine, die für den Rest der Pakete zuständig ist (1:10).
+
+rate legt fest, wie die Bandbreite im Verhältnis aufgeteilt werden soll (90% zu 10%), wenn Vollast anliegt (100mbit). ceil definiert ein oberes, maximales Limit, welches genutzt werden darf, wenn kein anderer Traffic vorhanden ist.
+
+Einen Überblick über die im Kernel aktivierten qdisc und ihre Klassen erhält man mit den verschiedenen tc - Kommandos:
+
+tc qdisc show dev eth0
+tc class show dev eth0
+tc filter show dev eth0
+
+Fassen wir zusammen: Das Kommando iptables... verwendet die Tabelle mangle, um eine bestimmte Klasse von Traffic zu filtern, dann zu markieren, und an die bereits aktivierte Bandbreitenregelung zu übergeben. Zuerst müssen die Klassen definiert werden, dann erst darf der gefilterte Traffic zugeordnet werden. Dem ausgehenden Traffic auf Port 80 des Webservers wird ein Marker 11 der Bandbreitenregelung zugeordnet, welche dafür sorgt, daß der Webserver auch dann, wenn z.B. SMTP oder FTP - Traffic den Server hoch belastet, mit mindestens 10mbit noch Webseiten ausliefert. Hier nun ein mit script /QoS-Protokoll mitgeschnittenes Beispiel, welches im Wechselspiel die Kommandos und das Ergebnis zeigt, nämlich das, was dann im Kernel angekommen ist:
+
+[root]# tc qdisc del dev eth0 root
+[root]# tc class show dev eth0
+[root]# tc qdisc show dev eth0
+[root]# tc qdisc add dev eth0 root handle 1:0 htb default 10
+[root]# tc qdisc show dev eth0
+qdisc htb 1: r2q 10 default 10 direct_packets_stat 0
+[root]# tc qdisc del dev eth0 root
+[root]# tc qdisc show dev eth0
+[root]# tc qdisc show dev eth0
+[root]# tc qdisc add dev eth0 root handle 1:0 htb default 10
+[root]# tc qdisc show dev eth0
+qdisc htb 1: r2q 10 default 10 direct_packets_stat 0
+[root]# tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit ceil 100mbit
+[root]# tc qdisc show dev eth0
+qdisc htb 1: r2q 10 default 10 direct_packets_stat 13
+[root]# tc class show dev eth0
+class htb 1:1 root prio 0 rate 100Mbit ceil 100Mbit burst 132644b cburst
+132644b
+[root]# tc class add dev eth0 parent 1:1 classid 1:10 htb
+rate 90mbit ceil 100mbit
+[root]# tc class add dev eth0 parent 1:1 classid 1:11 htb
+rate 10mbit ceil 100mbit
+[root]# tc class show dev eth0
+class htb 1:11 parent 1:1 prio 0 rate 10Mbit ceil 100Mbit burst 14704b
+cburst 132644b
+class htb 1:1 root rate 100Mbit ceil 100Mbit burst 132644b cburst 132644b
+class htb 1:10 parent 1:1 prio 0 rate 90Mbit ceil 100Mbit burst 119545b
+cburst 132644b
+[root]# iptables -A POSTROUTING -t mangle -o eth0 -p tcp --sport 80 -j MARK --set-mark 11
+[root]# iptables -t mangle -L
+Chain PREROUTING (policy ACCEPT)
+target prot opt source destination
+
+Chain INPUT (policy ACCEPT)
+target prot opt source destination
+
+Chain FORWARD (policy ACCEPT)
+target prot opt source destination
+
+Chain OUTPUT (policy ACCEPT)
+target prot opt source destination
+
+Chain POSTROUTING (policy ACCEPT)
+target prot opt source destination
+MARK tcp -- anywhere anywhere tcp spt:http MARK set 0xb
+[root]# iptables -L
+Chain INPUT (policy ACCEPT)
+target prot opt source destination
+
+Chain FORWARD (policy ACCEPT)
+target prot opt source destination
+
+Chain OUTPUT (policy ACCEPT)
+target prot opt source destination
+[root]# tc filter add dev eth0 parent 1: prio 0 protocol ip handle 11 fw flowid 1:11
+[root]# tc filter show dev eth0
+filter parent 1: protocol ip pref 49152 fw
+filter parent 1: protocol ip pref 49152 fw handle 0xb classid 1:11
+
+Und wenn man alles wieder löschen will, kann man das mit folgenden Kommandos tun:
+
+[root]# tc qdisc del dev eth0 root
+[root]# tc filter show dev eth0
+[root]# tc class show dev eth0
+[root]# tc qdisc show dev eth0
+[root]#
+
+Und da noch eine Filterregel existiert, die auch noch gelöscht werden muß:
+
+[root]# iptables -t mangle -F
+[root]# iptables -t mangle -L
+Chain PREROUTING (policy ACCEPT)
+target prot opt source destination
+
+Chain INPUT (policy ACCEPT)
+target prot opt source destination
+
+Chain FORWARD (policy ACCEPT)
+target prot opt source destination
+
+Chain OUTPUT (policy ACCEPT)
+target prot opt source destination
+
+Chain POSTROUTING (policy ACCEPT)
+target prot opt source destination
+[root]#
+
+Ein weiteres Beispiel zeigt, wie man in einem Unternehmen, welches via Linux und DSL am Internet angeschlossen ist, verhindert, daß FTP Downloads die Bandbreite schlucken, sodaß es zu keinen Behinderungen kommt:
+
+## Löschen aller Klassen für ppp0 und der Filterregeln
+tc qdisc del dev ppp0 root
+iptables -t mangle -F
+
+
+## Wir aktivieren die Queueing DISCipline für ppp0 Device, die
+## auf Klasse 1, Handle 12 (1:12) default-mäßig zeigt
+
+tc qdisc add dev ppp0 root handle 1:0 htb default 12
+
+## Nun richten wir Geschwindigkeits - Klassen ein: Zunächst die oberste, parent
+tc class add dev ppp0 parent 1: classid 1:1 htb rate 768kbit ceil 768kbit
+
+## Klasse fuer kleine Pakete bis 64 Bytes (SYN/ACK, ACK) mit hoher Priorität
+tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 68kbit ceil 100kbit prio 0
+
+## Klasse fuer VPN/SSH
+tc class add dev ppp0 parent 1:1 classid 1:11 htb rate 100kbit ceil 200kbit prio 1
+
+## Klasse fuer normalen Traffic
+tc class add dev ppp0 parent 1:1 classid 1:12 htb rate 300kbit ceil 700kbit prio 2
+
+## Klasse fuer Bulk
+tc class add dev ppp0 parent 1:1 classid 1:13 htb rate 300kbit ceil 700kbit prio 3
+
+## Nun der Filter für SYN/ACK, ACK Pakete
+iptables -A POSTROUTING -t mangle -o ppp0 -p tcp -m length --length :64 -j MARK --set-mark 10
+
+## Für VPN/IPsec
+iptables -A POSTROUTING -t mangle -o ppp0 -p 50 -j MARK --set-mark 11
+
+## Für SSH
+iptables -A POSTROUTING -t mangle -o ppp0 -p tcp --dport 22 -j MARK --set-mark 11
+
+## Für ausgehenden SMTP - Traffic
+iptables -A POSTROUTING -t mangle -o ppp0 -p tcp --dport 25 -j MARK --set-mark 13
+
+## Für eingehenden SMTP - Traffic
+iptables -A PREROUTING -t mangle -i ppp0 -p tcp --sport 25 -j MARK --set-mark 13
+
+## Und nun müssen die Filterregeln an die Klassen gebunden werden
+
+tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10
+tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 11 fw flowid 1:11
+tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 13 fw flowid 1:13
+
+## Und nun die Anzeige der Kernel - Parameter
+
+tc qdisc show dev ppp0
+tc class show dev ppp0
+tc filter show dev ppp0
+
+
+Die Ausgabe dieses Skriptes sollte folgendes zeigen:
+
+qdisc htb 1: r2q 10 default 12 direct_packets_stat 0
+class htb 1:11 parent 1:1 prio 1 rate 100Kbit ceil 200Kbit burst 1728b
+cburst 1856b
+class htb 1:1 root rate 768Kbit ceil 768Kbit burst 2582b cburst 2582b
+class htb 1:10 parent 1:1 prio 0 rate 68Kbit ceil 100Kbit burst 1686b cburst
+1728b
+class htb 1:13 parent 1:1 prio 3 rate 300Kbit ceil 700Kbit burst 1983b
+cburst 2495b
+class htb 1:12 parent 1:1 prio 2 rate 300Kbit ceil 700Kbit burst 1983b
+cburst 2495b
+filter parent 1: protocol ip pref 49151 fw
+filter parent 1: protocol ip pref 49151 fw handle 0xd classid 1:13
+filter parent 1: protocol ip pref 49151 fw
+filter parent 1: protocol ip pref 49151 fw handle 0xb classid 1:11
+filter parent 1: protocol ip pref 49152 fw
+filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10
+Chain PREROUTING (policy ACCEPT)
+target prot opt source destination
+
+Chain INPUT (policy ACCEPT)
+target prot opt source destination
+
+Chain FORWARD (policy ACCEPT)
+target prot opt source destination
+
+Chain OUTPUT (policy ACCEPT)
+target prot opt source destination
+
+Chain POSTROUTING (policy ACCEPT)
+target prot opt source destination
+MARK tcp -- anywhere anywhere length 0:64 MARK
+set 0xa
+MARK ipv6-crypt-- anywhere anywhere MARK set
+0xb
+MARK tcp -- anywhere anywhere tcp dpt:ssh MARK
+set 0xb
+MARK tcp -- anywhere anywhere tcp dpt:smtp
+MARK set 0xd
+
+Wer detaillierte Statistiken über den Traffic im Linux Kernel benötigt, kann mit tc -s class ls dev ppp0 sich diese ausgeben lassen:
+
+[root]# tc -s class ls dev ppp0
+class htb 1:11 parent 1:1 prio 1 rate 100Kbit ceil 200Kbit burst 1728b
+cburst 1856b
+ Sent 100 bytes 1 pkts (dropped 0, overlimits 0)
+ lended: 1 borrowed: 0 giants: 0
+ tokens: 104448 ctokens: 56320
+
+class htb 1:1 root rate 768Kbit ceil 768Kbit burst 2582b cburst 2582b
+ Sent 179602 bytes 2358 pkts (dropped 0, overlimits 0)
+ rate 4bps
+ lended: 0 borrowed: 0 giants: 0
+ tokens: 21192 ctokens: 21192
+
+class htb 1:10 parent 1:1 prio 0 rate 68Kbit ceil 100Kbit burst 1686b cburst
+1728b
+ Sent 110724 bytes 2163 pkts (dropped 0, overlimits 0)
+ rate 3bps
+ lended: 2163 borrowed: 0 giants: 0
+ tokens: 155011 ctokens: 108032
+
+class htb 1:13 parent 1:1 prio 3 rate 300Kbit ceil 700Kbit burst 1983b
+cburst 2495b
+ Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
+ lended: 0 borrowed: 0 giants: 0
+ tokens: 42324 ctokens: 22820
+
+class htb 1:12 parent 1:1 prio 2 rate 300Kbit ceil 700Kbit burst 1983b
+cburst 2495b
+ Sent 68778 bytes 194 pkts (dropped 0, overlimits 0)
+ lended: 194 borrowed: 0 giants: 0
+ tokens: 40960 ctokens: 22236
+
+Abschließend bleibt noch zu sagen, daß mit Hilfe dieser Skripte jede beliebige Firewall nachgerüstet werden kann. Die Firewall - Regeln befinden sich in der Tabelle filter, wo sie mit den Kommandos iptables -t nat -L; iptables -t filter -L angeschaut werden können. Es ist möglich, je nach Distribution, daß beim Verändern der Filterregeln in der Firewall die Regeln in der Tabelle mangle mit verändert. In diesem Falle kommentiert man zu Beginn des Skriptes die Zeile iptables -t mangle -F einfach aus. Und damit diese QoS - Regeln reboot - fest sind, kann man diese entweder komplett in die Datei /etc/rc.local kopieren, oder aus /etc/rc.local ein weiteres Skript aufrufen lassen, welches diese Regeln enthält.
+
+###kleines QoS für wrt
+/sbin/insmod ipt_ipp2p >&- 2>&-
+/sbin/insmod ipt_layer7 >&- 2>&-
+/sbin/insmod ipt_length >&- 2>&-
+/sbin/insmod cls_fw >&- 2>&-
+/sbin/insmod sch_htb >&- 2>&-
+/sbin/insmod sch_sfq >&- 2>&-
+/sbin/insmod sch_red >&- 2>&-
+/sbin/insmod ipt_multiport >&- 2>&-
+/sbin/insmod ipt_CONNMARK >&- 2>&-
+/usr/sbin/tc qdisc del dev ppp0 root >&- 2>&-
+/usr/sbin/iptables -t mangle -D POSTROUTING -o ppp0 -j MYSHAPER-OUT >&- 2>&-
+/usr/sbin/iptables -t mangle -F MYSHAPER-OUT >&- 2>&-
+/usr/sbin/iptables -t mangle -X MYSHAPER-OUT >&- 2>&-
+/usr/sbin/ip link set dev ppp0 qlen 30
+/usr/sbin/tc qdisc add dev ppp0 root handle 1: htb default 23 r2q 6
+/usr/sbin/tc class add dev ppp0 parent 1: classid 1:1 htb rate 680kbit
+/usr/sbin/tc class add dev ppp0 parent 1:1 classid 1:20 htb rate 97kbit ceil 680kbit prio 0
+/usr/sbin/tc class add dev ppp0 parent 1:1 classid 1:21 htb rate 97kbit ceil 680kbit prio 1
+/usr/sbin/tc class add dev ppp0 parent 1:1 classid 1:22 htb rate 97kbit ceil 680kbit prio 2
+/usr/sbin/tc class add dev ppp0 parent 1:1 classid 1:23 htb rate 97kbit ceil 680kbit prio 3
+/usr/sbin/tc class add dev ppp0 parent 1:1 classid 1:24 htb rate 97kbit ceil 680kbit prio 4
+/usr/sbin/tc class add dev ppp0 parent 1:1 classid 1:25 htb rate 97kbit ceil 680kbit prio 5
+/usr/sbin/tc class add dev ppp0 parent 1:1 classid 1:26 htb rate 97kbit ceil 680kbit prio 6
+/usr/sbin/tc qdisc add dev ppp0 parent 1:20 handle 20: sfq perturb 10
+/usr/sbin/tc qdisc add dev ppp0 parent 1:21 handle 21: sfq perturb 10
+/usr/sbin/tc qdisc add dev ppp0 parent 1:22 handle 22: sfq perturb 10
+/usr/sbin/tc qdisc add dev ppp0 parent 1:23 handle 23: sfq perturb 10
+/usr/sbin/tc qdisc add dev ppp0 parent 1:24 handle 24: sfq perturb 10
+/usr/sbin/tc qdisc add dev ppp0 parent 1:25 handle 25: sfq perturb 10
+/usr/sbin/tc qdisc add dev ppp0 parent 1:26 handle 26: sfq perturb 10
+/usr/sbin/tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 20 fw flowid 1:20
+/usr/sbin/tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 21 fw flowid 1:21
+/usr/sbin/tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 22 fw flowid 1:22
+/usr/sbin/tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 23 fw flowid 1:23
+/usr/sbin/tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 24 fw flowid 1:24
+/usr/sbin/tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 25 fw flowid 1:25
+/usr/sbin/tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 26 fw flowid 1:26
+
+Code:
+/usr/sbin/iptables -t mangle -N MYSHAPER-OUT
+/usr/sbin/iptables -t mangle -I POSTROUTING -o ppp0 -j MYSHAPER-OUT
+# Prio 0 (Ultra Time critical)
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p udp --dport 53 -j MARK --set-mark 20 # DNS
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p icmp -j MARK --set-mark 20 # ICMP
+# Prio 1 (Time critical)
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p udp -s ! 192.168.1.1 -j MARK --set-mark 21 # UDP Traffic der User
+# Prio 2 (Time critical local Services)
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --dport 22 -j MARK --set-mark 22 # SSH
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --sport 22 -j MARK --set-mark 22
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --dport 5900 -j MARK --set-mark 22 # VNC
+(LAN->WAN)
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --sport 5900 -j MARK --set-mark 22
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --sport 3979 -j MARK --set-mark 22 # OpenTTD Server
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p udp --sport 3979 -j MARK --set-mark 22
+# Prio 3 (Network Users)
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp -m multiport --dports 25,110,80,443 -j MARK --set-mark 23 # Surf the web
+# Prio 4 (Important local Services and less important Network User Traffic)
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --sport 587 -j MARK --set-mark 24 # OpenVPN Server
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --sport 80 -j MARK --set-mark 24 # Web-Server
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --dport 21 -j MARK --set-mark 24 # FTP (LAN->WAN)
+# Prio 5 (P2P)
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -m ipp2p --edk --dc --kazaa --gnu --bit -j MARK --set-mark 25 # Esel
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -m layer7 --l7proto edonkey -j MARK --set-mark 25
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -m layer7 --l7proto bittorrent -j MARK --set-mark 25
+# Prio 6 (Bulk)
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --sport 21 -j MARK --set-mark 26 # FTP-Server
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --sport 65000:65009 -j MARK --set-mark 26
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p tcp --sport 873 -j MARK --set-mark 26 # Rsync-Server
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -p udp --sport 873 -j MARK --set-mark 26
+# TCP ACKs der priorisierten Queues
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 22 -p tcp -m tcp --tcp-flags ACK ACK -j MARK --set-mark 21 # TCP ACKs
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 23 -p tcp -m tcp --tcp-flags ACK ACK -j MARK --set-mark 21
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 24 -p tcp -m tcp --tcp-flags ACK ACK -j MARK --set-mark 21
+# Rest (Prio 3)
+/usr/sbin/iptables -t mangle -A MYSHAPER-OUT -m mark --mark 0 -j MARK --set-mark 23 # Rest
+
+
+###tc
+#tc -s class show dev eth0
+#bandbreite
+CEIL=240
+#qdisk anlegen in der form
+#+---------+
+#| root 1: |
+#+---------+
+# |
+#+---------------------------------------+
+#| class 1:1 |
+#+---------------------------------------+
+# | | | | | |
+#+----+ +----+ +----+ +----+ +----+ +----+
+#|1:10| |1:11| |1:12| |1:13| |1:14| |1:15|
+#+----+ +----+ +----+ +----+ +----+ +----+
+
+tc qdisc add dev eth0 root handle 1 htb default 15
+tc class add dev eth0 parent 1: classid 1:1 htb rate ${CEIL}kbit ceil ${CEIL}kbit
+tc class add dev eth0 parent 1:1 classid 1:10 htb rate 800kbit ceil 800kbit prio 0
+tc class add dev eth0 parent 1:1 classid 1:11 htb rate 800kbit ceil ${CEIL}kbit prio 1
+tc class add dev eth0 parent 1:1 classid 1:12 htb rate 200kbit ceil ${CEIL}kbit prio 2
+tc class add dev eth0 parent 1:1 classid 1:13 htb rate 200kbit ceil ${CEIL}kbit prio 2
+tc class add dev eth0 parent 1:1 classid 1:14 htb rate 100kbit ceil ${CEIL}kbit prio 3
+tc class add dev eth0 parent 1:1 classid 1:15 htb rate 300kbit ceil ${CEIL}kbit prio 3
+tc qdisc add dev eth0 parent 1:12 handle 120: sfq perturb 10
+tc qdisc add dev eth0 parent 1:13 handle 130: sfq perturb 10
+tc qdisc add dev eth0 parent 1:14 handle 140: sfq perturb 10
+tc qdisc add dev eth0 parent 1:15 handle 150: sfq perturb 10
+
+#filter anlegen
+tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1 fw classid 1:10
+tc filter add dev eth0 parent 1:0 protocol ip prio 2 handle 2 fw classid 1:11
+tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 3 fw classid 1:12
+tc filter add dev eth0 parent 1:0 protocol ip prio 4 handle 4 fw classid 1:13
+tc filter add dev eth0 parent 1:0 protocol ip prio 5 handle 5 fw classid 1:14
+tc filter add dev eth0 parent 1:0 protocol ip prio 6 handle 6 fw classid 1:15
+
+#ping
+iptables -t mangle -A PREROUTING -p icmp -j MARK --set-mark 0x1
+iptables -t mangle -A PREROUTING -p icmp -j RETURN
+#nun nach services, minimale Verzögerung
+iptables -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j MARK --set-mark 0x1
+iptables -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j RETURN
+#minimale Kosten
+iptables -t mangle -A PREROUTING -m tos --tos Minimize-Cost -j MARK --set-mark 0x5
+iptables -t mangle -A PREROUTING -m tos --tos Minimize-Cost -j RETURN
+#maximaler durchsatz
+iptables -t mangle -A PREROUTING -m tos --tos Maximize-Throughput -j MARK --set-mark 0x6
+iptables -t mangle -A PREROUTING -m tos --tos Maximize-Throughput -j RETURN
+#ssh priorisieren
+iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 22 -j MARK --set-mark 0x1
+iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 22 -j RETURN
+#esp
+iptables -t mangle -I PREROUTING -p esp -j MARK --set-mark 0x1
+iptables -t mangle -I PREROUTING -p esp -j RETURN
+#neue verbindungen priorisieren
+iptables -t mangle -I PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j MARK --set-mark 0x1
+iptables -t mangle -I PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j RETURN
+#den rest in 1:15 packen, braucht man eigentlich nicht, da 1:15 standart
+iptables -t mangle -A PREROUTING -j MARK --set-mark 0x6
+
+#für lokal generierte Packete höhere prio
+-j MARK --set-mark 0x3
+
+
+###VOIP bevorzugen
+ #!/bin/sh
+#
+# SipShaper v0.01
+# VoIP Traffic Shaper for 1024/128Kbit/s ADSL Line
+#
+# Written by Udo Schacht-Wiegand (2005-04-03)
+#
+# based on MYSHAPER from Dan Singletary (8/7/02)
+# http://www.nslu2-linux.org/wiki/HowTo/EnableTrafficShaping
+# and on phone-man's script
+# http://www.ip-phone-forum.de/forum/viewtopic.php?p=100371#100371
+# and on the (German) Linux Magazine 02/05 article p.28
+#
+# Please mail comments and improvements to sipshaper at udo dot comlink dot org
+
+
+# Set your outgoing interface and upload rate (in kbit/s) here
+DEV=ppp0
+RATEUP=128
+
+RTPS=$(cat /etc/asterisk/rtp.conf|awk -F= '/rtpstart/ {print $2}')
+RTPE=$(cat /etc/asterisk/rtp.conf|awk -F= '/rtpend/ {print $2}')
+
+# Which ports should be prioritized (yes, I know that ssh is not VoIP ;-)
+VOIPPORTS="sip iax $RTPS:$RTPE ssh"
+
+# Which servers should be prioritized (may be empty "")
+VOIPIPS="192.168.178.1 192.168.178.99"
+
+
+# end of configuration options
+
+######################
+# show status and exit
+######################
+
+if [ "$1" = "status" ]
+then
+ echo "[qdisc]"
+ tc -s qdisc show dev $DEV
+
+ echo ""
+ echo "[class]"
+ tc -s class show dev $DEV
+
+ echo ""
+ echo "[filter]"
+ tc -s filter show dev $DEV
+
+ echo ""
+ echo "[iptables]"
+ iptables -t mangle -L SIPSHAPER -v -x 2> /dev/null
+ exit
+fi
+
+######################
+# default: start it #
+######################
+
+# Reset everything to a known state (cleared)
+tc qdisc del dev $DEV root 2> /dev/null > /dev/null
+
+# Flush and delete tables
+iptables -t mangle --delete POSTROUTING -o $DEV -j SIPSHAPER 2> /dev/null > /dev/null
+iptables -t mangle --flush SIPSHAPER 2> /dev/null > /dev/null
+iptables -t mangle --delete-chain SIPSHAPER 2> /dev/null > /dev/null
+
+######################
+# stop it and exit
+######################
+
+if [ "$1" = "stop" ]
+then
+ echo "Shaping removed on $DEV."
+ exit
+fi
+
+######################
+# set up shaping
+######################
+
+# add HFSC root qdisc
+tc qdisc add dev $DEV root handle 1: hfsc default 10
+
+# add main rate limit class
+tc class add dev $DEV parent 1: classid 1:1 hfsc sc rate ${RATEUP}kbit ul rate ${RATEUP}kbit
+
+# keep it simple: two classes only
+tc class add dev $DEV parent 1:1 classid 1:10 hfsc sc umax 1500b dmax 53ms rate 40kbit ul rate ${RATEUP}kbit
+tc class add dev $DEV parent 1:1 classid 1:11 hfsc sc umax 1500b dmax 30ms rate 80kbit ul rate ${RATEUP}kbit
+
+# add SIPSHAPER chain to the mangle table in iptables
+iptables -t mangle --new-chain SIPSHAPER
+iptables -t mangle --insert POSTROUTING -o $DEV -j SIPSHAPER
+
+# Filter for voip packets
+tc filter add dev $DEV parent 1: prio 1 protocol ip handle 1 fw flowid 1:11
+
+
+# VoIP ports as defined above
+for port in $VOIPPORTS
+do
+ iptables -t mangle -A SIPSHAPER -p udp --sport $port -j MARK --set-mark 1
+ iptables -t mangle -A SIPSHAPER -p udp --dport $port -j MARK --set-mark 1
+done
+
+# VoIP IPs as defined above
+for ip in $VOIPIPS
+do
+ iptables -t mangle -A SIPSHAPER -p udp --src $ip -j MARK --set-mark 1
+ iptables -t mangle -A SIPSHAPER -p udp --dst $ip -j MARK --set-mark 1
+done
+
+
+
+echo SipShaper started on $DEV with ${RATEUP}kbit/s upload rate.
+
+echo -n "QoS activated for ports: "
+for port in $VOIPPORTS
+do
+ echo -n " $port"
+done
+echo "."
+
+echo -n "QoS activated for ip# : "
+for ip in $VOIPIPS
+do
+ echo -n " $ip"
+done
+echo "."
+
+#end
+
+###
+
+###Trafficshaping
+#script
+#!/bin/sh
+
+TC=/sbin/tc
+
+add_class() {
+# $1=parent class $2=classid $3=hiband $4=lowband $5=handle $6=style
+$TC class add dev eth0 parent $1 classid $2 cbq bandwidth 10Mbit rate $3 allot 1514 weight $4 prio 5 maxburst 20 avpkt 1000 $6
+$TC qdisc add dev eth0 parent $2 sfq quantum 1514b perturb 15
+$TC filter add dev eth0 protocol ip prio 3 handle $5 fw classid $2
+}
+
+
+$TC qdisc add dev eth0 root handle 10: cbq bandwidth 10Mbit avpkt 1000
+$TC class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate 64kbit allot 1514 weight 6.4kbit prio 8 maxburst 20 avpkt
+1000 bounded
+
+# first type of traffic ICMP, TCP-SYN, DNS will be marked '1' by the
+firewall code
+# we will give it a bounded bandwidth of 5% of our total incoming
+bandwidth (64*0.05=3.2)
+add_class 10:1 10:100 3.2kbit 0.32kbit 1 bounded
+
+# second type of traffic SMTP,POP3 will be marked '2' by the
+firewalling code
+# we will give it a bounded bandwidth of 20% of our total incoming
+bandwidth (64*0.20=12.8)
+add_class 10:1 10:200 12.8kbit 1.28kbit 2
+
+# third type of traffic Napster will be marked '3' by the firewalling
+code
+# we will give it a bounded bandwidth of 5% of our total incoming
+bandwidth (64*0.05=3.2)
+add_class 10:1 10:300 3.2kbit 0.32kbit 3
+
+# last type of traffic is interactive traffic. It will be marked '4'
+by the firewalling code
+# we will give it a bounded bandwidth of 70% of our total incoming
+bandwidth (64*0.70=44.8)
+add_class 10:1 10:400 44.8kbit 4.48kbit 4
+
+exit 0
+##end script
+
+###TBZ
+
+export CEIL=10000
+tc qdisc add dev eth0 root handle 1 htb default 15
+tc class add dev eth0 parent 1: classid 1:1 htb rate ${CEIL}kbit ceil ${CEIL}kbit
+tc class add dev eth0 parent 1:1 classid 1:10 htb rate 800kbit ceil 2000kbit prio 0
+tc class add dev eth0 parent 1:1 classid 1:11 htb rate 2000kbit ceil ${CEIL}kbit prio 1
+tc class add dev eth0 parent 1:1 classid 1:12 htb rate 200kbit ceil ${CEIL}kbit prio 2
+tc class add dev eth0 parent 1:1 classid 1:13 htb rate 200kbit ceil ${CEIL}kbit prio 2
+tc class add dev eth0 parent 1:1 classid 1:14 htb rate 100kbit ceil ${CEIL}kbit prio 3
+tc class add dev eth0 parent 1:1 classid 1:15 htb rate 300kbit ceil ${CEIL}kbit prio 3
+tc qdisc add dev eth0 parent 1:12 handle 120: sfq perturb 10
+tc qdisc add dev eth0 parent 1:13 handle 130: sfq perturb 10
+tc qdisc add dev eth0 parent 1:14 handle 140: sfq perturb 10
+tc qdisc add dev eth0 parent 1:15 handle 150: sfq perturb 10
+
+#filter anlegen
+tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1 fw classid 1:10
+tc filter add dev eth0 parent 1:0 protocol ip prio 2 handle 2 fw classid 1:11
+tc filter add dev eth0 parent 1:0 protocol ip prio 3 handle 3 fw classid 1:12
+tc filter add dev eth0 parent 1:0 protocol ip prio 4 handle 4 fw classid 1:13
+tc filter add dev eth0 parent 1:0 protocol ip prio 5 handle 5 fw classid 1:14
+tc filter add dev eth0 parent 1:0 protocol ip prio 6 handle 6 fw classid 1:15
+
+iptables -t mangle -A PREROUTING -p icmp -j MARK --set-mark 0x1
+iptables -t mangle -A PREROUTING -p icmp -j RETURN
+
+iptables -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j MARK --set-mark 0x1
+iptables -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j RETURN
+
+iptables -t mangle -A PREROUTING -m tos --tos Minimize-Cost -j MARK --set-mark 0x5
+iptables -t mangle -A PREROUTING -m tos --tos Minimize-Cost -j RETURN
+
+iptables -t mangle -A PREROUTING -m tos --tos Maximize-Throughput -j MARK --set-mark 0x6
+iptables -t mangle -A PREROUTING -m tos --tos Maximize-Throughput -j RETURN
+
+iptables -t mangle -A PREROUTING -p esp -j MARK --set-mark 0x1
+iptables -t mangle -A PREROUTING -p esp -j RETURN
+
+iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j MARK --set-mark 0x1
+iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j RETURN
+
--- /dev/null
+###Radwege
+
+http://www.adfc-nrw.de/kreisverbaende/kv-bottrop/radverkehr/sicherheit-von-radwegen.htmlbbiegen
+
+# Ein Kraftfahrer, der in eine vorfahrtsberechtigte Straße einbiegt, hat die
+Vorfahrt eines Radfahrers zu beachten und darf nicht so einbiegen, daß der
+Radfahrer sich zum Ausweichen auf den unbefestigten Randstreifen veranlaßt
+sieht. Benutzt der Radfahrer die Fahrbahn der Straße, weil der vorhandene Radweg
+in so schlechtem Zustand ist, daß er nicht schnell befahren werden kann, so
+trifft ihn kein (Mit-)Verschulden, weil der Rechtswidrigkeitszusammenhang
+zwischen dem Verstoß und den Folgen fehlt.
+(OLG Köln, Az. 19 U 208/93). [mehr von Olaf Schultz ...]
+
+# Der Führer eines langsam fahrenden Lastwagens muß – je nach Verkehrslage und -
+zeit – damit rechnen, von Radfahrern rechts überholt zu werden, und ihnen eine
+genügenden Verkehrsraum lassen, wenn er sich nicht etwa durch einen Blick in den
+rechten Außenspiegel vergewissern kann, daß der Randstreifen neben und
+unmittelbar hinter seinem Fahrzeug frei ist (OLG Celle, Az. 1 Ss 56/90).
+
+# Der Fahrer eines Lkw muss sich keine Ausrüstung verschaffen, die tote Winkel
+bei der Beobachtung des rechten rückwärtigen Verkehrs vermeidet. Er muss sich
+jedoch so verhalten, wie ein Wartepflichtiger, der in eine bevorrechtigte Straße
+einfahren muss, ohne ausreichende Sicht auf den bevorrechtigten Verkehr zu
+haben. Hier ist allgemein anerkannt, dass sich der Wartepflichtige "eintasten"
+muss, also sehr langsam ("zentimeterweise", "unter Schrittgeschwindigkeit"),
+stets bremsbereit einzufahren hat und bei gegebenem Anlass sofort bremsen muss.
+Einem Radfahrer kann nicht zum Vorwurf gemacht werden, mit unverminderter
+Geschwindigkeit auf einer Radwegfurt in eine Kreuzung eingefahren zu sein, wenn
+die für ihn geltende Ampel Grünlicht zeigt und er Vorfahrt hat. Allein die
+Tatsache, dass ein auf der Fahrbahn fahrendes Fahrzeug Blinker gesetzt hatte,
+braucht ihn nicht zum Herabsetzen der Geschwindigkeit oder gar zum Halten
+veranlassen
+(OLG München, Urteil vom 05.08.1988, Az. 10 U 5242/86 = NZV 1989, 394).
+
+# Benutzer eines neben der allgemeinen Fahrbahn verlaufenden Radweges müssen den
+vor ihnen befindlichen Verkehr beobachten und dürfen ein Fahrzeug, welches das
+rechte Richtungszeichen gesetzt und sich entsprechend eingeordnet hat, an einer
+Straßenkreuzung oder -einmündung nicht mehr überholen, es sei denn, der
+Vorausfahrende gibt deutlich zu erkennen, dass er sich vor Durchführung der
+Richtungsänderung überholen lassen werde (BayObLG, Az. 1a St 43/65).
+
+# Dem Radwegbenutzer gebührt der Vorrang vor einem von der Fahrbahn auf ein
+Grundstück einbiegenden Kraftfahrer; dem Radfahrer steht der Ersatz des gesamten
+Schadens zu (KG, Az. 12 U 50/92).
+
+# Ein Radfahrer handelt nicht verkehrswidrig, wenn er zum Linksabbiegen den
+Radweg verlässt und sich auf der Fahrbahn einordnet. Voraussetzung ist allerdings
+das Fehlen einer Radwegeführung zum Abbiegen. (OLG Hamm, 8.6.1989, Az 27 U 1/89,
+Neue Zeitschrift für Verkehrsrecht [NZV] 26/1990, VRS 46, 217)
+
+# Radfahrer sind nicht verpflichtet, während des gesamten Abbiegevorgangs den
+Arm auszustrecken (OLG Hamm, Az. 27 U 2/89).
+
+# Der Führer eines bei Rotlicht haltenden und nach dem Farbwechsel auf Grün nach
+rechts abbiegenden Lkw kann nicht darauf vertrauen, daß Radfahrer, die einen
+rechts neben der Fahrbahn befindlichen Radweg benutzen und die er wegen der
+technischen Beschaffenheit seines Fahrzeugs nicht sehen kann, sein
+Richtungszeichen beachten und nicht in gerader Richtung weiterfahren (KG, Az.
+(3) 1 Ss 7/88 (10/88)).
+
+# Auf anderen (nicht beschilderten) Radwegen haben Radfahrer gegenüber (rechts)
+abbiegenden Kfz ebenso Vorrang wie auf benutzungspflichtigen.
+(OLG Frankfurt ,Az 24 U 118/03, 23.01.2004)
+Ein anders lautendes Urteil ist nicht bekannt.
+
+
+
+ Ampel
+
+# Radfahrer müssen eine am Radweg befindliche Radfahrampel beachten, auch
+wenn sie nicht den Radweg befahren (OLG Köln, Az. Ss 753/86).
+
+# Einen Rotlichtverstoß begeht ein Radfahrer, der außerhalb des Radwegs und
+der durch Rotlicht gesperrten Radfahrerfurt bei Grün für den Fahrbahnverkehr
+die Kreuzung überquert, da sich der Schutzbereich einer Verkehrsampel für
+Radfahrer auf die gesamte durch Lichtzeichenanlage gesicherte Kreuzung
+erstreckt (OLG Celle, Az. 2 Ss Owi 70/84).
+
+Auch wer als Fahrradfahrer eine rote Ampel missachtet, muss mit einem Bußgeld
+und Punkten in der Flensburger Verkehrssünderkartei rechnen. Die Ausrede, man
+habe es eilig gehabt, ist keine Entschuldigung, befand das Amtsgericht
+Karlsruhe. Es verurteilte einen Radfahrer zu einer Geldbuße von 60 Euro. Eine
+dagegen eingelegte Beschwerde beim Oberlandesgericht Karlsruhe (OLG) wurde nicht
+zur Entscheidung angenommen. Der Fahrradfahrer hatte vor einer Ampel mehrere
+wartende Fahrzeuge überholt und war trotz Rotlichts, das bereits rund fünf
+Sekunden angedauert hatte, in die Kreuzung gefahren. Polizisten hatten den
+Vorfall beobachtet und den Mann angehalten (OLG Karlsruhe, Az. 1 Ss 119/03).
+
+
+ Ausfahrten
+
+# Der Führer eines Kraftfahrzeuges, der aus einem Grundstück ausfährt und
+dabei einen Gehweg überquert, ist von seiner erhöhten Sorgfaltspflicht
+gegenüber Verkehrsteilnehmern auf dem Gehweg nicht deshalb befreit, weil
+diese sich dort verbotenerweise bewegen (hier: gegenüber einer erwachsenen
+Radfahrerin, die entgegen § 2 Abs. 1 und 5 StVO den Gehweg benutzt) (OLG
+Düsseldorf, Az. 5 Ss (OWi) 265/95 - (OWi) 173/95 I).
+
+# Ein Radfahrer, der einen vor ihm auf einem Radweg fahrenden anderen
+Radfahrer im Bereich einer Grundstücksausfahrt ohne Klingelzeichen überholen
+will, haftet grundsätzlich nicht für einen Unfall, der sich daraus ergibt,
+daß der eingeholte Radfahrer ohne Handzeichen und Rückschau plötzlich links
+abbiegt und dadurch mit dem Überholenden zusammenstößt. Das Unterlassen der
+Abgabe eines Klingelzeichens steht mit einem solchen Unfall in keinem
+haftungsrechtlichen Zusammenhang (OLG München, 10 U 3728/83).
+
+# Auf dem Gehweg darf ein Radfahrer nur die Schrittgeschwindigkeit fahren.
+Deshalb hat ein erwachsener Radfahrer, der unberechtigt auf dem Bürgersteig
+fährt und die Schrittgeschwindigkeit von Fußgängern erheblich überschreitet,
+auch gegenüber demjenigen, der aus einer Torausfahrt heraus sich langsam auf
+den Bürgersteig bis zur Sichtlinie hervortastet, im Fall einer Kollision den
+Beweis des ersten Anscheins gegen sich, den Unfall allein verursacht und
+verschuldet zu haben, weil er seine Geschwindigkeit nicht den besonderen
+Straßenverhältnissen angepaßt hat. (AG Köln, Az. 266 C 481/92).
+
+# Wer aus einem Grundstück auf die Straße ausfahren möchte, muss eine Gefährdung
+anderer Verkehrsteilnehmer ausschließen. Dabei muss ein Autofahrer auch mit
+verbotswidrig auf dem Gehweg fahrenden Radfahrern rechnen. Das Argument des
+Autofahrers, er habe sich vorsichtig aus der Einmündung hervorgetastet; kein
+Fußgänger sei auch nur annähernd gefährdet oder belästigt worden, und mit einem
+Radfahrer habe er nicht gerechnet, ließen die Richter des Landgerichts Hagen
+nicht gelten. Dies hätte er tun sollen, meinten die Richter. Er habe sich in der
+konkreten Situation nicht darauf verlassen können, nicht auf einen Radfahrer zu
+treffen. Die Sorgfaltspflicht des Autofahrers werteten die Richter so hoch, dass
+sie ihm 70 Prozent der Haftung und des Schadens aufbürdeten
+(LG Hagen, Az. 1 S 139/05).
+
+Autofahrer müssen nicht damit rechnen, dass auf einem Bürgersteig, auf dem
+Radfahren verboten ist, Radler unterwegs sind (LG Stralsund, Az. 6-6 O 560/05).
+
+# Es besteht eine Wartepflicht des ein Grundstück verlassenen Kraftfahrers
+auch gegenüber einem Radfahrer, der einen vor der Fahrbahn verlaufenden
+Radweg in verkehrter Richtung befährt (KG Berlin, Az. 12 U 6697/91).
+
+# Die Pflicht zu höchstmöglicher Sorgfalt besteht nach § 10 StVO nicht nur
+gegenüber dem fließenden Verkehr auf der Fahrbahn, sondern auch gegenüber
+Benutzern eines neben der Fahrbahn laufenden Radweges. Wer aus einem
+Grundstück auf eine Straße fahren will, darf, wenn er wegen starken Verkehrs
+warten muß, auf einem neben der Fahrbahn verlaufenden verkehrsfreien Radweg
+warten, auf wenn sein Fahrzeug dabei den Radweg in voller Breite versperrt.
+Er braucht dann nicht auf etwa später sich auf dem Radweg nähernde
+Verkehrsteilnehmer zu achten. Insbesondere braucht er beim auftauchen von
+Benutzern des Radweges nicht zurückzufahren, um diese ungehindert
+durchfahren zu lassen (OLG Düsseldorf, Az. 2 Ss 283/78 I).
+
+# Ist der wartepflichtige Kraftfahrer, weil sich von links zunächst kein
+Radfahrer auf dem Radweg näherte und die Sichtverhältnisse nach links
+begrenzt sind, erlaubterweise bis zum Beginn der für den Kraftfahrer
+bestimmten Fahrbahn der Vorfahrtsstraße vorgefahren, ist er bei späterer
+Annäherung eines Radfahrers nicht verpflichtet, den Radweg durch
+Rückwärtsfahren zu räumen (SchlOLG, Az. 9 U 38/86).
+
+# Ein Fahrradfahrer, der eine Fahrbahn von einer Fahrbahnseite zu anderen
+überquert, verstößt gegen das Gebot zur Benutzung der rechten Fahrbahnseite
+in Längsrichtung, auch wenn er aus einer Grundstückseinfahrt kommt (KG, Az.
+12 U 5072/94).
+
+# Kommt es auf einem Radweg zu einer Kollision zwischen einem Radfahrer und
+einem aus einer Grundstückseinfahrt herauskommenden Pkw, so ist eine volle
+Haftung des Pkw-Fahrers gerechtfertigt, wenn sich überhöhte Geschwindigkeit
+oder Unaufmerksamkeit des Radfahrers nicht feststellen läßt (OLG Hamm, Az.
+32 U 1/98).
+
+# Ein Autofahrer, der bei der Ausfahrt aus einem Grundstück ein zulässigerweise
+auf dem Gehweg fahrendes Kind anfährt, trägt die alleinige Schuld
+(OLG Hamburg, Az. 14 U 12/91).
+
+# Maßgebend für die verkehrsrechtliche Einordnung als Straße oder Ausfahrt ist
+das Gesamtbild der äußerlich erkennbaren Merkmale, wobei in der Rechtsprechung
+teilweise auch auf die nach außen in Erscheinung tretende Verkehrsbedeutung –
+etwa als nicht den fließenden Verkehr dienender Zugang zu einem Grundstück –
+abgestellt wird. Auf Eigentumsverhältnisse oder verwaltungsrechtliche Widmung in
+bezug auf die betroffene Grundstücksfläche ist nicht abzustellen. Ist die
+Unfallörtlichkeit aus verschiedenen Perspektiven und Blickrichtungen in einer
+Art und Weise dokumentiert, daß sich daraus ein ausreichendes und eindeutiges
+Bild für die zu treffende Entscheidung ergibt und hat keine der Parteien von den
+Bildwiedergaben abweichende oder nicht erfaßte Merkmale vorgetragen bzw.
+behauptet, kann sich ein Ortstermin zur Inaugenscheinnahme erübrigen
+(OLG Köln, Az. 11 U 891/93). [mehr von Olaf Schultz ...]
+
+
+ Beleuchtung
+
+Wer in der Dunkelheit ohne Licht Rad fährt, muss bei einem Unfall grundsätzlich
+haften. Zwei Radfahrer waren an einem Winterabend ohne Licht unterwegs gewesen.
+Eine Autofahrerin bemerkte sie daher erst sehr spät und stieß beim Ausweichen
+mit einem entgegenkommenden Fahrzeug zusammen. Die Richter sahen in dem
+Verhalten der beiden Radfahrer die überwiegende Ursache für den Unfall: Radler
+ohne Licht könnten in der Dunkelheit grundsätzlich zu spät gesehen werden. Es
+sei wahrscheinlich, dass der Unfall mit Beleuchtung hätte verhindert werden
+können (OLG Frankfurt, Az. 24 U 201/03).
+
+# Fahren bei Dunkelheit auf einem kombinierten Rad- und Fußgängerweg kann bei
+einer unverschuldeten Kollision mit einem Fußgänger, trotz korrekter Batterie-
+Beleuchtung, mitschuldig machen. Auch wenn dieser dunkel bekleidet ist, muss die
+Fahrweise auf die Sichtmöglichkeit abgestimmt sein. Der Fußgänger kann auf ein
+korrekter Verhalten des Radfahrers vertrauen (LG Hannover, Urt. v.15.03.2006-11
+S 84/05).
+
+# Zwei Radfahrer waren in der Dunkelheit mit unbeleuchteten Fahrrädern
+zusammengestoßen. Dabei klagte ein Radfahrer aufgrund seiner Verletzungen auf
+Zahlung eines Schmerzensgeldes. Das OLG Celle rechnete dem Verletzten nur ein
+Drittel Mitverschulden zu. Der andere Radfahrer war nämlich 46 Jahre alt,
+während der Verletzte mit 17 Jahren noch minderjährig war. Bei Jugendlichen sei
+allgemein die Neigung zu beobachten, sich eher leichtsinnigem Verhalten
+hinzugeben, als bei voll ausgereiften Erwachsenen. Dies rechtfertigte
+Jugendliche grundsätzlich in einem milderen Licht zu beurteilen als gleichartige
+Verstöße voll ausgereifter Erwachsener. Hinzu trat, dass der 46-jährige auch mit
+hoher Geschwindigkeit unterwegs war. Da generell die von einem schnell fahrenden
+Radfahrer ausgehende Gefahr höher sei als die eines langsam Fahrenden, war auch
+dies bei der Haftungsverteilung zu berücksichtigen (OLG Celle, Akz 14 U 122/02).
+
+
+ Fahrbahnbenutzung/Nichtbenutzung von Radwegen
+
+# Ist der Zustand eines Radweges so, dass er zum langsamen Fahren zwingt,
+besteht keine Benutzungspflicht. (OLG Köln, NZV 1994, 278).
+
+# Wenn die Benutzung des Radweges unzumutbar erschwert ist, besteht keine
+Benutzungspflicht (OLG Oldenburg, 29.07.1952, VkBl. 53, 190).
+
+# Nach ständiger Rechtsprechung u.a. des Verwaltungsgerichtes Berlin, des
+Oberlandesgerichts Düsseldorf und des Bundesgerichtshofes besteht nach keine
+Radwegebenutzungspflicht, wenn die Radwegbenutzung dem einzelnen Radfahrer
+objektiv unzumutbar ist (OLG Düsseldorf, NZV 1992, 290, 291; BGH, NZV 1995,
+144). Als unzumutbar kann sie dann angesehen werden, wenn der Radweg nicht
+die erforderliche Breite aufweist, insbesondere, wenn die Soll-Breite gemäß
+der Verwaltungsvorschrift zu ¤ 2 Abs. 4 S. 2 StVO unterschritten ist (VG
+Berlin, NZV 2001, 317). In der NJW 2005, 396-399 sowie in der NZV 2004, 61
+wird das Thema im Zusammenhang mit Fahrradtaxen aufgearbeitet. Auch das OLG
+Dresden urteilte in diesem Sinne, als es im Februar 2004 ein Urteil des
+Amtsgerichts Leipzig wegen unerlaubter Personenbeförderung aufhob. (OLG
+Dresden, Beschluss vom 11. 10. 2004, Az. Ss (OWi) 460/04, NStZ-RR 2005, 24
+und NJW 2005, 452)
+
+# Radfahrer dürfen auch dann nicht nebeneinander fahren, wenn sie
+schnelleren Verkehrsteilehmern das Überholen zwar nicht unmöglich machen,
+aber erschweren (Bay ObLG, Az. 1 St 236/55). [Anm.: Dieses Urteil ist
+bereits 1955 ergangen, als die StVO noch eine andere Formulierung dieser
+Regel enthielt. Es ist davon auszugehen, daß es nach der neuen Formulierung
+nicht mehr so ergehen könnte.]
+
+# Wird ein Radfahrer, der statt des vorhandenen Radwegs grundlos die
+Fahrbahn benutzt, von einem überholenden Pkw angefahren und verletzt, muß er
+wegen seines Mitverschuldens 25 % seines Schadens selbst tragen. Das
+Ergebnis der Beweisaufnahme hatte ergeben, daß der Kfz-Fahrer entweder zu
+spät reagiert hat oder zu schnell gefahren war. Beide Alternativen begründen
+sein überwiegendes Verschulden an dem Unfall. Der Radfahrer muß jedoch wegen
+eigenen Mitverschuldens eine Anspruchskürzung hinnehmen. Der Radfahrer hat
+gegen § 2 Abs.4 StVO verstoßen, indem er die Fahrbahn benutzt hat, obwohl
+rechts daneben ein Radweg verlief. Dieses Verhalten ist auch
+unfallursächlich geworden. Das Gebot zur Radwegbenutzung dient nicht nur
+dazu, den Radfahrer wegen seiner schlechteren Erkennbarkeit zu schützen,
+sondern soll allgemein den Rad- und Motorfahrverkehr trennen
+(OLG Hamm, Az. 6 U 91/93).
+
+# Die Radwegbenutzungspflicht gilt auch für Liegeräder. Deren bauartbedingten
+Besonderheiten stehen dem nicht entgegen.
+Liegeradfahrer dürfen nicht die Fahrban benutzen, wenn ein Radweg ausgeschildert
+ist. Liegeräder sind Fahrräder im Sinne der Straßenverkehrsordnung und
+unterliegen den Regeln für Zweiräder.
+(VGH Baden-Württemberg, Az. 1 S 1862/99 vom 10.07.2000).
+
+# Hält ein Radfahrer von dem unmittelbar neben der Fahrbahn verlaufenden
+Gehweg einen Abstand von 75 bis 80 cm, so hat er in aller Regel gegenüber
+den Benutzern des Gehweges seinen Pflichten aus § 1 StVO erfüllt (BGH, Az.
+VI ZR 66/56).
+
+# Auch Rennradfahrer müssen öffentliche Radwege benutzen. (LG Köln, Az. 5 O 310/98).
+ dgl. Liegeradfahrer (BVerwG Az 3B 183.00)
+
+# Radwege müssen auch bei Glätte + Freigabe als Gehweg in Gegenrichtung
+benutzt werden, solange eine Beschilderung mit Z237 vorhanden ist, sogar dann,
+wenn diese rechtswidrig beibehalten wurde.
+Die Unbenutzbarkeit des betr. "Radwegs" Weg wurde von zwei Zeugen bestätigt.
+Er war zum Zeitpunkt (Winter 2001) durch Umleitung der Fussgänger um eine
+Baustelle quasi zum Gehweg gemacht worden.
+Verhandlung wurde von Herrn Allhausen, Präsident Amtsgericht Magdeburg, geleitet.
+Widerspruch wurde zurückgezogen, ohne dass ein Urteil erging.
+30 OWI 722 Js 12588/02 (Amtsgericht Magdeburg, 17.07.2002)
+
+# Unbenutzbare Radwege (z.B. tiefer Schnee, Eis, Löcher) müssen nicht benutzt werden.
+Sind Radwege unbenutzbar oder in Fahrtrichtung kein Radweg oder Seitenstreifen vorhanden,
+so haben Radfahrer auf der Fahrbahn möglichst weit rechts zu fahren und nicht auf dem
+Radweg oder Seitenstreifen der anderen Straßenseite.
+OLG Naumburg, Urteil vom 08.12.2011, 1 U 74/11
+; vorgehend LG Halle, Urteil vom 28.06.2011, 6 O 560/10.
+
+
+# Allein die Erhöhung der Verkehrssicherheit durch Trennung der Verkehrsarten
+ist kein geeigneter Gesichtpunkt, um eine Radwegebenutzungspflicht auf
+unzureichend ausgebauten Wegen zu rechtfertigen.
+Aufhebung der Benutzungspflicht ändert nichts an der Möglichkeit, einen
+Radweg weiterhin zu befahren. (VG Hannover 23.07.2003)
+
+
+# Eine über einen abgesenkten Bordstein erreichbare Straße bildet keine
+Einmündung. Radwegschilder müssen deshalb dort nicht wiederholt werden.
+(OLG Karlsruhe, VR 94, 362).
+
+
+# Ist die Fahrbahn geräumt und der Radweg glatt, zugeschneit oder zugeschoben,
+besteht keine Benutzungspflicht. (LG Düsseldorf, 06.10.2009, Az. 2 B O 212/08
+sowie Auskunft des BMVBW, März 2010)
+
+
+# Linke Radwege, die nicht entsprechend § 2 Abs. 4 StVO beschildert sind, dürfen
+auch dann nicht benutzt werden, wenn der in Fahrtrichtung rechts liegende Radweg
+z.B. wegen Baustellen o.ä. unbenutzbar ist.
+"Unbenutzbare Radwege (tiefer Schnee, Eis, Löcher) müssen zwar nicht
+benutzt werden (Hentschel/König/Dauer StVR, 41. Aufl., StVO § 2, Rn.
+67). Ist rechts kein Radweg oder Seitenstreifen vorhanden oder [ist selbiger]
+unpassierbar, so haben Radfahrer gemäß § 2 Abs. 2 StVO auf der Fahrbahn möglichst
+weit rechts zu fahren und nicht etwa auf dem Radweg oder Seitenstreifen der
+linken Straßenseite. Links verlaufende Radwege ohne Zeichen 237 [240 bzw. 241]
+sind für die beabsichtigte Fahrtrichtung gesperrt."
+(OLG DüsseldorfBeschluss vom 15.4.1992 - 5 Ss (OWi) 69/92 - außerdem
+OLG Sachsen-Anhalt, 08.12.2011, 1 U 74/11)
+
+
+
+ Fahrbahnbeschaffenheit/Wegbeschaffenheit
+
+siehe auch Hindernisse auf dem Radweg
+
+# Eine Absackung inmitten einer Fahrbahn mit einer Tiefe von 12 bis 13 cm
+und einem Durchmesser von 30 bis 35 cm stellt eine Gefahrenquelle,
+insbesondere für einen Radfahrer dar, die der Verkehrssicherungspflichtige
+beseitigen muß (LG Aachen, Az. 4 O 226/88).
+
+# Ein im öffentlichen Verkehrsbereich liegender Gully muß so gestaltet sein,
+daß er in bezug auf Rillenrichtung und -abstand keine Gefährdung für
+Radfahrer darstellt (OLG Hamm, Az. 6 U 240/89).
+
+# Verlaufen die öffnungen eines Gullys längs der Fahrtrichtung, haftet der
+Verkehrssicherungspflichtige gegenüber einem Radfahrer, er mit seinem
+Fahrrad in den Gully gerät und stürzt (BGH, Az. III ZR 174/81).
+
+# Der Rad- und Fußgängerverkehr muß sich darauf einrichten, daß
+Straßenbahnschienen den Straßenbelag um 4 cm überragen. Wer über
+Kopfsteinpflaster und Straßenbahnschienen fährt, muß mit gewissen
+Unebenheiten rechnen (OLG München, Az. 1 U 5425/89).
+
+# Wer auf einem schadhaften Gehweg stürzt, obwohl ein aufmerksamer Passant
+die beschädigte Stelle bemerkt hätte und ihr ausgewichen wäre, bekommt nur
+ein geringes Schmerzensgeld. Im konkreten Fall war ein Fußgänger wegen
+einiger loser Gehwegplatten gestürzt und hatte sich dabei schwere Prellungen
+zugezogen. Den Fußgänger treffe ein erhebliches Mitverschulden an dem Sturz,
+weil er die gebotene Vorsicht außer Acht gelassen habe. Er hätte die
+schadhafte Stelle erkennen und einen Bogen um sie machen müssen (LG Aachen,
+Az. 4 O 325/97).
+
+# Die Stadt haftet nicht für Schäden, die einem Radfahrer aufgrund der
+Benutzung von Wegen entstanden sind, die nur für land- und
+forstwirtschaftlichen Verkehr freigegeben sind (LG Aachen, Az. 4 O 294/96).
+
+# Die Gemeinde haftet nicht für Schäden, die einem Radfahrer aufgrund der
+Benutzung von Natur-Radwegen, die zum Teil mit Rollsplit belegt sind,
+entstanden sind. Solche Stellen sind mit Vorsicht zu befahren. Bei
+Unachtsamkeit haftet die Gemeinde nicht (LG Gera, Az. 7 O 2376/96).
+
+# Fußgänger, die auf der Fahrbahn wegen eines Schlagloches stürzen, können
+keinen Schadenersatz fordern. Die Kommune muss nur dafür sorgen, dass
+Straßen den Anforderungen des Fahrzeugverkehrs genügen (OLG Hamm, Az. 9 U
+208/03).
+
+# Wer auf einem mit Schlaglöchern übersäten Radweg unterwegs ist, sollte
+nicht darauf hoffen, nach einem Sturz Schadensersatz von der zuständigen
+Kommune zu bekommen. Bei klar erkennbaren Schäden gelte es, besonders
+vorsichtig und aufmerksam zu fahren, heißt es in einem Urteil des
+Landgerichts Rostock. Eine Radfahrerin war auf abschüssiger Strecke und nach
+einer Kurve auf dem desolaten Radweg gestürzt und hatte sich erheblich
+verletzt. Nun verlangte sie Schadensersatz und Schmerzensgeld von der
+zuständigen Kommune, weil diese ihre Verkehrssicherungspflicht missachtet
+habe. Die Richter wiesen die Klage jedoch ab. Sie argumentierten, die Frau
+habe schon weit vor der Unfallstelle den schlechten Zustand des Radwegs
+erkannt und habe - wie sie selbst einräumte - Schlangelinien um die
+vorhandenen Schlaglöcher fahren müssen. Dann aber, so hieß es in dem Urteil,
+musste sie auch damit rechnen, dass sich an diesem Zustand auch nach der
+Kurve nichts ändert, und ihr Tempo vermindern. Der
+Verkehrssicherungspflichtige müsse nur solche Gefahren beseitigen, die ein
+sorgfältiger Benutzer nicht erkennen und auf die er sich nicht einrichten
+könne, so das Gericht: Es ist also nur eine Warnung vor unvermuteten
+Gefahren nötig (LG Rostock, Az. 4 O 139/04 vom 25. August 2004),
+www.anwaltverein.de.
+
+# Ein Radfahrer muss sich darauf einstellen, dass ein unbefestigter Radweg
+in einer städtischen Wallanlage durch andere Radfahrer zerfahren worden ist,
+so dass entstandene Spurrillen während einer Frostperiode scharfkantig
+festfrieren und das Lenken erschweren; dies gilt auch dann, wenn der Weg zur
+Zustandsverbesserung mit einer weichen grobkörnigen Splittschicht abgedeckt
+worden ist. der Verkehrssicherungspflichtige muß den zerfahrenen feuchten
+Boden vor dem Absplitten nicht durch Walzen oder in sonstiger Weise glätten
+(OLG Celle, Az. 9 U 199/04 vom 23.03.2005, vorgehend LG Bückeburg 30.
+September 2004 2 O 23/04).
+
+
+
+ Fahrbahnquerung
+
+# Bei dichtem Verkehr dürfen Fußgänger die Straße nicht überqueren, weil die
+Gefahr besteht, auf einer Fahrspur stehen bleiben zu müssen. Dadurch erhöht
+sich die Unfallgefahr. Aus diesem Grund mußte ein Passant ein Drittel seines
+Schadens selbst tragen, der dadurch entstanden war, daß er auf dem
+Fahrstreifen stehend von einem Auto erfaßt und schwer verletzt worden war
+(OLG Hamm, Az. 27 U 115/96).
+
+# Ein Fahrradfahrer, der eine Fahrbahn von einer Fahrbahnseite zu anderen
+überquert, verstößt gegen das Gebot zur Benutzung der rechten Fahrbahnseite
+in Längsrichtung, auch wenn er aus einer Grundstückseinfahrt kommt (KG, Az.
+12 U 5072/94).
+
+
+
+ Gehwegebenutzung, gemeinsamer Geh-/Radweg
+(siehe auch Radwegbenutzung)
+
+# Einem entgegenkommenden Radfaher, der trotz vorhandener Radwegführung zur
+Überquerung einer Seitenstraße die dortige Fußgängerfurt befährt, steht
+gegenüber einem nach links in die Straße einbiegenden Pkw kein
+Vorfahrtsrecht zu. Den Kraftfahrer trifft aber die allgemeine
+Sorgfaltspflicht aus § 1 Abs. 2 StVO (OLG Frankfurt/M., Az. 2 WS (B) 465/98
+OWig).
+
+# Ein Radfahrer, der auf dem Fuß- statt auf dem Radweg fährt, muß bei einem
+Unfall selber die entstandenen Schäden zahlen. Im verhandelten Fall war ein
+Radfahrer auf einer Vorfahrtstraße unterwegs gewesen, die von einem
+getrennten Rad- und Gehweg gesäumt wurde. Statt vorschriftsmäßig den Radweg
+in Fahrtrichtung zu benutzen, war er jedoch auf der falschen Straßenseite
+und darüber hinaus auch noch auf dem Gehweg gefahren. An einer schwer
+einsehbaren Straßenmündung war er schließlich mit einem Auto
+zusammengeprallt und dabei schwer verletzt worden. Da er der Ansicht war, er
+habe Vorfahrt gehabt und der Autofahrer trage die Schuld, hatte er vor
+Gericht auf Schadenersatz geklagt. Die Richter des OLG Celle befanden
+jedoch: Gehwege seien allein für Fußgänger gedacht und von jedem Fahrverkehr
+freizuhalten - Radfahrer, die solche Flächen berührten, hätten grundsätzlich
+keine Vorfahrt, auch wenn sie eigentlich in einer Vorfahrtstraße unterwegs
+seien. Deshalb müsse der Radfahrer den Schaden selber tragen. Grundsätzlich
+verliere ein Radfahrer sein Vorfahrtsrecht zwar nicht allein dadurch, daß er
+von zwei vorhandenen Fahrradwegen den falschen benutze. In diesem Fall habe
+der Radfahrer jedoch einen besonders groben Verkehrsverstoß begangen. Wer
+auf einem Gehweg in falscher Richtung auf eine unübersichtliche Einmündung
+zufahre, nehme seine eigene Gefährdung und die anderer Verkehrsteilnehmer in
+Kauf. Selbst wenn der Autofahrer hier eine geringfügige Mitverantwortung
+tragen sollte, müsse er nichts zahlen, so die Richter (OLG Celle, Az. 14 U
+89/00).
+
+Gehwege gehören den Fußgängern und radelnden Kindern bis 8 Jahre, toleriert auch
+für Kinder bis 10 Jahre (siehe Seite "Verkehrssicherheit"). Die Klage einer
+Radfahrerein, die von einem links aus einer Ausfahrt kommenden Pkw erfaßt wurde
+und schwer stürzte, wurde in vollem Umfang abgewiesen. Nach Ansicht des Gerichts
+hatte sich die Radlerin gleich zweimal verkehrswidrig verhalten: Radweg nicht
+benutzt und Fahren entgegen der Fahrtrichtung. Diese Verstöße gegen StVO §2
+Abs.4 u. Abs. 5 sowie gegen §1 Abs. 2 - allgemeine Sorgfaltspflicht - reichten
+für eine Alleinhaftung (LG Dessau, Urt.v. 19.08.2005 - 1 S 79/05, NZV 2006,
+149). Urteil im Einklang mit Rechtssprechung OLG Hamm NZV 1995, 152; OLG Celle
+MDR 2003, 928.
+
+# Der Führer eines Kraftfahrzeuges, der aus einem Grundstück ausfährt und
+dabei einen Gehweg überquert, ist von seiner erhöhten Sorgfaltspflicht
+gegenüber Verkehrsteilnehmern auf dem Gehweg nicht deshalb befreit, weil
+diese sich dort verbotenerweise bewegen (hier: gegenüber einer erwachsenen
+Radfahrerin, die entgegen § 2 Abs. 1 und 5 StVO den Gehweg benutzt) (OLG
+Düsseldorf, Az. 5 Ss (OWi) 265/95 - (OWi) 173/95 I).
+
+# Auf dem Gehweg darf ein Radfahrer nur die Schrittgeschwindigkeit fahren.
+Deshalb hat ein erwachsener Radfahrer, der unberechtigt auf dem Bürgersteig
+fährt und die Schrittgeschwindigkeit von Fußgängern erheblich überschreitet,
+auch gegenüber demjenigen, der aus einer Torausfahrt heraus sich langsam auf
+den Bürgersteig bis zur Sichtlinie hervortastet, im Fall einer Kollision den
+Beweis des ersten Anscheins gegen sich, den Unfall allein verursacht und
+verschuldet zu haben, weil er seine Geschwindigkeit nicht den besonderen
+Straßenverhältnissen angepaßt hat. (AG Köln, Az. 266 C 481/92).
+
+# Eine durchgezogene Linie zwischen Radweg und Bürgersteig ist als "Mauer"
+zu betrachten: Sie darf von Radfahrern nicht überfahren werden. Bei
+Gegenverkehr müssen Radler sich ganz rechts halten, notfalls sogar anhalten
+- vorsorgliches Ausweichen auf den Fußgängerstreifen ist in jedem Fall grob
+verkehrswidrig (OLG Hamm, Az. 13 U 111/94).
+
+# Ein Erwachsener verstößt gegen die Sorgfaltspflicht, wenn er mit dem
+Fahrrad auf dem [nicht für den Radverkehr freigegebenen] Gehweg fährt;
+kollidiert er mit einem Auto, das vorsichtig aus einem Grundstück fährt,
+trifft ihn die volle Haftung (OLG Hamm, Az. 27 U 153/93).
+
+# Ein innerorts verbotswidrig auf dem Gehweg fahrender erwachsener
+Radfahrer, der einem aus einer Grundstückseinfahrt herauskommenden Pkw in
+die Seite fährt, hat seinen Schaden selbst zu tragen; die Betriebsgefahr des
+Pkw tritt hinter der groben Fahrlässigkeit des Radfahrers zurück (OLG
+Karlsruhe, Az. 10 U 117/90).
+
+# Ein Autofahrer, der bei der Ausfahrt aus einem Grundstück ein
+zulässigerweise auf dem Gehweg fahrendes Kind anfährt, trägt die alleinige
+Schuld (OLG Hamburg, Az. 14 U 12/91).
+
+# Kollidiert ein erwachsener Radfahrer, der auf dem Bürgersteig schneller
+als Schrittgeschwindigkeit fährt, mit einem langsam aus einer Torausfahrt
+herausfahrenden Pkw, dann spricht dies für ein alleiniges Verschulden des
+Radfahrers. Wenn der Fahrradfahrer den Gehweg (verbotswidrig) befährt, darf
+er zumindest die Schrittgeschwindigkeit nicht überschreiten. Fährt er
+schneller, handelt er grob verkehrswidrig. Die Schrittgeschwindigkeit
+beträgt etwa 4-6 km/h (AG Köln, Az. 266 C 481/92).
+
+# Ein Radfahrer darf seine Fahrt auch nicht zu einer nur kurzen Überbrückung
+auf dem Gehweg fortsetzen, wenn der Radweg kurz vor der Kreuzung endet und
+bis zur Kreuzung nur noch als Gehweg weiter gefürt wird. Er muß vielmehr auf
+die Straße ausweichen oder absteigen (OLG Düsseldorf, Az. 15 U 53/94).
+
+# Ein Radfahrer hat so viel Abstand vom Gehweg zu halten, dass weder Lenker
+noch andere Radteile in den Gehweg hineinragen (OLG Celle, Az. 9 U 190/00).
+
+# Radfahrer müssen auf kombinierten Rad- und Fußwegen besondere Rücksicht
+auf Fußgänger nehmen. Insbesondere bei unklarer Verkehrslage muss der
+Radfahrer mit dem Fußgänger Blickkontakt zur Verständigung aufnehmen. Die
+Radfahrgeschwindigkeit ist so zu reduzieren, dass sofort gefahrlos
+angehalten werden kann. Dabei muss der Radfahrer stets mit
+Unaufmerksamkeiten oder Schreckreaktionen des Fußgängers rechnen. Mit dieser
+Begründung hat das Oberlandesgericht in Oldenburg einer Radfahrerin nach
+einem Unfall mit einem Fußgänger Schadenersatz und Schmerzensgeld verweigert
+(OLG Oldenburg, Az. 8 U 19/04/04, NJW-RR 2004, 890).
+
+# Radfahrer trifft eine Teilschuld, wenn sie auf einem Radweg von einem
+unaufmerksamen Passanten so bedrängt werden, dass es zu einem Sturz kommt. Das
+gilt auch dann, wenn der Radfahrer auf einem Weg unterwegs war, auf dem er
+Vorrang vor Fußgängern hat. (BGH VI ZR 171/07).
+
+# Parkverbot für Kfz auf Gehweg zwischen Radweg und Fahrbahn:
+Ein Gehweg ist ein Weg, der für Fußgänger eingerichtet und bestimmt, von der
+Fahrbahn räumlich getrennt und äußerlich als Gehweg - durch Pflasterung,
+Plattenbelag oder auf sonstige Weise - erkennbar ist.
+Die Gehwegeigenschaft ändert sich nicht, wenn rechts daneben ein Radweg
+verläuft, der beidseitig durch durchgehende weiße Linien gekennzeichnet und
+begrenzt ist und auch durch das Verkehrszeichen 241 von dem Gehweg getrennt
+wird. Der Bereich links von diesem Radweg, der in größerem Abstand durch Bäume
+unterbrochen ist und in dem sich Fahrradständer und geparkte Fahrräder befinden,
+ist als Gehweg anzusehen, auf dem Kraftfahrzeuge nicht parken dürfen.
+(OLG Karlsruhe / AZ: 2 Ss 82/03 16.19.2003) Fundstelle: NZV 2004, 271
+
+
+
+ Geschwindigkeit
+
+# Radfahrer dürfen nur so schnell fahren, wie es von einem Radfahrer
+allgemein erwartet wird. Dies gilt vor allem, weil sie akustisch und optisch
+schlechter wahrnehmbar sind, als andere Kraftfahrer (OLG Karlsruhe, VRS 78,
+329 sowie BGH, VI ZR 73/90).
+
+# Auf einem 2,30 m breiten innerstädtischen Radweg darf ein Radler nicht mit
+25-30 km/h fahren, wenn die Sicht zur Fahrbahn hin durch parkende Autos
+beschränkt ist. Der Radler musste für 2/3 des beim Unfall entstandenen
+Schadens aufkommen (KG, VerkMitt 1984, 94).
+
+# Ein Rennradfahrer, der mit einer Geschwindigkeit von 45 km/h in
+Rennfahrerhaltung über den Lenker gebeugt auf einer innerörtlichen Straße
+mit einem Fußgänger kollidierte, der die Fahrbahn überqueren wollte, wurde
+wegen überhöhter Geschwindigkeit zu einer hälftigen Mithaftung verurteilt
+(OLG Karlsruhe, Az. 1 U 94/89).
+
+# Ein Rennradfahrer, der mit zügiger Geschwindigkeit fährt, ist in
+besonderem Maße zu erhöhter Aufmerksamkeit verpflichtet (OLG Düsseldorf, Az.
+18 U 253/92).
+
+# Kollidiert ein Radfahrer mit "erheblichem Tempo" einen die Straße
+querenden Fußgänger, trifft den Fußgänger lediglich ein ein 30-prozentiges
+und den Radfahrer ein 70-prozentiges Verschulden. So entschied das
+Oberlandesgericht Köln. Der Fußgänger habe zum einen die Fahrbahn betreten,
+ohne sich zu vergewissern, dass kein Fahrzeug nahte. Zum anderen habe er
+plötzlich einen Schritt in Richtung Fahrbahnmitte gemacht. Dieses Verhalten
+sei fahrlässig gewesen, so die Richter. Der Mountainbiker seinerseits habe
+das Rechtsfahrgebot missachtet. Er sei in gefährdender Weise auf die Gruppe
+Jugendlicher zugefahren, ohne seine Geschwindigkeit den
+Verkehrsverhältnissen anzupassen. Ihn treffe deshalb ein Mitverschulden von
+70 Prozent. Der Fußgänger müsse dem Radfahrer ein Schmerzensgeld von 6.000
+DM zahlen, befanden die Richter (OLG Köln, Az. 11 U 16/00).
+
+
+
+ Haftung / Helme
+(siehe auch Hindernisse auf dem Radweg bzw. Kinder)
+
+# Ein Hersteller garantiert für die Einhaltung eines Mindeststandards an
+Sicherheit auch bei Billigfahrrädern. Bei Fahrradbremsen verbindet der
+Verbraucher demgegenüber weitreichendere Sichheitserwartungen: Sie müssen
+vollständig fehlerfrei sein. Ein Verbraucher hatte mit einem Kaufhausrad für
+239 DM einen Unfall erlitten, als er auf einer abschüssigen Straß bei Nässe
+durch die mangelhaften Bremsen nicht rechtzeitig hatte anhalten kännen. Das
+Gericht stellt fest, daß das Rad mangelhaft konstruiert worden war und
+sprach dem Radfahrer, der schwere Verletzungen davon getragen hatte,
+Schadenersatz zu (LG Hanau, Az. 7 O 1819/92, nicht rechtskräftig).
+
+# Ein Berliner Radfahrer stürzte mit seinem Rad kurz nach dem Kauf im
+September 1993, weil sich durch einen festgesetzten Gegenstand zwischen
+Reifen und vorderem Schutzblech das Schutzblech auffaltete und das Vorderrad
+blockierte. Das Gericht sprach dem Verletzten Schadensersatz und
+Schmerzensgeld (fast 10.000 DM) zu, da der Fahrradhersteller gegen die
+Produktbeobachtungspflicht verstoßen habe. Er hätte aus der Fachpresse
+bereits im Jahre 1991 entnehmen können, daß die von ihm verwendeten
+Schutzbleche unfallträchtig waren (LG Berlin, Az. 26 O 337/95).
+
+# Der Hersteller von Kinderfahrrädern haftet für die Folgen eines
+Lenkerbruchs, der auf eine nicht werkstoffgerechte Konstruktion
+zurückzuführen war (LG Frankfurt/Main, Az. 2/10 O 377/87).
+
+# Schmerzensgeld in Höhe von 7.500 EUR erhält eine Oldenburger
+Fahrradfahrerin von einem Fahrradhersteller, weil sie infolge eines
+Pedalbruchs gestürzt war und sich verletzt hatte. Im Sommer 2001 kaufte sich
+die Oldenburgerin in einem Oldenburger Discountmarkt ein Citydamenrad fŸr
+279 DM. Bei einer Fahrt am nächsten Tag brach die rechte Pedale ab. Die Frau
+stürzte und zog sich einen offenen Unterschenkeltrümmerbruch und eine
+komplizierte Daumenfraktur zu. Sie musste mehrere Wochen ins Krankenhaus und
+wurde zweimal operiert. Auf die Klage der Frau hin verurteilte das
+Landgericht den Hersteller u.a. zur Zahlung von Schmerzensgeld. Zwar sah das
+Produkthaftpflichtgesetz, das anders als das Bürgerliche Gesetzbuch (BGB)
+eine verschuldensunabhängige Herstellerhaftung normiert, nach der 2001
+geltenden Rechtslage noch kein Schmerzensgeld vor (geändert seit 2002). Die
+Haftung der Beklagten folge aber Ð so das Landgericht - aus den allgemeinen
+Grundsätzen des BGB, denn bei Auftreten eines Fehlers, werde ein
+Herstellerverschulden vermutet. Es sei Sache des Herstellers, sich zu
+entlasten. Tue er dies nicht, hafte er. Hier habe sich die Beklagte nicht
+entlastet. Das OLG Oldenburg hat die Berufung der Beklagten mit einstimmigem
+Beschluss vom 23.02.2005 als unbegründet zurückgewiesen. Die Beklagte habe
+die Pflicht getroffen, die ausgehenden Fahrräder zumindest stichprobenartig
+einer Kontrolle zu unterziehen. Dass sie dies nicht getan habe, gereiche ihr
+zum Verschulden. Dass die Beklagte werktäglich bis zu 1.000 Fahrräder
+produziere, sei in diesem Zusammenhang ohne Belang. Gegebenenfalls hätte
+sich die Beklagte entsprechende Materialprüfungszertifikate für die aus
+Tschechien angelieferten Teile beschaffen müssen (OLG Oldenburg, Az. 8 U
+301/04). Zur Pressemitteilung des OLG Oldenburg
+
+# Nach einem Unfall sind Radler nicht für ihre eigenen Verletzungen
+mitverantwortlich, nur weil sie keinen Helm getragen haben. Radfahrer seien
+nicht gesetzlich verpflichtet, einen Kopfschutz zu tragen. Deshalb könne
+ihnen der Verzicht auf einen Helm nicht zur Last gelegt werden, urteilten
+die Richter. Im verhandelten Fall war eine Fahrradfahrerin auf einem Radweg
+auf die linke Seite geraten und gegen eine entgegenkommende Fahrradfahrerin
+geprallt. Diese stürzte und zog sich eine Platzwunde und eine
+Gehirnerschütterung zu. Wegen monatelanger Arbeitsunfähigkeit sprach das
+Oberlandesgericht der Hausfrau 5.000 DM Schmerzensgeld und eine
+Entschädigung in Höhe von rund 14.000 Mark zu. Die Einwände der Beklagten
+und der Haftpflichtversicherung, daß die Frau ohne Helm gefahren und deshalb
+an ihren Verletzungen Mitschuld sei, ließ das Gericht nicht gelten (OLG
+Nürnberg, Az. 8 U 1893/99 ebenso: OLG Nürnberg, Az. 3 U 2574/90 und OLG
+Karlsruhe, Az. 1 U 94/89).
+
+# Wenn ein Fahrradfahrer bei einem Verkehrsunfall keinen Schutzhelm getragen
+hat, mindert dies nicht seine Schadensersatzansprüche. So entschied das OLG
+Hamm. Zwar sei das Tragen von Schutzhelmen bei Erwachsenen inzwischen weit
+verbreitet, allerdings werde nicht einmal ernsthaft darüber diskutiert, dies
+zur gesetzlichen Pflicht zu machen. Nach Auffassung der Richter bestehe
+keine allgemeine Überzeugung davon, daß das Tragen von Fahrradhelmen zum
+notwendigen Eigenschutz des Radfahrers erforderlich sei. Infolgedessen hafte
+der Unfallverursacher auf vollen Schadensersatz, den Radfahrer treffe kein
+anspruchsminderndes Mitverschulden (OLG Hamm, Az. 27 U 93/00) Mit dem Urteil
+wurde die Entscheidung der Vorinstanz (LG Bochum) bestätigt.
+
+# Fahrradfahrer, die bei einem Unfall eine Kopfverletzung erleiden, müssen sich
+ein Mitverschulden anrechnen lassen, wenn sie keinen Helm getragen haben. Das
+gilt zumindest dann, wenn sie mit einem Rennrad unterwegs waren. Der Kläger
+befuhr im Juli 2007 mit seinem Rennrad einen als Fuß- und Radweg
+gekennzeichneten geteerten Weg, als ihm von dem Fahrer eines VW-Busses die
+Vorfahrt genommen wurde. Bei der anschließenden Kollision erlitt er unter
+anderem eine schwere Kopfverletzung. Doch weil er ohne Fahrradhelm unterwegs
+war, wollte ihm der Versicherer des Unfallverursachers nur einen Teil seines
+Schadens ersetzen. (OLG München 3. März 2011, Az.: 24 U 384/10).
+
+# Ob im konkreten Fall ein Helm die Unfallfolgen gemindert hätte, muss vom Kläger
+nachgewiesen werden. (LG Koblenz, DAR 2011, 395)
+
+# Einen Radfahrer trifft keine Schuld, wenn er über ein temporär im Rahmen
+einer Veranstaltung gelegtes, nicht gesondert gekennzeichnetes Kabel stürzt.
+Im konkreten Fall waren vom Veranstalter an mehreren Stellen Kabel über den
+Radweg gelegt worden. Die Kabel waren mit Kabelbrücken oder Gummimatten und
+schwarz-gelbem Klebeband gekennzeichnet. Bei einem Kabel fehlte jedoch das
+schwarz-gelbe Klebeband, so dass der Radfahrer das Kabel im Dunkeln trotz
+eingeschalteter Fahrradbeleuchtung nicht gesehen hat und darüber stürzte.
+Auch wenn im fraglichen Bereich das Schild "unebene Fahrbahn" (Z. 112 StVO)
+aufgestellt war, musste der Radfahrer nicht mit "getarnten Kabeln" rechnen.
+Der Veranstalter ist somit voll schadenersatzpflichtig (AG Köln, Az. 261 C
+118/02).
+
+# Ein Radfahrer, der nachts verbotswidrig durch eine Fußgängerzone fährt,
+muss dabei mit Hindernissen rechnen. Stürzt er beispielsweise über einen
+Betonpoller, kann er nicht die zuständige Kommune haftbar machen. Dies folgt
+aus einem Urteil des Thüringer Oberlandesgerichts. Die Richter wiesen die
+Klage einer Frau ab, die mit ihrem Rad im Dunkeln auf einem nur Fußgängern
+vorbehaltenen Straßenabschnitt über einen Poller gestürzt war und sich
+erheblich verletzt hatte. Dort sei Fahrrad fahren verboten gewesen. Die
+Klägerin habe deshalb den Weg außerhalb seiner Freigabe benutzt. Damit
+bestehe ihr gegenüber keine Verkehrssicherungsplicht. Die Gemeinde sei auch
+nicht zu Sicherheitsmaßnahmen gegenüber verbotswidrig handelnden Personen
+verpflichtet gewesen, hieß es weiter. Vor der Fußgängerzone und dem Poller
+sei eine verkehrsberuhigte Zone angeordnet gewesen, wo auch Radfahrer nur in
+Schrittgeschwindigkeit hätten fahren dürfen. Die Entfernung zwischen den
+Pollern und dem Ort, wo die Klägerin nach ihrem Sturz gelegen habe, belege
+aber, dass sie wesentlich schneller als Schrittgeschwindigkeit gefahren sei.
+Mit einem solchen verbotswidrigen Verhalten habe die Kommune nicht rechnen
+müssen (OLG Thüringen, Az 3 U 559/01).
+
+# Die beiden Teile eines kombinierten Fuß- und Radweges dürfen zum Schutz
+der Fußgänger statt durch rein optisch wirkende Maßnahmen auch durch eine
+Kante getrennt werden, die die Radfahrer davon abhält, auf den Gehwegteil
+auszuweichen. Außerdem muss jedem Verkehrsteilnehmer (hier: Radfahrer)
+bekannt sein, dass sich bei der Einfahrt in einen Tunnel wegen des Wechsels
+der Lichtverhältnisse die Sichtmöglichkeiten verändern, weil das Auge zu
+Anpassungsreaktionen gezwungen ist. Eine Radfahrerin war in einem Tunnel,
+durch den ein kombinierter Fuß- und Radweg geführt wird, gegen eine
+Trennkante zwischen den beiden Wegteilen gefahren und dabei gestürzt. Sie
+behauptet, sie habe die fünf bis zehn cm hohe Kante in dem nicht ausreichend
+beleuchteten Tunnel nicht erkennen können. Das Gericht urteilte, dass die
+Klägerin von der Trennung der beiden Wegteile nicht überrascht wurde, da
+schon vor Erreichen des Tunnels die Trennung deutlich erkennbar war. Dass
+Trennungen nicht kontinuierlich in derselben baulichen Weise fortgeführt
+werden müssen, sondern ein Wechsel eintreten kann, musste der Klägerin
+bekannt sein. Trennungen zwischen Gehweg und Radweg durch Niveauunterschiede
+sind ein häufig eingesetztes technisches Mittel zur Abgrenzung der Wegteile.
+Auf die Sichtverhältnisse im Tunnel musste sich die Klägerin ebenfalls
+einstellen. Es muss jedem Verkehrsteilnehmer bekannt sein, dass sich bei
+einem starken Wechsel der Lichtverhältnisse die Sichtmöglichkeiten
+verändern, weil das Auge zu Anpassungsreaktionen gezwungen ist. Die Klägerin
+hätte ihre Geschwindigkeit an ihre individuellen Sichtmöglichkeiten
+angesichts des erkennbaren Tunnels anpassen müssen. Im Übrigen hätte sie den
+Unfall vermieden, wenn sie einfach geradeaus weitergefahren wäre; der Radweg
+verläuft im Tunnel ohne jede Biegung. Die Klägerin kann sich im Übrigen
+nicht darauf berufen, sie habe am äußersten rechten Rand des Radwegteils
+fahren dürfen. Zu einem Sturz konnte es nur kommen, wenn die Räder die Kante
+berührten, dabei aber Lenker und weitere Radteile bereits unerlaubt in den
+Gehwegteil hineinragten (OLG Celle, Az. 9 U 190/00).
+
+# Sofern der Reisende die ihm obliegenden Pflichten zur Sicherung seines
+Fahrrades im Fahrradabteil der Deutschen Bundesbahn erfüllt, ist die Bahn
+als Frachtführer und Vertragspartner des Beförderungsvertrages verpflichtet,
+dem Reisenden ein während der Bahnfahrt gestohlenes Fahrrad entsprechend des
+Verkehrswertes zu ersetzen. (AG Hannover, Az. 510 C 4031/00, LG Hannover,
+Az. 3 S 1238/00). Das Urteil im Volltext ...
+
+
+
+ Hindernisse auf dem Radweg
+(siehe auch Haftung bzw. Geh-/Radwegbeschaffenheit)
+
+# Radfahrer müssen ihre Geschwindigkeit den Sichtverhältnissen anpassen und
+aufmerksam sein. Mit dieser Begründung wies das Landgericht Itzehoe die
+Klage einer Radfahrerin auf 1.800 DM Schadenersatz und Schmerzensgeld
+zurück. Sie war mit Licht im Dunkeln gegen einen rot-weißen Pfosten auf dem
+Radweg gefahren und hatte sich schwer verletzt (LG Itzehoe, Az. 3 O 612/00).
+
+# Ein Fahrradfahrer hat grundsätzlich keinen Anspruch auf Schadenersatz
+gegen die Stadt oder gegen die Gemeinde, wenn er mit einem Sperrpfosten
+kollidiert. In dem verhandelten Fall war eine Fahrradfahrerin mit einem
+Sperrpfosten aus Metall zusammengestoßen. Die Kommune hat den Pfosten
+installiert, um den Kraftfahrzeugverkehr von einer Promenade fernzuhalten.
+Der Pfosten stelle kein Verkehrshindernis dar, sondern eine rechtlich
+zulässige Verkehrseinrichtung. Vielmehr habe die Radfahrerin ihre
+Sorgfaltspflichten verletzt. Denn ein Fahrradfahrer dürfe nicht blind darauf
+vertrauen, daß sich ihm nichts in den Wege stelle. Dies gelte erst recht
+hinsichtlich zulässiger Verkehrseinrichtungen (OLG Rostock, Az. 1 U
+144/2001).
+
+# Mit einem lange erwarteten Urteil hat das Kölner Oberlandesgericht endlich
+für klare Verhältnisse in Wald und Flur gesorgt. Das OLG gab einem
+Mountainbiker Recht, der beim Abbiegen von einer Gemeindestraße in einen
+Waldweg über einen in ca. einem Meter Höhe quer über den Weg gespannten
+Weidezaun gefahren und gestürzt war. In der Berufungsinstanz - das
+Landgericht Kön hatte die Schadensersatzforderungen des Gestürzten noch
+abgewiesen - gab das Oberlandesgericht an, daß auch Landwirte das
+Freizeitverhalten von Radfahren zur Kenntnis zu nehmen hätten. Der verklagte
+Landwirt hatte sich damit verteidigt, daß er den Draht nach dem Viehauftrieb
+abgenommen und ins Gras gelegt habe. Dies war nach Auffassung des OLG nicht
+ausreichend. Der Bauer habe keine Sicherung dagegen getroffen, dass andere
+Personen den Draht mißbräuchlich über den Weg spannten, was in der
+Vergangenheit schon vorgekommen sei (OLG Köln, Az. 19 U 109/97).
+
+# Einen Radfahrer trifft keine Schuld, wenn er über ein vorübergehend im
+Rahmen einer Veranstaltung gelegtes, nicht gesondert gekennzeichnetes Kabel
+stürzt. Im konkreten Fall waren vom Veranstalter an mehreren Stellen Kabel
+über den Radweg gelegt worden. Die Kabel waren mit Kabelbrücken oder
+Gummimatten und schwarz-gelbem Klebeband gekennzeichnet. Bei einem Kabel
+fehlte jedoch das schwarz-gelbe Klebeband, so dass der Radfahrer das Kabel
+im Dunkeln trotz eingeschalteter Fahrradbeleuchtung nicht gesehen hat und
+darüber stürzte. Auch wenn im fraglichen Bereich das Schild "unebene
+Fahrbahn" (Z. 112 StVO) aufgestellt war, musste der Radfahrer nicht mit
+"getarnten Kabeln" rechnen. Der Veranstalter ist somit voll
+schadenersatzpflichtig (AG Köln, Az. 261 C 118/02).
+
+# Mülltonnen müssen verkehrssicher abgestellt werden. Sie dürfen keine
+Hindernisse für die Verkehrsteilnehmer bilden. Daher haftet die zuständige
+Gemeinde, wenn unachtsam hinterlassene Tonnen zu einer Verletzung von
+Verkehrsteilnehmern führen (OLG Hamm, Az. 9 U 218/95).
+
+# Ein Blumenkübel, der innerorts auf einer Straße aufgestellt wird, ist so
+kenntlich zu machen, daß er von einem Radfahrer auch in der Dunkelheit
+rechtzeitig erkannt werden kann (OLG Celle, Az. 9 U 129/89).
+
+
+
+ Radwegebenutzung
+(siehe auch Gehwegbenutzung bzw. Nichtbenutzung von Radwegen)
+
+# Fußgänger, die einen für Fußgänger und Radfahrer vorbehaltenen Sonderweg
+[Anm: Gemeinsamer Geh- und Radweg] benutzen, können den von ihnen
+bevorzugten Wegteil frei wählen. Sie brauchen, da dort Radfahrer keinen
+Vorrang haben, nicht fortwährend nach Radfahrern, die etwa von hinten
+herankommen können, Umschau zu halten. Sie dürfen darauf vertrauen, daß
+Radfahrer rechtzeitig durch Glockenzeichen auf sich aufmerksam machen, um
+dann aber eine Passage freizugeben. Eine Mutter, die in einer
+Fußgängergruppe mit ihrem 3 1/2jährigen Kind geht, genügt ihrer
+Aufsichtspflicht, wenn sie das Kind vor sich hergehen läßt und es im Auge
+behält. Sie braucht ihm auch einen Ball, den es ruhig im Arm hält, nicht
+wegzunehmen. Kommt es später zu einem Unfall, weil ein Radfahrer gegen den
+heruntergefallenen Ball fährt, trifft die Mutter keine Verantwortung durch
+den Unfall (KG Berlin, Az. 22 U 3319/76).
+
+# Ein Radfahrer, der einen für beide Richtungen freigegebenen Radweg
+benutzt, darf auf dieser Seite auch dann bleiben, wenn auf der für ihn
+rechten Fahrbahnseite ein neuer Radweg beginnt und der Radweg auf der linken
+Seite nicht mehr für diese Richtung freigegeben ist. Dies gilt nur dann
+nicht, wenn durch einen eindeutige Fahrbahnmarkierung oder eindeutige
+Verkehrsschilder der Radverkehr auf die andere Straßenseite umgeleitet wird
+(BGH, Az. VI ZR 310/95).
+
+# Auf einem innerstädtischen 2,3 m breiten Radweg, auf dem die Sicht zur
+Fahrbahn hin durch parkende Autos beschränkt ist, darf ein Radfahrer nicht
+mit einer Geschwindigkeit von 25-30 km/h fahren (KG Az. 12 U 2931/83).
+
+# Ein Fußgänger muß nach einer Kollision mit einem Fahrradfahrer auf einem
+markierten Radweg für den entstandenen Schaden haften. Geklagt hatte eine
+Radfahrerin, die auf dem Radweg mit einem unaufmerksamen 80jährigen Rentner
+zusammengeprallt war. Die Frau hatte sich bei dem Sturz erhebliche
+Verletzungen zugezogen und verlangte Schadenersatz und Schmerzensgeld. Die
+Haftpflichtversicherung des Rentners machte vergeblich geltend, die Frau
+trage ein Mitverschulden, weil sie mit unvorsichtigen Fußgängern rechnen
+müsse. Dagegen erklärten die Richter, die Klägerin habe darauf vertrauen
+können, daß ihr auf dem markierten Radweg Vorfahrt gewährt werde (OLG Hamm,
+Az. 13 U 76/98).
+
+# Ein Fußgänger ist zur Zahlung von 2.000 DM Schadenersatz verurteilt
+worden, nachdem er auf einem Radweg von einem Radfahrer angefahren wurde.
+Dem Radfahrer war keine Pflichtverletzung nachzuweisen, da sich der Unfall
+auf einem Radweg ereignete (LG Bonn, Az. 2 S 1/97).
+
+# Auch Rennradfahrer müssen öffentliche Radwege benutzen. Die Richter mußten
+über eine gegen die Stadt Köln gerichtete Schadensersatz- und
+Schmerzensgeldklage eines Rennradfahrers entscheiden, der sich bei einem
+Sturz durch ein Schlagloch in der Fahrbahndecke einer Kölner Straße
+erheblich verletzt hatte. Der Rennradfahrer hatte argumentiert, die Stadt
+Köln habe durch das Nichtbeseitigen des Schlaglochs ihre
+Verkehrssicherungspflicht verletzt. Selbst wenn dies der Fall wäre, so
+argumentierten die Richter in der Urteilsbegründung, habe der Radfahrer ein
+erhebliches Mitverschulden an dem Unfall, denn auch als Rennradfahrer hätte
+er die beiderseits der Fahrbahn vorhandenen, ausgeschilderten Radwege
+benutzen müssen (LG Köln, Az. 5 O 310/98).
+
+# Radwegebenutzungspflicht hängt nicht davon ab, ob an Kreuzungen rechtsabbiegenden
+Fahrzeugen abweichend von § 9 Abs. 3 Satz 1 StVO die Vorfahrt eingeräumt wird
+(vgl. VwV-StVO I zu § 9 Abs. 3).
+# Radfahrer dürfen neben blockierten Radwegen nicht auf der Fahrbahn fahren,
+sondern müssen sich vor der Benutzung eines Radwegs ortskundig machen oder aber
+gegebenenfalls angesichts von Hindernissen diese entweder überwinden oder aber
+unter Inkaufnahme eines Umwegs umkehren.
+ (VGH Baden-Württemberg, Mannheim, 05.12.2002 - 5 S 2625/01)
+
+
+ Benutzung linker Radwege/"Geisterradler"
+
+# Wer einen Radweg in der falschen Richtung befährt und dabei mit einem
+anderen Radfahrer zusammenstößt, muss selbst dann für zwei Drittel der
+Unfallfolgen haften, wenn der Entgegenkommende zu schnell und unaufmerksam
+gefahren ist (OLG Celle, Az. 14 U 149/01). [Mehr dazu ...]
+
+# Das Vorfahrtsrecht eines Radfahrers bleibt auch bei verbotswidrigem
+Benutzen eines linken Radweges erhalten. Dies entschied das OLG Düsseldorf.
+Weit verbreitet ist die Unkenntnis unter Radfahrern, daß Radwege nur in
+bestimmte Richtungen (Blickrichtung des Verkehrsschildes) freigegeben sind.
+Nur in die Richtung, in der das Verkehrsschild (Radfahrer auf blauem Grund)
+zu sehen ist, darf der Radweg von Radfahrern auch benutzt werden. Oftmals
+ist es so, daß gerade die Radfahrer, die einen Radweg in verkehrter Richtung
+benutzen, in einen Verkehrsunfall verwickelt werden, da Kraftfahrer "in die
+falsche Richtung schauen". Die Frage, ob hierdurch der Radfahrer auch sein
+Vorfahrtsrecht verliert, wenn er einen Radweg auf der Vorfahrtsstraße in
+verkehrte Richtung benutzt, ist in der Rechtsprechung der Oberlandesgerichte
+umstritten. So verneint das Oberlandesgericht Bremen (DAR1997, Seite 272
+ff.) das Vorfahrtsrecht. Hingegen hat das Oberlandesgericht Hamm bereits in
+mehrfachen Entscheidungen das Vorfahrtsrecht bejaht. Nunmehr hat sich auch
+das Oberlandesgericht Düsseldorf der Ansicht des Oberlandesgerichts Hamm
+angeschlossen und gibt auch dem verbotswidrigfahrenden Radfahrer weiterhin
+das Vorfahrtsrecht (OLG Düsseldorf, NZV 2000, Seite 506).
+
+# Radwege, die als Sonderwege Einbahnstraßen zugeordnet sind, dürfen
+vorbehaltlich anderweitiger ausdrücklicher Regelung (Zeichen 237) nur in der
+vorgeschriebenen Richung der Einbahnstraße benutzt werden. Wer
+Einbahnstraßen und diesen zugeordnete Radwege in der gesperrten Richtung
+befährt, hat auch gegenüber aus untergeordneten Straßen einmündenden oder
+kreuzenden Verkehrsteilnehmern keine Vorfahrt. Indessen besteht, soweit es
+sich um einen Radweg handelt, für den Benutzer der untergeordneten Straßen
+ausnahmsweise die Pflicht, in zumutbarem Maße auch auf Verkehrsteilnehmer zu
+achten, die den Radweg in der verbotenen Richtung benutzen
+(BGH, VI ZR 296/79).
+
+# Es besteht eine Wartepflicht des ein Grundstück verlassenen Kraftfahrers
+auch gegenüber einem Radfahrer, der einen vor der Fahrbahn verlaufenden
+Radweg in verkehrter Richtung befährt (KG Berlin, Az. 12 U 6697/91).
+
+# Der Fahrer eines nach rechts abbiegenden Pkw, der das Vorrecht eines
+kreuzenden Radweges zu beachten hat, muß auch mit Radfahern rechnen, die den
+Radweg unberechtigterweise in Gegenrichtung nutzen. Auch bei einem
+derartigen Verstoß entfällt das Vorfahrtsrecht des Radfahrers nicht. Der
+verkehrswidrig den linken Radweg benutzende Radfahrer muss bedenken, daß
+Kraftfahrer bei einem Einbiegen auf eine Vorfahrtsstraße nach rechts häufig
+mit für sie von rechts kommenden Radfahrern nicht rechnen
+(OLG Hamm, Az. 9 U 208/94).
+
+# Ein Autofahrer, der nach rechts in eine vorfahrtstraße abbiegt und dabei
+einen Radweg kreuzt, muß damit rechnen, daß ein Radfahrer vorschriftswidrig
+in falscher Richtung auf dem Radweg färt. Allerdings wird dem Radfahrer eine
+Mitschuld angerechnet (OLG Hamm, Az. 6 U 68/96).
+
+# Passiert ein Unfall, weil ein Radler in falscher Richtung auf dem Radweg
+fährt, haften Autofahrer und Radler zu gleichen Teilen. Der Autofahrer hätte
+wissen müssen, daß Radfahrer häufig verbotswidrig Radwege in falscher
+Richtung benutzen. Umgekehrt hätte die Radfahrerin mit plötzlich
+auftauchenden Autos rechnen müssen. (OLG Hamm, Az. 9 U 12/98).
+
+# Durch eine verbotswidrig - gegen das für Radfahrer in § 2 Abs. 4 Satz 2
+StVO festgelegte Rechtsfahrgebot verstoßende - Benutzung des linken Radwegs
+in entgegengesetzter Fahrtrichtung wird ein bestehendes Vorfahrtsrecht nicht
+aufgehoben (i.A. an BGH, NJW 1986, 2651) (LG Hamburg, Az. 81 S 112/89).
+
+# Ein Radfahrer, der - zwar vorfahrtsberechtigt, aber verkehrswidrig - den
+linken Radweg benutzt und im Einmündungsbereich einer Straße mit einem
+einbiegenden Kraftfahrzeug zusammenstößt, trägt eine Mitschuld (LG Hannover,
+Az. 3 S 302/87).
+
+# Ein Radfahrer, der einen Radweg in falscher Richtung befährt, haftet in
+vollem Umfang, wenn ihm ein in richtiger Richtung auf einem Fahrrad
+fahrendes Kind entgegenkommt, durch die falsche Fahrweise verunsichert wird,
+stürzt und sich dabei verletzt (LG Nürnberg-Fürth, Az. 2 S 6548/90).
+
+# Ein Radfahrer, der verkehrswidrig den linken Radweg benutzt, verliert zwar
+nicht das Vorfahrtsrecht gegenüber einem aus der untergeordneten Straße
+kommenden Kraftfahrer. Er hat jedoch bei einem Zusammenstoß mit einem
+Kraftfahrzeug 1/4 seines Schadens selbst zu tragen
+(AG Köln, Az. 262 C 517/88).
+
+# Auch nach dem Inkrafttreten der StVO-Novelle 1980, die dem Radfahrer
+grundsätzlich die Benutzung der rechten Radwege gebietet, dürfen sich
+Kraftfahrer nicht blindlings darauf verlassen, daß Radfahrer linke Radwege
+nicht benutzen. Wenden sie beim Einbiegen nach rechts ihre Aufmerksamkeit
+nur in die linke Richtung, so haben die Kraftfahrer bei einem Zusammenstoß
+mit einem auf dem linken Radweg entegegenkommenden Radfahrer einen Teil des
+Schadens selbst zu tragen (hier 1:2) (AG Köln, Az. 266 C 219/81).
+
+# Ein Radfahrer auf der Vorfahrtsstraße behält auch dann sein Vorfahrtsrecht
+gegenüber kreuzenden oder einbiegenden Fahrzeugen, wenn er den linken von
+zwei vorhandenen Radwegen benutzt, der nicht für die Gegenrichtung
+freigegeben ist (BGH, Az. 4 StR 192/86).
+
+# Auch ein Radfahrer, der den Radweg auf der falschen Straßenseite befährt,
+hat gegenüber dem aus der Seitenstraße kommenden Verkehrsteilnehmer den
+Vortritt (KG Berlin, Az. 12 U 6697/91).
+
+# Der in eine Vorfahrtstraße mit Radweg einbiegende muß auch dann mit
+Radfahrern rechnen, die den Radweg in falscher Richtung benutzen, wenn es
+sich um eine durch begrünten Mittelstreifen unterteilte Ortsstraße handelt
+(OLG Hamm, Az. 27 U 241/91).
+
+# Ein Radfahrer, der den Radweg gegen die forgeschriebene Fahrtrichtung
+befährt, hat keine Vorfahrt gegenüber Autos, die aus Seitenstraßen kommen
+und den Radweg kreuzen. Im konkreten Fall war ein Radfahrer gegen die
+Fahrtrichtung auf einem Radweg gefahren und darum von einer abbiegenden
+Autofahrerin zu spät wahrgenommen worden. Das Gericht vertrat die
+Auffassung, daß die nach dem Unfall querschnittgelähmte Radfahrerin zu
+dreifünftel am Unfall selbst schuld war. Es gab zur Begründung an, daß sich
+der Autofahrer normalerweise auf die zulässige Fahrtrichtung konzentriere
+(OLG Bremen, Az. 3 U 69/96).
+
+# Ein Radfahrer, der auf einer bevorrechtigten Straße verbotswidrig den -
+nicht freigegebenen - linksläufigen Radweg befährt, hat nur ein erheblich
+abgeschwächtes Vorfahrtsrecht (AG Köln, Az. 266 C 527/92).
+
+# Kollidiert ein den Radweg in falscher Richtung befahrender Radfahrer im
+Einmündungsbereich zweier Straßen mit einem wartepflichtigen Pkw, so trifft
+den Radfahrer das alleinige Verschulden, wenn die Sicht durch einen in der
+am Einmündungsbereich in einer Parkbucht abgestellten Lkw für den Pkw-Fahrer
+stark eingeschränkt war. Die Betriebsgefahr des Pkw tritt in derartigen
+Fällen hinter dem grob fahrlässigen Verhalten des Radfahrers zurück
+(LG Nürnberg-Fürth, Az. 8 S 9525/91).
+
+# Befährt ein Radfahrer unter vorsätzlichem Verstoß gegen § 2 Abs. 4 Satz 2
+StVO den in seiner Fahrtrichtung linken Radweg, ist dies für einen Unfall
+mit einem entgegenkommenden Radfahrer und dessen Verletzung ursächlich. Die
+Verurteilung wegen fahrlässiger Körperverletzung setzt aber voraus, daß der
+Unfall für ihn als Folge seines verkehrswidrigen Verhaltens auch
+voraussehbar war, so z.B. wenn der Radweg wegen seiner geringen Breite nicht
+für eine gefahrlose Begegnung zweier Radfahrer ausreicht.
+
+# Ein Radfahrer, der einen für beide Richtungen freigegebenen Radweg
+benutzt, darf auf dieser Seite auch dann bleiben, wenn auf der für ihn
+rechten Fahrbahnseite ein neuer Radweg beginnt und der Radweg auf der linken
+Seite nicht mehr für diese Richtung freigegeben ist. Dies gilt nur dann
+nicht, wenn durch einen eindeutige Fahrbahnmarkierung oder eindeutige
+Verkehrsschilder der Radverkehr auf die andere Straßenseite umgeleitet wird
+(BGH, Az. VI ZR 310/95).
+
+# Zwei auf dem linken Radweg verkehrswidrig fahrende Radfahrer tragen die
+Gesamtschuld an einem Unfall, bei dem ein entgegenkommender,
+vorschriftsmäßig fahrender Radler stürzte. Das Verschulden des gestürzten
+Radlers, weil dieser zu spät auswich, wurde vom Gericht als gering
+angesehen, zumal die verkehrswidrig fahrenden Radler zum Ausweichen
+verpflichtet gewesen wären. Die Unfallverursacher wurden auch zur Zahlung
+von Schmerzensgeld verurteilt (OLG Celle, Az. 14 U 103/04 vom 2. Dezember
+2004, Urteil der Vorinstanz: LG Hannover vom , Az. 20 O 315/03 ).
+
+#Das OLG Celle (Urt.v.02.12.2004 - 14 U 103/04, MDR 2005, 504), hat zwei
+nebeneinander, auf dem linken (dann gab es also auch einen rechten!) Radweg,
+fahrenden Radfahrern die Vollschuld für einen wegen ihnen ausweichenden, und
+dadurch gestürzten, Radler gegeben.
+
+
+ Seitenabstand/Überholen
+
+# Die ununterbrochene Mittellinie (Z. 295) und die Sperrfläche (Z. 298) sprechen
+zwar ein Überholverbot nicht unmittelbar aus. Ein Radfahrer darf aber darauf
+vertrauen, daß ein nachfolgender Kraftfahrer ihn nicht überholt, wenn dies bei
+dem gebotenen seitlichen Abstand nur durch Inanspruchnahme des abgegrenzten
+Fahrstreifens oder der Sperrfläche möglich ist (BGH, VI ZR 66/86).
+
+# Ein Autofahrer hat beim Überholen eines Radlers mindestens 1,5 Meter
+Seitenabstand zu halten. Ein Autofahrer hatte einen Radfahrer verklagt, weil
+dieser beim Überholtwerden einen Schlenker gemacht hatte und der Autofahrer
+deshalb in den Straßengraben gefahren ist. Bei einer Geschwindigkeit von 90 km/h
+hätte er sogar zwei Meter Abstand halten müssen (OLG Hamm, Az. 9 U 66/92). Anm.:
+Der Seitenabstand beim Überholen wird in der Straßenverkehrsordnung (StVO) nicht
+genau geregelt, dort ist nur von "ausreichendem Seitenabstand" die Rede. Das
+Urteil aus Hamm bestätigt andere, ältere Urteile, die ebenfalls Größenordnungen
+von – je nach Sachlage – 1,5 bis 2 Meter vorschreiben. Die StVO regelt außerdem,
+daß der Überholte beim Wiedereinscheren nicht behindert werden darf.
+
+# Bei Steigungen ist mit größeren Schwankungen von Radfahrern zu rechnen.
+Deshalb ist an Steigungen beim Überholen ein Mindestabstand von 2 Metern
+einzuhalten (OLG Frankfurt/Main, Az. 2 Sa 478/80).
+
+# Der Führer eines Lastzuges handelt verkehrswidrig, wenn er, und sei es auch
+mit Schrittgeschwindigkeit, ein anderes Fahrzeug überholt oder an einem
+parkenden Fahrzeug vorbeifährt, obwohl er infolge der Einhaltung eines
+genügenden Abstandes von diesem einem entgegenkommenden Radfahrer einen
+Zwischenraum von nur 1,15 m zwischen seinem Lastzug und dem Bordstein einräumen
+kann (BGH, 4 StR 169/57).
+
+# Ein Lkw-Fahrer handelt fahrlässig, wenn er eine Radfahrerin, die ein
+Kindergartenkind auf dem Fahrrad mit sich führt, mit einem Seitenabstand von
+einem Meter überholt; zwei Meter wären erforderlich gewesen
+(OLG Karlsruhe, 10 U 102/88).
+
+#Verringert ein Busfahrer den notwendigen Abstand zum Bürgersteig von 1,50 m
+(mindestens 1,35 m) auf weniger als 1 m, um an eine Haltestelle heranzufahren,
+haftet er zu 100 % gegenüber dem überholten Radfahrer
+(KG, Urteil vom 12. 9. 2002 - 12 U 9590/00 = NZV 2003, 30).
+
+# Hält ein Radfahrer von dem unmittelbar neben der Fahrbahn verlaufenden Gehweg
+einen Abstand von 75 bis 80 cm, so hat er in aller Regel gegenüber den Benutzern
+des Gehweges seinen Pflichten aus § 1 StVO erfüllt (BGH, Az. VI ZR 66/56).
+
+# Wird ein Radfahrer, der statt des vorhandenen Radwegs die Fahrbahn benutzt,
+von einem überholenden Pkw angefahren und verletzt, muß er wegen seines
+Mitverschuldens 25 % seines Schadens selbst tragen. Das Ergebnis der
+Beweisaufnahme hatte ergeben, daß der Kfz-Fahrer entweder zu spät reagiert hat
+oder zu schnell gefahren war. Beide Alternativen begründen sein überwiegendes
+Verschulden an dem Unfall. Der Radfahrer muß jedoch wegen eigenen
+Mitverschuldens eine Anspruchskürzung hinnehmen. Der Radfahrer hat gegen § 2
+Abs.4 StVO verstoßen, indem er dieFahrbahn benutzt hat, obwohl rechts daneben
+ein Radweg verlief. Dieses Verhalten ist auch unfallursächlich geworden. Das
+Gebot zur Radwegbenutzung dient nicht nur dazu, den Radfahrer wegen seiner
+schlechteren Erkennbarkeit zu schützen, sondern soll allgemein den Rad- und
+Motorfahrverkehr trennen (OLG Hamm, Az. 6 U 91/93).
+
+# Beginnt auf der linken Seite der Fahrbahn ein benutzungspflichtiger Radweg, so
+muß bei einem Überholvorgang ein Radfahrer damit rechnen, daß der vorausfahrende
+nach links abbiegt. Stoßen beide zusammen, weil der Abbiegende kein Handzeichen
+gab, so muß der Überholende die Hälfte seines eigenen Schadens tragen (LG
+Nürnberg-Fürth, Az. 2 S 4512/95).
+
+# Radfahrer müssen einen ausreichenden Sicherheitsabstand vom rechten
+Fahrbahnrand und insbesondere von parkenden Kraftfahrzeugen einhalten. Der
+Abstand muß so bemessen sein, daß den Radfahrer eine sich öffnende Autotür nicht
+in eine Gefahrensituation bringen kann (LG Berlin, Az. 24 O 466/95).
+
+# Bei dichtem Verkehr genügt es, wenn ein Radfahrer nur 40 cm Seitenabstand zu
+parkenden Autos einhält. Kommt es zu einer Kollision mit einer vom Autofahrer
+geöffneten Autorür, trifft den Autofahrer die alleinige Schuld (OLG Celle, Az. 5
+U 327/86).
+
+# Ein Radfahrer darf bei Dunkelheit und Regen auf stark befahrener Straße nicht
+weiter als 1 m vom rechten Fahrbahnrand fahren (OLG Saarbrücken, Az. 3 U
+186/77).
+
+# Ein Radfahrer, der als erster zu einer engen Stelle der Fahrbahn kommt, hat
+Vorfahrt. Ein entgegenkommendes Auto muß dann mindestens einen Meter
+Seitenabstand zu dem Radler halten können, auch wenn es langsam mit Tempo 30
+fährt. Ist der Abstand wegen des Engpasses nicht möglich, muß der Autofahrer
+warten (OLG Hamm, Az. 6 U 163/96).
+
+# Radfahrer untereinander brauchen beim Überholen nicht einen Sicherheitsabstand
+von 1,50 bis 2 m einzuhalten, wie er beim Überholen von Radfahrern durch Kfz
+erforderlich ist. auf einem 1,70 m breiten Radweg darf ein Radfahrer jedenfalls
+dann überholen, wenn er seine Überholabsicht durch Klingeln angezeigt und der
+Vorausfahrende dies wahrgenommen hat (OLG Frankfurt/M., 17 U 129/88).
+
+# Ein Radfahrer, der einen vor ihm auf einem Radweg fahrenden anderen Radfahrer
+im Bereich einer Grundstücksausfahrt ohne Klingelzeichen überholen will, haftet
+grundsätzlich nicht für einen Unfall, der sich daraus ergibt, daß der eingeholte
+Radfahrer ohne Handzeichen und Rückschau plötzlich links abbiegt und dadurch mit
+dem Überholenden zusammenstößt. Das Unterlassen der Abgabe eines Klingelzeichens
+steht mit einem solchen Unfall in keinem haftungsrechtlichen Zusammenhang (OLG
+München, 10 U 3728/83).
+
+
+
+ Winterdienst, Herbstlaub
+
+# Beschluß des BGH vom 20.10.1994 - III ZR 60/94, NZV 1995, 144:
+ "Streupflicht auf Gehwegen außerhalb geschlossener Ortschaften"
+
+"... nicht auf einem reinen Gehweg, sondern auf einem kombinierten Geh- und Radweg zu Fall
+kam. Zwar ist gerade ein Radfahrer bei Schnee- und Eisglätte besonderen Sturzgefahren ausgesetzt.
+Diese Gefahr kann er aber - zumutbarerweise - dadurch mindern, daß er entweder vor glatten
+und gefährlichen Stellen vom Rad steigt und zu Fuß geht, oder aber dadurch, daß er - erlaubtermaßen
+- den Radweg verläßt und die (gestreute bzw. geräumte) Fahrbahn benutzt (Jagusch/
+Hentschel, § 2 StVO Rdnr. 67). Es besteht daher kein Grund, außerhalb geschlossener Ortschaften
+die Räum- und Streupflicht von Rad- und Gehwegen unterschiedlich zu beurteilen."
+
+d.h. Radfahrer dürfen laut geltender Rechtssprechung (BGH /AZ: III ZR 60/94 vom 20.10.1994) bei
+vereisten oder nicht geräumten Radwegen auf der Fahrbahn fahren.
+
+
+# Der BGH urteilte 2003:
+"Unabhängig davon, dass das Radfahreraufkommen bei schlechtem Winterwetter
+ohnehin deutlich geringer ist, ist weiter zu bedenken, dass Radfahrer, sofern
+zwar nicht der Radweg, wohl aber die daneben oder in der Nähe verlaufende Fahrbahn
+geräumt oder gestreut ist, die Fahrbahn benutzen dürfen."
+(Senatsbeschluss vom 20.10.1994 aaO, Az III ZR 8/03?).
+
+
+# Ein Radfahrer kann die Sturzgefahr zumutbarerweise dadurch mindern, dass er
+entweder vor glatten und gefährlichen Stellen vom Rad steigt und zu Fuß geht,
+oder aber dadurch, dass er dann erlaubtermaßen den Radweg verlässt und – ggf. –
+die gestreute bzw. geräumte Fahrbahn benutzt (vgl. BGH BGHR BGB § 839 I 1
+Streupflicht 12, Nichtannahmebeschluss vom 20.10.1994 - III ZR 60/94).«
+ OLG Celle 2000
+
+
+# Wer auf einem mit Split gestreuten Radweg fährt und dadurch nicht die gefrorenen
+Spurrillen sieht, sollte zu Fuß weitergehen! Bei einem Sturz kann nicht einmal
+auf eine Teilschuld des Streuers gehofft werden. Die Eigenvorsorge wird hier
+höher bewertet (OLG Celle, Urt.v.23.03.2005 - 9 U 199/04).
+
+# Laub auf dem Radweg. Wer in eine Blätterschicht einfährt und dann
+abschmiert muss Mitschuld tragen. Geschehen bei einer Radfahrerein, die sich
+dabei einen Oberschnenkelhalsbruch zuzog. 60% betrug ihr Anteil (OLG Hamm,
+Urt.v.09.12.2005 - 9 U 170/04)!
+
+# Auch in verkehrsberuhigten Bereichen besteht an gefährlichen Stellen für
+Kommunen eine Streupflicht gegenüber Radfahrern. Gefährliche Stellen sind nach
+Ansicht des Gerichts Straßenabschnitte, an denen Radfahrer erfahrungsgemäß
+bremsen, ausweichen, Fahrtrichtung oder Tempo ändern müssen (OLG Hamm, Az. 9 U
+193/92).
+
+# Die Pflicht zum Bestreuen der Fahrbahn bei Glätte innerhalb geschlossener
+Ortschaften besteht gegenüber allen Verkehrsteilnehmern, die die Straße
+befugt benutzen, insbesondere also auch gegenüber Radfahrern (BGH, Az. III
+ZR 200/63).
+
+# Eine Streupflicht die außerhalb geschlossender Ortschaften an besonders
+gefährlichen Stellen mit erheblicher Verkehrsbedeutung besteht, bezieht sich
+nur auf die für den Kfz-Verkehr bestimmten Fahrbahnen. Zugunsten der
+Fußgänger besteht sie nicht. Eine Streupflicht zugunsten von Fußgängern kann
+auf Gehbahnen, die einzelne Ortsteile verbinden und nur streckenweise über
+unbebautes Gebiet führen, befürwortet werden, wenn eine Verkehrsbedeutung zu
+bejahen ist und die Ortsteile nicht allzuweit auseinander liegen (BGH, Az.
+III ZR 60/94).
+
+# An die Räum- und Streupflicht gegenüber Radfahrern sind grundsätzlich
+keine höheren Anforderungen zu stellen, als sie für die Fahrbahnbenutzung
+durch Kraftfahrzeuge gelten. Das Gericht argumentierte, daß ein Radfahrer
+die Sturzgefahr zumutbarerweise dadurch mindern kann, daß er entweder vor
+glatten und gefährlichen Stellen vom Rad steigt und zu Fuß geht, oder aber
+dadurch, daß er dann erlaubtermaßen den Radweg verläßt und - ggf. - die
+gestreute bzw. geräumte Fahrbahn benutzt (dazu auch BGH, Az. III ZR 60/94)
+(OLG Celle, Az. 9 U 104/00 vom 22.11.2000). Das Urteil im Volltext
+
+# Eine Radfahrerin, die an einem Sonn- oder Feiertag vor 9.00 Uhr auf einer
+öffentlichen Straße ausrutscht, weil die Gemeinde nicht gestreut hat, hat
+keinen Anspruch auf Schmerzensgeld. Dies entschieden die Richter des OLG
+Oldenburg. Die Richter wiesen damit die Klage einer 59 Jahre alten Frau aus
+Hooksiel (Kreis Friesland) auf Schmerzensgeld gegen die Gemeinde ab. Die
+Frau war an einem winterlichen Sonntag vor 9.00 mit dem Fahrrad unterwegs.
+Auf eisglatter Straße stürzte sie und erlitt mehrere Knochenbrüche (OLG
+Oldenburg, Az. 6 U 90/01).
+
+# Einem Radfahrer, der auf einem innerhalb der geschlossenen Ortschaft
+gelegenen gemeinsamen Fuß- und Radweg (Zeichen 240 der StVO) infolge
+Glatteises zu Fall kommt, können Amtshaftungsansprüche wegen Verletzung der
+winterlichen Räum- und Streupflicht gegen die sicherungspflichtige Gemeinde
+auch dann zustehen, wenn dieser Weg nur deshalb geräumt oder gestreut werden
+muss, weil es sich auch und gerade um einen Gehweg handelt. Dies gilt
+ungeachtet des Umstandes, dass sich Inhalt und Umfang der Räum- und
+Streupflicht, sofern sich - wie hier - der Unfallort nicht an einer
+verkehrswichtigen und gefährlichen Stelle befindet, nur nach den Belangen
+der Fußgänger auszurichten hat. Der BGH bekräftigt einerseits den Grundsatz,
+dass der Radfahrer bei nicht gestreuten Radverkehrsanlagen auf die Fahrbahn
+ausweichen kann und muss, um einen Sturz zu vermeiden, drängt andererseits
+aber darauf, bestimmte Geh- (und Rad-)wege seien wegen der Bedeutung des
+Weges für die Fußgänger zu streuen und darauf dürfe sich der Radfahrer auch
+verlassen. Der Weg muss allerdings nur so weit vom Schnee gerämt werden,
+dass zwei Fußgänger aneinander vorbeigehen können (1-1,2 m) (BGH, Az. III ZR
+8/03, Urteil vom 9. Oktober 2003. Das Urteil des OLG Oldenburg, Az. 6 U
+150/02 vom 06.12.2002 wurde damit aufgehoben und die Sache zur weiteren
+Sachaufklärung an das OLG Oldenburg zurückverwiesen). Auszug aus dem Urteil
+
+# Rutscht ein Radfahrer auf einem mit Herbstlaub bedeckten Radweg aus, muss
+die Gemeinde Schadensersatz leisten. Sie darf sich nicht auf turnusgemäße
+Reinigungen des Weges verlassen, sondern muss die Radwege bei starken
+Laubaufkommen häufiger säubern, entschied das Oberlandesgericht Hamm. Kann
+der Radfahrer die Gefahr erkennen, trifft ihn allerdings eine Mitschuld. Im
+vorliegenden Fall schrieben die Richter dem Radler eine Schuld von 60
+Prozent zu. Er hätte wissen müssen, dass sich unter dicken Laubschichten oft
+feuchte und rutschige Blätter befinden. Außerdem wohnte er gegenübe der
+Unfallstelle und musste deshalb die Gefahren kennen. Die Gemeinde musste
+1.800 Euro Schmerzensgeld zahlen (OLG Hamm, Az. 9 U 170/04). Anmerkung: In
+einigen Städten, u.a. Hamburg, liegt die Reinigungspflicht oft beim Anwohner
+und nicht bei der Gemeinde. Herbstlauf verdeckt auch andere
+Sicherheitsrisiken wie Schlaglöcher und Kanten. Bei laubbedeckten Radwegen
+entfällt die Benutzungspflicht für Radwege, man darf auf der Fahrbahn fahren
+– und sollte es auch, um wie im geschilderten Fall bei Stürzen eine
+Mitschuld zu vermeiden.
+
+
+ Fahrradhelm
+
+#Wer mit einem Rennrad ohne Helm auf einer unübersichtlichen Strecke mit 30
+bis 40m km/h fährt, muss sich nicht wundern, wenn seine
+Schadensersatzforderungen jeglicher Art vor Gericht abgewiesen werden.
+OLG Düsseldorf, Urt. v. 12.2.2007, Az. I-1 U 182/06.
+
+# Fehlender Helm: Alltagsradler nicht mitschuldig
+ADFC warnt vor Helmpflicht durch die Hintertür
+Alltagsradler tragen bei Fahrradunfällen nicht schon allein deshalb eine
+Mitschuld, weil sie keinen Fahrradhelm tragen. Das hat das Oberlandesgericht
+(OLG) Düsseldorf entschieden.
+Das OLG sprach einem Radfahrer vollen Schadensersatz zu. Die Richter
+bekräftigten ihre Auffassung, nach der ein Rennradfahrer nur beim Tragen eines
+Schutzhelms vollen Schadensersatz erhalten könne. Die Gründe dafür – eine
+erhöhte Gefährdung und eine weite Verbreitung von Fahrradhelmen bei Fahrern von
+Rennrädern – lägen aber bei Radfahrern, die ein gewöhnliches Fahrrad als
+Fortbewegungsmittel nutzten, nicht vor. Bei ihnen sei das Unfallrisiko und die
+mögliche Eigengefährdung deutlich geringer. In dieser Gruppe gebe es auch (noch)
+kein allgemeines Bewusstsein einer Notwendigkeit, einen Helm zu tragen (Urteil
+vom 18.06.2007, I-1 U 278/06).
+
+# Das LG Krefeld hat mit Urt. v.22.12.2005-3 O 179/05, NZV 2005, 205 entschieden,
+dass bei Unfällen besonders gefährdeter Radler bei Kopfverletzungen eine
+Mitschuld zutreffen kann, wenn dieser keinen Helm trägt. Ein Zehnjähriger war in
+einem privaten Garagenhof von einem Kleinlaster angefahren worden. Rennradfahrer
+könnten durch die höheren Geschwindigkeiten dazu gezählt werden. ABER dabei
+blieb es nicht: Die Berufung vorm OLG Düsseldorf ergab: Zurückweisung an das LG
+mit der Begründung, da nur wenige Kinder und Erwachsene Helm trügen, gebe es
+kein allgemeines Bewußtsein für eine "Eigensicherung" des Radfahrers. Zudem
+lasse das Alter des Kindes keine größere Mitschuld zu. Dennoch gilt: Gesunden
+Kopf durch Helm schützen! (siehe auch http://www.daveshields.com/Saul.html)
+zurück zu Gerichtsurteile Gehwegverbot
+
+
+# es besteht kein Mitverschulden, wenn ein Radfahrer bei der zum Unfall
+führenden Fahrt keinen Helm trug.
+(OLG Saarbrücken, Az 4 U 80/07-28, 09.10.2007)
+
+
+# Keine grobe Fahrlässigkeit liegt vor, wenn eine Mutter erlaubt, dass ihr
+5-jähriges Kind ohne Schutzhelm im Fahrrad-Kindersitz mitfährt
+OLG Celle, 11.6.2008 – 14 U 179/07
+
+
+
+ Anordnung von Verkehrszeichen u.a. Verwaltungsakte
+
+# Benutzungspflicht von Radwegen ist Ausnahme:
+"Rechtsgrundlage für die Aufstellung von Verkehrszeichen ist § 45
+Abs.1 StVO. Nach dieser Vorschrift können die Straßenverkehrsbehörden
+die Benutzung bestimmter Straßen oder Straßenstrecken aus Gründen der
+Sicherheit oder Ordnung des Verkehrs u.a. beschränken oder verbieten.
+Zu einer derartigen Beschränkung des Verkehrs gehört auch die
+Anordnung einer Radwegebenutzungspflicht. Denn die früher bestehende
+generelle Radwegebenutzungspflicht aus § 2 Abs.4 Satz 2 StVO a.F. ist
+durch die StVO-Novelle aus dem Jahre 1998 obsolet geworden. Dadurch,
+dass § 2 Abs.4 Satz 2 StVO n.F. nunmehr eine Radwegebenutzungspflicht
+nur noch dann statuiert, wenn sie ausdrücklich durch das
+Verkehrszeichen 237 angeordnet worden ist, sind Radfahrer
+grundsätzlich berechtigt, auch bei vorhandenen Radwegen die
+Fahrstraße benutzen zu dürfen. Dies bedeutet, dass sich die Anordnung
+der Radwegebenutzungspflicht als Ausnahme zur Regel darstellt und
+daher nicht grundlos vorgenommen werden kann. Verdeutlicht wird
+dieses Regel-Ausnahmeverhältnis auch dadurch, dass nach § 45 Abs.9
+Sätze 1 und 2 StVO die grundsätzlich im pflichtgemäßen Ermessen
+stehende Entscheidung der Straßenverkehrsbehörden,
+Verkehrsbeschränkungen anzuordnen, eingeschränkt wird."
+(VG Hamburg 29.11.2001, Az 20 VG 1279/2001)
+
+
+# Verkehrsfluss und Ampeltiming - kein Grund zur Anordnung von Benutzungspflicht:
+Der Leichtigkeit des (motorisierten) Verkehrs darf gegenüber der
+Sicherheit von Radfahrern kein Vorrang eingeräumt werden." ...
+"Gleiches gilt für die vom Beklagten geltend gemachten
+Aufwändungen wegen der bei Wegfall der Radwegbenutzungspflicht
+erforderlichen Änderung der Signalzeitpläne an den
+Lichtzeichenanlagen, die aus 'personellen und finanziellen Gründen
+gegenwärtig nicht leistbar' seien und an den großen Knotenpunkten aus
+'steuerungstechnischen Gründen abgelehnt' würden. Im Übrigen ist
+dieser Umstand kein sachgerechtes Kriterium für die Frage der
+Erforderlichkeit der Radwegbenutzungspflicht, die in erster Linie eine
+Frage der Verkehrssicherheit und damit von Gesundheit und Leben (vor
+allem) der Radfahrer ist. Bei dieser Frage dürfen monetäre
+Gesichtspunkte keinesfalls den Ausschlag geben und zu einer Hinnahme
+von solchen Gefahren führen. (...) Der Leichtigkeit des
+(motorisierten) Verkehrs darf gegenüber der Sicherheit von Radfahrern
+kein Vorrang eingeräumt werden."
+(VG Berlin vom 12.11.2003 - VG 11 A 606.03, VRS 106, 153;
+NZV 2004, 486 mit Anm. Kettler S. 488 - rechtskräftig)
+
+
+# Radwegebenutzungspflicht darf nur angeordnet werden, wenn aufgrund der
+besonderen örtlichen Verhältnisse eine Gefahrenlage besteht, die das
+allgemeine Risiko einer Rechtsgutbeeinträchtigung erheblich übersteigt (
+§45 Abs. 9 Satz 2 der Straßenverkehrs-Ordnung - StVO)
+Straßenverkehrsbehörden dürfen eine Radwegebenutzungspflicht durch
+Aufstellen der Zeichen 237, 240 oder 241 nur dann anordnen, wenn die
+Voraussetzungen von § 45 Abs. 9 Satz 2 StVO erfüllt sind. Erforderlich ist
+danach eine auf besondere örtliche Verhältnisse zurückgehende qualifizierte
+Gefahrenlage. (BVerwG 3 C 42.09, 18.11.2010 )
+Vorinstanzen:
+VG Regensburg, VG RO 5 K 03.2192 - Urteil vom 28.11.2005 -
+VGH München, VGH 11 B 08.186 - Urteil vom 11.08.2009 -
+
+# Das Zusatzzeichen 1012-34 "Radfahrer absteigen" hat verkehrsrechtlich keine
+Bedeutung, egal, ob es mit oder ohne VZ237/240/241 aufgestellt wird. Für Verstöße
+gegen dieses Zeichen gibt es keinen relevanten Tatbestant im Bußgeldkatalog, eine
+Ahndung ist damit nicht möglich. (OLG Celle Az VRS 30,232)
+
+#farbiges Pflaster ist keine bauliche Trennung (BGH, VI ZR 171/07):
+"Nach den Feststellungen des Berufungsgerichts ist im Bereich der Unfallstelle
+der Radweg von den angrenzenden - dem Fußgängerverkehr vorbehaltenen -
+Verkehrsflächen, ..., weder räumlich noch baulich abgetrennt. Vielmehr ist der
+Radweg als Sonderweg allein durch eine anders farbige Aufpflasterung von den
+übrigen Verkehrsflächen abgesetzt.
+[..]
+Werden Rad- und Fußgängerwege auf jeweils nur optisch voneinander getrennten
+Verkehrsflächen so dicht aneinander vorbeigeführt [...]"
+
+#Radfahren auf der Straße ist der Regelfall - Benutzungspflicht für
+Radwege dürfen Behörden nur in Ausnahmefällen anordnen. Betr. Widerspruch
+gegen Anordnung von Benutzungspflicht eines Radweges in Regensburg.
+(Az. BayVGH 11 B 08.186, 11.08.2009)
+
+# starkes Verkehrsaufkommen allein erlaubt noch nicht die Annahme einer
+besonderen Gefahrenlage, die eine Trennung von Rad- und Autoverkehr zwingend
+erforderlich machen würde. (VG Berlin 27 A 241 01)
+http://www.critical-mass-hamburg.de/VG_Berlin_27_A_241_01.pdf
+
+# Die Jahresfrist für die Anfechtung von verkehrsrechtlichen Anordnungen,
+die durch Verkehrszeichen bekanntgegeben werden, gilt laut Urteil des
+Bundesverwaltungsgerichts von heute ab erstmaliger Betroffenheit, nicht
+ab Aufstellung. Pressemitteilung:
+
+"Das Bundesverwaltungsgericht hat die Berufungsurteile der beiden
+Verwaltungsgerichtshöfe bestätigt, auch soweit sie angenommen hatten,
+dass die Rechtsmittelfrist gegen ein durch Verkehrszeichen bekannt
+gegebenes Verkehrsgebot oder -verbot nicht bereits mit dem Aufstellen
+des Verkehrszeichens zu laufen beginnt, sondern erst dann, wenn der
+dagegen Rechtsschutz begehrende Verkehrsteilnehmer zum ersten Mal auf
+dieses Verkehrszeichen trifft." (BVerwG 3 C 32.09)
+
+Verpflichtungsklage (D. Kettler 01/2005)
+# Wird nicht nur gegen widerrechtliche Beschilderung von Radwegen geklagt,
+sondern zugleich mitgeteilt, dass man mit anderen Maßnahmen zufrieden wäre,
+die zur Behebung der Mängel führt, handelt es sich um eine so genannte
+Verpflichtungsklage. Sie lässt den Behörden offen, einen Radweg entweder in
+einen Zustand zu bringen, der den Anforderungen der VwV-StVO an Benutzungspflicht
+genügt oder aber die Radwegschilder zu entfernen und damit die Benutzungspflicht
+aufzuheben. Für Verpflichtungsklagen gilt die Jahresfrist nicht. Sie kann
+jederzeit erhoben werden, auch nach vielen Jahren.
+Gegen Geschwindigkeitsbegrenzungen, Überholverbote, Halteverbote u.ä. funktioniert
+dieser Weg nicht. Das kann Radfahrern aber egal sein, wenn sie auf diesem Wege
+entweder einen wirklich guten Radweg bekommen (bei leeren öffentlichen Kassen
+eher unwahrscheinlich) oder die Radwegschild entfernt werden.
+VG Hannover (11 A 5004/01, Urteil v. 23.7.03) sowie VG Berlin (11 A 606.03,
+Urteil v. 12.11.03)
+
+#Rechtsstaatliche Zurechnung muss darauf ausgerichtet sein, nicht
+rechtswidriges, sondern rechtmäßiges Verhalten zu begünstigen [...]. Dem
+läuft es grundsätzlich zuwider, wenn [...] Maßnahmen zur Abwehr drohenden
+rechtswidrigen Verhaltens nicht vorrangig gegen den oder die Störer, sondern
+ohne weiteres - und in Grundrechte eingreifend - gegen den von solchem rechts-
+widrigen Verhalten potentiell Betroffenen ergriffen werden.
+(BVerfG, 2 BvR 1295/05 vom 27.6.2006, Absatz-Nr. 17)
+https://www.bundesverfassungsgericht.de/pressemitteilungen/bvg06-068.html
+
+#Nach Art. 14 Abs. 2 BayBO dürfen bauliche Anlagen und ihre Benutzung die
+Sicherheit und Leichtigkeit des öffentlichen Verkehrs nicht gefährden. Die
+Sicherheit und Leichtigkeit des Verkehrs wird ... gefährdet, wenn nach den
+Erfahrungen des täglichen Lebens mit hinreichender Wahrscheinlichkeit zu erwarten
+ist, dass durch die Anlage ein Verkehrsunfall verursacht wird oder der Verkehr in
+seinem Ablauf behindert wird, insbesondere ein Durchschnittskraftfahrer durch die
+Werbeanlage abgelenkt wird. Geht es um die Gefährdung von Leben und Gesundheit,
+sind an die Feststellung der Wahrscheinlichkeit des Schadenseintritts keine
+übermäßig hohen Anforderungen zu stellen. (BayVGH, B.v. 24.02.2003, Az.: 2 CS 02.2730).
+
+# Schutzstreifen fallen unter §45 (9): Durch Leitlinien auf der Fahrbahn
+markierte Schutzstreifen für den Radverkehr stellen eine den fließenden Verkehr
+beschränkende verkehrsrechtliche Anordnung dar und erfordern daher nach § 45 Abs. 9
+Satz 2 StVO eine auf besondere örtliche Verhältnisse zurückzuführende, das
+allgemeine Risiko einer Beeinträchtigung insbesondere des Lebens und der
+Gesundheit der Verkehrsteilnehmer übersteigende Gefahrenlage.
+(VG Saarlouis Beschluß vom 19.1.2011, 10 L 1655/10)
+http://www.rechtsprechung.saarland.de/cgi-bin/rechtsprechung/document.py?Gericht=sl&nr=3267
+
+# § 45 Abs. 1 Satz 2 Nr. 6 StVO setzt, ebenso wie die straßenverkehrsrechtliche
+Generalklausel des § 45 Abs. 1 Satz 1 StVO, voraus, dass eine konkrete Gefahr für
+die Sicherheit oder Ordnung des Straßenverkehrs vorliegt. Es genügt also nicht,
+dass die Straßenverkehrsbehörde eine derartige Gefahr nur vermutet und durch den
+angeordneten Verkehrsversuch Aufschluss darüber erlangen will, ob sie
+tatsächlich gegeben ist. Dafür, dass die Vorschrift einen solchen
+Gefahrerforschungseingriff ermöglichen soll, gibt es keine greifbaren
+Anhaltspunkte."
+http://www.dbovg.niedersachsen.de/Entscheidung.asp?Ind=0520020080018207+A
+
+http://openjur.de/u/56706.html
+# Verkehrseinrichtungen müssen so gestaltet sein, dass sie für einen
+Verkehrsteilnehmer mit durchschnittlicher Aufmerksamkeit durch einen beiläufigen
+Blick deutlich erkennbar sind und eine möglichst gefahrlose Abwicklung des
+Verkehrs ermöglichen; sie dürfen weder irreführend noch undeutlich sein.
+Verkehrszeichen müssen deshalb so angebracht und - bei Schilderkombinationen -
+gestaltet sein, dass auch ein ortsunkundiger Verkehrsteilnehmer Sinn und
+Tragweite der getroffenen Regelung ohne Weiteres erkennen kann, ohne nähere
+Überlegungen hierüber anstellen zu müssen. mehr anzeigen...
+"Eine unzweckmäßige oder irreführende Gestaltung von Verkehrszeichen
+kann je nach Sachlage entweder das Verschulden eines Verkehrsteilnehmers,
+der den Sinn des Zeichens missversteht, mindern und ein Mitverschulden
+des für die Gestaltung Verantwortlichen begründen ..."
+(OLG Jena · Beschluss vom 6. Mai 2010 · 1 Ss 20/10)
+
+
+
+ Sonstige
+
+# Radfahrer dürfen keinen Walkman mit Kopfhörer benutzen, falls die
+Lautstärke zu einer Gehörbeeinträchtigung führt (OLG Köln, Az. Ss 12/87 Z).
+
+# Die Gebühr für Widersprüche gegen straßenverkehrsrechtliche
+Allgemeinverfügungen beträgt 25,60 € (VG Karlsruhe, Oktober 2008 Az. 4 K 1514/08).
+ http://www.flickr.com/photos/83837423@N00/sets/72157608087011996/
+
+# Seit 1. Februar 2001 ist das Telefonieren am Steuer verboten: Generell
+verboten ist der Gebrauch von Mobil- und Autotelefonen im Straßenverkehr,
+wenn hierfür das Mobiltelefon oder der Hörer des Autotelefons aufgenommen
+oder gehalten werden muss. Das Telefonieren mit Freisprecheinrichtung bleibt
+erlaubt - vorausgesetzt der Fahrer behält die Hände am Steuer bzw. Lenker.
+Das Anwählen des Gesprächspartners ist also nur mittels Sprachwahl, nicht
+dagegen über die Tastatur erlaubt. Wer ohne diese Einrichtungen telefonieren
+will, muß sein Fahrzeug abstellen und den Motor ausschalten. In den Medien
+war zu lesen, daß Radfahrern die Benutzung eines Telefons gänzlich verboten
+sei. Dies gibt aber der neue § 23 Abs. 1a der StVO nicht her. Verstöße
+werden seit dem 1. April 2001 mit ein Verwarnungsgeld von DM 60, bei
+Radfahrern mit DM 30 belegt.
+
+# Kostenerstattung durch Krankenkassen: Krankenkassen müssen die Kosten für
+einen Fahrradrollstuhl übernehmen, wenn dadurch die Bewegungsbehinderung
+ausgeglichen und dem Behinderten ein elektrisch betriebener Rollstuhl bisher
+nicht gewährt wurde (LG Dortmund, Az. 1 S 72/94).
+
+# Ein Querschnittsgelähmter, dem ein handgetriebener Rollstuhl und ein Pkw
+zur Verfügung stehen, hat keinen Anspruch darauf, daß ihm ein sog.
+Rollstuhl-Bike (ein handbetriebener Fahrradvorsatz) bereitgestellt wird. Das
+Landessozialgericht Nordrhein-Westfalen stellte fest, daß die Mobilität des
+Behinderten durch die beiden anderen Transportmittel gewährleistet sei. Mit
+eigener Körperkraft die nähere Umgebung zu verlassen und längere Wegstrecken
+zurückzulegen, sei ihm zwar nicht möglich. Dies gehöre aber auch nicht zu
+den allgemeinen Grundbedürfnissen des Menschen (LSG NRW, Az. L 5 Kr 35/96).
+
+# Ein Fahrrad gehört zum notwendigen Lebensunterhalt eines Kindes. Das
+entschied das Verwaltungsgericht Hannover und wies die Stadt an, einem
+sozialhilfeberechtigten Kind 80 DM für den Kauf eines gebrauchten Rades zu
+zahlen (VG Hannover, Az. 3 B 1404/00).
+
+# Verkehrszeichen sind verbindlich, auch wenn sie im Einzelfall rechtswidrig
+aufgestellt sind. Bei Verkehrszeichen handelt es sich um Verwaltungsakte in Form
+von Allgemeinverfügungen, die unmittelbar kraft Gesetzes zu befolgen seien. Es
+würde zu einer erheblichen Beeinträchtigung der Sicherheit des Straßenverkehrs
+führen, wenn dem einzelnen Verkehrsteilnehmer die Bewertung überlassen bleibe,
+ob ein Vekehrszeichen gültig oder ungültig sei. Anders sei die Rechtslage nur im
+Falle ihrer "Nichtigkeit", wenn die Errichtung eines Verkehrszeichens auf
+offensichtlicher Willkür beruhe oder wenn das Verkehrszeichen unklare oder
+sinnwidrige Anordnungen treffe (OLG Karlsruhe, Az. 2 Ss 87/00).
+
+#Hupt ein Autofahrer grundlos und es kommt durch die Attacke ein anderer
+Verkehrsteilnehmer zu Schaden, dann muss er dafür einstehen und Schadenersatz,
+gegebenenfalls Schmerzensgeld zahlen. Das hat das Amtsgericht (AG) Frankfurt am
+Main in einem durch die Verkehrsanwälte (Arge Verkehrsrecht im DAV) bekannt
+gemachten Urteil entschieden.
+http://verkehrsanwaelte.de/allgemein_teuere_hupattacke.html
+AG Frankfurt a.M., Aktenzeichen: 32 C 3625/06-48 - Urteil vom 13.07.2007
+
+#Nacktfahren ist laut VG Karlsruhe, Beschl.v.02.06.2005 - 6 K 1058/05, verboten,
+da die Allgemeinheit (§118 OWiG) davon belästigt wird. Sie kann sich nicht, im
+Gegensatz zum geschlossenen FKK-Bad, davon entziehen. Also: Hüllen anbehalten!
+zurück zu Gerichtsurteile
+
+#Wer betrunken Fahrrad fährt, kann seinen Führerschein verlieren. Das VG
+Karlsruhe hat den Entzug der Fahrerlaubnis eines Radlers bestätigt, der mit 1,68
+Promille auf dem Fahrrad erwischt und zu einer Geldstrafe verurteilt worden war.
+Als er der mehrmaligen Aufforderung nicht nachkam, ein medizinisch-
+psychologisches Gutachtens vorzulegen, entzog man ihm den Führerschein. Im
+Eilverfahren wurde seine Gegenklage abgewiesen, obwohl es sich sogar um einen
+Ersttäter handelte.
+
+#Das Wissen um nicht ordnungsgemäß montierte Teile am Rad führt zu erheblichem
+Schadensersatzverlust. Das LG Aachen hat einem Radfahrer seine Ansprüche
+gekürzt, da er trotz Kenntnis des Zustandes seines Gabelschaftes gefahren und
+schwer gestürzt ist. Das Teil war bestellt aber noch nicht geliefert.
+
+#Wer bei einem Radunfall mit einem Autofahrer auf dessen Mithaftung aufgrund der
+sogenannten Betriebsgefahr seines Fahrzeuges spekuliert und dabei selbst gegen
+Verkehrsvorschriften verstoßen hat, hat sich verspekuliert. Dies gilt auch für
+die Minderjährige trotz ihrer Besserstellung!!! (LG Koblenz, Urt.v.01.12.2004-12
+S 159/04).
+
+#Eine Radlerin passierte auf dem Radweg eine Bushaltestelle. Durch den
+versehentlichen Stoß eines wartenden Fahrgastes geriet sie unter den anfahrenden
+Bus und wurde schwer verletzt. Ihr wurden ein Drittel Mitschuld auferlegt, weil
+sie an der Bushaltestelle nicht abstieg und ihr Fahrrad schob (OLG Celle,
+Urt.v.12.05.2005-14 U 231/04).
+
+#Rammt ein Autofahrer ein auf dem Gehweg abgestelltes Fahrrad haftet er voll.
+Eine Mitschuld trifft nur zu, wenn das Rad eine Einfahrt komplett zustellt.
+Allerdings ist der Radbesitzer auch dann aus dem Schneider, wenn sein Rad, am
+Bürgersteigrand an einem Baum oder Pfahl angekettet, nur teilweise in die
+Einfahrt ragt. So die AG Verkehrsrecht des Deutschen Anwaltsvereins. Grundlage
+ist eine Entscheidung zum Abstellen von Fahrrädern auf dem Bürgersteig des BVG
+(NZV 2005, 333). Dies gilt unabhängig von einem bestehenden Zonenhalteverbot.
+
+#Fahrräder dürfen auf Gehwegen und auf Verkehrsinseln, die hauptsächlich dem
+Fußgängerverkehr dienen, aufgestellt werden, wenn dadurch keine Fußgänger
+behindert werden. Unter diese Einschränkung fallen nicht nur - wie bei § 1 StVO -
+konkret eintretende Behinderungen, sondern auch Fälle, in denen der Eintritt
+einer Behinderung der Fußgänger wahrscheinlich ist, z. B. bei einem häufiger
+benutzten, sehr schmalen Fußweg. (OLG Celle / AZ: 1 Ss 329/59 17.12.1995)
+Anmerkung: Fußgänger dürfen ein Fahrrad auf dem Gehweg schieben, wenn sie
+andere Fußgänger nicht erheblich behindern ( § 25 Abs. 2 S. 1 StVO).
+
+_________________________________________________________________________
+ Radbeleuchtung allgemein (StVZO)
+
+(1) Fahrräder müssen für den Betrieb des Scheinwerfers und der Schlussleuchte
+mit einer Lichtmaschine ausgerüstet sein, deren Nennleistung mindestens 3 W und
+deren Nennspannung 6 V beträgt (Fahrbeleuchtung). Für den Betrieb von
+Scheinwerfer und Schlussleuchte darf zusätzlich eine Batterie mit einer
+Nennspannung von 6 V verwendet werden (Batterie-Dauerbeleuchtung). Die beiden
+Betriebsarten dürfen sich gegenseitig nicht beeinflussen.
+
+(2) An Fahrrädern dürfen nur die vorgeschriebenen und die für zulässig erklärten
+lichttechnischen Einrichtungen angebracht sein. Als lichttechnische
+Einrichtungen gelten auch Leuchtstoffe und rückstrahlende Mittel. Die
+lichttechnischen Einrichtungen müssen vorschriftsmäßig und fest angebracht sowie
+ständig betriebsfertig sein. Lichttechnische Einrichtungen dürfen nicht verdeckt
+sein.
+
+(3) Fahrräder müssen mit einem nach vorn wirkenden Scheinwerfer für weißes Licht
+ausgerüstet sein. Der Lichtkegel muss mindestens so geneigt sein, dass seine
+Mitte in 5 m Entfernung vor dem Scheinwerfer nur halb so hoch liegt wie bei
+seinem Austritt aus dem Scheinwerfer. Der Scheinwerfer muss am Fahrrad so
+angebracht sein, dass er sich nicht unbeabsichtigt verstellen kann. Fahrräder
+müssen mit mindestens einem nach vorn wirkenden weißen Rückstrahler ausgerüstet
+sein.
+
+(4) Fahrräder müssen an der Rückseite mit einer Schlussleuchte für rotes Licht,
+deren niedrigster Punkt der leuchtenden Fläche sich nicht weniger als 250 mm
+über der Fahrbahn befindet, mindestens einem roten Rückstrahler, dessen höchster
+Punk der leuchtenden Fläche sich nicht höher als 600 mm über der Fahrbahn
+befindet, und einem mit dem Buchstaben "Z" gekennzeichneten roten Großflächen-
+Rückstrahlerausgerüstet sein. Die Schlussleuchte sowie einer der Rückstrahler
+dürfen in einem Gerät vereinigt sein. Beiwagen von Fahrrädern müssen mit einem
+Rückstrahler entsprechend Nummer 2 ausgerüstet sein.
+
+(5) Fahrräder dürfen an der Rückseite mit einer zusätzlichen, auch im Stand
+wirkenden Schlussleuchte für rotes Licht ausgerüstet sein. Diese Schlussleuchte
+muss unabhängig von den übrigen Beleuchtungseinrichtungen einschaltbar sein.
+
+(6) Fahrradpedale müssen mit nach vorn und nach hinten wirkenden gelben
+Rückstrahlern ausgerüstet sein; nach der Seite wirkende gelbe Rückstrahler an
+den Pedalen sind zulässig.
+
+(7) Die Längsseiten müssen nach jeder Seite mitmindestens zwei um 180° versetzt
+angebrachten, nach der Seite wirkenden gelben Speichenrückstrahlern an den
+Speichen des Vorderrades und des Hinterrades oder ringförmig zusammenhängenden
+retroreflektierenden weißen Streifen an den Reifen oder in den Speichen des
+Vorderrades und des Hinterradeskenntlich gemacht sein. Zusätzlich zu der
+Mindestausrüstung mit einer der Absicherungsarten dürfen Sicherungsmittel aus
+der anderen Absicherungsart angebracht sein. Werden mehr als zwei
+Speichenrückstrahler an einem Rad angebracht, so sind sie am Radumfang
+gleichmäßig zu verteilen.
+
+(8) Zusätzliche nach der Seite wirkende gelbe rückstrahlende Mittel sind
+zulässig.
+
+(9) Der Scheinwerfer und die Schlussleuchte nach Absatz 4 dürfen nur zusammen
+einschaltbar sein. Eine Schaltung, die selbsttätig bei geringer Geschwindigkeit
+von Lichtmaschinenbetrieb auf Batteriebetrieb umschaltet (Standbeleuchtung), ist
+zulässig; in diesem Fall darf auch die Schlussleuchte allein leuchten.
+
+(10) In den Scheinwerfern und Leuchten dürfen nur die nach ihrer Bauart dafür
+bestimmten Glühlampen verwendet werden. Radbeleuchtung Rennrad
+
+(11) Für Rennräder, deren Gewicht nicht mehr als 11 kg beträgt, gilt abweichend
+folgendes: > für den Betrieb von Scheinwerfer und Schlussleuchte brauchen
+anstelle der Lichtmaschine nur eine oder mehrere Batterien entsprechend Absatz 1
+Satz 2 mitgeführt werden; der Scheinwerfer und die vorgeschriebene
+Schlussleuchte brauchen nicht fest am Fahrrad angebracht zu sein; sie sind
+jedoch mitzuführen und unter den in § 17 Abs. 1 der Straßenverkehrs-Ordnung
+beschriebenen Verhältnissen vorschriftsmäßig am Fahrrad anzubringen und zu
+benutzen; > Scheinwerfer und Schlussleuchte brauchen nicht zusammen einschaltbar
+zu sein; > anstelle des Scheinwerfers nach Absatz 1 darf auch ein Scheinwerfer
+niedrigerer Nennspannung als 6 V und anstelle der Schlussleuchte nach Absatz 4
+Nr. 1 darf auch eine Schlussleuchte nach Absatz 5 mitgeführt werden.
+
+(12) Rennräder sind für die Dauer der Teilnahme an Rennen von den Vorschriften
+der Absätze 1 bis 11 befreit.
+
+
+_________________________________________________________________________
+
+ Verwaltungsrecht
+
+Betr.: Ausweichen auf Fahrbahn neben unbenutzbaren, aber benutzungspflichtigen Radwegen
+
+ Freie und Hansestadt Hamburg
+Behörde für Inneres
+Amt für Innere Verwaltung und Planung
+Grundsatzangelegenheiten des Straßenverkehrs
+Referat: Straßenverkehrsordnung und straßenverkehrsbehördliche
+Planung
+Johanniswall 4
+D - 20095 Hamburg
+Telefon 040 - 4 28 39 - 2866
+Telefax 040 - 4 28 39 - 1908
+Ansprechpartner: Rupert Schubert
+Zimmer: 503
+eMail: Rupert.Schubert@bfi-a.hamburg.de
+
+ Geschäftszeichen A 320/641.30-3/03
+
+Hamburg, den 3. Januar 2005
+
+Sehr geehrter Herr ...,
+
+zu der von Ihnen mit Schreiben vom 11.10 und 30.12.2004 gewünschten Feststellung zur Rechtswirkung
+der Zeichen 237 "oder" (?) 241 und zu Ihrer Absicht, "in entsprechenden Abschnitten auf der Fahrbahn zu
+fahren", weist die Behörde für Inneres darauf hin, dass das durch diese Verkehrszeichen für Radfahrer
+auch angeordnete Verbot der Fahrbahnbenutzung, das Ihnen offenbar geläufig ist, bei Hindernissen auf
+dem Radweg in seiner rechtlichen Geltung für Radfahrer ebensowenig geschmälert wird wie das für Radfahrer
+geltende Verbot der Gehwegbenutzung. Ggf. müssen Radfahrer also absteigen und ihr Fahrrad
+schieben (Alternative 1). Die anderen beschriebenen Verhaltensmöglichkeiten (Alternativen 2a, 2b und 3)
+scheiden aus, weil sie rechtlich unzulässig sind.
+Solange die in Rede stehenden amtlichen Verkehrszeichen aufgestellt sind, haben alle betroffenen
+Verkehrsteilnehmer wie bei anderen Verkehrsschildern auch die entsprechenden Ge- und Verbote zu beachten
+und den entsprechenden Pflichten nachzukommen, ggf. auch unabhängig davon, ob das Fahrbahnbenutzungsverbot
+und die Radwegebenutzungspflicht zu Recht oder zu Unrecht angeordnet sind.
+Verkehrszeichen jeder Art stehen nicht zur Disposition der Verkehrsteilnehmer.
+Soweit Sie in Ihrem Schreiben auf die für die Hamburger Verwaltung selbstverständlich verbindliche
+Entscheidung des OVG Hamburg vom 28.03.2000 hinweisen, heißt es auch dort zur Unzulässigkeit, den
+Gehweg zu befahren, wenn der Radweg durch einen falsch parkenden PKW "stark verengt" ist: "Ein
+Ausweichen auf den Gehweg könnte Fußgänger gefährden und wäre überdies verboten."
+Zur Unzulässigkeit, auf die Fahrbahn auszuweichen, enthält die Entscheidung dagegen keine verwertbaren
+Aussagen, da sie sich auf die Rechtslage vor Inkrafttreten der Neuregelung der sog. Radwegebenutzungspflicht
+durch die Vierundzwanzigste Verordnung zur Änderung straßenverkehrsrechtlicher Vorschriften vom 7. August 1997
+(BGBI. I S. 2028) - sog. Fahrradnovelle zur StVO - bezieht, so dass der Entscheidung sachlich (der Radweg war
+nicht durch Zeichen 237, 240 oder 241 gekennzeichnet) und rechtlich andere Voraussetzungen zugrunde lagen.
+Die Rechtslage nach dieser Novelle unterscheidet sich grundlegend von der Rechtslage davor, weil nach geltendem
+Recht die Radwegebenutzungspflicht und das damit korrespondierende Fahrbahnbenutzungsverbot nur dann angeordnet
+werden, wenn es aus Gründen der Verkehrssicherheit erforderlich ist; Hindernisse jeder Art auf dem Radweg bis
+hin zur Unbenutzbarkeit berühren diese Erforderlichkeit nicht.
+
+
+VG Saarlouis Beschluß vom 7.5.2008, 11 L 290/08
+
+betr.: Weigerung von Anwohnern, Flächen für Radweg abzugeben.
+Auszug aus der Begründung der Ablehnung des Antrags:
+"Dies folgt allein daraus, dass generell keine vernünftigen Zweifel daran
+bestehen können, dass eine räumliche Trennung des motorisierten vom
+nichtmotorisierten Verkehr die Sicherheit aller Verkehrsteilnehmer bedeutend
+erhöht und damit unmittelbar dem Leben, der Unversehrtheit und der Gesundheit
+der Verkehrsteilnehmer dient."
+
+
+
+RA Dr. Dietmar Kettler
+Knooper Weg 10, 24103 Kiel
+Tel.: 0431/95045
+Fax: 0431/95046
+Dietmar.Kettler@web.de
+
+http://www.adfc-nrw.de/kreisverbaende/kv-bottrop/radverkehr/wo-radfahren.html
+###Helme
+http://hardshell.fahrrad-helm.de/physik.html
+
+
+
+
+
--- /dev/null
+###enable hw decoding / license keys
+decode_MPG2=0x6c652062
+decode_WVC1=0x1c52305e
+###overclocking
+gpu_freq Sets core_freq, h264_freq, isp_freq, v3d_freq together. Default 250
+core_freq Frequency of GPU processor core in MHz. It has an impact on ARM performance since it drives L2 cache. Default 250
+h264_freq Frequency of hardware video block in MHz. Default 250
+isp_freq Frequency of image sensor pipeline block in MHz. Default 250
+v3d_freq Frequency of 3D block in MHz. Default 250
+avoid_pwm_pll Don't dedicate a pll to PWM audio. This will reduce analogue audio quality slightly. The spare PLL allows the core_freq to be set independently from the rest of the gpu allowing more control over overclocking. Default 0
+sdram_freq Frequency of SDRAM in MHz. Default 400
+over_voltage ARM/GPU core voltage adjust. [-16,8] equates to [0.8V,1.4V] with 0.025V steps. [5] Default is 0 (1.2V). Values above 6 are only allowed when force_turbo or current_limit_override are specified (which set the warranty bit)
+over_voltage_sdram Sets over_voltage_sdram_c, over_voltage_sdram_i, over_voltage_sdram_p together
+over_voltage_sdram_c SDRAM controller voltage adjust. [-16,8] equates to [0.8V,1.4V] with 0.025V steps. Default 0 (1.2V) [5]
+over_voltage_sdram_i SDRAM I/O voltage adjust. [-16,8] equates to [0.8V,1.4V] with 0.025V steps. Default 0 (1.2V)[5]
+over_voltage_sdram_p SDRAM phy voltage adjust. [-16,8] equates to [0.8V,1.4V] with 0.025V steps. Default 0 (1.2V)[5]
+force_turbo Disables dynamic cpufreq driver and minimum settings below. Enables h264/v3d/isp overclock options. Default 0. May set warranty bit.
+initial_turbo Enables turbo mode from boot for the given value in seconds (up to 60) or until cpufreq sets a frequency. Can help with sdcard corruption if overclocked. Default 0 [6]
+arm_freq_min Minimum value of arm_freq used for dynamic clocking. Default 700
+core_freq_min Minimum value of core_freq used for dynamic clocking. Default 250
+sdram_freq_min Minimum value of sdram_freq used for dynamic clocking. Default 400
+over_voltage_min Minimum value of over_voltage used for dynamic clocking. Default 0
+temp_limit Overheat protection. Sets clocks and voltages to default when the SoC reaches this Celsius value. Setting this higher than default voids warranty. Default 85
+current_limit_override Disables SMPS current limit protection when set to "0x5A000020". Can help if you are currently hitting a reboot failure when overclocking too high. May set warrany bit.[
+###vcgencmd - alles anzeigen was möglich ist
+vcgencmd commands
+###cpu temperatur
+vcgencmd measure_temp
+###aktuelle Taktung CPU
+vcgencmd measure_clock arm
+###aktuelle Konfigurationsparameter auslesen
+vcgencmd get_config int
+###Soundkarten anzeigen
+aplay -l
+###Touchscreenkeyboard
+apt-get install matchbox-keyboard
+#oder
+#http://xmodulo.com/onscreen-virtual-keyboard-linux.html
+apt-get install florence
+###Helligkeit Display
+echo 80 > /sys/class/backlight/rpi_backlight/brightness
+##carpc Lösung mittels Raspi
+#http://www.engineering-diy.blogspot.ro/2015/01/raspberrypi-carpc-tutorial.html
+#https://christian-brauweiler.de/howto/carpc-rpi-und-7-zoll-touchscreen-update-2015
+###Musikserver
+#siehe mpd.txt
--- /dev/null
+###umkodieren von Dateien
+recode utf8..latin1 *.dat
+###
--- /dev/null
+###cardclient.conf
+ccam2:192.168.178.29:12000:0/0000/0000:reel:lustigesPasswort
+###
+#ffplayer
+http://wiki.reel-multimedia.com/index.php/Plugins_f%C3%BCr_die_ReelBox#FFplayer_-_Mediafiles_auf_dem_Netclient_abspielen
+###hd-ext alles befehle auflisten
+hdctrld --help
+###hd-ext ton umschalten
+hdctrld -o HDMIAC3
+###telnet auf die hd-ext
+telnet 192.168.99.129
+###snapshot erstellen
+osddump > /opt/osd.pnm
+osddump | pnmtojpeg > /opt/osd.jpg
+###switch slm 2008 konfig
+Port 1, VLAN 1+2, PVID1
+Port 2-7, VLAN 1, PVID 1
+Port 8, VLAN 2, PVID 2
+
+Switch unten (.67)
+
+Port 1+2, VLAN 1+2, PVID 1
+Port 3-7, VLAN 1, PVID 1
+Port 8, VLAN 1+2, PVID 1
+
--- /dev/null
+###im vi vorletzte Spalte mit 8 ersetzen ..,^^,^00000000^ durch ..,^8^,^00000000^
+1,$s/\^,\^\([^^]*\)\^$/8^,^\1^/
+###eines der zeichen e g h
+[egh]
+###zeichen zwischen 0 und 6
+[0-6]
+###ein beliebiges zeichen außer a (^ negiert)
+[^a]
+###Zeichenklassen (geht nicht immer)
+[:alnum:] Alphanumerische Zeichen: [:alpha:] oder [:digit:].
+[:alpha:] Buchstaben: [:lower:] oder [:upper:].
+[:blank:] Leerzeichen oder Tabulator.
+[:cntrl:] Steuerzeichen. Im ASCII sind das die Zeichen 00 bis 1F, und 7F (DEL).
+[:digit:] Die Ziffern 0 bis 9.
+[:graph:] Graphische Zeichen: [:alnum:] oder [:punct:].
+[:lower:] Kleinbuchstaben: nicht notwendigerweise nur von a bis z.
+[:print:] Druckbare Zeichen: [:alnum:], [:punct:] und Leerzeichen.
+[:punct:] Satzzeichen wie: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ .
+[:space:] Whitespace: Horizontaler und vertikaler Tabulator, Zeilen- und Seitenvorschub, Wagenrücklauf und Leerzeichen.
+[:upper:] Großbuchstaben1: nicht notwendigerweise nur von A bis Z.
+[:xdigit:] Hexadezimale Ziffern: 0 bis 9, A bis F, a bis f.
+###Quantifizierer
+? Der voranstehende Ausdruck ist optional, er kann einmal vorkommen, muss es aber nicht, d. h. der Ausdruck kommt null- oder einmal vor. (Dies entspricht {0,1})
++ Der voranstehende Ausdruck muss mindestens einmal vorkommen, darf aber auch mehrfach vorkommen. (Dies entspricht {1,})
+* Der voranstehende Ausdruck darf beliebig oft (auch keinmal) vorkommen. (Dies entspricht {0,})
+{n} Der voranstehende Ausdruck muss exakt n-mal vorkommen.
+{min,} Der voranstehende Ausdruck muss mindestens min-mal vorkommen.
+{,max} Der voranstehende Ausdruck darf maximal max-mal vorkommen.
+{min,max} Der voranstehende Ausdruck muss mindestens min-mal und darf maximal max-mal vorkommen.
+###
+^ steht für den Zeilenanfang (nicht zu verwechseln mit „^“ bei der Zeichenauswahl mittels „[“ und „]“).
+$ kann je nach Kontext für das Zeilen- oder Stringende stehen, wobei bei manchen Implementierungen noch ein „\n“ folgen darf. Das tatsächliche Ende wird von \z gematcht.
+\ hebt gegebenenfalls die Metabedeutung des nächsten Zeichens auf. Beispielsweise lässt der Ausdruck „(A\*)+“ die Zeichenketten „A*“, „A*A*“, usw. zu. Auf diese Weise lässt sich auch ein Punkt „.“ mit „\.“ suchen, während nach „\“ mit „\\“ gesucht wird.
+\b leere Zeichenkette am Wortanfang oder am Wortende
+\B leere Zeichenkette, die nicht den Anfang oder das Ende eines Wortes bildet
+\< leere Zeichenkette am Wortanfang
+\> leere Zeichenkette am Wortende
+\n ein Zeilenumbruch im Unix-Format
+\r ein Zeilenumbruch im Mac-Format
+\r\n ein Zeilenumbruch im Windows-Format
--- /dev/null
+###alle Pakete anzeigen
+rpm -qa
+###dateien des pakets paketname incl. pfad
+rpm -ql paketname
+###zugehöriges rpm zu programm finden (immer vollen pfad mit angeben)
+rpm -qf /usr/bin/tiffcp
+###installieren von paketname
+rpm -i paketname
+###installieren von paketname testen
+rpm -i --test paketname
+###installiert paketname nochmals, wenn es schon installiert ist
+rpm -i --force paketname
+###prüfen ob alle pakete noch in ordnung sind
+rpm -Va
+###fortschrittsanzeige
+rpm -ih paketname
+###infos über rpm datei, direkt aus datei, nich aus db
+rpm -qip filename.rpm
+###rpm paket entpaken
+rpm2cpio RPM_file | cpio -idv
+###bestimmtes file aus rpm entpacken
+rpm2cpio RPM_file | cpio -idv individual_file(s)
+
--- /dev/null
+###neues Binary RPM erstellen und löscht das source, specfile und build directory
+rpmbuild --rebuild srcrpm.spec
+###build binary rpm
+rpmbuild -bb srcrpm.spec
+###build binary and source packages
+rpmbuild -ba paket.spec
--- /dev/null
+#Backuplösung unter linux, nutzt rsync, links, cp und mv
+###
--- /dev/null
+###syncen von Verzeichnissinhalt test nach aktuellem übers Netz gezippte Übertragung
+rsync -avz user@host:test/ .
+###syncen aller dateien die in rsync_include.txt stehen
+rsync -avP -e ssh `cat deploy/rsync_include.txt` root@0.0.0.0:/var/www/
+rsync -av --files-from=rsync_include.txt /etc/ /tmp
+###andere identity nutzen
+rsync -avz -e 'ssh -i ~/.ssh/1234-identity'
+###übertragen aller dateien die älter als 10 minuten sind
+#!/bin/bash
+for V in TP1 TQ1
+do
+ /usr/bin/find /home/modftp/THUEGA/CIMTRANSFER/${V}/ -maxdepth 1 -type f -amin +10 -printf %P\\0 |/usr/bin/rsync -av --from0 --files-from - --remove-source-files /home/modftp/THUEGA/CIMTRANSFER/${V}/ modftp@evk-cs:/home/modftp/THUEGA/CIMTRANSFER/${V}/ 2>&1 >> /home/modftp/log/caps2cs_rsync.log
+done
+#
+
--- /dev/null
+###Beispiel config aus meiner Fritzbox\r
+#begin config\r
+### global\r
+[global]\r
+netbios name = FRITZ.BOX\r
+workgroup = Arbeitsgruppe\r
+server string = %h (Samba %v)\r
+syslog = 0\r
+encrypt passwords = true\r
+passdb backend = smbpasswd\r
+obey pam restrictions = yes\r
+socket options = TCP_NODELAY\r
+unix charset = ISO-8859-1\r
+preferred master = yes\r
+os level = 20\r
+security = SHARE\r
+guest account = ftpuser\r
+interfaces = 192.168.1.1/255.255.255.0\r
+bind interfaces only = yes\r
+### expert\r
+[global]\r
+ log level = 3\r
+ log file = /var/media/ftp/uStor11/samba_%m.log\r
+### default\r
+[uStor01]\r
+ path = /var/media/ftp/uStor01\r
+ user = ftpuser\r
+ read only = no\r
+ write cache size = 65536\r
+[uStor11]\r
+ path = /var/media/ftp/uStor11\r
+ user = ftpuser\r
+ read only = no\r
+ write cache size = 65536\r
+[uStor31]\r
+ path = /var/media/ftp/uStor31\r
+ user = ftpuser\r
+ read only = no\r
+ write cache size = 65536\r
+### shares\r
+[Musik]\r
+ comment = Musik\r
+ path = /var/media/ftp/uStor11/Musik\r
+ guest ok = yes\r
+ read only = no\r
+ user = ftpuser\r
+ write cache size = 65536\r
+[Bilder_rw]\r
+ comment = Bilder_rw\r
+ path = /var/media/ftp/uStor11/Bilder_Cam\r
+ guest ok = yes\r
+ read only = no\r
+ user = ftpuser\r
+ write cache size = 65536\r
+[Bilder_ro]\r
+ comment = Bilder_ro\r
+ path = /var/media/ftp/uStor11/Bilder_Cam\r
+ guest ok = yes\r
+ read only = yes\r
+ user = ftpuser\r
+ write cache size = 65536\r
+### fin\r
+#end config\r
+###schauen ob die freigabe erreichbar ist\r
+smbclient -L <windows-box> -U <username>\r
+###freigaben anzeigen lassen (-N) ohne passwortabfrage\r
+smbclient -L samba_server -N\r
+###samba in linux mounten\r
+mount -t smbfs -o username=<username>,password=<password> //<win-box>/<share> /mnt/<name-of-mountpoint>\r
+###samba via fstab\r
+//10.102.11.21/EMSSCAN3/ /var/spool/scan cifs username=user,password=pass 0 0\r
+###bei Domain Anmeldung noch domain (domain als Beispiel) mit davor\r
+smbclient //10.113.1.150/scan_files$/ -U domain/modscan\r
+###freigabe eines druckers per samba\r
+[PSLaser]\r
+ comment = PS_600dpi-a4-auto-mono-600\r
+ path = /tmp\r
+ guest ok = Yes\r
+ printable = Yes\r
+ printer name = lp2\r
+###spezielle freigabe printers (gibt alle drucker des unix-systems frei)\r
+[printers]\r
+ comment = All Printers\r
+ path = /tmp\r
+ printable = Yes\r
+ browseable = No\r
+ guest ok = Yes \r
+###\r
--- /dev/null
+###codes über die Telefontastatur eingeben
+*#06# (Display IMEI number)
+*#1234# (Display current firmware)
+*#*#4636#*#* (Diagnostic and general settings mode)
+*#*#7780#*#* (Factory soft reset)
+or *#7780#
+*2767*3855# (Factory hard reset to ROM firmware default settings)
+*2767*4387264636# (To display product code)
+*#272*imei#* (Display/change CSC code)
+or *#272*HHMM#*
+*#*#1472365#*#* (GPS test settings)
+*#*#197328640#*#* (Service mode main menu)
+*#12580*369# (SW & HW Info)
+*#0228# (ADC Reading)
+*#32489# (Ciphering Info)
+*#232337# (Bluetooth Address)
+*#232331# (Bluetooth Test Mode)
+*#232338# (WLAN MAC Address)
+*#232339# (WLAN Test Mode)
+*#0842# (Vibra Motor Test Mode)
+*#0782# (Real Time Clock Test)
+*#0673# (Audio Test Mode)
+*#0*# (General Test Mode)
+*#2263# (RF Band Selection)
+*#9090# (Diagnostic ConfiguratioN)
+*#7284# (USB I2C Mode Control)
+*#872564# (USB Logging Control)
+*#4238378# (GCF Configuration)
+*#0283# (Audio Loopback Control)
+*#1575# (GPS Control Menu)
+*#3214789650# (LBS Test Mode)
+*#745# (RIL Dump Menu)
+*#746# (Debug Dump Menu)
+*#9900# (System Dump Mode)
+*#44336# (Sofware Version Info)
+*#0289# (Melody Test Mode)
+*#2663# (TSP / TSK firmware update)
+*#03# (NAND Flash S/N)
+*#0589# (Light Sensor Test Mode)
+*#0588# (Proximity Sensor Test Mode)
+*#273283*255*3282*# (Data Create Menu)
+*#273283*255*663282*# (Data Create SD Card)
+*#3282*727336*# (Data Usage Status)
+*#7594# (Remap Shutdown to End Call TSK)
+*#34971539# (Camera Firmware Update)
+*#526# (WLAN Engineering Mode)
+*#528# (WLAN Engineering Mode)
+*#7412365# (Camera Firmware Menu)
+or *#*#34971539#*#*
+*#80# (Unknown)
+*#07# (Test History)
+*#3214789# (GCF Mode Status)
+*#272886# (Auto Answer Selection)
+*#8736364# (OTA Update Menu)
+*#301279# (HSDPA/HSUPA Control Menu)
+*#7353# (Quick Test Menu)
+*2767*4387264636# (Sellout SMS / PCODE view)
+*#7465625# (View Phone Lock Status)
+*7465625*638*# (Configure Network Lock MCC/MNC)
+#7465625*638*# (Insert Network Lock Keycode)
+*7465625*782*# (Configure Network Lock NSP)
+#7465625*782*# (Insert Partitial Network Lock Keycode)
+*7465625*77*# (Insert Network Lock Keycode SP)
+#7465625*77*# (Insert Operator Lock Keycode)
+*7465625*27*# (Insert Network Lock Keycode NSP/CP)
+#7465625*27*# (Insert Content Provider Keycode)
+
+
+
+*#06# (Display IMEI number)*#1234# (Display current firmware)
+*#*#4636#*#* (Diagnostic and general settings mode)
+*#*#7780#*#* (Factory soft reset)or *#7780#
+*2767*3855# (Factory hard reset to ROM firmware default settings)
+
+*2767*4387264636# (To display product code)
+*#272*imei#* (Display/change CSC code)or *#272*HHMM#*
+
+*#*#1472365#*#* (GPS test settings)
+
+*#*#197328640#*#* (Service mode main menu)
+
+*#12580*369# (SW & HW Info)
+*#0228# (ADC Reading)
+*#32489# (Ciphering Info)
+*#232337# (Bluetooth Address)
+*#232331# (Bluetooth Test Mode)
+*#232338# (WLAN MAC Address)
+*#232339# (WLAN Test Mode)
+*#0842# (Vibra Motor Test Mode)
+*#0782# (Real Time Clock Test)
+*#0673# (Audio Test Mode)
+*#0*# (General Test Mode)
+*#2263# (RF Band Selection)
+*#9090# (Diagnostic ConfiguratioN)
+*#7284# (USB I2C Mode Control)
+*#872564# (USB Logging Control)
+*#4238378# (GCF Configuration)
+*#0283# (Audio Loopback Control)
+*#1575# (GPS Control Menu)
+*#3214789650# (LBS Test Mode)
+*#745# (RIL Dump Menu)
+*#746# (Debug Dump Menu)
+*#9900# (System Dump Mode)
+*#44336# (Sofware Version Info)
+
+*#0289# (Melody Test Mode)
+*#2663# (TSP / TSK firmware update)
+*#03# (NAND Flash S/N)
+*#0589# (Light Sensor Test Mode)
+*#0588# (Proximity Sensor Test Mode)
+*#273283*255*3282*# (Data Create Menu)
+*#273283*255*663282*# (Data Create SD Card)
+*#3282*727336*# (Data Usage Status)
+*#7594# (Remap Shutdown to End Call TSK)
+*#34971539# (Camera Firmware Update)
+*#526# (WLAN Engineering Mode)
+*#528# (WLAN Engineering Mode)
+*#7412365# (Camera Firmware Menu)or *#*#34971539#*#*
+*#80# (Unknown)
+*#07# (Test History)
+*#3214789# (GCF Mode Status)
+*#272886# (Auto Answer Selection)
+*#8736364# (OTA Update Menu)
+*#301279# (HSDPA/HSUPA Control Menu)
+*#7353# (Quick Test Menu)
+*2767*4387264636# (Sellout SMS / PCODE view)
+*#7465625# (View Phone Lock Status)
+*7465625*638*# (Configure Network Lock MCC/MNC)
+#7465625*638*# (Insert Network Lock Keycode)
+*7465625*782*# (Configure Network Lock NSP)
+#7465625*782*# (Insert Partitial Network Lock Keycode)
+*7465625*77*# (Insert Network Lock Keycode SP)
+#7465625*77*# (Insert Operator Lock Keycode)
+*7465625*27*# (Insert Network Lock Keycode NSP/CP)
+#7465625*27*# (Insert Content Provider Keycode)
--- /dev/null
+###neue screen session
+screen -S sessionname
+###session shortcuts
+screen command Task
+Ctrl+a c Create new window
+Ctrl+a k Kill the current window / session
+Ctrl+a w List all windows
+Ctrl+a 0-9 Go to a window numbered 0 9, use Ctrl+a w to see number
+Ctrl+a Ctrl+a Toggle / switch between the current and previous window
+Ctrl+a S Split terminal horizontally into regions and press Ctrl+a c to create new window there
+Ctrl+a :resize Resize region
+Ctrl+a :fit Fit screen size to new terminal size. You can also hit Ctrl+a F for the the same task
+Ctrl+a :remove Remove / delete region. You can also hit Ctrl+a X for the same taks
+Ctrl+a tab Move to next region
+Ctrl+a D (Shift-d) Power detach and logout
+Ctrl+a d Detach but keep shell window open
+Ctrl-a Ctrl-\ Quit screen
+Ctrl-a ? Display help screen i.e. display a list of commands
+###session wieder aufnehmen
+screen -r session
+###Tastenkürzel anzeigen
+STRG-A ?
+###screen mit mehreren Nutzern teilen
+#screen session starten
+screen -S mu
+#multiuser einschalten
+STRG-A :
+multiuser on
+#Benutzer Berechtigung setzen
+acladd nutzer2
+#nutzer2 startet screen mit
+screen -xr nutzer2/
+###screen als terminal
+screen /dev/[device name] 115200
+###Auflistung laufender Sitzungen
+screen -ls
+###sitzung trennen
+screen -d sitzung
+###Befehl in Sitzung sitzung senden und ausführen (\n für [ENTER]):
+screen -S sitzung -X stuff $'ls -l\n'
--- /dev/null
+###von hinten genau eine Zahl bis zum (incl.) / suchen und ersetzen durch /0gefundene Zahl
+sed -e 's+/\([0-9]\)$+/0\1+'
+Bsp.: echo 5550017/2/1186505/1|sed -e 's+/\([0-9]\)$+/0\1+' Erg.: 5550017/2/1186505/01
+### ersetzen von am anfang 0 durch a
+sed -e "s/^0/a/"
+###ersetzt __ durch _hertz_ wenn am anfang der zeile S9000 steht in allen dat-files
+sed -i "/^S9000/s/__/_hertz_/" *.dat
+### leezeilen entfernen
+sed -e '/^\s*$/d' datei_mit_leerzeilen.txt
+### erste zeile löschen (1 beliebige Zahl der zu löschenden Zeilen)
+sed 1d
+### Doppelter Zeilenvorschub
+sed G
+### Doppelter Zeilenabstand für Dateien, die Leerzeilen enthalten.
+### Die Ausgabe sollte keine zwei aufeinander folgenden Leerzeilen enthalten.
+sed '/^$/d;G'
+###Dreifacher Zeilenvorschub
+sed 'G;G'
+### Doppelter Zeilenvorschub rückgängig machen
+### (Annahme: jede zweite Zeile ist leer)
+sed 'n;d'
+### Füge eine Leerzeile über jeder Zeile ein, die "regex" enthält
+sed '/regex/{x;p;x;}'
+### Füge eine Leerzeile unter jeder Zeile ein, die "regex" enthält
+sed '/regex/G'
+### Füge eine Leerzeile über und unter jeder Zeile ein, die "regex" enthält
+sed '/regex/{x;p;x;G;}'
+### Nummeriere alle Zeilen (linksbündig). Der Tabulator anstelle von Leerzeichen
+### erhält den Rand. (siehe auch die Bemerkung zu '\t' am Ende dieser Datei)
+sed = filename | sed 'N;s/\n/\t/'
+### Nummeriere alle Zeilen (Zahl rechtsbündig in linker Spalte)
+sed = filename | sed 'N; s/^/ /; s/ *\(.\{6,\}\)\n/\1 /'
+### Nummeriere alle Zeilen, aber die Nummern von Leerzeilen werden nicht ausgegeben.
+sed '/./=' filename | sed '/./N; s/\n/ /'
+### Zeilen zählen (Nachahmung von "wc -l")
+sed -n '$='
+
+TEXT UMWANDLUNG UND ERSETZUNG:
+
+ # IN EINER UNIX UMGEBUNG: Wandle DOS Zeilenvorschübe (CR/LF) in das Unix-Format.
+ sed 's/.$//' # Annahme: Alle Zeilen enden mit CR/LF
+ sed 's/^M$//' # Bei bash/tcsh: Ctrl-V dann Ctrl-M
+ sed 's/\x0D$//' # für ssed, gsed 3.02.80 oder neuere Versionen
+
+ # IN EINER UNIX UMGEBUNG: Wandle Unix Zeilenvorschübe (LF) in das DOS-Format.
+ sed "s/$/`echo -e \\\r`/" # ksh
+ sed 's/$'"/`echo \\\r`/" # bash
+ sed "s/$/`echo \\\r`/" # zsh
+ sed 's/$/\r/' # gsed 3.02.80 oder neuere Versionen
+
+ # IN EINER DOS UMGEBUNG: Wandle Unix Zeilenvorschübe (LF) in das DOS-Format.
+ sed "s/$//" # Möglichkeit 1
+ sed -n p # Möglichkeit 2
+
+ # IN EINER DOS UMGEBUNG: Wandle DOS Zeilenvorschübe (CR/LF) in das Unix-Format.
+ # Die kann mit mit der UnxUtils Version von sed, Version 4.0.7 oder neuer
+ # gemacht werden. Die UnxUtils Version von sed kann durch die zusätzliche
+ # "--text" Option bestimmt werden, die beim Aufruf mit "--help" angezeigt wird.
+ # Ansonsten kann die Umwandlung von DOS-Zeilenvorschüben in UNIX-Zeilenvorschübe
+ # nicht mit sed unter DOS vorgenommen werden. Benutzen Sie stattdessen "tr".
+ sed "s/\r//" infile >outfile # UnxUtils sed v4.0.7 oder neuer
+ tr -d \r <infile >outfile # GNU tr Version 1.22 oder neuer
+
+ # Lösche alle Einrückungen (Leerzeichen, Tabulatoren) vom Anfang jeder Zeile
+ # Richtet alle Zeilen linksbündig aus.
+ sed 's/^[ \t]*//' # (siehe auch die Bemerkung zu '\t' am Ende dieser Datei)
+
+ # Lösche unsichtbare Zeichen (Leerzeichen, Tabulatoren) vom Ende aller Zeilen
+ sed 's/[ \t]*$//' # (siehe auch die Bemerkung zu '\t' am Ende dieser Datei)
+
+ # Lösche unsichtbare Zeichen sowohl am Anfang als auch am Ende jeder Zeile
+ sed 's/^[ \t]*//;s/[ \t]*$//'
+
+ # Füge 5 Leerzeichen am Anfang jeder Zeile ein. (Einrückung)
+ sed 's/^/ /'
+
+ # Alle Zeilen rechtsbündig ausrichten (Spaltenbreite: 79 Zeichen)
+ sed -e :a -e 's/^.\{1,78\}$/ &/;ta' # set at 78 plus 1 space
+
+ # Zentriere alle Zeilen in einer 79-Zeichen breiten Spalte.
+ # Bei Methode 1 bleiben Leerzeichen am Zeilenanfang und -ende erhalten.
+ # Bei Methode 2 werden Leerzeichen am Zeilenanfang gelöscht und es
+ # folgen keine Leerzeichen am Zeilenende.
+ sed -e :a -e 's/^.\{1,77\}$/ & /;ta' # Möglichkeit 1
+ sed -e :a -e 's/^.\{1,77\}$/ &/;ta' -e 's/\( *\)\1/\1/' # Möglichkeit 2
+
+ # Ersetze (Suchen und Ersetzen) "foo" mit "bar" in jeder Zeile
+ sed 's/foo/bar/' # Ersetzt nur das 1. Vorkommen pro Zeile
+ sed 's/foo/bar/4' # Ersetzt nur das 4. Vorkommen pro Zeile
+ sed 's/foo/bar/g' # Ersetzt ALLE Vorkommen von "foo" mit "bar"
+ sed 's/\(.*\)foo\(.*foo\)/\1bar\2/' # Ersetzt nur das vorletzte Vorkommen pro Zeile
+ sed 's/\(.*\)foo/\1bar/' # Ersetzt nur das letzte Vorkommen pro Zeile
+
+
+ # Ersetze "foo" mit "bar" NUR in Zeilen die "baz" enthalten
+ sed '/baz/s/foo/bar/g'
+
+ # Ersetze "foo" mit "bar" AUSSER in Zeilen die "baz" enthalten
+ sed '/baz/!s/foo/bar/g'
+
+ # Ersetze "scarlet", "ruby" oder "puce" mit "red"
+ sed 's/scarlet/red/g;s/ruby/red/g;s/puce/red/g' # Die meisten seds
+ gsed 's/scarlet\|ruby\|puce/red/g' # Nur GNU sed
+
+ # Kehre die Reihenfolge der Zeilen um (entspricht "tac")
+ # Bug/Feature in HHsed v1.5 löscht hierbei Leerzeilen
+ sed '1!G;h;$!d' # Möglichkeit 1
+ sed -n '1!G;h;$p' # Möglichkeit 2
+
+ # Kehre die Reihenfolge der Buchstaben innerhalb jeder Zeile um (entspricht "rev")
+ sed '/\n/!G;s/\(.\)\(.*\n\)/&\2\1/;//D;s/.//'
+
+ # Füge Zeilenpaare nebeneinander zusammen (entspricht "paste")
+ sed '$!N;s/\n/ /'
+
+ # Falls eine Zeile mit einem Rückwärtsstrich "\" endet, füge die nächste hinzu.
+ sed -e :a -e '/\\$/N; s/\\\n//; ta'
+
+ # Falls eine Zeile mit einem Gleichheitszeichen "=" beginnt,
+ # füge die vorhergehende hinzu und ersetzt das "=" mit einem Leerzeichen.
+ sed -e :a -e '$!N;s/\n=/ /;ta' -e 'P;D'
+
+ # Füge Kommas in Zahlenfolgen ein. Aus "1234567" wird "1,234,567"
+ gsed ':a;s/\B[0-9]\{3\}>/,&/;ta' # GNU sed
+ sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{3\}\)/\1,\2/;ta' # Andere seds
+
+ # Füge Kommas in Zahlenfolgen mit Dezimalpunkt und Vorzeichen ein. (GNU sed)
+ gsed -r ':a;s/(^|[^0-9.])([0-9]+)([0-9]{3})/\1\2,\3/g;ta'
+
+ # Füge alle 5 Zeilen eine Leerzeile ein. (Nach 5, 10, 15, 20,... Zeilen)
+ gsed '0~5G' # GNU sed
+ sed 'n;n;n;n;G;' # andere seds
+
+DRUCKEN AUSGEWÄHLTER ZEILEN:
+
+ # Ausgabe der ersten 10 Zeilen einer Datei (wie "head")
+ sed 10q
+
+ # Ausgabe der ersten Zeilen einer Datei (wie "head -1")
+ sed q
+
+ # Ausgabe der letzten 10 Zeilen einer Datei (wie "tail")
+ sed -e :a -e '$q;N;11,$D;ba'
+
+ # Ausgabe der letzten beiden Zeilen einer Datei (wie "tail -2")
+ sed '$!N;$!D'
+
+ # Ausgabe der letzten Zeilen einer Datei (wie "tail -1")
+ sed '$!d' # Möglichkeit 1
+ sed -n '$p' # Möglichkeit 2
+
+ # Ausgabe der vorletzten Zeile einer Datei
+ sed -e '$!{h;d;}' -e x # Bei einzeiligen Dateien wird eine Leerzeile ausgegeben
+ sed -e '1{$q;}' -e '$!{h;d;}' -e x # Bei einzeiligen Dateien wird die Zeile ausgegeben
+ sed -e '1{$d;}' -e '$!{h;d;}' -e x # Bei einzeiligen Dateien wird nichts ausgegeben
+
+ # Ausgabe der Zeilen, die durch Lösche ALLE Leerzeilen aus einer Datei (wie "grep '.' ")
+ sed. auf dem Bildschirm ausgegeben.
+Daher gilt:
+
+ cat filename | sed '10q' # Benutzt die "Pipe" zur Eingabe
+ sed '10q' filename # gleicher Effekt, spart das unnötige "cat"
+ sed '10q' filename > newfile # Leitet die Ausgabe um ins Dateisystem
+
+Weitere Erklärungen des Sysntax, inklusive der Möglichkeit Befehle
+von einer Datei statt von der Befehlszeile zu benutzen sind in "sed &
+awk, 2nd Edition," von Dale Dougherty und Arnold Robbins (O'Reilly,
+1997; http://www.ora.com), "UNIX Text Processing," von Dale Dougherty
+und Tim O'Reilly (Hayden Books, 1987) oder in den Anleitungen von Mike Arst
+die als U-SEDIT2.ZIP au vielen Seiten zum Download bereit stehen zu finden.
+
+Um alle Möglichkeiten von sed zu nutzen, muss man Reguläre Ausdrücke
+verstehen. Hierfür können folgende Bücher herangezogen werden:
+"Mastering Regular Expressions" von Jeffrey Friedl (O'Reilly, 1997).
+Die Manual-Seiten ("man") auf Unix-Systemen können auch hilfreich sein.
+("man sed", "man regexp", oder der Abschnitt über Reguläre Ausdrücke in
+"man ed"), aber einige dieser Seiten sind für ihren Schwierigkeitsgrad
+bekannt. Sie sind nicht als Einführung für neue Sed- oder Regex-Benutzer
+geschrieben, sondern als Referenz für diejenigen, die diese Werkzeuge
+bereits beherrschen.
+
+BENUTZUNG VON HOCHKOMMAS:
+Die angeführten Beispiele schließen die Anweisungen in einfache
+Anführungszeichen ('...') anstatt der doppelten ("...") ein, da
+sed typischerweise in einer Unix-Umgebung zur Anwendung kommt.
+Einfache Anführungszeichen hindern die Unix-Shell (Kommandozeile)
+daran, das Dollarzeichen ($) und die umgekehrten Hochkommas (`...`)
+auszuwerten, wie dies bei der verwendung von doppelten Anführungszeichen
+("...") der Fall wäre.
+Benutzer der "csh" Shell und deren Weiterentwicklungen müssen ausserdem
+trotz verwendung von einfachen Anführungszeichen alle Ausrufezeichen (!)
+mit einem Rückwärtsstrich schützen (z.B. "\!") um die Beispiele korrekt
+ausführen zu können.
+DOS-Versionen von sed benötigen allesamt doppelte Anführungszeichen ("...")
+um die Befehle herum.
+
+DIE BENUTZUNG VON '\t' IN SED-SCRIPTEN:
+Der Deutlichkeit halber haben wir in diesem Dokument die Zeichenfolge '\t'
+benutzt, um das Tabulatorzeichen (0x09) darzustellen. Die meisen Versionen
+von sed kennen jedoch diese Darstellung nicht.
+Bei der Eingabe der Befehle muss '\t' durch drücken der Tabulatortaste
+eingegeben werden. '\t' wird von awk, perl, HHsed, sedmod, und GNU sed
+v3.02.80 in regulären Ausdrücken als Tabulator anerkannt.
+
+VERSIONEN VON SED:
+Die unterschiedlichen sed-versionen haben unterschied und man muss auch
+mit leichten Unterschieden im Syntax rechnen. Besonders die Benutzung von
+Marken (:name) oder Verzweigungen (b,t) innerhalb von Kommandos (nicht an
+deren Ende) werden von vielen Versionen nicht unterstützt.
+Wir haben eine Schreibweise gewählt, die sich mit den meisten Versionen
+von sed benutzen lässt, auch wenn die beliebten GNU-Versionen von sed eine
+elegantere Schreibweise erlauben würden.
+Wem man einen ziemlich langen Befehl wie den folgenden sieht:
+
+ sed -e '/AAA/b' -e '/BBB/b' -e '/CCC/b' -e d
+
+ist es gut zu wissen, dass man diesen mit GNU-sed zu folgendem kürzen kann:
+
+ sed '/AAA/b;/BBB/b;/CCC/b;d' # oder sogar
+ sed '/AAA\|BBB\|CCC/b;d'
+
+Ausserdem ist zu beachten, dass obwohl viele Versionen von sed einen Befehl
+wie "/one/ s/RE1/RE2/" erlauben, einige "/one/! s/RE1/RE2/" NICHT erlauben,
+was ein Leerzeichen vor dem 's' enthält. Bei der Eingabe der Befehle muss hier
+das Leerzeichen weggelassen werden.
+
+GESCHWINDIGKEITSOPTIMIERUNG:
+Falls die ausfürungsgeschwindigkeit wegen großen Dateien oder langsamen CPUs
+bzw. Festplatten erhöht werden muss, können Ersetzungen beschleunigt werden,
+indem der gesuchte Ausdruck vor dem "s/.../.../" genannt wird. Es gilt:
+
+ sed 's/foo/bar/g' filename # Normales Suchen & Ersetzen
+ sed '/foo/ s/foo/bar/g' filename # Schnellere Version
+ sed '/foo/ s//bar/g' filename # sed Kurzschreibweise
+
+Wenn bei der Auswahl oder Löschung von Zeilen nur Zeilen aus dem Dateianfang
+ausgegeben werden sollen, verkürzt bei großen Dateien ein "quit" Befehl (q)
+die Bearbeitungszeit erheblich. Daher:
+
+ sed -n '45,50p' filename # Ausgabe der Zeilen 45-50 einer Datei
+ sed -n '51q;45,50p' filename # dito, aber biel schnel
+
--- /dev/null
+google.de 209.85.229.104, 216.239.59.104, 74.125.77.104
+htwm.de 141.55.192.70
+postbank.de 62.153.105.39
+dkb.de 212.34.64.27
+www.opendns.org 208.67.219.99
+DNS Server opendns 208.67.222.222; 208.67.220.220
--- /dev/null
+#!/bin/sh
+DEV=eth3
+RATEUP=700mbit
+MINCLASSRATE=100mbit
+
+TC="/usr/sbin/tc"
+
+if [ "$1" = "status" ]
+then
+ echo "[qdisc]"
+ $TC -s qdisc show dev $DEV
+ echo "[class]"
+ $TC -s class show dev $DEV
+ echo "[filter]"
+ $TC -s filter show dev $DEV
+ exit
+fi
+
+# Reset everything to a known state (cleared)
+$TC qdisc del dev $DEV root 2> /dev/null > /dev/null
+
+if [ "$1" = "stop" ]
+then
+ echo "Shaping removed on $DEV."
+ exit
+fi
+
+
+echo "Starting outbound shaping..."
+
+###########################################################
+#
+# Outbound Shaping (limits total bandwidth to RATEUP)
+
+# add HTB root qdisc
+$TC qdisc add dev $DEV root handle 1: htb default 26
+
+# add main rate limit class
+$TC class add dev $DEV parent 1: classid 1:1 htb rate ${RATEUP}
+# class for local traffic
+$TC class add dev $DEV parent 1: classid 1:2 htb rate 100mbit
+
+# add leaf classes
+#
+# We grant each class at LEAST it's "fair share"
+# of bandwidth. this way no class will ever be
+# starved by another class. Each class is also
+# permitted to consume all of the available bandwidth
+# if no other classes are in use.
+
+## create fair-share-classes, descending priority
+$TC class add dev $DEV parent 1:1 classid 1:20 htb rate ${MINCLASSRATE} ceil ${RATEUP} prio 0
+$TC class add dev $DEV parent 1:1 classid 1:21 htb rate ${MINCLASSRATE} ceil ${RATEUP} prio 1
+$TC class add dev $DEV parent 1:1 classid 1:22 htb rate ${MINCLASSRATE} ceil ${RATEUP} prio 2
+$TC class add dev $DEV parent 1:1 classid 1:23 htb rate ${MINCLASSRATE} ceil ${RATEUP} prio 3
+$TC class add dev $DEV parent 1:1 classid 1:24 htb rate ${MINCLASSRATE} ceil ${RATEUP} prio 4
+$TC class add dev $DEV parent 1:1 classid 1:25 htb rate ${MINCLASSRATE} ceil ${RATEUP} prio 5
+$TC class add dev $DEV parent 1:1 classid 1:26 htb rate ${MINCLASSRATE} ceil ${RATEUP} prio 6
+
+# attach qdisc to leaf classes
+# here we at SFQ to each priority class. SFQ insures
+# that within each class connections will be treated
+# (almost) fairly.
+$TC qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
+$TC qdisc add dev $DEV parent 1:21 handle 21: sfq perturb 10
+$TC qdisc add dev $DEV parent 1:22 handle 22: sfq perturb 10
+$TC qdisc add dev $DEV parent 1:23 handle 23: sfq perturb 10
+$TC qdisc add dev $DEV parent 1:24 handle 24: sfq perturb 10
+$TC qdisc add dev $DEV parent 1:25 handle 25: sfq perturb 10
+$TC qdisc add dev $DEV parent 1:26 handle 26: sfq perturb 10
+
+# filter traffic into classes by fwmark
+#
+# here we direct traffic into priority class according
+# to the fwmark set on the packet (we set fwmark with
+# iptables later). Note that above we've set the
+# default priority class to 1:26 so unmarked packets
+# (or packets marked with unfamiliar IDs) will be
+# defaulted to the lowest priority class.
+$TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 20 fw flowid 1:20
+$TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 21 fw flowid 1:21
+$TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 22 fw flowid 1:22
+$TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 23 fw flowid 1:23
+$TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 24 fw flowid 1:24
+$TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 25 fw flowid 1:25
+$TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 26 fw flowid 1:26
+$TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 2 fw flowid 1:2
--- /dev/null
+###Belegung der Dosen
+1 leer
+2 Homematic CCU
+3 Licht Weide
+4 Backup Platte 500GB
--- /dev/null
+#! /bin/bash
+#
+# DVD's als VDR-Aufnahme mounten
+# damit mehr als 8 loopback mounts möglich sind
+# max_loop=257
+# eintragen, z.B. in menu.lst
+#
+
+ISO_DIR=/media/hd/dvd
+MOUNT_DIR=/tmp/loop
+TARGET_DIR=/video0/ISO2VDR
+RECDATE="2010-04-01.00.00.00.00.rec"
+for iso in $ISO_DIR\/*.iso; do
+ name=$(echo $iso |sed 's/.iso$//' |sed 's/.*\///g' ) ;
+ echo $name
+ ## Loopback mounten
+ if [ `mount |grep "$MOUNT_DIR/$name" | wc -l` -ne "1" ] ; then
+ mkdir -p "$MOUNT_DIR/$name"
+ mount -o loop "$iso" "$MOUNT_DIR/$name"
+ if [ ! -d "$TARGET_DIR/$name/$RECDATE/" ] ; then
+ ## VDR Verzeichnisse anlegen
+ mkdir -p "$TARGET_DIR/$name/$RECDATE/"
+ cnt=1;
+ for vob in "$MOUNT_DIR/$name/VIDEO_TS/"*; do
+ if [ $(echo $vob | grep -ci vob) -eq "1" ] ; then
+ if [ $cnt -ge "10" ] ; then
+ ln -s "$vob" "$TARGET_DIR/$name/$RECDATE/0$cnt.vdr"
+ else
+ ln -s "$vob" "$TARGET_DIR/$name/$RECDATE/00$cnt.vdr"
+ fi
+ (( cnt++ ))
+ fi
+ done
+ cd "$TARGET_DIR/$name/$RECDATE/"
+ /usr/bin/genindex
+ cd -
+ fi
+ fi
+done
--- /dev/null
+###Client meldet sich an
+HELO client.example.org
+###Client gibt Absenderadresse an
+MAIL FROM:<bar@example.org>
+###Empfänger angeben
+RCPT TO:<foo@example.com>
+###Client möchte jetzt die Mail mitteilen
+DATA
+###Zeile mit nur punkt, ende der mail
+###Ende
+QUIT
--- /dev/null
+###Service Menü Sony Fernseher
+First, turn off power with the main switch on the front panel.
+
+Hold the plus and minus buttons on the front panel and turn on power. Wait for picture, then release the plus and minus buttons. It now shows "TT" (test mode) on screen.
+
+Once "TT" isdisplayed, select a number from the remote:
+
+The newer Sony televisions use a different procedure to senter service mode:
+
+ Turn on the main power switch and enter into the stand-by mode.
+ Press the following sequence of buttons on the Remote Control:
+ info/disp (OSD)
+ 5 (Number 5)
+ vol+ (Volume Up)
+ TV
+
+ -or-
+
+ [it]
+ [5] (Number 5)
+ [vol+] (Volume Up)
+ [teletext off]
+
+ -or-
+
+ On TV:
+ Hard Power On
+ On Remote:
+ Standby Off
+ [i+]
+ [5]
+ [Vol+]
+ Digital TV
+
+The television will turn on and "TT" will appear in the upper right corner of the screen. Other status information will also be displayed. Press "MENU" on the remote control to obtain the following menu on the screen:
+# Picture Adjustment
+# Geometry
+# Wide
+# IC Status
+# MSP
+# Current TV status
+
+ Also you can enter "TT" mode by opening the little hatch on the front, holding [P+] and [P-] (prog. button) switching main power on - then pressing menu twice enters the service menu.
+
+Move to the corresponding adjustment using the button on the remote. Press the + button to enter the selected adjustment. Turn off the power to quit the service mode or enter 0, 0 (zero twice) when adjustments have been completed.
+
+
+
+Go Home LIST OF SETTINGS Go Top
+
+ ITEM DESCRIPTION
+-------------------------------------------------------------
+ 00 TT Mode off (save and exit)
+ 01 Service menu on
+ 02 No function
+ 03 Set vol to 30%
+ 04 Service menu in "Service Mode"
+ 05 Serve menu in "production Mode"
+ 06 Set vol. to 80%
+ 07 Aging mode (picture goes normal to bright)
+ 08 Shipping condition (Reset to defaults - affects brightness/contrast only)
+ 09 Language reset (effective after power cycle)
+ 11 (menus locks up - requires a power off reset)
+ 13 Display of software version
+ 13 SCART 16:9 On -> Off -> On (auto 16:9 switching by SCART connector control voltage level)
+ 14 Production info display: TV Status Menu (view only) + SW version info
+ 15 Norm
+ 18 RGB Priority On / Off
+ 22 Operating timer and error mem. display
+ 24 Chassis Destination: UK (United Kingdom?)
+ 25 Chassis Destination: D (Germany?)
+ 26 Chassis Destination: B (Belgium?)
+ 27 Chassis Destination: K
+ 28 Chassis Destination: L (Luxemburg?)
+ 29 Chassis Destination: E (Spain?)
+ 31 Chassis Destination: A (Austria?)
+ 32 Chassis Destination: R
+ 36 Rotation Test (3 steps)
+ 37 Size: 25 Inch
+ 38 Size: 29 Inch
+ 39 Colour Trap Switch: Off, SECAM only, All
+ 55 (screen goes back to normal when it's gone bright after using code 56)
+ 56 (screen slowly goes very bright)
+ 57 AV3 (front) input enabled
+ 58 AV3 (front) input disabled
+ 74 (Teletext screen comes up)
+ 99 Enter Service Mode
+
+NAVIGATE IN SERVICE MODE
+
+The service menu (01):
+Up/Down (menu keys) you may select the module (controller chip) to modify.
+OK selects the highlighted module.
+Choose a parameter with Up/Down. OK then selects the parameter.
+Up/Down changes the value.
+OK writes the value to memory.
+"Speaker Off" will toggle the display of the menu. The function is kept even when the menu is not displayed.
+Exit from service mode with "teletext cancel key".
+
--- /dev/null
+###engeniering menü
+http://192.168.178.1/engineer/html/interface.html?lang=de
+####tools zum auslesen
+https://github.com/melle/l33tport/tree/master/rrdtool
+###
--- /dev/null
+###zerschnippeln eines OSM Datensatzes (wget http://www.mkgmap.org.uk/splitter/splitter.jar)
+java -Xmx5000M -jar splitter.jar --mapid=63240345 --max-nodes=1000000 ../germany.osm
+###Dateien die entstehen und ihre Bedeutung
+template.args - diese Datei kann bei mkgmap mit Option -c genutzt werden um alle Dateien zu nutzen
+areas.list - Liste der Einzelregionen die berechnet wurden als Rechtecke
+areas.poly - Liste der Einzelregionen als Polygone --polygon-file für Nutzung
+densities-out.txt - debugging infos
+
--- /dev/null
+###port von remote host auf lokalen umlenken (631 von server auf localhost:8080)
+ssh -L 8080:localhost:631 root@server
+###tunnel für vnc über einen server
+#fernszusteuernder rechner
+ssh -R 5900:localhost:5900 nutzer@server
+#fernsteuerer
+ssh -L 5900:localhost:5900 nutzer@server
+#danach dann vncviewer localhost auf den fernsteuerer
+###Escape-Kommandos
+. Beendet die Sitzung
+& beendet Sitzung und Tunnel bleibt bestehen
+C zeigt Promt ssh> hier kann man nachträglich Portforwarding einrichten
+# zeigt alle Verbindungen an die über den Tunnel laufen
+? Hilfe
+###Verschlüsselung blowfish verwenden, geht schneller
+ssh -c blowfish
+ssh -o Cipher=blowfish
+###neuen publickey aus private key erzeugen
+ssh-keygen -y -f ~/.ssh/id_rsa
+###Passphrase nachträglich ändern
+ssh-keygen -p -f ~/.ssh/id_rsa
+###Von A (dem lokalen Rechner) nach B (Remote Rechner)
+ssh -g -R remote_port:localhost:local_port login@B
--- /dev/null
+-----BEGIN CERTIFICATE-----
+MIIDnDCCAoQCCQD/84qydOvM4DANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMC
+REUxEDAOBgNVBAgTB1NhY2hzZW4xETAPBgNVBAcTCENoZW1uaXR6MREwDwYDVQQK
+Ewhtb2VsbGVpbjERMA8GA1UECxMIbW9lbGxlaW4xETAPBgNVBAMTCG1vZWxsZWlu
+MSIwIAYJKoZIhvcNAQkBFhNtb2VsbGVpbkBmcmVlbmV0LmRlMB4XDTA5MDEyMjEw
+MDIyNVoXDTEwMDEyMjEwMDIyNVowgY8xCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdT
+YWNoc2VuMREwDwYDVQQHEwhDaGVtbml0ejERMA8GA1UEChMIbW9lbGxlaW4xETAP
+BgNVBAsTCG1vZWxsZWluMREwDwYDVQQDEwhtb2VsbGVpbjEiMCAGCSqGSIb3DQEJ
+ARYTbW9lbGxlaW5AZnJlZW5ldC5kZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBANAvcqfvwbc9JuNLiDoq6OBOOvLeH2hzWQ0jPQEmFJrV27wdr0Cfpus0
+VPSvvavko69mij1E7NI5Sqp+yo8CKi9KPNxHOgaGrljzP1rABww4JXWm+8oDxZm3
+FgpzFtdKeMETJ+1MBXjiD3eu76Vw9XTumHnsD2c6d7Cd1QiUNws4yNEfd+D4o63d
+P3gnTa7W9APuW0sOUEtdrS3mE5Mo3J4e1c3zdbtUu8xb7BJa/NYF7hylegN6ylRW
+31p0GpSJjgLwDOxW7mWX+LHEWONpUQg1gEqSgd89WI2m35WBFVqx2LL2fL1JDRub
+ToISvaogFePfgrAGo9ROxjHG/R2D1VECAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
+cazqpE+Tw8xsPXB7kCpOkvNk1WP2vCbs76R/PgtfrP9+u4rs+YUx+cMo+/hyUMIX
+z6ogME8bPqr7mfCLBMH96KN88plEsGtVHwL9cSN6McFe/DzXz4f7kRxoqkKOOB6Y
+cks0GLYI3M9TdQljQXJNr2FONH1zQdvg/nZQ8FF0GpJ0sL+gLi2qWAJrr25dUte0
+GbriDQZN1U2E+BpdcyzjZBTD22/iACo1UmVqukr4XXRuXCgkLM873HU+hG+cl9m3
+2st2aUPbdVlrRTXdHbsJKvBt/wWsUmeXbad/Ga7uF91SgFsjxwHp/OaikjkdWpQm
+z6jO65IpUul0R0jJnMlMNg==
+-----END CERTIFICATE-----
--- /dev/null
+-----BEGIN CERTIFICATE REQUEST-----
+MIIC1TCCAb0CAQAwgY8xCzAJBgNVBAYTAkRFMRAwDgYDVQQIEwdTYWNoc2VuMREw
+DwYDVQQHEwhDaGVtbml0ejERMA8GA1UEChMIbW9lbGxlaW4xETAPBgNVBAsTCG1v
+ZWxsZWluMREwDwYDVQQDEwhtb2VsbGVpbjEiMCAGCSqGSIb3DQEJARYTbW9lbGxl
+aW5AZnJlZW5ldC5kZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAv
+cqfvwbc9JuNLiDoq6OBOOvLeH2hzWQ0jPQEmFJrV27wdr0Cfpus0VPSvvavko69m
+ij1E7NI5Sqp+yo8CKi9KPNxHOgaGrljzP1rABww4JXWm+8oDxZm3FgpzFtdKeMET
+J+1MBXjiD3eu76Vw9XTumHnsD2c6d7Cd1QiUNws4yNEfd+D4o63dP3gnTa7W9APu
+W0sOUEtdrS3mE5Mo3J4e1c3zdbtUu8xb7BJa/NYF7hylegN6ylRW31p0GpSJjgLw
+DOxW7mWX+LHEWONpUQg1gEqSgd89WI2m35WBFVqx2LL2fL1JDRubToISvaogFePf
+grAGo9ROxjHG/R2D1VECAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4IBAQBvqQvrRrzP
+U1MIi2uBt7gvG7kvBNjjGOmvkVIRubCYOOMZaCa3sBzUyXZv1vdMQWrkirSORvwR
+ZKKdp30trZ7v4HyQ3e/Ow582hs6tVFvMr/dmy5f1Us2920UjXZyAu5ohOLWDBbLk
+6XlLHUmyeePNQKveDY4bY0i+orgdddv95eB3K5osAchK5kokongNs2ejLbP2YvTM
+0v/kNpE3JttAYyxWXupqmo3/CNIXy9yecaRjlfsfONov18BwtWHd3mg7b20oIAT3
+lcFaGq3gf1FDsc0zpwO5NPrQb4OaNVn2FKBQRqwGQLj5e8xxwrhM6caSmJQTEvOH
+8dFVtHHpFvvG
+-----END CERTIFICATE REQUEST-----
--- /dev/null
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEA0C9yp+/Btz0m40uIOiro4E468t4faHNZDSM9ASYUmtXbvB2v
+QJ+m6zRU9K+9q+Sjr2aKPUTs0jlKqn7KjwIqL0o83Ec6BoauWPM/WsAHDDgldab7
+ygPFmbcWCnMW10p4wRMn7UwFeOIPd67vpXD1dO6YeewPZzp3sJ3VCJQ3CzjI0R93
+4Pijrd0/eCdNrtb0A+5bSw5QS12tLeYTkyjcnh7VzfN1u1S7zFvsElr81gXuHKV6
+A3rKVFbfWnQalImOAvAM7FbuZZf4scRY42lRCDWASpKB3z1YjabflYEVWrHYsvZ8
+vUkNG5tOghK9qiAV49+CsAaj1E7GMcb9HYPVUQIDAQABAoIBAQCLgdA2g27vqNX/
+aKUwPYLylNnh2EF50BozuJJvy6HxJDBsfgPrrVDAur/XfFEA+GVL683lQuPj+Cp1
+2CNK8+tq5zejcUOMDgKVbuPcn2PZp2JK1gxSknZ/DHaDqB39RVVoJLsTxGbCW9J7
+pEnJNsn1gtHAmhS0WzTLsOiKKDA+nqd1PBePfwWZpBwHiQEUF1jM3vJIC9lwy8Tz
+x9ZGaboAJqGSU6rRDmWphz9z98bQt/fIDT9E0DEqjinLiEklMqkufanw2p+gC6sf
+5iDY4kAZ+y/ZZt6xhsHyQ75L/VHkGv48/6hNaBVFsbDaP18F/AvbncHaZ1XKz/cK
+pylH4boVAoGBAPl8zyO/Dl47jWo6XO4EaS3ZDkrD1rkayGqkQ1ZoWoXhJW4mv5sz
+NdepCnykdIqd5p+ERGClc8lNmSudtCiClhKQb8RHG/9qNp1Gf1QrNurt+MKD7+vx
+VO5ZBswqlm6oFDO0udl2VnnPmCLeETq1Mouyho5RGWuTpz4ILTziDaVHAoGBANWe
+o2+5cPKyjpGJnEXh+ne/DHDy26TlcBmx+Y7yOl5aD6IXRGDm1nWd/9+fShph3cXB
+UsHn7O+gsYpXGx8jdQ6KNBUN31BEXCIXcc40eXBpt2fbMj1G4b5YAp1lVaEBhqty
+MQS8GyAAvwqr0k+lcNlKdLvTrBzNVlOS6kgIzNynAoGAfOAGwiqoI2yFbO1HhG86
+whMJv0xk1oPcWtxbRA25eZdm58qHT0SDp61ZrWeXWaaNP7yxiPpniRPJHfayrTAn
+s6UN/F1nWyGrsm8N3nA+7botMBdf6GYED8UJzPloEH0al4LXH0zHHfNVf+ZNE2iM
+ozW5edSH97uRE1B+bCHtmJMCgYEAkHSslPrUFGsG2ggys1czZxK8uQyh14qIGfgu
+iKnpKrDAbZ5KUTUIxZTI2VIAbILN09L9wb6yjQEfzitFXfM+T0zKF4q//qmbnDo6
+bXUywf/bVNH30VRDh9JAQmuqUiyUAxA/cbI6rZOTnQXAPLfl7irZccKcWwXIYM+y
+um+pCXUCgYEAjicf2TkesYdiMJKbgaXPBCH9bLqHl6AZIXEf1BnDxAiDjlIaypQj
+VPwYGLtf+ljF05tH5asALZkq1XTKPF+zIlCWpZaeOzqojdpSF/l5stBe5q78HB+6
+nsm+j1fPQn8i3WxpO3ZPy4ye6zKiWHaf3BtDCxuehjuu7+sFJ2Uc/Po=
+-----END RSA PRIVATE KEY-----
--- /dev/null
+##Stromverbrauch mit Stadtwerkemessgerät
+XPS 1330m Netzteil am Laptop Akku Voll 1,8-2,0 Watt
+Netzteil Linksys WRT54 grosses Dickes ohne Router 3,0 Watt
+Linksys WRT54 mit grossem Netzteil 6,5-7,0 Watt
+Fernseher
+Kaffeautomat
+Wasserkocher
+Dbox
+Aquariumspumpe
+Aquariumslampe
+Tiefkühlwürfel
+Lape Bett Susi Energiesparlampe
+Lampe Bett Mario normal
+Radiowecker
+Verstärker Wohnzimmer
+kleiner Fernseher Schlafzimmer
+
--- /dev/null
+###svn auschecken per ssh, wenn srv-root /home/svn/projekte/ ist und projekt=projekt
+svn co svn+ssh://mhoellein@rootserver/home/svn/projekte/projekt/ .
+###schon ausgechecktes SVN URL Ändern
+svn switch --relocate svn://reelbox.org svn://monster.reelbox.org
+###auschecken per svn+ssh
+svn co svn+ssh://svn@192.168.1.1/var/svn/project-01 project-01
--- /dev/null
+###logserver der pakete von anderen annimmt
+syslogd -r
+###spezielle ip's in separates logfile (rsyslog.conf)
+if $fromhost-ip startswith '192.168.178.' then /var/log/rechnername.log
--- /dev/null
+###eigene skripte unter
+/etc/systemd/system
+###
+
--- /dev/null
+###packen mit gzip
+tar czf datei.tgz *
+###entpacken mit gzip
+tar xzf datei.tgz
+###packen bzip2
+tar cjf datei.tbz *
+###file from stdin
+find -iname \*.dat | tar --files-from=- -cf /tmp/t.tar
+
--- /dev/null
+virtserv: root 5e808dbTMcBa
+
+uid name passwd uid passwd Status
+1000 fwint aVbecYxFGn7W root nuLX7mmWO2mF test
+1001 fwext egPziVZ8ZTem root pXxh1B9ygG9E test
+1002 comserver 4x2bztu1ZrzD root I1YHExPV2q15 test
+1003 tbzgw vwfRaJEFFOG5 root OG3tolAU8xCa
+1004 thuegagw JHcmqtf8K8B0 root 88JELikLjJnP test
+1005 webserver 3hTpd6JipLhW root omlI6WQdoXJO
+1006 emsarchiv AdN:ems root ApWEMS06 produktiv
+1007 faxserver beenVVt5V4fV root UlFm24YCc1st
+
+
+z.Z. root innerhalb der virtuellen Maschinen AnD:root
--- /dev/null
+#####
+##### Dovecot für imap (virtuelle Nutzer im mysql)
+##### Postfix als MX (virtuelle Nutzer im mysql)
+##### Tine20 als Backend (mit mysql)
+#####
+##### mydomain.tld
+##### vmail XXVMAILPWXX
+##### tine20admin XXTINEADMINPWXX
+##### tine20setup XXTINESETUPPWXX
+##### XXMYIPXX
+#######################################################################################
+##### Mysql
+#####
+groupadd -g 5000 vmail
+useradd -g vmail -u 5000 vmail -d /home/vmail -m
+
+
+mysql -u admin -p
+
+CREATE DATABASE vmail;
+use vmail;
+CREATE TABLE domains (domain varchar(50) NOT NULL, PRIMARY KEY (domain) );
+CREATE TABLE forwardings (source varchar(80) NOT NULL, destination TEXT NOT NULL, PRIMARY KEY (source) );
+# keine Ahnung wo diese Tabelle überhaubt gebraucht wird
+CREATE TABLE users (email varchar(80) NOT NULL, password varchar(20) NOT NULL, PRIMARY KEY (email) );
+CREATE TABLE transport ( domain varchar(128) NOT NULL default '', transport varchar(128) NOT NULL default '', UNIQUE KEY domain (domain) );
+GRANT SELECT, INSERT, UPDATE, DELETE ON vmail.* TO 'mail_admin'@'localhost.localdomain' IDENTIFIED BY 'XXVMAILPWXX';
+GRANT SELECT, INSERT, UPDATE, DELETE ON vmail.* TO 'mail_admin'@'localhost' IDENTIFIED BY 'XXVMAILPWXX';
+FLUSH PRIVILEGES;
+show PRIVILEGES;
+
+wenn in tine20 ein neuer Nutzer angelegt wird, dann wird er in folgende Tabellen eingetragen:
+ dovecot_users
+ smtp_users
+ smtp_destinations
+
+Domains/Nutzer von Hand eintragen:
+
+mysql -u mail_admin vmail -p
+INSERT INTO domains (domain) VALUES ('mydomain.tld');
+# keine Ahnung wo diese Tabelle überhaubt gebraucht wird
+INSERT INTO users (email, password) VALUES ('mario@mydomain.tld', ENCRYPT('qwertz'));
+
+use vmail;
+
+CREATE TABLE IF NOT EXISTS dovecot_users (
+`userid` VARCHAR( 40 ) NOT NULL,
+`domain` VARCHAR( 80 ) NOT NULL DEFAULT "",
+`username` VARCHAR( 80 ) NOT NULL,
+`password` VARCHAR( 100 ) NOT NULL,
+`quota_bytes` BIGINT NOT NULL DEFAULT 0,
+`quota_message` INT NOT NULL DEFAULT 0,
+`uid` VARCHAR( 20 ) DEFAULT NULL,
+`gid` VARCHAR( 20 ) DEFAULT NULL,
+`home` VARCHAR( 256 ) DEFAULT NULL,
+`last_login` DATETIME DEFAULT NULL,
+PRIMARY KEY (`userid`, `domain`),
+UNIQUE (`username`)
+) ENGINE = InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `smtp_users` (
+`userid` varchar(40) NOT NULL,
+`client_idnr` varchar(40) NOT NULL,
+`username` varchar(80) NOT NULL,
+`passwd` varchar(80) NOT NULL,
+`email` varchar(80) DEFAULT NULL,
+`forward_only` tinyint(1) NOT NULL DEFAULT '0',
+PRIMARY KEY (`userid`, `client_idnr`),
+UNIQUE KEY `username` (`username`),
+UNIQUE KEY `email` (`email`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `smtp_destinations` (
+`userid` VARCHAR( 40 ) NOT NULL ,
+`source` VARCHAR( 80 ) NOT NULL ,
+`destination` VARCHAR( 80 ) NOT NULL ,
+CONSTRAINT `smtp_destinations::userid--smtp_users::userid` FOREIGN KEY (`userid`)
+REFERENCES `smtp_users` (`userid`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=Innodb DEFAULT CHARSET=utf8;
+
+#######################################################################################
+##### Dovecot
+#####
+zypper in dovecot20 dovecot20-backend-mysql dovecot20-fts-solr postfix-mysql
+
+edit config-files:
+
+ /etc/dovecot/dovecot.conf
+ /etc/dovecot/dovecot-sql.conf
+ /etc/dovecot/conf.d/auth-sql.conf.ext
+ /etc/dovecot/conf.d/10-auth.conf
+ /etc/dovecot/conf.d/10-mail.conf
+ /etc/dovecot/conf.d/10-master.conf
+ /etc/dovecot/conf.d/10-ssl.conf
+ /etc/dovecot/conf.d/15-lda.conf
+ /etc/dovecot/conf.d/20-imap.conf
+
+ /etc/postfix/mysql-vmail-mailbox_domains.cf
+ /etc/postfix/mysql-vmail-virtual_alias_maps_aliases.cf
+ /etc/postfix/mysql-vmail-virtual_mailbox_maps.cf
+
+/etc/dovecot/dovecot.conf
+protocols = imap sieve
+dict {
+ #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
+ #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
+}
+!include conf.d/*.conf
+!include_try local.conf
+
+/etc/dovecot/dovecot-sql.conf
+driver = mysql
+connect = host=127.0.0.1 dbname=vmail user=mail_admin password=XXVMAILPWXX
+default_pass_scheme = PLAIN-MD5
+password_query = SELECT dovecot_users.username AS user, \
+ password, \
+ home AS userdb_home, \
+ uid AS userdb_uid, \
+ gid AS userdb_gid, \
+ CONCAT('*:bytes=', CAST(quota_bytes AS CHAR), 'M') AS userdb_quota_rule \
+ FROM dovecot_users \
+ WHERE dovecot_users.username='%u'
+user_query = SELECT home, uid, gid, \
+ CONCAT('*:bytes=', CAST(quota_bytes AS CHAR), 'M') AS userdb_quota_rule \
+ FROM dovecot_users \
+ WHERE dovecot_users.username='%u'
+
+/etc/dovecot/conf.d/auth-sql.conf.ext
+passdb {
+ driver = sql
+ # Path for SQL configuration file, see example-config/dovecot-sql.conf.ext
+ args = /etc/dovecot/dovecot-sql.conf
+}
+userdb static {
+ driver = static
+ args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
+}
+
+/etc/dovecot/conf.d/10-auth.conf
+auth_mechanisms = login
+!include auth-system.conf.ext
+!include auth-sql.conf.ext
+
+/etc/dovecot/conf.d/10-mail.conf
+mail_location = maildir:/home/vmail/%d/%n/Maildir
+namespace {
+ type = private
+ separator = .
+ prefix = INBOX.
+ inbox = yes
+}
+mail_plugin_dir = /usr/lib64/dovecot/modules
+
+/etc/dovecot/conf.d/10-master.conf
+service imap-login {
+ inet_listener imap {
+ }
+ inet_listener imaps {
+ }
+}
+service pop3-login {
+ inet_listener pop3 {
+ }
+ inet_listener pop3s {
+ }
+}
+service lmtp {
+ unix_listener lmtp {
+ }
+}
+service imap {
+}
+service pop3 {
+}
+service auth {
+ unix_listener auth-userdb {
+ mode = 0600
+ user = vmail
+ group = vmail
+ }
+ unix_listener auth-master {
+ mode = 0600
+ user = vmail
+ group = vmail
+ }
+ unix_listener /var/spool/postfix/private/auth {
+ mode = 0660
+ user = postfix
+ group = postfix
+ }
+}
+service auth-worker {
+}
+service dict {
+ unix_listener dict {
+ }
+}
+
+/etc/dovecot/conf.d/10-ssl.conf
+ssl = yes
+ssl_key = </etc/ssl/mydomain.tld/cacert.org-imap.mydomain.tld.privatekey.pem
+ssl_cert = </etc/ssl/mydomain.tld/cacert.org-imap.mydomain.tld.servercert.pem
+
+/etc/dovecot/conf.d/15-lda.conf
+protocol lda {
+ log_path = /home/vmail/dovecot-deliver.log
+ auth_socket_path = /var/run/dovecot/auth-master
+ postmaster_address = meinemailadresse.tld
+ mail_plugins = sieve quota
+ rejection_reason = Your message to <%t> was automatically rejected:%n%r
+}
+
+/etc/dovecot/conf.d/20-imap.conf
+protocol imap {
+ mail_max_userip_connections = 10
+ imap_client_workarounds = delay-newmail
+ mail_plugins = quota imap_quota
+}
+
+
+#######################################################################################
+##### Postfix
+#####
+
+mailgw:/etc/postfix # cat mysql-vmail-mailbox_domains.cf
+user = mail_admin
+password = XXVMAILPWXX
+dbname = vmail
+query = SELECT DISTINCT 1 FROM smtp_destinations WHERE SUBSTRING_INDEX(source, '@', -1) = '%s';
+hosts = 127.0.0.1
+mailgw:/etc/postfix # cat mysql-vmail-virtual_alias_maps_aliases.cf
+user = mail_admin
+password = XXVMAILPWXX
+dbname = vmail
+query = SELECT destination FROM smtp_destinations WHERE source='%s'
+hosts = 127.0.0.1
+mailgw:/etc/postfix # cat mysql-vmail-virtual_mailbox_maps.cf
+user = mail_admin
+password = XXVMAILPWXX
+dbname = vmail
+query = SELECT 1 FROM smtp_users WHERE username='%s' AND forward_only=0
+hosts = 127.0.0.1
+
+
+grep sql /etc/postfix/main.cf
+virtual_alias_maps = mysql:/etc/postfix/mysql-vmail-virtual_alias_maps_aliases.cf, hash:/var/spool/postfix/plesk/virtual
+virtual_mailbox_domains = mysql:/etc/postfix/mysql-vmail-mailbox_domains.cf, hash:/etc/postfix/virtual_domains, hash:/var/spool/postfix/plesk/virtual_domains
+virtual_mailbox_maps = mysql:/etc/postfix/mysql-vmail-virtual_mailbox_maps.cf, hash:/var/spool/postfix/plesk/vmailbox
+
+chmod o= /etc/postfix/mysql-vmail*
+chgrp postfix /etc/postfix/mysql-vmail*
+
+
+#######################################################################################
+##### Tine20
+#####
+
+
+mysql -u admin -p
+mysql> CREATE DATABASE tine20db DEFAULT CHARACTER SET 'UTF8';
+mysql> GRANT ALL PRIVILEGES ON mydomain_tld_tine20db.* TO 'tine20admin'@'localhost' IDENTIFIED BY 'XXTINEADMINPWXX';
+
+cd /srv/www/vhosts/mydomain.tld
+mkdir -p tine20 tine20adm/{tmp,cache,sessions,public}
+tar xvjfC tine20-allinone_2012.03.7.tar.bz2 tine20
+
+tine20 # cat config.inc.php
+<?php
+return array (
+ 'database' =>
+ array (
+ 'host' => 'localhost',
+ 'dbname' => 'mydomain_tld_tine20db',
+ 'username' => 'tine20admin',
+ 'password' => 'XXTINEADMINPWXX',
+ 'adapter' => 'pdo_mysql',
+ 'tableprefix' => 'tine20_',
+ 'port' => '',
+ ),
+ 'setupuser' =>
+ array (
+ 'username' => 'tine20setup',
+ 'password' => 'XXTINESETUPPWXX',
+ ),
+ 'caching' =>
+ array (
+ 'active' => true,
+ 'path' => '/srv/www/vhosts/mydomain.tld/tine20adm/cache',
+ 'lifetime' => 3600,
+ ),
+ 'logger' =>
+ array (
+ 'active' => true,
+ 'filename' => '/srv/www/vhosts/mydomain.tld/tine20adm/tine20.log',
+ 'priority' => '7',
+ ),
+ 'tmpdir' => '/srv/www/vhosts/mydomain.tld/tine20adm/tmp',
+ 'session' =>
+ array (
+ 'lifetime' => 86400,
+ 'backend' => 'File',
+ 'path' => '/srv/www/vhosts/mydomain.tld/tine20adm/sessions',
+ 'host' => 'localhost',
+ 'port' => 6379,
+ ),
+ 'filesdir' => '/srv/www/vhosts/mydomain.tld/tine20adm/public',
+ 'mapPanel' => '',
+);
+
+tine20 # php setup.php --install -- adminLoginName="tine20admin" adminPassword="XXTINEADMINPWXX" adminEmailAddress="tine20admin@mydomain.tld" acceptedTermsVersion=1000 imap="host:localhost,port:143,useSystemAccount:1,ssl:tls,domain:mydomain.tld,backend:dovecot_imap,dovecot_host:localhost,dovecot_dbname:vmail,dovecot_username:mail_admin,dovecot_password:XXVMAILPWXX,dovecot_uid:5000,dovecot_gid:5000,dovecot_home:/home/vmail/%d/%n,dovecot_scheme:SHA256" smtp="backend:postfix,hostname:localhost,port:25,ssl:tls,auth:login,primarydomain:mydomain.tld,username:notification@mydomain.tld,password:XXTINEADMINPWXX,from:notification@mydomain.tld,postfix_host:localhost,postfix_dbname:vmail,postfix_username:mail_admin,postfix_password:XXVMAILPWXX" sieve="hostname:localhost"
+
+tine20 # chown -R wwwrun: /srv/www/vhosts/mydomain.tld/tine20*
+
+
+
+# cat /etc/apache2/vhosts.d/10_mydomain.tld.conf
+<IfModule mod_ssl.c>
+
+<VirtualHost MYIP:443 >
+ ServerName "mydomain.tld:443"
+ ServerAlias "www.mydomain.tld"
+ UseCanonicalName Off
+
+<IfModule mod_suexec.c>
+ SuexecUserGroup "wwwrun" "www"
+</IfModule>
+
+ ServerAdmin "serveradmin@mydomain.tld""
+
+ DocumentRoot "/srv/www/vhosts/mydomain.tld"
+ CustomLog /srv/www/vhosts/mydomain.tld/logs/access_ssl_log plesklog
+ ErrorLog "/srv/www/vhosts/mydomain.tld/logs/error_log"
+
+ ScriptAlias "/cgi-bin/" "/srv/www/vhosts/mydomain.tld/cgi-bin/"
+
+ SSLEngine on
+ SSLVerifyClient none
+ SSLCertificateFile /etc/ssl/mydomain.tld/mydomain.tld.servercert_combined.pem
+
+ SetEnv PP_CUSTOM_PHP_INI /srv/www/vhosts/mydomain.tld/etc/php.ini
+
+<IfModule mod_fcgid.c>
+ FcgidInitialEnv PP_CUSTOM_PHP_INI /srv/www/vhosts/mydomain.tld/etc/php.ini
+ FcgidMaxRequestLen 16777216
+</IfModule>
+
+ <Directory "/srv/www/vhosts">
+ php_admin_flag engine on
+ </Directory>
+
+<IfModule mod_php5.c>
+ <FilesMatch "\.ph(p[345]?|tml)$">
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+ <FilesMatch "\.php[345]?s$">
+ SetHandler application/x-httpd-php-source
+ </FilesMatch>
+ DirectoryIndex index.php4
+ DirectoryIndex index.php5
+ DirectoryIndex index.php
+</IfModule>
+ <Files ~ ".(cgi|shtml|phtml|php[345]?)$">
+ SSLOptions +StdEnvVars
+ </Files>
+ RewriteEngine on
+ RewriteOptions Inherit
+# RewriteLog /srv/www/vhosts/mydomain.tld/tine20adm/tmp/rewrite.log
+# RewriteLogLevel 2
+ RewriteRule ^/Microsoft-Server-ActiveSync(.*) /srv/www/vhosts/mydomain.tld/tine20/index.php$1 [E=REDIRECT_ACTIVESYNC:true,E=REMOTE_USER:%{HTTP:Authorization},L]
+
+ <Directory /srv/www/vhosts/mydomain.tld/tine20>
+ SSLRequireSSL
+
+ Options +Indexes +ExecCGI FollowSymLinks MultiViews
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+
+ # tine needs some memory
+ php_admin_value memory_limit 64M
+ # tine insists on this
+ php_admin_flag magic_quotes_gpc off
+
+ RewriteEngine on
+ RewriteCond %{REQUEST_METHOD} !^(GET|POST)$
+ RewriteRule ^$ /tine20/index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+ RewriteRule ^addressbooks /tine20/index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+ RewriteRule ^calendars /tine20/index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+ RewriteRule ^principals /tine20/index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+ RewriteRule ^webdav /tine20/index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
+
+ </Directory>
+ <Directory /srv/www/vhosts/mydomain.tld/tine20adm>
+ SSLRequireSSL
+
+ Options FollowSymLinks MultiViews
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+ </Directory>
+</VirtualHost>
+
+
+apache neu starten
+tine20 setup aufrufen und prüfen ob alle korrekt eingetragen wurde:
+
+ https://www.mydomain.tld/tine20 tine20setup XXTINESETUPPWXX
+
+tine20 admin Seite aufrufen und Nutzer eintragen:
+
+
+ https://www.mydomain.tld/tine20 tine20admin XXTINEADMINPWXX
+
+ Reiter Tine 2.0->Admin->Benutzer hinzufügen
+
+prüfen ob Rewrite und ActiveSync geht:
+
+ https://www.mydomain.tld/Microsoft-Server-ActiveSync
+
+ Antwort: es wird nach Login und PW gefragt
+ It works!
+ Your userid is: 820bcc04355a68cd243e8908a9472a899f0c78ea and your IP address is: WW.XX.YY.ZZ.
+
+
+#######################################################################################
+##### Thunderbird
+#####
+
+für das Adressbuch: "SOGo Connector Thunderbird extension" http://www.sogo.nu/english/downloads/frontends.html
+über Extras-Addons->links neben dem Suchfeld->Add-an aus Datei installieren->File auswählen ...
+
+im Tine anmelden und Reiter Tine 2.0->Adressbuch->Links auf ADRESSBÜCHER->Meine Adressbücher->Tine 2.0 User ...->rechte Maustaste->Adressbuch Eigenschaften->Url merken ;-)
+analog Kalender: Tine 2.0->Kalender ...
+
+im TB:
+
+Termine und Aufgaben->Kalender->Neuer Kalender->im Netzwerk->CalDav URL, Cache ja->Namen vergeben Mail auswählen->OK rechte Maustaste Sync->User und PW eingeben
+Adressbuch->Datei->Neu->Remote Adressbuch->URL eingeben->OK rechte Maustaste Sync->User und PW eingeben (entfällt wenn vorher Kalender angelegt wurde)
+
+Kalender z.B. aus Google exportieren und im Thunderbird importieren (nicht im Tine)
+Adressbuch z.B. im Google als vCard exportieren und im Tine importieren
+ im Adressbuch eingebene Geburtstage sind im Handy um einen Tag verschoben
+ im Kalender eingetragene Termine (auch Ganztagstermine wie Geburtstage) nicht
+
+#######################################################################################
+##### Handy
+#####
+Einstllungen->Konten und Syncronisierung->Konto hinzufügen->Microsoft Exchange->Mailadresse und PW->Servername->sichere Verbindung verwenden->Alle SSL Zertifikate akzeptieren->Ferig
+eventuell vorher noch die CACert-Roots installieren über: Einstellungen->Sicherheit->Von SD-Karte installieren
+###Tine on centos
+www: http://www.ctkn.net/2011/04/how-to-install-and-configure-tine-2-0-with-activesync/
+###mehrere Kalender unter Android
+#in ./ActiveSync/Frontend/Abstract.php ergänzen um
+protected $_devicesWithMultipleFolders = array(
+ 'android',
+ 'nine',
+###HTML Mails in Felamail anzeigen
+#config.inc.php
+'Felamimail' => array(
+ 'filterEmailUris' => false,
+)
+###update tine via command line cmd
+php setup.php --update
--- /dev/null
+###datei unter /etc/tmpfiles.d erstellen (deljpg)
+###löschen aller jpg-Dateien in /tmp die älter als einen Tag sind
+r /tmp/*.jpg - - - 1d
--- /dev/null
+###Gewichtsbezogene Leistung
+Maximale Leistung - 5 Sekunden (auch "Peak Power" genannt)
+
+Männer:
+
+ * Anfänger: unter 12,00 W/kg
+ * Hobbyfahrer: 12,00 W/kg bis 13,49 W/kg
+ * Moderat: 13,50 W/kg bis 14,99 W/kg
+ * Gut: 15,00 W/kg bis 16,99 W/kg
+ * Super: 17,00 W/kg bis 18,49 W/kg
+ * Weltklasse: ab 18,50 W/kg
+
+Frauen:
+
+ * Anfängerin: unter 10,00 W/kg
+ * Hobbyfahrerin: 10,00 W/kg bis 10,90 W/kg
+ * Moderat: 11,00 W/kg bis 11,90 W/kg
+ * Gut: 12,00 W/kg bis 13,90 W/kg
+ * Super: 14,00 W/kg bis 14,90 W/kg
+ * Weltklasse: ab 15,00 W/kg
+
+
+Durchschnittliche Leistung - 1 Stunde (auch "Endurance Mean Power" genannt)
+
+Männer:
+
+ * Anfänger: unter 2,40 W/kg
+ * Hobbyfahrer: 2,40 W/kg bis 2,89 W/kg
+ * Moderat: 2,90 W/kg bis 3,49 W/kg
+ * Gut: 3,50 W/kg bis 4,09 W/kg
+ * Super: 4,10 W/kg bis 4,59 W/kg
+ * Weltklasse: ab 4,60 W/kg
+
+Frauen:
+
+ * Anfängerin: unter 2,00 W/kg
+ * Hobbyfahrerin: 2,00 W/kg bis 2,49 W/kg
+ * Moderat: 2,50 W/kg bis 2,99 W/kg
+ * Gut: 3,00 W/kg bis 3,49 W/kg
+ * Super: 3,50 W/kg bis 3,99 W/kg
+ * Weltklasse: ab 4,00 W/kg
--- /dev/null
+###Fingerprintreader einschalten
+/usr/lib/pam-thinkfinger/pam-thinkfinger-enable
+###
--- /dev/null
+###Udev-Attribute
+###Bedingungsattribute
+ACTION ACTION=="add" (add, change, remove)
+ATTR ATTR{serial}=="12345678" (vergleich mit inhalt einer Datei im Sysfs)
+ATTRS ATTRS{removable}==1 (wie ATTR, sucht auch in übergeordneten Verzeichnissen)
+DRIVER DRIVER=="ipw2200" (Name des zuständigen Treibers (Kernelmodul))
+DRIVERS DRIVERS=="option" (wie DRIVER, sucht auch in übergeordneten Verzeichnissen)
+ENV ENV{ID_PATH}=="?*" (vergleicht mit einer Umgebungsvariablen)
+KERNEL KERNEL=="event[0-9]" (Kernel-Device-Bezeichnung)
+KERNELS KERNELS=="0-9*.*[0-9]" (wie KERNEL, sucht auch in übergeordneten Verzeichnissen)
+PROGRAM PROGRAM="/bin/true" (führt den Befehl aus, bei Rückgabewert 0 ist das Ergebnis wahr)
+RESULT PROGRAM="/bin/echo test", RESULT=="test" (vergleicht mit der Ausgabe des zuvor aufgerufenen Programms)
+SUBSYSTEM SUBSYSTEM=="net" (Kernel-Subsystem, das das Event auslöst)
+SUBSYSTEMS SUBSYSTEMS=="usb" (wie SUBSYSTEM, sucht auch in übergeordneten Verzeichnissen)
+TEST TEST=="/lib/udev/devices/$name" (prüft, ob es die angegebene Datei gibt)
+###Aktionsattribute
+ATTR ATTR{queue/read_ahead_kb)="256" (schreibt den Wert in die angegebene Sysfs-Datei)
+ENV ENV{libsane_matched}="yes" (exportiert die Variable mit dem Wert in die Umgebung (Environment))
+GROUP GROUP="vboxuser" (setzt die Gruppenzugehörigkeit des Devices)
+MODE MODE="0660" (setzt die Zugriffsrechte des Device)
+NAME NAME="eth0" (legt den Namen des Devices fest)
+OWNER OWNER="root" (bestimmt den Eigentümer des Device)
+OPTIONS OPTIONS="last_rule", OPTIONS="ignore_device" (legt fest, dass die Udev-Regel die letzte ist bzw. Gerät ignoriert wird)
+RUN RUN+="/sbin/modprobe option" (führt das angegebene Kommando aus, ohne Prüfung des Rückgabewertes)
+SYSMLINK SYSMLINK+="umtsmodem" (legt einen symbolischen Link auf angegebenes Device an)
+###Udev-Variablen
+%E{..},$env{..} Inhalt der angegebenen Umgebungsvariablen
+%M,$major Major-Device-Nummer des Gerätes
+%N,$tempnode temporärer Device-Node des Gerätes
+%P,$parent Device-Node des übergeordneten Gerätes
+%S,$sys Mountpoint von Sysfs
+%b,$id Name des übergeordneten Devices/Buses
+%c,$result Ausgabe des letzten Programmaufrufs
+%d,$driver Treiber-Name
+%k,$kernel Device-Bezeichnung des Kernels
+%m,$minor Minor-Device-Nummer des Gerätes
+%n,$number Nummer der Kernel-Device-Bezeichnung (z.B. 1 bei sda1)
+%p,$devpath Device-Pfad des Aktuellen Gerätes
+%r,$root Root-Verzeichnis von Udev
+%s{..},$attr{..} Inhalt der angegebenen Sysfs-Datei
+###Zuordnungsoperatoren
+= Zuordnung, Wert kann von späterer Udev-Regel geändert werden
+:= Zuordnung, Wert ist schreibgeschützt
++= Liste, beispielsweise mehrere Namen für ein Gerät
+###Udev events anzeigen und Sysfs-Einträge für das Gerät
+udevmonitor oder udevadm monitor
+###verlauf neue Hardware
+Kernel
+ |
+Treiber
+ | --Kernelspace
+Udev
+ |
+ Hal
+ |
+DBus
+ | --Userspace
+Automounter
+
+###schreiben von udev rules (/etc/udev/rules.d/rulname.rules)
+Bsp: Festplatten anhand von Seriennummer symlink (/dev/Montag) anlegen und cryptsetup rufen
+
+#SUBSYSTEMS=="usb", ATTRS{serial}=="3999B624", NAME="%k", SYMLINK="Monatg"
+#SUBSYSTEMS=="usb", ATTRS{serial}=="3999EE32", NAME="%k", SYMLINK="Dienstag"
+#SUBSYSTEMS=="usb", ATTRS{serial}=="3999B5DA", NAME="%k", SYMLINK="Mittwoch"
+#SUBSYSTEMS=="usb", ATTRS{serial}=="3999B4A9", NAME="%k", SYMLINK="Donnerstag"
+#SUBSYSTEMS=="usb", ATTRS{serial}=="3999ED29", NAME="%k", SYMLINK="Freitag"
+#SUBSYSTEMS=="usb", ATTRS{serial}=="3999ECE8", NAME="%k", SYMLINK="Freitag"
+#SUBSYSTEMS=="usb", ATTRS{serial}=="3999B704", NAME="%k", SYMLINK="Freitag"
+
+
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999B624", ACTION=="add", RUN+="/sbin/cryptsetup --verbose --batch-mode --key-file /var/lib/backup/etc/key.erw luksOpen /dev/%k Montag", NAME="%k", SYMLINK="Backup"
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999B624", ACTION=="remove", RUN+="/sbin/cryptsetup --verbose --batch-mode luksClose Montag"
+
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999EE32", ACTION=="add", RUN+="/sbin/cryptsetup --verbose --batch-mode --key-file /var/lib/backup/etc/key.erw luksOpen /dev/%k Dienstag", NAME="%k", SYMLINK="Backup"
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999EE32", ACTION=="remove", RUN+="/sbin/cryptsetup --verbose --batch-mode luksClose Dienstag"
+
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999B5DA", ACTION=="add", RUN+="/sbin/cryptsetup --verbose --batch-mode --key-file /var/lib/backup/etc/key.erw luksOpen /dev/%k Mittwoch", NAME="%k", SYMLINK="Backup"
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999B5DA", ACTION=="remove", RUN+="/sbin/cryptsetup --verbose --batch-mode luksClose Mittwoch"
+
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999B4A9", ACTION=="add", RUN+="/sbin/cryptsetup --verbose --batch-mode --key-file /var/lib/backup/etc/key.erw luksOpen /dev/%k Donnerstag", NAME="%k", SYMLINK="Backup"
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999B4A9", ACTION=="remove", RUN+="/sbin/cryptsetup --verbose --batch-mode luksClose Donnerstag"
+
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999ED29", ACTION=="add", RUN+="/sbin/cryptsetup --verbose --batch-mode --key-file /var/lib/backup/etc/key.erw luksOpen /dev/%k Freitag", NAME="%k", SYMLINK="Backup"
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999ED29", ACTION=="remove", RUN+="/sbin/cryptsetup --verbose --batch-mode luksClose Freitag"
+
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999ECE8", ACTION=="add", RUN+="/sbin/cryptsetup --verbose --batch-mode --key-file /var/lib/backup/etc/key.erw luksOpen /dev/%k Freitag", NAME="%k", SYMLINK="Backup"
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999ECE8", ACTION=="remove", RUN+="/sbin/cryptsetup --verbose --batch-mode luksClose Freitag"
+
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999B704", ACTION=="add", RUN+="/sbin/cryptsetup --verbose --batch-mode --key-file /var/lib/backup/etc/key.erw luksOpen /dev/%k Freitag", NAME="%k", SYMLINK="Backup"
+SUBSYSTEMS=="usb", ATTRS{serial}=="3999B704", ACTION=="remove", RUN+="/sbin/cryptsetup --verbose --batch-mode luksClose Freitag"
+
+###Scanner Fujitsu 4340
+SYSFS{idVendor}=="04c5", SYSFS{idProduct}=="10cf", MODE="0666", GROUP="scanner"
+###usb für alle schreib und lesbar
+SUBSYSTEM=="usb", MODE="0777"
+###reload rules
+udevadm control --reload-rules
--- /dev/null
+https://wiki.ubuntuusers.de/Unison/
+###$USERHOME/.unison/save.prf
+#inhalt
+root = /PFAD/ZUR/QUELLE
+root = /PFAD/ZUM/ZIEL
+#damit kann man unison save machen
+###Bsp.-config
+# Roots of the synchronization
+root = /home/BENUTZERNAME
+root = ssh://laptop.local//home/BENUTZERNAME
+# SSH und Avahi ist installiert
+
+# Pfade in home zu sync:
+path = daten
+path = Job
+path = .mozilla
+path = .thunderbird
+
+# ausgenommen diesen hier:
+ignore = Path {Telefon}
+ignore = Path {Cache}
+# liegt Cache in versteckten Verzeichnissen, ist der gesamte relative Pfad anzugeben:
+ignore = Path {.mozilla/firefox/XXXXXXXX.default/Cache}
+
+# Sicherungsdateien werden auch nicht mehr gesichert
+ignore = Name *_
+ignore = Name temp.*
+ignore = Name *.o
+ignore = Name *.tmp
+
+# ignoriert Sicherungen
+ignore = Path {alt}
+ignore = Name *~
+ignore = Name .*~
+
+# macht bis zu 3 Sicherungen im jeweiligen Unterordner alt
+backuplocation = local
+backup = Name *
+backupprefix = alt/
+maxbackups = 3
+backupsuffix = .$VERSION
+###Backup beim Überschreiben von Dateien anlegen lassen
+root = /home/BENUTZER/Dokumente/
+root = ssh://dns-oder-ip-des-Zielrechners//home/BENUTZER/Dokumente/
+batch = true
+auto = true
+logfile = /home/BENUTZER/.unison/logfile-PROFILNAME
+backup = Name *
+maxbackups=5
--- /dev/null
+###alternatives java einrichten
+update-alternatives --install /usr/bin/java java /usr/java/jdk1.7*/bin/java 1065
+update-alternatives --install /usr/bin/javac javac /usr/java/jdk1.7*/bin/javac 1065
+update-alternatives --install /usr/bin/jar jar /usr/java/jdk1.7*/bin/jar 1065
+update-alternatives --config java
+#append .bash.rc of user
+export JAVA_HOME=/usr/lib/jvm/jdk1.<X.Y_uZ>
+
--- /dev/null
+###Softcam.key Aufbau
+;
+; Irdeto/Betacrypt
+;
+; I XX ZZ <16 characters>
+;
+; XX - provider
+; ZZ - key number
+;
+; Irdeto 2
+;
+; I XXXX YY ZZ <32 characters> ; opkey
+; I XXXX YY IV <32 characters> ; IV (M2)
+; I XXXX YY ECM <32 characters> ; ECM seed (M1)
+; I XXXX YY EMM <32 characters> ; EMM seed (M0)
+; I XXXX YY MK0 <32 characters> ; first PMK (M3)
+; I XXXX YY MK1 <32 characters> ; second PMK (M4)
+;
+; XXXX - caid
+; YY - provider
+; ZZ - opkey number
+;
+; Seca
+;
+; S XXXX YY <16 characters/32 characters>
+; S XXXX [EMM] Mz <180 characters>
+; S XXXX [EMM] Ez <12 characters/180 characters>
+; S XXXX N51 M9 <258 characters>
+; S XXXX N51 E9 <2 characters>
+;
+; XXXX - provider ident
+; YY - key number
+; Mz / Ez - RSA key name (z = 1,3,5).
+; Exponent keys may be padded up to 180 chars.
+; Optional "EMM" for EMM RSA keys.
+; N51 - RSA keys for Nano 5109 handling.
+;
+;
+; Viaccess
+;
+; V XXXXXX YY <16 characters/32 characters>
+; V XXXXXX TPS <32 characters> ; old TPS keys. no longer used
+; V XXXXXX TPSMKy <32 characters> ; TPS masterkeys for AU y=0-7
+;
+; XXXXXX - provider ident
+; YY - key number
+;
+;
+; Nagra 1
+;
+; N XXXX YY <16 characters>
+; N XXXX E1 [ROMq] [PKv] [TYPw] <128 characters>
+; N XXXX N1 [ROMq] [PKv] [TYPw] <128 characters>
+; N XXXX N2 [ROMq] [TYPw] <128 characters>
+; N XXXX V [ROMq] [TYPw] <16 characters>
+;
+; Nagra 2
+;
+; N XXXX YY <32 characters> ; IDEA opkey (00/01)
+; N XXXX V <32 characters> ; IDEA verify key
+; N XXXX M1 <128 characters> ; RSA key
+; N XXXX NN ZZ <32/48/192 characters> ; EMM keys (literal 'NN'), some examples:
+; N XXXX NN 02 <32/48 characters> ; EMM-G IDEA key (former N XXXX 02)
+; N XXXX NN 03 <32 characters> ; EMM-G signature key
+; N XXXX NN 12 <192 characters> ; EMM-G RSA key (former N XXXX N2)
+; N XXXX NN 30 <32 characters> ; EMM-G 3DES key
+;
+; XXXX - provider ident
+; YY - key number
+; ZZ - EEPROM key number
+; ROMq - (optional) ROM specific keys (q = ROM number)
+; PKv - (optional) PK key number (v = 0,1,2)
+; TYPw - (optional) key type number (w = 0,1)
+;
+;
+; Conax
+;
+; C XX M <128 characters>
+; C XX E <128 characters>
+;
+; XX - key number
+;
+;
+; Cryptoworks
+;
+; W XXXX YY ZZ VV <32 characters> ; opkey
+; W XXXX YY ZZ VV <128 characters> ; RSA key (normaly ZZ=10)
+; W XXXX YY CC <12 characters> ; cardkey (literal 'CC')
+;
+; XXXX - caid
+; YY - provider ident
+; ZZ - keytype (20/31/10 derived from cardfiles EF20/EF31/EF10)
+; VV - keyid (00/01)
+;
+;
+; @SHL (SkyCrypt)
+;
+; Z 00 00 <16 characters>
+;
+;
+; Constant CW
+;
+; X YYYY freq:pol:src:sid <32 characters>
+;
+; YYYY - CA system id e.g. 0100
+; freq - frequency
+; pol - polarisation (v/h/r/l)
+; src - source
+; sid - service ID
+;
+; example:
+X 0d02 12670:v:S19.2E:23457 00000000000000000000000000000000
+; cable example (Z can be an arbitrary letter, is ignored)
+X 1801 346:Z:C:23457 00000000000000000000000000000000
--- /dev/null
+###www Adressen
+https://bugs.launchpad.net/ubuntu/+source/linux/+bug/343235
+http://forum.ubuntuusers.de/topic/vaio-vgn-p11z-option-gtm382-troubleshooting-g/
+http://forum.ubuntuusers.de/topic/sony-vgn-p11z-gps-umts/
+#viel über at commands
+http://www.option.com/en/support/faq/embedded-mobile-broadband/
+###umts modem und gps im vgn
+mv sony-laptop-zseries-0.9np5 /usr/src
+dkms add build install -m sony-laptop-zseries -v 0.9np5
+#falls fehlerhaft dann wieder entfernen
+sudo dkms remove -m sony-laptop-zseries -v 0.9np5 --all
+###sony-laptop-zseries.deb erstellen
+dkms mkdeb -m sony-laptop-zseries -v 0.9np5
+###GPS
+minicom -s
+serial port setup: -> Serial Device : /dev/ttyHS3
+Screen and keyboard: -> Local echo : Yes
+Exit
+###Stop GPS
+AT_OGPS=0
+###GPS Postition einmalig bestimmen und dann Stop
+AT_OGPS=1
+###GPS Position immer wieder neu bestimmen, normaler GPS Modus
+AT_OGPS=2
+###weitere AT-Befehle
+at+gmi
+Option N.V.
+
+at+gmm
+GTM382
+###Firmwareversion
+at+gmr oder at+cgmr
+1.4.3.0Hd (Date: Aug 18 2008, Time: 16:45:58)
+
+at_oiface=?
+_OIFACE: ("DIAG","GPS","APP1","APP2","PCSC","IP","MODEM","VOICE","SD","CD")
+
+at_oiface="GPS",1
+OK
+
+at_oiface?
+DIAG: 1
+GPS: 0
+APP1: 1
+APP2: 1
+PCSC: 1
+IP: 1
+MODEM: 1
+VOICE: 0
+SD: 0
+CD: 0
+
+
+How to set up a voice call with a GTM382 module via HyperTerminal
+
+19/02/2009
+
+This article describes how to set up a voice call via HyperTerminal and is only applicable for hardware version 3.1 or later. This therefore applies to the GTM382 module or newer.
+
+Verify the AT commands below in order to set-up the module for voice calls. Refer to section 8 on how to send AT commands to the module using HyperTerminal.
+Firstly, ensure your PIN code is entered and that you are registered to the network. Check the registration LED.
+(1) AT_ODO=0
+
+With this AT command, circuit switched data transfer, which is needed for voice calls is enabled. This setting is stored in non-volatile memory of the module.
+
+The response to this AT command should be: OK
+(2) AT_OPCMENABLE=1
+
+By default, the voice part of the firmware is disabled. To enable digital voice, the command mentioned above must be set. This setting is stored in non-volatile memory of the module.
+
+The response to this AT command should be: OK
+(3) AT_OPCMCONFIG=102,3,0,256,0,1,4
+
+This AT command configures the PCM codec for 16bit linear with volume padding, maximum volume (Short Synch 8kHz, 2MHz CLK). This is also the default configuration.
+
+NOTE: In this configuration the jumper in the upper right-hand corner should be set to the two right-hand pins of the cradle. This setting is stored in non-volatile memory of the module.
+
+The response to this AT command should be: OK
+
+OR AT_OPCMCONFIG=0,0,0,256,0,1,4
+
+This AT command configures the PCM codec for 8bit μ-law, maximum volume (Short Synch 8kHz, 2MHz CLK). NOTE: In this configuration the jumper in the upper right-hand corner should be set to the two left-hand pins. This setting is stored in non-volatile memory of the module.
+
+The response to this AT command should be: OK
+###
+AT_ODO=0
+AT_OPCMENABLE=1
+AT_OPCMCONFIG=102,3,0,256,0,1,4
+AT_OPCMCONFIG=0,0,0,256,0,1,4
+
+How to send an SMS with AT-commands?
+
+4/02/2009
+
+AT commands can be used to collect information from the modem device or the network and can help you troubleshoot modem specific issues.
+
+To send an AT command to your Option modem device, open a terminal window (for example Hyperterminal on Windows XP). Type the AT command and press enter to send it to the modem device. If the characters that you type do not appear on your screen, the "echo" might be off. To enable this echo, type the following AT command: ATE1 For more information on how to use a terminal with our device, please refer to the article “How to send AT-commands to the device? How to use HyperTerminal?”
+Preparation and Registration
+Power on the modem device and check your registration status with the following AT commands:
+
+- Check if the PIN code is enabled (PIN status) by entering the following AT command: AT+CPIN?
+You can receive one of the following answers (for the complete list of answers, please refer to the ETSI 3GPP spec 27.007 for more information):
++CPIN: SIM PIN (you need to enter the PIN code to enable the card)
++CPIN: READY (the PIN is entered and the card is registered to the network)
+To enter the PIN code, the following command can be used: AT+CIN=xxxx (where xxxx is the PIN code of your SIM card)
+
+- To check if you are registered to the network, different AT commands are available.
+When registered, you can check to which network by issuing the following AT command:
+AT+COPS? (shows network provider you are registered to)
+
+Checking the Service Center Address
+Before sending or receiving an SMS, you first have to make sure the service center address (SCA) is set correctly. Normally, this is done automatically if the SCA is available on the SIM card.
+
+- To check the SCA, you can use the following AT command: AT+CSCA?
+
+- To enter or change the SCA, the following command can be used: AT+CSCA="+9911111111"
+(+99 is the country code, 11111111 is a fictive SCA number)
+Sending an SMS
+To send an SMS, AT commands need to be entered in the following order:
+
+- at+cmgf=1 (send SMS in text mode)
+
+- at+cmgs="+9955555555" (Destination number; replace +99 with the country code of the country you want to send the SMS to, 55555555 needs to be replaced with the destination number)
+
+When a prompt > appears enter the text you wish to send as a message, for example:
+> Test sending SMS message
+press CTRL+Z keys to send the message
+
+When the SMS is sent correctly, a response will appear on the screen:
++CMGS: xx (xx=reference number)
+
+Receiving an SMS
+To receive an SMS, the following AT commane: +CMGL: x,"REC UNREAD","+329955555555"
+Reply to Test sending
+
+nformation on AT commands used for SMS activities, please also refer to the ETSI 3GPP 27.005 specification. This one can be found at http://www.3gpp.org/
+
+
+###GPS
+Getting GPS information
+Retreiving GPS coordinates
+
+22/05/2009
+
+The GPS interface is a serial port to the module.
+
+The GPS interface is a serial port to the module., this allows you to connect with a terminal program.
+ In our example to retreive GPS data, we can connect toCOM31. The terminal cannot be used forentering commands, but the GPS output will appear on it.
+
+GPS position determination is started usingthe AT_OGPS command. Here is the syntax:
+
+
+
+Command
+
+
+Possible Response(s)
+
+_OGPS=<mode>
+
+
+OK ERROR
+
+_OGPS?
+
+
+_OGPS: <mode>
+
+_OGPS=?
+
+
+_OGPS: (0-2)
+
+Description
+
+Changes the mode of the GPS engine: on, offor tracking.
+
+Defined values
+
+<mode>:
+
+0: disable GPS Position Determination
+
+1: enable GPS Position Determination
+
+It will turn off upon error or positionfix.
+
+2: enable GPS Tracking
+
+This will automatically re-start thePosition Determination when it ends.
+ For more information about the NMEA codes,see the NMEA specifications.
+
+Option develops the following AT commands forusing GPS function.
+
+AT_OGPS // Start or stop a GPS determination
+
+AT_OGPSP // Set parameters for a GPSdetermination
+
+AT_OGPSLS //Set parameters for using withSUPL A-GPS
+
+AT_OGPSCONT //Set Context information whichGPS will use to contact the SUPL server
+
+AT_OMOLR // Start a Mobile OriginatedLocation Request(MOLR) and set Transfer to Third Party information to be used
+
+AT_OMTLR // Set automatic response, show alocation verify indication and allow the user to send a response
+
+Beware, for different modules, theinstructions of these AT commands might be slightly different. Please contactOption for the latest instructions.
+
+
+
+How to activate the GPS interface?
+ The GPS and other interfaces can be turned on and off using the AT command AT_OIFACE.
+
+
+
+This command is an Option proprietary command and should not be communicated to the end-customers. This chapter will only explain how to enable/disable the GPS interface.
+
+
+
+AT_OIFACE? displays the current status of the module’s interface configuration.
+
+
+
+For example:
+
+
+
+ AT_OIFACE?
+
+ DIAG: 1
+
+ GPS: 0
+
+ APP1: 1
+
+ APP2: 0
+
+ PCSC: 0
+
+ IP: 1
+
+ MODEM: 1
+
+ VOICE: 0
+
+ SD: 1
+
+ CD: 0
+
+
+
+OK
+
+
+
+The part GPS: 0 in the response above shows that the GPS device is disabled.
+
+
+
+• To enable the GPS interface, issue the following AT command:
+
+AT_OIFACE=”GPS”,1
+
+
+
+A module reboot is needed to configure the GPS interfaces of the module correctly.
+
+
+
+• To disable the GPS interface afterwards, issue the following AT command:
+
+AT_OIFACE=”GPS”,0
+
+
+
+Again a module reboot is needed for the changes to take effect.
+
+
+
+As indicated, the Globetrotter module needs to be rebooted for the GPS ports to become available. Unplug the power supply and USB connection to do this.
+
--- /dev/null
+###zeilennummern an
+:set number
+###datei verschlüsseln
+:X
+###verschlüsselte datei wieder ohne verschlüsselung speichern (key leer setzen)
+:set key=
+###anzeigen dez. hex. oder oktal von zeichen unter cursor
+ga
+###nach hex kovertieren
+:%!xxd
+###zurück konvertieren
+:%!xxd -r
+###geteiltes Fenster, nebeneinander
+:vsplit
+:vsplit <DATEI>
+:vnew
+###geteiltes Fenster, untereinander
+:sp
+:split
+:split <DATEI>
+:new
+###Browsen des aktuellen Verzeichnisses
+:Explore
+###mehrere Dateien, nächste Datei
+:n
+###mehrere Dateien, vorhergegende Datei
+:N
+###löschen bis zum Auftreten von Zeichen (hier .)
+ct.
+###Einfügemodus starten vor aktueller Pos.
+i
+###Einfügemodus starten hinter akt. Pos.
+a
+###Einfügemodus starten an anfang akt. Zeile
+I
+###Einfügemodus starten am ende der Zeile
+A
+###Navigation links
+h
+###Navigation rechts
+l
+###Navigation unten
+j
+###Navigation oben
+k
+###Navigation Ende der Datei
+G
+###Navigation oberer Bildschirmrand
+H
+###Navigation unterer Bildschirmrand
+L
+###anfang der Datei
+gg
+###ende der datei
+G
+###rot13 {motion} ist der text, bsp: g?L (von akt. zeile bis bildschirmende)
+g?{motion}
+###ganze datei rot13
+ggVGg?
+###zeile in kleinbuchstaben
+guu
+Vu
+###zeile in großbuchstaben
+gUU
+VU
+###taschen groß->klein klein->groß
+g~~
+###wort in großbuchstaben
+vEU
+###taschen groß->klein klein->groß für wort
+vE~
+###ganze datei klein
+ggguG
+###3 leerzeilen finden
+/^\n\{3}
+###zwei zeilen finden die hintereinander mit run starten
+/^run.*\nrun
+###findet alle zeilen mit run und normal
+/run.*normal
+###automatisches einrücken
+set smartindent
+###
+#Grundlegende Bewegungen
+h l k j Zeichen links, rechts; Zeile hoch, runter
+b w Wort links, rechts
+ge e Wortende links, rechts
+{ } Anfang vorhergehender, nächster Absatz
+( ) Anfang vorhergehender, nächster Satz
+0 ^ $ Zeilenanfang erstes, letztes Zeichen der Zeile
+nG ngg Zeile n, Ersatzwert: letzte, erste Zeile
+n% Prozentsatz n der Datei
+n| Spalte n der akt. Zeile
+% zugehörige Klammer, Kommentarende, #define
+nH nL Zeile n nach Dateianfang, vor Dateiende
+M mittlere Zeile im Fenster
+
+#Einfügen & Ersetzen→ Einfügemodus
+i a vor, nach dem Cursor einfügen
+I A am Anfang, Ende der Zeile einfügen
+gI in der 1. Spalte einfügen
+o O neue Zeile unter, über der akt. Zeile öffnen
+rc Zeichen unter dem Cursor durch c ersetzen
+grc wie r, ohne Auswirkung auf das Layout
+R Zeichen ab der Cursorposition ersetzen
+gR wie R, ohne Auswirkung auf das Layout
+cm ersetze Text des Bewegungsbefehls m
+cc or S ersetze aktuelle Zeile
+C ersetze bis zum Zeilenende
+s ersetze ein Zeichen, gehe in den Einfügemodus
+~ ändere Groß-/Kleinschreibung
+g~m ändere Groß-/Kleinschr. des Bew.bef. m
+gum gUm Klein-, Großschreibung des Bew.bef. m
+<m >m Text der Bewegung m links, rechts schieben
+n<< n>> n Zeilen links, rechts schieben
+
+#Löschen
+x X lösche Zeichen unter, vor dem Cursor
+dm lösche Text der Bewegung m
+dd D lösche akt. Zeile, bis zum Zeilenende
+J gJ 2 Zeilen zusammenfassen, ohne Leerzeichen
+:rd↵ löschextergänzung (Treffer nach, vor dem Cursor)
+^W Wort vor dem Curpierregister hinter, vor dem Cursor ein
+]p [p wie p, P mit Einrückung
+gp gP wie p, P, Cursor bleibt hinter dem Text
+
+#Weitere Einfügeoperationen
+g?m rot13-Verschlüsselung für die Bewegung m
+n^A n^X +n, -n zur Zahl unter dem Cursor
+gqm format. Bewegungsbereich m auf feste Breite
+:rce w↵ zentriere Zeilen im Bereich r auf Breite w
+:rle i↵ Zeilenbereich r linksbündig mit Einrückung i
+:rri w↵ Zeilenbereich r rechtsbündig auf Breite w
+!mc↵ filtere Bewegungsbereich m durch ext. Befehl c
+n!!c↵ filtere n Zeilen durch ext. Befehl c
+:r!c↵ filtere Zeilenbereich r durch ext. Befehl c
+
+#Markierungsmodus
+v V ^V Zeichen-, Zeilen-, Blockmarkierung ein/aus
+o Cursor an den Anfang der Markierung
+gv letzten markierten Bereich nochmals markieren
+aw as ap Wort, Satz, Absatz markieren
+ab aB ( )-Block , { }-Block markieren
+
+Rückgängig machen, Wiederholen & Register
+u letzten Befehl rückgängig machen
+U zuletzt geänderte Zeile wiederherstellen
+. letzte Änderungen wiederholen
+^R rückgängig gemachten Befehl erneut anwenden
+n. letzte Änderungen n-mal durchführen
+qc qC nächste Eingaben in Reg. c speichern, anfügen
+q Aufzeichnung beenden
+@c Inhalt von Register c ausführen
+@@ letzten @-Befehl wiederholen
+:@c↵ Register c als Ex-Befehl ausführen
+:rg/p/c↵ Ex-Befehl c für Bereich r dort ausführen
+ wo das Muster p zutrifft
+
+#Komplexe Bewegungen
+- + Zeile hoch, runter auf erstes Nichtleerzeichen
+B W Wort links, rechts (Trennung: Leerzeichen)
+gE E Wortende links, rechts (Trennung: Leerzeichen)
+n_ n-1 Zeilen runter zum 1. Nichtleerzeichen
+g0 gm Anfang, Mitte der Bildschirmzeile
+g^ g$ erstes, letztes Zeichen der Bildschirmzeile
+gk gj Bildschirmzeile auf, ab
+fc Fc nächstes, vorhergehendes Zeichen c suchen
+tc Tc vor nächstes c, hinter vorhergehendes c
+; , letztes fFtT wiederholen, in Gegenrichtung
+[[ ]] zum Abschnittsbeginn rückwärts, vorwärts
+[] ][ zum Abschnittsende rückwärts, vorwärts
+[( ]) offene (, ) rückwärts, vorwärts
+[{ [} offene {, } rückwärts, vorwärts
+[m ]m Anfang der vorhergeh., nächsten Java-Methode
+[# ]# offenes #if, #else, #endif rückwärts, vorwärts
+[* ]* Anfang, Ende /* */ rückwärts, vorwärts
+
+#Suchen & Ersetzen
+/s↵ ?s↵ suche s vorwärts, rückwärts
+/s/o↵ ?s?o↵ suche s vorw., rückw., Versatz o
+n or /↵ letzte Suche vorwärts wiederholen
+N or ?↵ letzte Suche rückwärts wiederholen
+chtdef. Tasten, Neudef. möglich# * suche Wort unter Cursor rückwärts, vorwärts
+g# g* dasselbe, auch teilweise Übereinstimmung
+gd gD lok., glob. Def. des Symbols unter Cursor
+:rs/f/t/x↵ im Bereich r wird f durch t ersetzt
+ x: g-alle Vorkommen, c-mit Bestätigung
+:rs x↵ Ersetzung mit neuem r & x wiederholen
+#
+#Metazeichen in Suchmustern
+. ^ $ beliebiges Zeichen, Zeilenanfang, Zeilenende
+\< > Wortanfang, Wortende
+[c1-c2] einzelnes Zeichen im Bereich c1..c2
+[^c1-c2] einzelnes Zeichen nicht im Bereich c1..c2
+\i \k \I \K Name, Schlüsselwort; ohne Ziffern
+\f \p \F \P Dateiname, druck. Zeichen; ohne Ziffern
+\s \S Leerzeichen, Nichtleerzeichen
+\e \t \r \b <esc>, <tab>, <↵>, <←>
+\= * \+ Wiederholungen: 0..1, 0..∞, 1..∞
+\| trennt Alternativen ( ≡ Oder)
+\( \) faßt Muster zu einer Gruppe zusammen
+\& \n der ganze Treffer, die n-te () Gruppe
+\u \l Groß-, Kleinbuchstabe
+\c \C Groß-, Kleinschreib. beachten/nicht beachten
+#
+#Tags
+:ta t↵ springe zum tag t
+:nta↵ springe zum n-neueren tag des Stapels
+^] ^T zum tag unter dem Cursor, zurück vom tag
+:ts t↵ Liste der tags zeigen, einen auswählen
+:tj t↵ springe zum tag t
+:tags↵ Liste der tags ausgeben
+:npo↵ :n^T↵ zum n-älteren tag des Stapels
+:tl↵ springe zum letzten passenden tag
+^W} :pt t↵ zeige tag unter Cursor, tag t (preview)
+^W] teile Fenster und zeige tag unter dem Cursor
+^Wz or :pc↵ schließe preview-Fenster
+#
+#Blättern & mehrere Fenster
+^E ^Y Zeile auf, ab
+^D ^U halbe Seite auf, ab
+^F ^B Seite auf, ab
+zt or z↵ akt. Zeile an den Fensteranfang
+zz or z. akt. Zeile in die Fenstermitte
+zb or z- akt. Zeile an das Fensterende
+zh zl ein Zeichen nach rechts, links
+zH zL halben Bildschirm nach rechts, links
+^Ws or :split↵ Fenster waagrecht teilen
+^Wn or :new↵ neues, leeres Fenster erzeugen
+^Wo or :on↵ akt. Fenster wird einziges Fenster
+^Wj ^Wk in das Fenster unten, oben
+^Ww ^W^W in das Fenster unten, oben (reihum)
+#
+#Ex-Befehle (↵)
+:e f editiere Datei f, außer nach Änderungen
+:e! f editiere Datei f in jedem Fall
+:wn :wN Datei schreiben & nächste, vorhergeh. edit.
+:n :N nächste, vorhergeh. Datei editieren
+:rw Bereich r in akt. Datei schreiben
+:rw f Bereich r in Datei f schreiben
+:rw>>f Bereich r an Datei f anhängen
+:q :q! Editor verlassen, Änderungen verwerfen
+:wq or :x or ZZ akt. Datei schreiben & Ed. verlassen
+<up> <down> in der Befehlsliste blättern
+:r f Inhalt von Datei f vor Cursor einfügen
+:r! c Ausgabe des Befehles c nach Cursor einfügen
+:args die Argumentliste anzeigen
+:rc a :rm a Kopieren, Verschieben: Bereich r unter Zeile a
+#Faltung:
+zfm erzeuge Faltung bis Bewegung m
+:rfo erzeuge Faltung für den Bereich r
+zd zE lösche Faltung unter Cursor, alle im Fenster
+zo zc zO zC öffne, schließe Faltung unter Cursor; rekursiv
+[z ]z zum Anfang, Ende der offenen Faltung
+zj zk aufwärts, abwärts zum Anfem Cursor steht
+#Verschiedenes
+K man für Wort unter dem Cursor aufrufen
+:make↵ make starten, Fehler lesen, zum 1. springen
+:cn↵ :cp↵ zum nächste, vorherg. Fehler springen
+:cl↵ :cf↵ Fehlerliste ausgeben, ∽ aus Datei lesen
+^L Bildschirm neu schreiben
+^G Dateinamen und Position zeigen
+g^G zeige Cursorpos.: Spalte, Zeile, Wort, Byte
+ga ASCII-Wert des Zeichens unter dem Cursor
+gf Datei öffnen, deren Name unter dem Cursor steht
+:redir>f↵ Ausgabe in Datei f umleiten
+:mkview [f] Darstellungsopt. speichern [in Datei f]
+:loadview [f] Darstellungsopt. laden [aus Datei f]
+
+
+#Plugins
+###gpg dateien sofort bearbeiten
+gnupg.vim
+###autovervollständigung (richtig gut)
+neocomplcache.vim
+###vimdiff Änderungen zwischen den Fenstern abgleichen
+#von aktuellem Fenster zum anderen
+dp
+#vom anderen ins aktuelle Fenster
+do
+##
+
--- /dev/null
+###How to migrate existing Windows installations to VirtualBox
+
+Windows installations, unlike Linux, cannot easily be moved from one hardware to another. This is not just due to Microsoft's activation mechanism but the fact that the installed kernel and drivers depend on the actual hardware.
+
+This document explains the common pitfalls and how to workaround these. We assume that either a physical Windows installation or a VMware image is the source of migration. It is also assumed that a suitable virtual disk image (either VDI or VMDK for VirtualBox >= 1.4) is already present.
+HAL ¶
+
+The hardware dependent portion of the Windows kernel is dubbed "Hardware Abstraction Layer" (HAL). While hardware vendor specific HALs have become very rare, there are still a number of HALs shipped by Microsoft. Here are the most common HALs (for more information, refer to this article: http://support.microsoft.com/kb/309283):
+
+ * Hal.dll (Standard PC)
+ * Halacpi.dll (ACPI HAL)
+ * Halaacpi.dll (ACPI HAL with IO APIC)
+
+If you perform a Windows installation with default settings in VirtualBox, Halacpi.dll will be chosen as VirtualBox enables ACPI by default but disables the IO APIC by default. A standard installation on a modern physical PC or VMware will usually result in Halaacpi.dll being chosen as most systems nowadays have an IO APIC and VMware chose to virtualize it by default (VirtualBox disables the IO APIC because it is more expensive to virtualize than a standard PIC). So as a first step, you either have to enable IO APIC support in VirtualBox or replace the HAL. Replacing the HAL can be done by booting the VM from the Windows CD and performing a repair installation.
+Hard Disk Support ¶
+
+For reasons we don't understand, Windows memorizes which IDE/ATA controller it was installed on and fails to boot in case the controller changes. This is very annoying because you will run into this problem with basically all migrated images. The solution here is to perform several modifications to the Windows registry. This can be done while the installation is still running on the original system because all it does is relax the IDE checks. Therefore the installation will continue to work on the original system after the modification. The easiest way is to use the excellent MergeIDE utility from the German c't computer magazine.
+agp440.sys / intelppm.sys ¶
+
+There are a few Windows device drivers that does not play nice on VirtualBox' hardware. Many physical PC systems (and VMware) have a AGP graphics bus which will cause agp440.sys to be installed. VirtualBox' virtual graphics card is on the PCI bus and the driver will cause a system crash. The most correct approach is to boot the recovery console from the Windows installation CD and disable this service. However, it is also possible to just rename/delete agp440.sys the C:\Windows\SYSTEM32\drivers directory. Here is a knowledge base article containing more information: http://support.microsoft.com/kb/324764
+
+A similar problem may exist with intelppm.sys, which can also cause a hang of the guest OS.
+
+After the above steps, your Windows installation should work fine in VirtualBox.
+###Virtuelle Maschine starten per Kommandozeile und remote desktop Nutzung
+VBoxManage startvm WindowsVista --type vrdp
+###laufende VMs anzeigen
+VBoxManage list runningvms
+###ausschalten
+VBoxManage controlvm WindowsVista poweroff
--- /dev/null
+###Datenbankverbindung
+Imports MySql.Data.MySqlClient
+Imports MySql.Data.Types
+Public Class Form1
+ Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
+ 'stellt die Verbindung mit der Datenbank zur Verfügung
+ Dim objMySQL As MySqlConnection
+
+ 'erlaubt das Ausführen von SQL-Statements
+ Dim objCommand As MySqlCommand
+
+ 'datareader
+ Dim objReader As MySqlDataReader
+
+ 'connection-string
+ Dim strConn As String = "Persist Security Info=False;database=k-soft;server=localhost;user id=k-soft;Password=[zensiert];charset=latin1"
+
+ 'sql-statement
+ Dim strSQL As String = "INSERT INTO `k-soft`.`accounts` (`ID` ,`name` ,`password` ,`e-mail` ,`sn` ,`sig` ,`qm` ,`pn`) VALUES ('1', '2', '3', '4', '5', '6', '7', '8');"
+
+ 'dieser String enthält nachher die Kundendaten, ein Datensatz pro Zeile
+ Dim strResult As String = ""
+
+ 'datenbankverbindung aufbauen
+ objMySQL = New MySqlConnection(strConn)
+ objMySQL.Open()
+ 'command-objekt vorbereiten und an den Reader übergeben
+ objCommand = New MySqlCommand(strSQL, objMySql)
+ 'objReader = objCommand.ExecuteNonQuer
+
+ 'ergebnisse auslesen und in string speichern
+ 'Do Until objReader.Read = False
+ 'Dim strName As String = objReader!KundenName
+ ' Dim strStrasse As String = objReader!Strasse
+ 'Dim strOrt As String = objReader!Ort
+ 'strResult &= strName & ", " & strStrasse & ", " & strOrt & vbCrLf
+ 'Loop
+
+ 'Datenbankverbindungen schließen und bereinigen
+ 'objReader.Close()
+ objMySQL.Close()
+
+ objReader = Nothing
+ objCommand = Nothing
+ objMySQL = Nothing
+
+ 'ergebniss anzeigen
+ MsgBox(strResult, vbOKOnly, "SQL Ergebniss")
+ End Sub
+End Class
+###Datumsprüfung
+Public Function IsDateValid_2(ByVal varYear As Variant, _
+ ByVal varMonth As Variant, ByVal varDay As Variant, _
+ Optional ByRef dtmDate As Date) As Boolean
+
+ Dim intYear As Integer
+ Dim intMonth As Integer
+ Dim intDay As Integer
+
+ Dim dtmDateSerial As Date
+
+ On Error Resume Next
+
+ intYear = CInt(varYear)
+ intMonth = CInt(varMonth)
+ intDay = CInt(varDay)
+
+ If Err.Number = 0 Then
+ dtmDateSerial = DateSerial(intYear, intMonth, intDay)
+ If Err.Number = 0 Then
+ If Year(dtmDateSerial) = intYear Then
+ If Month(dtmDateSerial) = intMonth Then
+ If Day(dtmDateSerial) = intDay Then
+ dtmDate = dtmDateSerial
+ IsDateValid_2 = True
+ End If
+ End If
+ End If
+ End If
+ End If
+ On Error GoTo 0
+End Function
+#
+Public Function IsDateValid_1(ByVal varYear As Variant, _
+ ByVal varMonth As Variant, ByVal varDay As Variant, _
+ Optional ByRef dtmDate As Date) As Boolean
+
+ Dim strDate As String
+
+ If IsNumeric(varYear) Then
+ If (varYear >= 100) And (varYear <= 9999) Then
+ If IsNumeric(varMonth) Then
+ If (varMonth >= 1) And (varMonth <= 12) Then
+ If IsNumeric(varDay) Then
+ strDate = Format$(varYear, "0000") & "-" & _
+ Format$(varMonth, "00") & "-" & _
+ Format$(varDay, "00")
+
+ If IsDate(strDate) Then
+ dtmDate = CDate(strDate)
+ IsDateValid_1 = True
+ End If
+ End If
+ End If
+ End If
+ End If
+ End If
+End Function
+#
+###Strings trennen
+Mid(string,start,laenge)
+Mid("Hallihallo",3,5)="lliha"
+Left(string,laenge)
+Left("Hallihallo",5)="Halli"
+Right("Hallihallo",5)="Hallo"
+###Datumsdifferenzen ausrechnen
+datediff("d",cdate("21.04.05"),cdate("23.04.05"))
+ergebniss 2
+datediff("d",cdate("05/04/05"),cdate("05/04/07"))
+ergebniss 730
--- /dev/null
+###x11vnc
+ssh -t -L 5900:localhost:5900 root@scanhv4 'x11vnc -localhost -nolookup -nopw -display :0 -auth /var/lib/xdm/authdir/authfiles/*'
+###
+
+
+
--- /dev/null
+###client config für cisco vpn
+IPSec gateway 80.228.110.21
+IPSec ID sslvpn
+IPSec secret superdau
+Xauth username #tbz-junge
+Xauth password ~~supporttbz#
--- /dev/null
+###plugins:
+Movie Browser Plugin - Der Movie Browser ruft zahlreiche Informationen und Bilder zu Ihren aufgenommen Filmen von IMDb, TMDb oder TheTVDb ab.
+
--- /dev/null
+###Bootcode neu erzeugen
+bcdedit /export C:\BCD_Backup
+c:
+cd boot
+attrib bcd -s -h -r
+ren c:\boot\bcd bcd.old
+bootrec /RebuildBcd
+###Reparieren von Vista
+Bootrec /Fixmbr
+Bootrec /Fixboot
+Bootrec /RebuildBCD
+###Administrator in Vista freischalten
+Systemsteuerung -> System und Wartung -> Verwaltung ->
+Computerverwaltung -> Lokale Benutzer und Gruppen -> Benutzer
+Eigenschaften -> Konto ist deaktiviert raus machen
+#oder
+net user Administrator /active
+#wieder sperren
+net user Administrator /active:no
+###chkdsk checkdisk (sollte auch in der Rep. Konsole funktionieren)
+chkdsk c: /f
+###dateirechte ändern
+icacls
+###speichert acl in aclfile für alle dateien name
+icacls name /save aclfile [/T] [/C] [/L] [/Q]
+###ändert den besitzer der dateien auf user
+icacls name /setowner user [/T] [/C] [/L] [/Q]
+###speichert acl für alle dateien unter c:\windows in AclFile
+icacls c:\windows\* /save AclFile /T
+###stellt acl aus datein AclFile wieder her
+icacls c:\windows\ /restore AclFile
+###erlaubt Administrator löschen und schreiben für file
+icacls file /grant Administrator:(D,WDAC)
+###laufwerk z von Dein-Rechnername\Dummy-Freigabe
+net use z: \\Dein-Rechnername\Dummy-Freigabe /user:Benutzername-auf-Deinem-Rechner password:gültiges-Kennwort-für-den-nutzer
+###netzwerkfreigaben
--- /dev/null
+http://www.zeroathome.de/wordpress/wlan-hotspot-mit-chillispotdd-wrt-freeradius-und-mysql-unter-ubuntu/
+
+http://www.imrazor.de/wordpress/?p=29
--- /dev/null
+###Weiterverarbeitung von datei.*
+grep Nachbearb -l *.dat | sed -e "s/.dat$//"|xargs -I{} -c bash "mv -v {}.* Nachbearbeitung/"
--- /dev/null
+<lircmap>
+ <remote device="Apple_A1156">
+ <left>REV</left>
+ <right>FFWD</right>
+ <up>PLUS</up>
+ <down>MINUS</down>
+ <select>PLAY</select>
+ <menu>MENU</menu>
+ </remote>
+</lircmap>
--- /dev/null
+
+# Please make this file available to others
+# by sending it to <lirc@bartelmus.de>
+#
+# this config file was automatically generated
+# using lirc-0.9.0-pre1(default) on Fri Sep 27 17:20:53 2013
+#
+# contributed by
+#
+# brand: /root/lircd.conf
+# model no. of remote control:
+# devices being controlled by this remote:
+#
+
+begin remote
+
+ name /root/lircd.conf
+ bits 8
+ flags SPACE_ENC|CONST_LENGTH
+ eps 30
+ aeps 100
+
+ header 9170 4620
+ one 577 1747
+ zero 577 605
+ ptrail 576
+ pre_data_bits 16
+ pre_data 0x77E1
+ post_data_bits 8
+ post_data 0x65
+ gap 110144
+ toggle_bit_mask 0x0
+
+ begin codes
+ KEY_UP 0xD0
+ KEY_DOWN 0xB0
+ KEY_LEFT 0x10
+ KEY_RIGHT 0xE0
+ KEY_OK 0x20
+ KEY_MENU 0x40
+ end codes
+
+end remote
+
+
--- /dev/null
+<keymap>
+ <global>
+ <remote>
+ <left>Left</left>
+ <right>Right</right>
+ <up>Up</up>
+ <down>Down</down>
+ <select>Select</select>
+ <menu>PreviousMenu</menu>
+ </remote>
+ </global>
+</keymap>
+
--- /dev/null
+###xorg.conf verschiedene Auflösungen eintragen
+Section "Screen"
+ Identifier "Screen0"
+ Device "Device0"
+ Monitor "Monitor0"
+ DefaultDepth 24
+ SubSection "Display"
+ Depth 24
+ Modes "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
+ EndSubSection
+EndSection
+###xorg.conf Tastatur eintragen
+Section "InputDevice"
+ Identifier "Generic Keyboard"
+ Driver "kbd"
+ Option "XkbRules" "xorg"
+ Option "XkbModel" "pc105"
+ Option "XkbLayout" "de"
+ Option "XkbVariant" "nodeadkeys"
+EndSection
+###xorg.conf Monitor
+Section "Monitor"
+ Identifier "Generic Monitor"
+ Option "DPMS"
+ Modeline "1024x768" 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
+EndSection
+###dpms ausschalten
+xset -dpms
+###screen saver aus
+xset s noblank
+###screen saver 5 sek. bis schwarz
+xset s 5
--- /dev/null
+###Nutzer anlegen und Passwort vergeben
+zarafa-admin -c mhoellein -P -e mhoellein@freenet.de -f 'Mario Hoellein'
+###Nutzer löschen, Daten bleiben erhalten in DB
+zarafa-admin -d mhoellein
+###Speicher ohne Nutzer anzeigen (guid)
+zarafa-admin --list-orphan
+###Speicher löschen (guid)
+zarafa-admin --remove-store 0DE532701AB9491E81793183F72EF8C6
--- /dev/null
+###hinzufügen einer quelle
+zypper ar http://installserver.tbz-pariv.lan/suse suse
+###entfernen einer quelle
+zypper rr suse
+zypper rr 1
+###anzeigen aller quellen
+zypper lr
+###anzeigen aller quellen incl. pfad
+zypper lr -u
+zypper lr --detail
+###installieren von paketen
+zypper install hal-doc
+zypper in hal-doc
+###entfernen von paketen
+zypper remove hal-doc
+###suchen nach paketen
+zypper search paket1
+zypper se paket1
+###modifizieren einer quelle, hier enable
+zypper mr -e 1
+zypper mr -e suse
+###modifizieren einer quelle, hier disable
+zypper mr -d 1
+zypper mr -d suse
+###