Compare commits

..

52 Commits

Author SHA1 Message Date
Jonas Höglund
bc743ec3a7 Move base-files to feed_inteno_openwrt 2016-03-03 11:33:04 +01:00
Jonas Höglund
2cd8e830b4 Remove other mtd-utils 2016-01-28 13:32:30 +01:00
Jonas Höglund
0c8fe5219e Add inteno mtd-utils 2016-01-28 13:32:00 +01:00
Jonas Höglund
7149ff400b Renamed iopsys-base-files to override openwrt base-files 2016-01-27 17:44:47 +01:00
Jonas Höglund
cb51d61097 Removed luci from inteno packages due to broken dependency 2016-01-21 14:22:38 +01:00
Jonas Höglund
4b603feaf7 Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* ac06bd5 Use physical interface for Wan
* b8834a9 Disable multiwan
-------------------------------------------------------------------------------
commit ac06bd552d2ba72fda1e20d3b52e96302381b3ef
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-01-19 11:21:14 +0100

    Use physical interface for Wan

Base directory -> /
 files/etc/init.d/iopsys-network-config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit b8834a96213d6303e475aa673362f290c86d04aa
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-01-19 10:15:22 +0100

    Disable multiwan

Base directory -> /
 files/etc/config/network               | 1 -
 files/etc/init.d/iopsys-network-config | 2 --
 2 files changed, 3 deletions(-)
-------------------------------------------------------------------------------
2016-01-19 12:34:26 +01:00
Jonas Höglund
28a699ace1 Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* f6945f5 small bug fix in hotplug net bridge script
* da0c0ee fix hardcoded device name
* 9a0ecef if a bridge contains uplink device, it uses its macaddress refs #8454
* 0fcfb80 simplify anywan hotplug script
* 5a41587 no need to reload a bridge if a wan interface gets removed from it
* 56679cd separate bridge and anywan hotplug handlers
* f63086e disable ipv6 on unmanaged bridge
* 1a01678 fix ifup lan loop caused by dhd recreating virtual interfaces
* e296d11 restart fap and fc in case of ifup
* a72edb7 wifi: if luci, set disable option for radio as well
* 9ef8071 hotplug: Add extbutton action and printouts for production
* e5f8485 add dect short/long button support to DG301 and CG300
* f3114e2 update hotplug button script dectbutton functions
* 514f165 set wan led status to ok instead of notice when plugged in
* d44ff19 symlink package/base-files/iopsys to package/zeta/basefiels/iopsys/base-files-iopsys
* 5e04757 Added lua to juci base package
* 14221d4 zeta/base-files to zeta/basefiles
-------------------------------------------------------------------------------
commit f6945f5b1169e2afe1f94913803e817fd788f7e8
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-01-15 16:11:15 +0100

    small bug fix in hotplug net bridge script

Base directory -> /
 files/etc/hotplug.d/net/01-bridge | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit da0c0ee8c2cccc202d5a314085b9777cd5da03fe
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-01-12 14:22:30 +0100

    fix hardcoded device name

Base directory -> /
 files/etc/hotplug.d/net/01-bridge | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 9a0ecef2e25772a39cda78222e2086fdc7a25c4a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-01-12 14:02:33 +0100

    if a bridge contains uplink device, it uses its macaddress refs #8454

Base directory -> /
 files/etc/hotplug.d/net/01-bridge | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 0fcfb806f4ec99722ac17b88d06452cea9a48727
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-01-11 18:34:59 +0100

    simplify anywan hotplug script

Base directory -> /
 files/etc/hotplug.d/net/02-anywan | 49 +++++++++++++++------------------------
 1 file changed, 19 insertions(+), 30 deletions(-)
-------------------------------------------------------------------------------
commit 5a41587db7aa41af31700c3b843ca6aaf54a51a1
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-01-11 18:11:31 +0100

    no need to reload a bridge if a wan interface gets removed from it

Base directory -> /
 files/etc/hotplug.d/net/01-bridge | 12 ------------
 1 file changed, 12 deletions(-)
-------------------------------------------------------------------------------
commit 56679cdcb58c1576c3f9511c1857f1fd4c5d93e4
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-01-11 18:10:23 +0100

    separate bridge and anywan hotplug handlers

Base directory -> /
 files/etc/hotplug.d/net/02-anywan | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
-------------------------------------------------------------------------------
commit f63086ee97b59337638060ccab8f06ea6a0082b9
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-01-11 18:09:55 +0100

    disable ipv6 on unmanaged bridge

Base directory -> /
 files/etc/hotplug.d/net/01-bridge | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)
-------------------------------------------------------------------------------
commit 1a016789ed67d59c17ad9da238e20490ed4baf15
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-02 19:21:12 +0100

    fix ifup lan loop caused by dhd recreating virtual interfaces

Base directory -> /
 files/etc/hotplug.d/net/01-bridge | 2 ++
 1 file changed, 2 insertions(+)
-------------------------------------------------------------------------------
commit e296d111a8f056adba6eda721153a696b7b2afb7
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-10-12 15:14:20 +0200

    restart fap and fc in case of ifup

Base directory -> /
 files/etc/hotplug.d/iface/01-fap | 8 ++++++++
 1 file changed, 8 insertions(+)
-------------------------------------------------------------------------------
commit a72edb7eb9c215f8ee16dbbff32fe2b415b3e11c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-09-23 17:45:50 +0200

    wifi: if luci, set disable option for radio as well

Base directory -> /
 files/etc/hotplug.d/button/10-button | 8 ++++++++
 1 file changed, 8 insertions(+)
-------------------------------------------------------------------------------
commit 9ef8071033b29895b82558853d7cb1a6b5d753b3
Author: Mats Karrman <mats@southpole.se>
Date: 2015-08-27 10:35:29 +0200

    hotplug: Add extbutton action and printouts for production

Base directory -> /
 files/etc/hotplug.d/button/10-button | 7 +++++++
 1 file changed, 7 insertions(+)
-------------------------------------------------------------------------------
commit e5f8485522efd74c3ef4b4e4559e02216ef926bb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-08-26 14:34:29 +0200

    add dect short/long button support to DG301 and CG300

Base directory -> /
 files/etc/hotplug.d/button/10-button | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit f3114e249465f172cd4e96e9509816067fd52d94
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-08-26 14:08:14 +0200

    update hotplug button script dectbutton functions

Base directory -> /
 files/etc/hotplug.d/button/10-button | 42 ++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 23 deletions(-)
-------------------------------------------------------------------------------
commit 514f1658977b27fc2d85ceb50779ba6c860c5994
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-08-20 14:33:04 +0200

    set wan led status to ok instead of notice when plugged in

Base directory -> /
 files/etc/hotplug.d/switch/10-switch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit d44ff19af9906d308e5b0c75ece2521fcb44a3bb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-08-14 09:28:29 +0200

    symlink package/base-files/iopsys to
    package/zeta/basefiels/iopsys/base-files-iopsys

Base directory -> /
 files/etc/hotplug.d/iface/05-ip6route | 42 +++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
-------------------------------------------------------------------------------
commit 5e04757610f379d6ec6420d968b150cd723cf373
Author: Martin Schröder <mkschreder.uk@gmail.com>
Date: 2015-08-13 16:52:22 +0200

    Added lua to juci base package

Base directory -> /
 files/etc/hotplug.d/button/10-button | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit 14221d4f7e3520cc1476041f9af6844d63d8f1f1
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-06-30 16:39:28 +0200

    zeta/base-files to zeta/basefiles

Base directory -> /
 files/etc/hotplug.d/button/10-button    |  98 +++++++++++++++++++++++++++++
 files/etc/hotplug.d/dsl/10-dsl          |  39 ++++++++++++
 files/etc/hotplug.d/dsl/20-dsl-leds     |  29 +++++++++
 files/etc/hotplug.d/iface/60-wanuptest  |  10 +++
 files/etc/hotplug.d/iface/70-shiftrange |  47 ++++++++++++++
 files/etc/hotplug.d/net/01-bridge       |  35 +++++++++++
 files/etc/hotplug.d/switch/10-switch    | 107 ++++++++++++++++++++++++++++++++
 files/etc/hotplug.d/switch/20-arpscan   |  10 +++
 files/etc/hotplug.d/usb/10-usb          |  17 +++++
 9 files changed, 392 insertions(+)
-------------------------------------------------------------------------------
2016-01-18 13:15:05 +01:00
Jonas Höglund
ecb30c14a7 Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* bda5055 Added iopsys banner
-------------------------------------------------------------------------------
commit bda50558ec6a4459036e5a7e3078eb9bda43726a
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-01-18 10:30:24 +0100

    Added iopsys banner

Base directory -> /
 files/etc/banner | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)
-------------------------------------------------------------------------------
2016-01-18 10:30:50 +01:00
Jonas Höglund
4df1883bc0 Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* 0fddb8b Rename environment init script
-------------------------------------------------------------------------------
commit 0fddb8b3e3dfa97c37705c315383b4aac3ccd596
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-01-14 17:00:11 +0100

    Rename environment init script

Base directory -> /
 files/etc/init.d/enviroment         | 172 ------------------------------------
 files/etc/init.d/iopsys-environment | 172 ++++++++++++++++++++++++++++++++++++
 2 files changed, 172 insertions(+), 172 deletions(-)
-------------------------------------------------------------------------------
2016-01-14 17:02:59 +01:00
Jonas Höglund
ad7561290b Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* 2974451 Added iopsys-network-config setup script
-------------------------------------------------------------------------------
commit 29744515609bb0e6962749950f53e739bc00f441
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-01-14 13:34:08 +0100

    Added iopsys-network-config setup script

Base directory -> /
 files/etc/init.d/iopsys-network-config | 53 ++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
-------------------------------------------------------------------------------
2016-01-14 14:10:26 +01:00
Jonas Höglund
72c80e7255 Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* e0a25d9 populate missing config files in /etc/config/backup
* 1b6790c migrate admin, support and user passwords
* 7dd9f06 Fixed openwrt_revision handling and added device_info handling
* e7868b9 move openwrt version filling to enviroment script
* 7b7fe8b remove setting priority of wl related threads in enviroment init script
* 98a5928 enviroment: fix taskset syntax
* 4dfbd24 enviroment script works even if basemac starts with 0
* 5b598d6 zeta/base-files to zeta/basefiles
-------------------------------------------------------------------------------
commit e0a25d918d525af816ccd669ffeabc6e11700d76
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-24 16:04:04 +0100

    populate missing config files in /etc/config/backup

Base directory -> /
 files/etc/init.d/enviroment | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
-------------------------------------------------------------------------------
commit 1b6790c5fdcd2784d906fab51a103b06174d3114
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-12 17:25:04 +0100

    migrate admin, support and user passwords

Base directory -> /
 files/etc/init.d/enviroment | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 7dd9f06d6a3604401a0a1a9a99f9856bf8aa94f3
Author: Vlatko Dimic <vlatko.dimic@inteno.se>
Date: 2015-11-10 12:37:40 +0100

    Fixed openwrt_revision handling and added device_info handling

Base directory -> /
 files/etc/init.d/enviroment | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit e7868b9179f764f557ad78aa2bc74b094b13cf5b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-10-29 15:01:04 +0100

    move openwrt version filling to enviroment script

Base directory -> /
 files/etc/init.d/enviroment | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
-------------------------------------------------------------------------------
commit 7b7fe8b3ecafbc26f2304ebe28e50973b90af4f6
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-10-23 18:59:59 +0200

    remove setting priority of wl related threads in enviroment init script

Base directory -> /
 files/etc/init.d/enviroment | 32 --------------------------------
 1 file changed, 32 deletions(-)
-------------------------------------------------------------------------------
commit 98a5928d8bc32af3bbde979ea504287e99992ee6
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-09-29 16:42:18 +0200

    enviroment: fix taskset syntax

Base directory -> /
 files/etc/init.d/enviroment | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 4dfbd24f969036219efebd2e4366321e73d8f91a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-08-18 17:00:55 +0200

    enviroment script works even if basemac starts with 0

Base directory -> /
 files/etc/init.d/enviroment | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
-------------------------------------------------------------------------------
commit 5b598d6700217d2cab7abdbd7f415686e1023a10
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-06-30 16:39:28 +0200

    zeta/base-files to zeta/basefiles

Base directory -> /
 files/etc/init.d/enviroment | 109 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 109 insertions(+)
-------------------------------------------------------------------------------
2016-01-13 17:11:50 +01:00
Jonas Höglund
eeae7ce03a Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* 2b03f01 network: adk 43, 66 and 67 dhcp options via reqopts in network config
* 7edb054 network config: add option 128 to reqopts
* dba8215 add inteno.lan to dhcp hostnames
* e2f1921 backup DynDNS and QoS config
* d902240 backup: remove backup section from backup config
* 39edc5e backup: remove unused sections
* 9d604d8 remove keep section from backup config
* 0d8b50a fixes for #7869 software upgrade was broken
* cdf64c7 set wan6 via uci-default instead of adding to config by default
* be605cb network: add wan6 interface back
* 950f370 remove management rule from firewall config
* cc0ff7e disable crashlog in default inteno fw
* dd56efd backup: conservative keep of passwd, parental and upnp
* 7dabf7f wifi: change defaults
* 1fb385a add reqopts 132 and 133 to default inteno config
* 21ad267 juci: add juci config to basefiles iopsys (Note: we should probably have a better way of generating all the configs)
* 2d33d83 wifi: default key is WPA2-PSK and added extra ssid
* 8e01614 put .icwmpd_backup_session.xml under correct section
* ea6622d add .icwmpd_backup_session.xml file to keep after upgrade list
* 2374fc9 firewall: add inteno office ip as management
* 001d4f6 wifi: set acs scan timer to 15 minutes by default
* a975f6c sysupgrade: add conservative_keep option in /etc/config/backup (handles sysupgrade from older versions), refs #7947
* 09a2e33 crashlog: catch and store any code dump file.
* 5fc7d9f remove guest network from default software
* a144d4e Add crashlog package.
* 1b8cc57 Added rpcd admin:admin login back
* 4d9d928 wireless: disable extrassid
* c2b749d wifi changes
* 42180d5 Updated default wireless config to only include 4 letters from mac into ssid
* 749899b zeta/base-files to zeta/basefiles
* 41b8b56 Remove openwrt default config files
-------------------------------------------------------------------------------
commit 2b03f01af02675a3717a1e8d55628696a01d5aab
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-01-04 14:12:31 +0100

    network: adk 43, 66 and 67 dhcp options via reqopts in network config

Base directory -> /
 files/etc/config/network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 7edb054a009aa41ac703c081bb4a7a6790e7fc4c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-12-29 11:14:29 +0100

    network config: add option 128 to reqopts

Base directory -> /
 files/etc/config/network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit dba821599b0ad906d0974f04aad7d58eb2e03bcb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-12-17 13:03:52 +0100

    add inteno.lan to dhcp hostnames

Base directory -> /
 files/etc/config/dhcp | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit e2f1921000af5af4a17ed248ddcbc70435c5a15f
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-24 16:07:51 +0100

    backup DynDNS and QoS config

Base directory -> /
 files/etc/config/backup | 8 ++++++++
 1 file changed, 8 insertions(+)
-------------------------------------------------------------------------------
commit d9022406b8b73fb3740ec0330912ee06f98f94bc
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-20 16:34:24 +0100

    backup: remove backup section from backup config

Base directory -> /
 files/etc/config/backup | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 39edc5e5c42e7d8516faf46036885dba4d5288c0
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-20 15:16:15 +0100

    backup: remove unused sections

Base directory -> /
 files/etc/config/backup | 41 ++++++++++++++---------------------------
 1 file changed, 14 insertions(+), 27 deletions(-)
-------------------------------------------------------------------------------
commit 9d604d8c4b3bc96a986641df030c1b15119b17fc
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-20 15:02:07 +0100

    remove keep section from backup config

Base directory -> /
 files/etc/config/backup | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)
-------------------------------------------------------------------------------
commit 0d8b50a411498ccaa2d68a1670f08a2ad41aa773
Author: Strhuan Blomquist <strhuan@inteno.se>
Date: 2015-11-20 13:55:48 +0100

    fixes for #7869 software upgrade was broken

Base directory -> /
 files/etc/config/backup | 5 +++++
 1 file changed, 5 insertions(+)
-------------------------------------------------------------------------------
commit cdf64c7a32842a6ea05d9f9fbc73859f91e49257
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-19 17:25:49 +0100

    set wan6 via uci-default instead of adding to config by default

Base directory -> /
 files/etc/config/network | 4 ----
 1 file changed, 4 deletions(-)
-------------------------------------------------------------------------------
commit be605cb666fc6048f8ed598f04b7cdb78333fce8
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-19 14:44:17 +0100

    network: add wan6 interface back

Base directory -> /
 files/etc/config/network | 5 +++++
 1 file changed, 5 insertions(+)
-------------------------------------------------------------------------------
commit 950f370db544b6e751c806dd9cff42e770b1f50c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-13 14:10:49 +0100

    remove management rule from firewall config

Base directory -> /
 files/etc/config/firewall | 11 -----------
 1 file changed, 11 deletions(-)
-------------------------------------------------------------------------------
commit cc0ff7e334f36f3b9357a2ab2575d499b4774f4d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-09 15:50:32 +0100

    disable crashlog in default inteno fw

Base directory -> /
 files/etc/config/system | 11 -----------
 1 file changed, 11 deletions(-)
-------------------------------------------------------------------------------
commit dd56efd6b7859525a209fa75cced37a84ee6c8bd
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-11-06 16:33:20 +0100

    backup: conservative keep of passwd, parental and upnp

Base directory -> /
 files/etc/config/backup | 3 +++
 1 file changed, 3 insertions(+)
-------------------------------------------------------------------------------
commit 7dabf7f05b5662f5a53406781dae650f04e196dd
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-05 16:42:08 +0100

    wifi: change defaults

Base directory -> /
 files/etc/config/wireless | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 1fb385ae41b639bf15a71ff95c1866615cf5b6b7
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-04 15:36:48 +0100

    add reqopts 132 and 133 to default inteno config

Base directory -> /
 files/etc/config/network | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit 21ad267725dbab3daa617af2d4377eb2853a7f26
Author: Martin Schröder <mkschreder.uk@gmail.com>
Date: 2015-11-04 12:22:53 +0100

    juci: add juci config to basefiles iopsys (Note: we should probably have a
    better way of generating all the configs)

    - this change means that you will only have menus that are selected in this
    config - thus you may not see new things added to juci right away.
    - any new pages can be added to juci manually by adding a new config menu
    section to juci config.
    - TODO: think through how we want to generate menu structure in the future
    (currently this is the best way considering special requirements of
    customers such as DNA)

Base directory -> /
 files/etc/config/juci | 316 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 316 insertions(+)
-------------------------------------------------------------------------------
commit 2d33d83fe657efbb82d8d15b75c040fd92aa3a69
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-03 14:54:07 +0100

    wifi: default key is WPA2-PSK and added extra ssid

Base directory -> /
 files/etc/config/wireless | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 8e01614374db1c87facc7ed6d33da0157084596a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-10-30 11:38:35 +0100

    put .icwmpd_backup_session.xml under correct section

Base directory -> /
 files/etc/config/backup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit ea6622d59dce51b0a4397e53911588954a279c7e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-10-30 11:30:26 +0100

    add .icwmpd_backup_session.xml file to keep after upgrade list

Base directory -> /
 files/etc/config/backup | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit 2374fc9b2f842eca394b80704043148d953614ae
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-10-28 09:31:37 +0100

    firewall: add inteno office ip as management

Base directory -> /
 files/etc/config/firewall | 11 +++++++++++
 1 file changed, 11 insertions(+)
-------------------------------------------------------------------------------
commit 001d4f6b8933d3ea7c094745615a180105327c4f
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-10-27 10:47:00 +0100

    wifi: set acs scan timer to 15 minutes by default

Base directory -> /
 files/etc/config/wireless | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit a975f6cfadb4cead612eefb5019fea923691aff8
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-10-13 11:49:16 +0200

    sysupgrade: add conservative_keep option in /etc/config/backup (handles
    sysupgrade from older versions), refs #7947

Base directory -> /
 files/etc/config/backup | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit 09a2e33213cc09964d9f05f476d40623941a0545
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2015-09-17 19:23:59 +0200

    crashlog: catch and store any code dump file.

    store the core on the crashlog server.

Base directory -> /
 files/etc/config/system | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 5fc7d9f9b5dd9514f6bf499ee2240466226b9062
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-09-17 15:29:07 +0200

    remove guest network from default software

Base directory -> /
 files/etc/config/dhcp     |  6 ------
 files/etc/config/firewall | 26 --------------------------
 files/etc/config/network  |  7 -------
 3 files changed, 39 deletions(-)
-------------------------------------------------------------------------------
commit a144d4eb916d4cd211cfe57810261786bdedae16
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2015-09-14 16:44:25 +0200

    Add crashlog package.

    read package/inteno/crashlog/readme for how to setup server for storing
    logs.

Base directory -> /
 files/etc/config/system | 7 +++++++
 1 file changed, 7 insertions(+)
-------------------------------------------------------------------------------
commit 1b8cc57aa6d31089a0f58ffef144fbdd8552339a
Author: Martin Schröder <mkschreder.uk@gmail.com>
Date: 2015-09-04 16:41:44 +0200

    Added rpcd admin:admin login back

Base directory -> /
 files/etc/config/rpcd | 5 +++++
 1 file changed, 5 insertions(+)
-------------------------------------------------------------------------------
commit 4d9d9281c8452391395ccfbe2ec0178cb5fe3d93
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-08-25 10:04:25 +0200

    wireless: disable extrassid

Base directory -> /
 files/etc/config/wireless | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit c2b749d90d65afb047a6890948c29e8671f0f87b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-08-24 18:12:42 +0200

    wifi changes

Base directory -> /
 files/etc/config/wireless | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 42180d569d2585a549e4fac10eeae8be480012d7
Author: Martin Schröder <mkschreder.uk@gmail.com>
Date: 2015-07-30 11:34:10 +0200

    Updated default wireless config to only include 4 letters from mac into ssid

Base directory -> /
 files/etc/config/wireless | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 749899bfac82cf337cda39f410137516951ec439
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-06-30 16:39:28 +0200

    zeta/base-files to zeta/basefiles

Base directory -> /
 files/etc/config/backup     | 143 ++++++++++++++++++++++++++++++++++++++++++
 files/etc/config/boardpanel |  14 +++++
 files/etc/config/dhcp       |  38 ++++++++++++
 files/etc/config/firewall   | 148 ++++++++++++++++++++++++++++++++++++++++++++
 files/etc/config/hosts      |   0
 files/etc/config/network    |  26 ++++++++
 files/etc/config/passwords  |   8 +++
 files/etc/config/system     |  17 +++++
 files/etc/config/wireless   |  21 +++++++
 9 files changed, 415 insertions(+)
-------------------------------------------------------------------------------
commit 41b8b5653803d2041987a60d9337011eb1d8c6ff
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-01-13 15:49:02 +0100

    Remove openwrt default config files

Base directory -> /
 files/etc/config/network | 22 ----------------------
 files/etc/config/system  | 11 -----------
 2 files changed, 33 deletions(-)
-------------------------------------------------------------------------------
2016-01-13 15:58:39 +01:00
Jonas Höglund
e660f7eb4e Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* 158581a Initialize iopsys-db on boot
-------------------------------------------------------------------------------
commit 158581a475fdaf7d0cf378b568d50ac7b847a948
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-01-13 13:26:25 +0100

    Initialize iopsys-db on boot

Base directory -> /
 files/etc/init.d/iopsys-db | 97 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
-------------------------------------------------------------------------------
2016-01-13 13:26:57 +01:00
Jonas Höglund
e25330b763 Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* c191786 Added db command
* ba32e58 cg300: lit blue wifi led if 5G wifi is on
* 1bc8eaa fix boardfiles with longpress option and set default minpress, refs #8318
* ad5f688 dg150: Add missing items to board file and change name to DG150R0
* 56ae36c eg300: board file: bad spelling of dimming voice1
* 1eed61a Voice: Match brcm line-index to port name in board files, refs #8271
* 37c0cd8 DG400 radar threshould values
* 997b3d5 dg200/dg400: board config: make wan led light up for adsl too, refs #8088
* b13d883 sx9512: create LED intensity and touch sensitivity board config options, refs #7932
* 4bd3f30 DG200: adjust LED intensity and touch sensitivity according to refs #7932
* ba63a97 dg400: board config: Added missing xDSL interfaces, refs #7857
* db708fa dg400: Fix phy led control, refs #7847
* 06a725b radar threshold values for dg200 and dg400
* 6deff60 DG400: Clean up board file
* 54d08eb DG200: enable button press indicator and switch to extbutton action
* d1ccf3e add dect short/long button support to DG301 and CG300
* 6053db6 Added led voice1
* d55c7d8 DG301: turn on broadband LED on ethernet (and DSL) WAN uplink, refs #7651
* 3e0dc52 cg30x boardfiles sx9512 init of LEDs default off
* 8dc2418 peripheral_manager: DG400 support, improved sx9512/shift register and exposed config options
* 8f4a885 dg200: Update peripheral_manager and board file, refs #7598
* 1965d28 DG400: Fix interface name typo in HW config, refs #7631
* 09ad14b Add board config DectAntennaDiversity, Default=0 is use both antennae refs #5990
* 478b1d9 zeta/base-files to zeta/basefiles
-------------------------------------------------------------------------------
commit c191786e48090dc586e45c5e13505eec0df58cd3
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-01-12 16:53:23 +0100

    Added db command

Base directory -> /
 files/sbin/db | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit ba32e58d7643c249f5456ce38c4a313a54e33333
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-12-22 15:22:12 +0100

    cg300: lit blue wifi led if 5G wifi is on

Base directory -> /
 files/lib/db/boards/CG300R0 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 1bc8eaacd19ebb2f3e8f0ccdad820a44aa092a9b
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-12-08 14:41:53 +0100

    fix boardfiles with longpress option and set default minpress, refs #8318

Base directory -> /
 files/lib/db/boards/CG300R0 | 16 ++++------------
 files/lib/db/boards/DG301R0 | 12 +++---------
 files/lib/db/boards/EG300R0 | 17 ++++-------------
 files/lib/db/boards/VOX25   | 11 +++--------
 4 files changed, 14 insertions(+), 42 deletions(-)
-------------------------------------------------------------------------------
commit ad5f6884ae0ff833c5ac2b77229832a3424e00fc
Author: Mats Karrman <mats@southpole.se>
Date: 2015-12-07 18:00:19 +0100

    dg150: Add missing items to board file and change name to DG150R0

Base directory -> /
 files/lib/db/boards/96362ADVNgr | 238 +-------------------------------------
 files/lib/db/boards/DG150R0     | 247 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 248 insertions(+), 237 deletions(-)
-------------------------------------------------------------------------------
commit 56ae36cecca4c67496f823c3b57644489a266992
Author: Mats Karrman <mats@southpole.se>
Date: 2015-12-01 12:57:34 +0100

    eg300: board file: bad spelling of dimming voice1

Base directory -> /
 files/lib/db/boards/EG300R0 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 1eed61a03733a998177a7479092e0bd47f3903de
Author: Mats Karrman <mats@southpole.se>
Date: 2015-11-27 15:03:45 +0100

    Voice: Match brcm line-index to port name in board files, refs #8271

Base directory -> /
 files/lib/db/boards/96362ADVNgr | 2 ++
 files/lib/db/boards/CG300R0     | 4 +++-
 files/lib/db/boards/CG301R0     | 4 +++-
 files/lib/db/boards/DG200R0     | 2 ++
 files/lib/db/boards/DG301R0     | 4 +++-
 files/lib/db/boards/DG400R0     | 4 +++-
 files/lib/db/boards/EG300R0     | 6 ++++--
 files/lib/db/boards/VOX25       | 2 ++
 8 files changed, 22 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit 37c0cd8f66e271eee83536a56639d00ad92513cf
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-27 11:42:05 +0100

    DG400 radar threshould values

Base directory -> /
 files/lib/db/boards/DG400R0 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 997b3d5be1170b4c4a87f74e2bee553c3705a3e8
Author: Mats Karrman <mats@southpole.se>
Date: 2015-11-05 19:09:19 +0100

    dg200/dg400: board config: make wan led light up for adsl too, refs #8088

Base directory -> /
 files/lib/db/boards/DG200R0 | 36 ++++++++++++++++++++++++++----------
 files/lib/db/boards/DG400R0 | 30 +++++++++++++++++++++++-------
 2 files changed, 49 insertions(+), 17 deletions(-)
-------------------------------------------------------------------------------
commit b13d8835954188763eb113db85b904d16dd7e9ce
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-10-13 17:46:15 +0200

    sx9512: create LED intensity and touch sensitivity board config options,
    refs #7932

Base directory -> /
 files/lib/db/boards/DG200R0 | 44 ++++++++------------------------------------
 1 file changed, 8 insertions(+), 36 deletions(-)
-------------------------------------------------------------------------------
commit 4bd3f30ff20f5cc328045d82238cfb5e6de3d7a6
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-10-13 16:40:10 +0200

    DG200: adjust LED intensity and touch sensitivity according to refs #7932

Base directory -> /
 files/lib/db/boards/DG200R0 | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
-------------------------------------------------------------------------------
commit ba63a97ffb144644646e65a4aedf71d710dee9ce
Author: Mats Karrman <mats@southpole.se>
Date: 2015-09-18 18:33:12 +0200

    dg400: board config: Added missing xDSL interfaces, refs #7857

Base directory -> /
 files/lib/db/boards/DG400R0 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit db708fa9ba35d622e89243e13575dcd17ffda133
Author: Mats Karrman <mats@southpole.se>
Date: 2015-09-18 16:26:07 +0200

    dg400: Fix phy led control, refs #7847

Base directory -> /
 files/lib/db/boards/DG400R0 | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
-------------------------------------------------------------------------------
commit 06a725bd5607aab4c596967ba5d9e08f9a2b3abe
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-09-18 11:09:46 +0200

    radar threshold values for dg200 and dg400

Base directory -> /
 files/lib/db/boards/DG200R0 |  2 +-
 files/lib/db/boards/DG400R0 | 21 +++++++++++++--------
 2 files changed, 14 insertions(+), 9 deletions(-)
-------------------------------------------------------------------------------
commit 6deff6046878c97be6f858d33dc3d7e1172efaa7
Author: Mats Karrman <mats@southpole.se>
Date: 2015-08-28 17:26:24 +0200

    DG400: Clean up board file

Base directory -> /
 files/lib/db/boards/DG400R0 | 41 ++++-------------------------------------
 1 file changed, 4 insertions(+), 37 deletions(-)
-------------------------------------------------------------------------------
commit 54d08ebddda4a3ba810f30c96f350231d4d5eba9
Author: Mats Karrman <mats@southpole.se>
Date: 2015-08-27 10:37:15 +0200

    DG200: enable button press indicator and switch to extbutton action

Base directory -> /
 files/lib/db/boards/DG200R0 | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit d1ccf3e552f7d09ac4624c3601c7444fff6d7ab9
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-08-26 14:34:29 +0200

    add dect short/long button support to DG301 and CG300

Base directory -> /
 files/lib/db/boards/CG300R0 | 15 +++++++++++----
 files/lib/db/boards/DG301R0 | 14 +++++++++++---
 2 files changed, 22 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 6053db6366af59fcfad79912568f30b6c4432611
Author: Vlatko Dimic <vlatko.dimic@inteno.se>
Date: 2015-08-26 11:53:45 +0200

    Added led voice1

Base directory -> /
 files/lib/db/boards/DG301R0 | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit d55c7d887758b59167da4081de86ca93c9bf1c45
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-08-13 11:51:32 +0200

    DG301: turn on broadband LED on ethernet (and DSL) WAN uplink, refs #7651

Base directory -> /
 files/lib/db/boards/DG301ALR0 | 26 +++++++++++++++++++++-----
 files/lib/db/boards/DG301R0   | 26 +++++++++++++++++++++-----
 2 files changed, 42 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
commit 3e0dc523581b945b0ae8769a2538bb26ac7819bf
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-08-06 17:22:46 +0200

    cg30x boardfiles sx9512 init of LEDs default off

Base directory -> /
 files/lib/db/boards/CG300R0 | 8 --------
 files/lib/db/boards/CG301R0 | 4 ----
 2 files changed, 12 deletions(-)
-------------------------------------------------------------------------------
commit 8dc24184f00a7b341d0b8d8fd3a0e2f8d4b35845
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-07-10 11:02:58 +0200

    peripheral_manager: DG400 support, improved sx9512/shift register and
    exposed config options

Base directory -> /
 files/lib/db/boards/CG300R0   |  22 ++-
 files/lib/db/boards/CG301R0   |  16 ++
 files/lib/db/boards/DG200R0   |   5 +
 files/lib/db/boards/DG301ALR0 |   4 +
 files/lib/db/boards/DG301R0   |   5 +-
 files/lib/db/boards/DG400R0   | 445 +++++++++++++++++++++++++++++++++++++++---
 files/lib/db/boards/EG300R0   |   6 +
 7 files changed, 471 insertions(+), 32 deletions(-)
-------------------------------------------------------------------------------
commit 8f4a8850fbc31e984defe85f1c3ebf6369976dee
Author: Mats Karrman <mats@southpole.se>
Date: 2015-07-10 16:52:02 +0200

    dg200: Update peripheral_manager and board file, refs #7598

Base directory -> /
 files/lib/db/boards/DG200R0 | 58 ++++++++++++++++++++++++++++++++-------------
 1 file changed, 42 insertions(+), 16 deletions(-)
-------------------------------------------------------------------------------
commit 1965d285ede48f2f3b918f8f69ff7696d22fdbb1
Author: Mats Karrman <mats@southpole.se>
Date: 2015-07-30 12:58:37 +0200

    DG400: Fix interface name typo in HW config, refs #7631

Base directory -> /
 files/lib/db/boards/DG400R0 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 09ad14b5d37d57a57ede9fff90fdf4078568db5f
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-07-09 18:09:52 +0200

    Add board config DectAntennaDiversity, Default=0 is use both antennae refs
    #5990

Base directory -> /
 files/lib/db/boards/CG300R0 | 1 +
 files/lib/db/boards/DG301R0 | 1 +
 2 files changed, 2 insertions(+)
-------------------------------------------------------------------------------
commit 478b1d9700d8f290e4353ad75f45273a799f267f
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-06-30 16:39:28 +0200

    zeta/base-files to zeta/basefiles

Base directory -> /
 files/lib/db/boards/96362ADVNgr | 235 ++++++++++++++++++++++++++++
 files/lib/db/boards/CG300R0     | 279 +++++++++++++++++++++++++++++++++
 files/lib/db/boards/CG301R0     | 294 ++++++++++++++++++++++++++++++++++
 files/lib/db/boards/DG200R0     | 292 ++++++++++++++++++++++++++++++++++
 files/lib/db/boards/DG301ALR0   | 280 +++++++++++++++++++++++++++++++++
 files/lib/db/boards/DG301R0     | 338 ++++++++++++++++++++++++++++++++++++++++
 files/lib/db/boards/DG400R0     |  44 ++++++
 files/lib/db/boards/EG200R0     | 114 ++++++++++++++
 files/lib/db/boards/EG300R0     | 331 +++++++++++++++++++++++++++++++++++++++
 files/lib/db/boards/VG50_R      | 252 ++++++++++++++++++++++++++++++
 files/lib/db/boards/VOX25       | 254 ++++++++++++++++++++++++++++++
 files/lib/db/boards/board       |   1 +
 12 files changed, 2714 insertions(+)
-------------------------------------------------------------------------------
2016-01-12 17:25:34 +01:00
Jonas Höglund
db18c12c03 Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* 99bbca8 Added db command
* 1e6a8a1 cg300: lit blue wifi led if 5G wifi is on
* 8566589 fix boardfiles with longpress option and set default minpress, refs #8318
* 80ca7f6 dg150: Add missing items to board file and change name to DG150R0
* 6b88958 eg300: board file: bad spelling of dimming voice1
* 33a25fa Voice: Match brcm line-index to port name in board files, refs #8271
* 7292fd8 DG400 radar threshould values
* dfb5024 dg200/dg400: board config: make wan led light up for adsl too, refs #8088
* ee1e050 sx9512: create LED intensity and touch sensitivity board config options, refs #7932
* d591135 DG200: adjust LED intensity and touch sensitivity according to refs #7932
* ee87250 dg400: board config: Added missing xDSL interfaces, refs #7857
* f15b8cb dg400: Fix phy led control, refs #7847
* 8c8c50b radar threshold values for dg200 and dg400
* 950078b DG400: Clean up board file
* 5c4cad3 DG200: enable button press indicator and switch to extbutton action
* 324e1f8 add dect short/long button support to DG301 and CG300
* 879e98c Added led voice1
* 80fac55 DG301: turn on broadband LED on ethernet (and DSL) WAN uplink, refs #7651
* 756d476 cg30x boardfiles sx9512 init of LEDs default off
* e03e303 peripheral_manager: DG400 support, improved sx9512/shift register and exposed config options
* c6c78fd dg200: Update peripheral_manager and board file, refs #7598
* 058edaa DG400: Fix interface name typo in HW config, refs #7631
* 5f2c95b Add board config DectAntennaDiversity, Default=0 is use both antennae refs #5990
* d425921 zeta/base-files to zeta/basefiles
-------------------------------------------------------------------------------
commit 99bbca8c16390f9efa790bb5957c1cc02f87b064
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-01-12 16:53:23 +0100

    Added db command

Base directory -> /
 files/sbin/db | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit 1e6a8a14ef1ae6099501a656f03266b67fbf5b20
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-12-22 15:22:12 +0100

    cg300: lit blue wifi led if 5G wifi is on

Base directory -> /
 lib/db/boards/CG300R0 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 8566589bb08dd7bb7183f36d79323f3810b30034
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-12-08 14:41:53 +0100

    fix boardfiles with longpress option and set default minpress, refs #8318

Base directory -> /
 lib/db/boards/CG300R0 | 16 ++++------------
 lib/db/boards/DG301R0 | 12 +++---------
 lib/db/boards/EG300R0 | 17 ++++-------------
 lib/db/boards/VOX25   | 11 +++--------
 4 files changed, 14 insertions(+), 42 deletions(-)
-------------------------------------------------------------------------------
commit 80ca7f61c1cd07c71712180a42bc8606b6f4c65f
Author: Mats Karrman <mats@southpole.se>
Date: 2015-12-07 18:00:19 +0100

    dg150: Add missing items to board file and change name to DG150R0

Base directory -> /
 lib/db/boards/96362ADVNgr | 238 +-------------------------------------------
 lib/db/boards/DG150R0     | 247 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 248 insertions(+), 237 deletions(-)
-------------------------------------------------------------------------------
commit 6b88958a416b683d56563665dbbfb142f29e7c0c
Author: Mats Karrman <mats@southpole.se>
Date: 2015-12-01 12:57:34 +0100

    eg300: board file: bad spelling of dimming voice1

Base directory -> /
 lib/db/boards/EG300R0 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 33a25fad2d6cb292502a00f7cf0ca0ba66c69dd4
Author: Mats Karrman <mats@southpole.se>
Date: 2015-11-27 15:03:45 +0100

    Voice: Match brcm line-index to port name in board files, refs #8271

Base directory -> /
 lib/db/boards/96362ADVNgr | 2 ++
 lib/db/boards/CG300R0     | 4 +++-
 lib/db/boards/CG301R0     | 4 +++-
 lib/db/boards/DG200R0     | 2 ++
 lib/db/boards/DG301R0     | 4 +++-
 lib/db/boards/DG400R0     | 4 +++-
 lib/db/boards/EG300R0     | 6 ++++--
 lib/db/boards/VOX25       | 2 ++
 8 files changed, 22 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit 7292fd802d514efe5600304348302f5b73571e4b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-11-27 11:42:05 +0100

    DG400 radar threshould values

Base directory -> /
 lib/db/boards/DG400R0 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit dfb5024858e90e70ac4ea6ff2a64d79c939698f6
Author: Mats Karrman <mats@southpole.se>
Date: 2015-11-05 19:09:19 +0100

    dg200/dg400: board config: make wan led light up for adsl too, refs #8088

Base directory -> /
 lib/db/boards/DG200R0 | 36 ++++++++++++++++++++++++++----------
 lib/db/boards/DG400R0 | 30 +++++++++++++++++++++++-------
 2 files changed, 49 insertions(+), 17 deletions(-)
-------------------------------------------------------------------------------
commit ee1e0507d1fd302eabc8814663e86f57dbd2ef8a
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-10-13 17:46:15 +0200

    sx9512: create LED intensity and touch sensitivity board config options,
    refs #7932

Base directory -> /
 lib/db/boards/DG200R0 | 44 ++++++++------------------------------------
 1 file changed, 8 insertions(+), 36 deletions(-)
-------------------------------------------------------------------------------
commit d5911354fa7d31b7b1da5490aa53f06ef0d20435
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-10-13 16:40:10 +0200

    DG200: adjust LED intensity and touch sensitivity according to refs #7932

Base directory -> /
 lib/db/boards/DG200R0 | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
-------------------------------------------------------------------------------
commit ee872509753b95ad67962b038ad47a6b4f4d3370
Author: Mats Karrman <mats@southpole.se>
Date: 2015-09-18 18:33:12 +0200

    dg400: board config: Added missing xDSL interfaces, refs #7857

Base directory -> /
 lib/db/boards/DG400R0 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit f15b8cb70e497d70ab992794886e0d1ce94bd597
Author: Mats Karrman <mats@southpole.se>
Date: 2015-09-18 16:26:07 +0200

    dg400: Fix phy led control, refs #7847

Base directory -> /
 lib/db/boards/DG400R0 | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
-------------------------------------------------------------------------------
commit 8c8c50b1012c4806c80b3f3db263ea295ae77061
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-09-18 11:09:46 +0200

    radar threshold values for dg200 and dg400

Base directory -> /
 lib/db/boards/DG200R0 |  2 +-
 lib/db/boards/DG400R0 | 21 +++++++++++++--------
 2 files changed, 14 insertions(+), 9 deletions(-)
-------------------------------------------------------------------------------
commit 950078befe9ed6e03f06782a598c49aa130eb393
Author: Mats Karrman <mats@southpole.se>
Date: 2015-08-28 17:26:24 +0200

    DG400: Clean up board file

Base directory -> /
 lib/db/boards/DG400R0 | 41 ++++-------------------------------------
 1 file changed, 4 insertions(+), 37 deletions(-)
-------------------------------------------------------------------------------
commit 5c4cad39a99c1bd425e9073ad847746da36c0ef8
Author: Mats Karrman <mats@southpole.se>
Date: 2015-08-27 10:37:15 +0200

    DG200: enable button press indicator and switch to extbutton action

Base directory -> /
 lib/db/boards/DG200R0 | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 324e1f8cf9b02f68e022950613a1bb83846e08f4
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-08-26 14:34:29 +0200

    add dect short/long button support to DG301 and CG300

Base directory -> /
 lib/db/boards/CG300R0 | 15 +++++++++++----
 lib/db/boards/DG301R0 | 14 +++++++++++---
 2 files changed, 22 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 879e98c962b4a52201d1a79ab65da65995788726
Author: Vlatko Dimic <vlatko.dimic@inteno.se>
Date: 2015-08-26 11:53:45 +0200

    Added led voice1

Base directory -> /
 lib/db/boards/DG301R0 | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit 80fac550fb406c35420fe4c67bc5b16e0695c6d8
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-08-13 11:51:32 +0200

    DG301: turn on broadband LED on ethernet (and DSL) WAN uplink, refs #7651

Base directory -> /
 lib/db/boards/DG301ALR0 | 26 +++++++++++++++++++++-----
 lib/db/boards/DG301R0   | 26 +++++++++++++++++++++-----
 2 files changed, 42 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
commit 756d476d32343acf4f3fb0051d286dd786ca0f78
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-08-06 17:22:46 +0200

    cg30x boardfiles sx9512 init of LEDs default off

Base directory -> /
 lib/db/boards/CG300R0 | 8 --------
 lib/db/boards/CG301R0 | 4 ----
 2 files changed, 12 deletions(-)
-------------------------------------------------------------------------------
commit e03e3039f1afc9e4f23fb40abcfa734a2c05a2ae
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-07-10 11:02:58 +0200

    peripheral_manager: DG400 support, improved sx9512/shift register and
    exposed config options

Base directory -> /
 lib/db/boards/CG300R0   |  22 ++-
 lib/db/boards/CG301R0   |  16 ++
 lib/db/boards/DG200R0   |   5 +
 lib/db/boards/DG301ALR0 |   4 +
 lib/db/boards/DG301R0   |   5 +-
 lib/db/boards/DG400R0   | 445 ++++++++++++++++++++++++++++++++++++++++++++----
 lib/db/boards/EG300R0   |   6 +
 7 files changed, 471 insertions(+), 32 deletions(-)
-------------------------------------------------------------------------------
commit c6c78fdfa002cb363355dbaf194180c96f873bcb
Author: Mats Karrman <mats@southpole.se>
Date: 2015-07-10 16:52:02 +0200

    dg200: Update peripheral_manager and board file, refs #7598

Base directory -> /
 lib/db/boards/DG200R0 | 58 +++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 42 insertions(+), 16 deletions(-)
-------------------------------------------------------------------------------
commit 058edaa6c6040358a3ea1695b1e8aa9afb2e8dc1
Author: Mats Karrman <mats@southpole.se>
Date: 2015-07-30 12:58:37 +0200

    DG400: Fix interface name typo in HW config, refs #7631

Base directory -> /
 lib/db/boards/DG400R0 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 5f2c95b0a4be08f5954453045ec54fa177c3723c
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2015-07-09 18:09:52 +0200

    Add board config DectAntennaDiversity, Default=0 is use both antennae refs
    #5990

Base directory -> /
 lib/db/boards/CG300R0 | 1 +
 lib/db/boards/DG301R0 | 1 +
 2 files changed, 2 insertions(+)
-------------------------------------------------------------------------------
commit d425921c881cea10beded6c3dcd7cd4c0583c3e1
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2015-06-30 16:39:28 +0200

    zeta/base-files to zeta/basefiles

Base directory -> /
 lib/db/boards/96362ADVNgr | 235 ++++++++++++++++++++++++++++++++
 lib/db/boards/CG300R0     | 279 ++++++++++++++++++++++++++++++++++++++
 lib/db/boards/CG301R0     | 294 ++++++++++++++++++++++++++++++++++++++++
 lib/db/boards/DG200R0     | 292 +++++++++++++++++++++++++++++++++++++++
 lib/db/boards/DG301ALR0   | 280 ++++++++++++++++++++++++++++++++++++++
 lib/db/boards/DG301R0     | 338 ++++++++++++++++++++++++++++++++++++++++++++++
 lib/db/boards/DG400R0     |  44 ++++++
 lib/db/boards/EG200R0     | 114 ++++++++++++++++
 lib/db/boards/EG300R0     | 331 +++++++++++++++++++++++++++++++++++++++++++++
 lib/db/boards/VG50_R      | 252 ++++++++++++++++++++++++++++++++++
 lib/db/boards/VOX25       | 254 ++++++++++++++++++++++++++++++++++
 lib/db/boards/board       |   1 +
 12 files changed, 2714 insertions(+)
-------------------------------------------------------------------------------
2016-01-12 16:54:09 +01:00
Kenneth Johansson
3c3534e5e6 Added comment
for testing.
2015-12-23 17:03:11 +01:00
Jonas Höglund
7493d71ea8 iopsys-base-files installs in correct dir 2015-12-23 15:00:37 +01:00
Jonas Höglund
847f109800 Update feed [ intenopackages ] package [ iopsys-base-files ]
-------------------------------------------------------------------------------
* a30f359 Removed inittab
* 3aca14d Added mandatory makefile
* 8090be7 Deleted package makefile
-------------------------------------------------------------------------------
commit a30f35957e419a772275071eb1322848fe8bf5df
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2015-12-22 17:17:26 +0100

    Removed inittab

Base directory -> /
 files/etc/inittab | 3 ---
 1 file changed, 3 deletions(-)
-------------------------------------------------------------------------------
commit 3aca14d5ac4dee330f90bb90bb2b60917a846270
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2015-12-21 14:17:45 +0100

    Added mandatory makefile

Base directory -> /
 Makefile | 3 +++
 1 file changed, 3 insertions(+)
-------------------------------------------------------------------------------
commit 8090be782bfe06aae1ffdcf1be7c8e3acd6ecf10
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2015-12-21 14:12:12 +0100

    Deleted package makefile

Base directory -> /
 Makefile | 156 ---------------------------------------------------------------
 1 file changed, 156 deletions(-)
-------------------------------------------------------------------------------
2015-12-22 18:32:33 +01:00
Jonas Höglund
3113657a5f Add opkg build dependency 2015-12-22 11:31:33 +01:00
Jonas Höglund
1e14f810b0 Package compile fix 2015-12-15 18:36:40 +01:00
Jonas Höglund
d8788edffa Repo path added 2015-12-15 14:02:37 +01:00
Jonas Höglund
ec152f8f9f Added iopsys-base-files package 2015-12-14 15:34:56 +01:00
Jonas Höglund
ca278a1871 Build fix for ice-client 2015-12-03 11:10:47 +01:00
Jonas Höglund
209ea5b025 Fix anyfi config.in syntax 2015-11-20 13:22:07 +01:00
Jonas Höglund
dd375f2a18 Correct section for configs in menuconfig 2015-11-20 11:56:24 +01:00
Jonas Höglund
cd49a9c30f New conf-caiman-inteno 2015-11-20 11:27:34 +01:00
Jonas Höglund
66706c7995 NewConfig util function 2015-11-19 18:37:26 +01:00
Jonas Höglund
551f885344 Autogenerate menu entry 2015-11-19 18:28:03 +01:00
Jonas Höglund
527a104ef5 Autogenerate package install 2015-11-19 18:23:35 +01:00
Jonas Höglund
840130ec14 Ignore error on cp 2015-11-19 18:14:24 +01:00
Jonas Höglund
c466667e3d Fixed broken makefile 2015-11-19 17:25:21 +01:00
Jonas Höglund
b83cb84ff9 Added conf-caiman-inteno 2015-11-19 17:22:30 +01:00
Jonas Höglund
0bef3a9e5a Config package definition 2015-11-19 17:11:28 +01:00
Jonas Höglund
6ee6b3675f Updated inteno-config package 2015-11-19 15:48:34 +01:00
Jonas Höglund
e8f90b0d41 Build in standard dir 2015-11-19 15:47:26 +01:00
Jonas Höglund
46eb21a677 Fixed broken url 2015-11-19 15:39:36 +01:00
Jonas Höglund
3161fbde1c Added inteno-configs package 2015-11-19 14:58:10 +01:00
Jonas Höglund
43ea4d028a Don't set ice-client default=y in package makefile 2015-11-17 17:27:08 +01:00
Jonas Höglund
c908ea3e7c Ice client compiles on cc 2015-11-17 15:21:49 +01:00
Jonas Höglund
75299f0ea2 Disable building ice-client torrent plugin 2015-11-17 15:21:49 +01:00
Jonas Höglund
dc6ef2b53e Added ice-client 2015-11-17 15:21:49 +01:00
Fredrik Åsberg
6badb49fd9 Created inteno-packages-broadcom repo for the following packages:
asterisk, bcmhotproxy, bcmkernel, brcm-h, brcm_fw_tool, brcminfo, dectmngr, dectmngr2, endptctl, natalie-dect, peripheral_manager, questd, teliasafety-misc, wl-anyfi.
2015-11-17 12:47:10 +01:00
Fredrik Åsberg
4a670745ca Removal of all packages that we'r not sure that we want to keep.
Removed the following packages: 4g-support, 6relayd, af_alg, alljoyn,ami_tool, block-mount-old, bridge-utils, broadcom-diag, broadcom-nvram, crda, dahdi, dbus, ddns-scripts, freecwmp, glib2, gpioctl, haproxy, hotplug2, jansson, libffi, libipfix, libmicroxml, libpcre, ltq-kpi2udp, ltq-tapidemo, minidlna, mosquitto, multiwan, net-snmp, owsip, pjsip, qrencode, samba2, shflags, sierra-directip, siit, sqlite3, statd, syslog-ng3, usb-modeswitch, wprobe
2015-11-13 17:24:28 +01:00
Fredrik Åsberg
eda680f4cf remove package ltq-dsl and ltq-dsl-app
needed by linux lantiq target
2015-11-13 15:50:35 +01:00
Fredrik Åsberg
8bb1b8e147 remove package libmbim and libqmi
remove reference from webgui/luci/luci/Makefile
2015-11-13 15:32:37 +01:00
Fredrik Åsberg
9cdc86c8e8 remove unused goldfish-qemu package 2015-11-13 15:05:01 +01:00
Fredrik Åsberg
ba02924ce5 remove unused ps3-utils package 2015-11-13 15:04:19 +01:00
Fredrik Åsberg
ee679f8258 remove dect-prog not needed
This package should not be included in the new system.
2015-11-13 14:25:03 +01:00
Fredrik Åsberg
13b7f7e363 remove compcache not needed
/dev/zram is part of linux kernel tree since kernel 3.14 release (part of staging tree for now "drivers/staging/zram").
2015-11-13 13:51:32 +01:00
Fredrik Åsberg
293b0835b1 remove unused grub package 2015-11-13 11:17:24 +01:00
Fredrik Åsberg
54395dd359 remove uboot-omap4 package 2015-11-13 11:01:03 +01:00
Fredrik Åsberg
bbc05c7c79 remove unused package uboot-omap35xx 2015-11-13 11:00:45 +01:00
520 changed files with 19056 additions and 35138 deletions

188
alleato-base/Makefile Normal file
View File

@@ -0,0 +1,188 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=alleato-base
PKG_VERSION:=14.49.2
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_URL:=git@iopsys.inteno.se:alleato_base.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8314aed451255410a2cd4fa43ac3235504e8f018
PKG_MAINTAINER:=Martin Assarsson, ALLEATO
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
######################################################
define Package/alleato3
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+python
TITLE:=Alleato python libraries
endef
define Package/zwaved
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+jansson
TITLE:=Alleato zwave daemon
endef
define Package/zwave-mgr
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3
TITLE:=Alleato zwave manager
endef
define Package/zwave-profiler
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3
TITLE:=Alleato zwave profiler
endef
define Package/alleato-scheduler
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3
TITLE:=Alleato scheduler
endef
define Package/alleato-boxconfig
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3
TITLE:=Alleato boxconfig
endef
define Package/all-omc
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=+alleato3 +screen
TITLE:=Alleato remote tunnel
endef
define Package/ubus-kicker
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=
TITLE:=Alleato ubus-kicker
endef
define Package/mqttnagios
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=
TITLE:=Alleato mqttnagios
endef
define Package/all4-alleato-tools
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Alleato
DEPENDS:=
TITLE:=Alleato tools
endef
######################################################
define Package/alleato3/install
$(INSTALL_DIR) $(1)/usr/lib/python2.7/
$(CP) -r $(PKG_BUILD_DIR)/python-2.7/* $(1)/usr/lib/python2.7/
endef
define Package/zwaved/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/zwaved $(1)/etc/init.d/zwaved
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/zwaved $(1)/usr/sbin/zwaved
endef
define Package/zwave-mgr/install
$(INSTALL_DIR) $(1)/usr/mqttrules $(1)/etc/init.d $(1)/etc/alleato/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/zwave-mgr $(1)/etc/init.d/zwave-mgr
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/zwave_mgr $(1)/usr/mqttrules/zwave_mgr
endef
define Package/zwave-profiler/install
$(INSTALL_DIR) $(1)/usr/mqttrules $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/zwave-profiler $(1)/etc/init.d/zwave-profiler
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/zwave-profiler $(1)/usr/mqttrules/zwave-profiler
endef
define Package/alleato-scheduler/install
$(INSTALL_DIR) $(1)/usr/mqttrules $(1)/etc/init.d $(1)/etc/crontabs/sched
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/scheduler $(1)/etc/init.d/scheduler
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/scheduler $(1)/usr/mqttrules/scheduler
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/schedule $(1)/etc/crontabs/sched/schedule
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/schedule $(1)/etc/crontabs/schedule
endef
define Package/alleato-boxconfig/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/bin $(1)/etc/init.d $(1)/etc/alleato $(1)/home/mosquitto
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/boxconfig $(1)/etc/init.d/boxconfig
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/boxconfig $(1)/usr/bin/boxconfig
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/genmosquittoconf $(1)/usr/bin/genmosquittoconf
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/check_client_id $(1)/usr/sbin/check_client_id
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/boxconfig.conf $(1)/etc/boxconfig.conf
endef
define Package/all-omc/install
$(INSTALL_DIR) $(1)/root $(1)/etc/init.d $(1)/etc/config $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/omc $(1)/etc/init.d/omc
$(INSTALL_BIN) $(PKG_BUILD_DIR)/root/ssh_key $(1)/root/ssh_key
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/alleato.config $(1)/etc/config/alleato
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/omc $(1)/usr/bin/omc
endef
define Package/ubus-kicker/install
$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/ubus-kicker $(1)/etc/init.d/ubus-kicker
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/ubus-kicker $(1)/usr/sbin/ubus-kicker
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/akick $(1)/usr/sbin/akick
endef
define Package/mqttnagios/install
$(INSTALL_DIR) $(1)/etc/nagios.d $(1)/usr/bin $(1)/etc/crontabs $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/mqttnagios $(1)/etc/init.d/mqttnagios
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/send_mqtt_nag $(1)/usr/bin/send_mqtt_nag
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nagios.d/dropbear $(1)/etc/nagios.d/dropbear.nag
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nagios.d/mosquitto $(1)/etc/nagios.d/mosquitto.nag
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nagios.d/ssh $(1)/etc/nagios.d/ssh.nag
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nagios.d/zwaved $(1)/etc/nagios.d/zwaved.nag
$(INSTALL_DATA) $(PKG_BUILD_DIR)/data/mqttnagios $(1)/etc/crontabs/mqttnagios
echo '/5 * * * * /usr/sbin/check_client_id' >> $(1)/etc/crontabs/root
endef
define Package/all4-alleato-tools/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/opt/alleato
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/house $(1)/etc/init.d/house
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init.d/rulesd $(1)/etc/init.d/rulesd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/binaries/alleato_tools $(1)/usr/bin/alleato_tools
endef
######################################################
$(eval $(call BuildPackage,alleato3))
$(eval $(call BuildPackage,zwaved))
$(eval $(call BuildPackage,zwave-mgr))
$(eval $(call BuildPackage,zwave-profiler))
$(eval $(call BuildPackage,alleato-scheduler))
$(eval $(call BuildPackage,alleato-boxconfig))
$(eval $(call BuildPackage,all-omc))
$(eval $(call BuildPackage,ubus-kicker))
$(eval $(call BuildPackage,mqttnagios))
$(eval $(call BuildPackage,all4-alleato-tools))

7
anyfi/Config.in Normal file
View File

@@ -0,0 +1,7 @@
config ANYFI_CONTROLLER
string "Controller IP or FQDN"
depends on PACKAGE_anyfi
help
The default IP address or fully qualified domain name (FQDN)
of the Controller that should manage the Anyfi.net software.

61
anyfi/Makefile Normal file
View File

@@ -0,0 +1,61 @@
include $(TOPDIR)/rules.mk
ANYFI_TARGET := $(ARCH)-linux-$(subst C,c,$(LIBC))-$(LIBCV)
PKG_NAME := anyfi
PKG_VERSION := 1.3.9
PKG_RELEASE := 1
PKG_SOURCE := anyfimac-$(PKG_VERSION)-$(ANYFI_TARGET).tar.bz2
PKG_SOURCE_URL := http://anyfi.net/download
PKG_BUILD_DIR := $(BUILD_DIR)/anyfimac-$(PKG_VERSION)-$(ANYFI_TARGET)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION := net
CATEGORY := Network
TITLE := Anyfi.net - Free SDWN Data Plane for IEEE 802.11
URL := http://anyfi.net
DEPENDS := +kmod-tun +librt +wl-anyfi
MAINTAINER := Anyfi Networks <eng@anyfinetworks.com>
endef
define Package/$(PKG_NAME)/description
Anyfi.net is a free Software-Defined Wirless Networking (SDWN)
forwarding data plane implementation for IEEE 802.11.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
define Build/Configure
echo "config anyfi controller" > $(PKG_BUILD_DIR)/anyfi.conf
echo " option 'hostname' $(CONFIG_ANYFI_CONTROLLER)" >> \
$(PKG_BUILD_DIR)/anyfi.conf
echo "config anyfi optimizer" >> $(PKG_BUILD_DIR)/anyfi.conf
endef
define Build/Compile
@echo "Nothing to do - Anyfi.net software comes pre-built."
endef
define Package/$(PKG_NAME)/conffiles
/etc/config/anyfi
endef
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/anyfi.conf $(1)/etc/config/anyfi
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/anyfimac $(1)/sbin
$(LN) anyfimac $(1)/sbin/anyfid
$(LN) anyfimac $(1)/sbin/myfid
$(INSTALL_DIR) $(1)/bin
$(LN) ../sbin/anyfimac $(1)/bin/anyfidctl
$(LN) ../sbin/anyfimac $(1)/bin/myfidctl
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -0,0 +1,558 @@
#!/bin/sh
#
# Copyright (C) 2013-2014 Anyfi Networks AB.
#
# Overview of the Integration
# ===========================
#
# Anyfi.net software consists of two user space daemons; the radio daemon
# anyfid and the tunnel termination daemon myfid. They communicate with each
# other and with a Controller [1] over UDP/IP.
#
# The radio daemon anyfid provides guests with access to remote Wi-Fi networks.
# It needs a Wi-Fi monitor interface to detect when guest devices come within
# range and a pool of virtual access points to serve them. The integration is
# responsible for creating the monitor interface and the pool of virtual access
# points; anyfid handles the rest.
#
# The tunnel termination daemon myfid provides remote access to the local Wi-Fi
# network. It is up to the integration to configure myfid to authenticate remote
# devices in the same way that devices are authenticated when connecting
# locally.
#
# Myfid is also responsible for telling the controller the MAC address of
# devices that connect locally, so that they can later be offered seamless
# remote access whenever they come close to another access point running anyfid.
# However, when the user changes the WPA passphrase all such associations
# between previously connected devices and the local Wi-Fi network should be
# removed. The integration does so by passing myfid the --reset flag.
#
# Below is the integration logic in pseudo code. If you need to integrate
# Anyfi.net software in your own firmware build environment you can find step
# by step instructions at http://anyfi.net/integration.
#
# 1. A Community Edition of the Controller is available for download at
# http://www.anyfinetworks.com/download. You can also use the public
# demonstration controller at "demo.anyfi.net".
#
#
# Integration Logic in Pseudo Code
# ================================
#
# After enabling a Wi-Fi device:
# IF a controller is configured AND Anyfi.net is not disabled
# ALLOCATE monitor interface and virtual access point pool for anyfid
# START anyfid
#
# FOREACH Wi-Fi interface of this device
# IF a controller is configured AND Anyfi.net is not disabled
# GENERATE a config file for myfid
#
# IF the WPA passphrase has changed
# ADD the --reset flag to myfid arguments
#
# START myfid on the Wi-Fi interface
#
# After disabling a Wi-Fi device:
# STOP anyfid
#
# FOREACH Wi-Fi interface of this device
# STOP myfid on the Wi-Fi interface
#
# NOTE 1: The integration provides remote access to all Wi-Fi interfaces on the
# system that have anyfi_disabled set to 0. Each interface will have
# its own myfid daemon. There should however only be one anyfid daemon
# per radio.
#
# NOTE 2: On concurrent dual band routers each radio should have its own anyfid
# daemon.
#
#
# Anyfi.net UCI data model
# ========================
#
# Anyfi.net global parameters:
#
# Name Type Default Description
# controller
# .hostname IP or FQDN demo.anyfi.net Controller IP or FQDN
# .key path - Controller public key PEM file
# optimizer
# .key path - Optimizer public key PEM file
#
# Wi-Fi device parameters:
#
# Name Type Default Description
# anyfi_disabled boolean 0 Enable/disable guest access on this radio
# anyfi_iface port - Bind anyfid to a WAN interface IP address
# anyfi_port number - Bind anyfid to a SDWN UDP port
# anyfi_floor percent 5 Min backhaul and spectrum allocation
# anyfi_ceiling percent 75 Max backhaul and spectrum allocation
# anyfi_uplink integer - WAN uplink capacity in bits per second
# anyfi_downlink integer - WAN downlink capacity in bits per second
# anyfi_bssids integer - Max number of virtual interfaces to use
# anyfi_clients integer - Max number of concurrent guest users
#
# Wi-Fi interface parameters:
#
# Name Type Default Description
# anyfi_disabled boolean 0 Enable remote access on this network
# anyfi_iface string - Bind myfid to a WAN interface IP
# address
# anyfi_port port - Bind myfid to a SDWN UDP port
# anyfi_autz_server IP - RADIUS authorization server IP
# anyfi_autz_port port 1812 RADIUS authorization server UDP port
# anyfi_autz_secret string - RADIUS authorization server shared
# secret
# anyfi_acct_server IP - RADIUS extra accounting server IP
# anyfi_acct_port port 1813 RADIUS extra accounting server UDP port
# anyfi_acct_secret string - RADIUS extra accounting server shared
# secret
append ENABLE_HOOKS anyfi_enable
append DISABLE_HOOKS anyfi_disable
# Daemon run dir for temporary files.
RUNDIR=/var/run
# Config file dir for persistent configuration files.
CONFDIR=/etc
##### Wi-Fi device handling ##################################################
# Get the channel for Wi-Fi device.
# anyfi_dev_get_channel <device>
anyfi_dev_get_channel() {
local device="$1"
local hwmode channel
config_get hwmode "$device" hwmode
config_get channel "$device" channel
if [ "$channel" = auto -o "$channel" = 0 ]; then
case "$hwmode" in
auto)
channel=auto
;;
*b*|*g*)
channel=auto2
;;
*a*)
channel=auto5
;;
esac
fi
echo "$channel"
}
# Get the WLAN interface list for a WLAN device.
# anyfi_get_vifs <device>
anyfi_get_vifs() {
local device=$1
local vifs=""
local cfg
for cfg in $CONFIG_SECTIONS; do
local type dev
config_get type "$cfg" TYPE
config_get dev "$cfg" device
if [ "$type" = wifi-iface ] && [ "$dev" = "$device" ]; then
append vifs "$cfg"
fi
done
echo "$vifs"
}
# Start the Anyfi.net radio head daemon anyfid on a device.
# anyfi_dev_start <device> <type> <controller> <controller_key>
anyfi_dev_start()
{
local device="$1"
local type="$2"
local controller="$3"
local controller_key="$4"
local nvifs bssids monitor iflist
# Determine how many virtual interfaces we should use
config_get bssids "$device" anyfi_bssids
nvifs=$(anyfi_get_vifs "$device" | wc -w)
if [ -n "$bssids" ]; then
# Limit the number of virtual interfaces to 32
[ "$bssids" -lt 32 ] || bssids=32
elif [ $nvifs -lt 4 ]; then
# Don't use more that 8 interfaces in total if possible...
bssids=$((8 - $nvifs))
else
# ...but try to allocate at least 4 interfaces for anyfid.
bssids=4
fi
# ALLOCATE monitor and pool of virtual access points
if monitor=$(anyfi_${type}_alloc_monitor "$device") && \
iflist=$(anyfi_${type}_alloc_iflist "$device" $bssids)
then
local args=""
local wanif port floor ceiling uplink downlink clients
config_get wanif "$device" anyfi_iface
config_get port "$device" anyfi_port
config_get floor "$device" anyfi_floor
config_get ceiling "$device" anyfi_ceiling
config_get uplink "$device" anyfi_uplink
config_get downlink "$device" anyfi_downlink
config_get clients "$device" anyfi_clients
# If there are no interfaces on this device then
# anyfid controls channel
if [ "$nvifs" -eq 0 ]; then
args="$args --channel=$(anyfi_dev_get_channel $device)"
fi
[ -n "$wanif" ] && args="$args --bind-if=$wanif"
[ -n "$port" ] && args="$args --bind-port=$port"
[ -n "$floor" ] && args="$args --floor=$floor"
[ -n "$ceiling" ] && args="$args --ceiling=$ceiling"
[ -n "$uplink" ] && args="$args --uplink=$uplink"
[ -n "$downlink" ] && args="$args --downlink=$downlink"
[ -n "$clients" ] && args="$args --max-clients=$clients"
[ -n "$controller_key" ] && \
args="$args --controller-key=$controller_key"
# START anyfid
echo "$device: starting anyfid"
/sbin/anyfid --accept-license -C "$controller" -B \
-P $RUNDIR/anyfid_$device.pid $args \
$monitor $iflist
else
echo "$device: failed to allocate anyfid interfaces" 1>&2
fi
}
##### Wi-Fi interface handling ###############################################
# Get the printable name of an interface.
anyfi_vif_get_name() {
local ifname
config_get ifname "$1" ifname
echo "${ifname:-$1}"
}
# Generate the config file for myfid from UCI variables.
# anyfi_vif_gen_config <vif>
anyfi_vif_gen_config() {
local vif="$1"
local name="$(anyfi_vif_get_name $1)"
local device net ssid enc key isolate ifname
config_get device "$vif" device
config_get net "$vif" network
config_get ssid "$vif" ssid
config_get enc "$vif" encryption
config_get key "$vif" key
config_get isolate "$vif" isolate
config_get ifname "$vif" ifname
# Check basic settings before proceeding
[ -n "$net" ] || [ -n "$ssid" ] || return 1
local auth_proto auth_mode auth_cache group_rekey
local ciphers wpa_ciphers rsn_ciphers passphrase
local auth_server auth_port auth_secret
local autz_server autz_port autz_secret
local acct_server acct_port acct_secret
local acct2_server acct2_port acct2_secret
local radius_nasid
# Resolve explicit cipher overrides (tkip, ccmp or tkip+ccmp)
case "$enc" in
*+tkip+ccmp|*+tkip+aes)
ciphers=tkip+ccmp
;;
*+ccmp|*+aes)
ciphers=ccmp
;;
*+tkip)
ciphers=tkip
;;
esac
# Resolve authentication protocol (WPA or WPA2)
case "$enc" in
psk-mixed*|wpa-mixed*|mixed-psk*|mixed-wpa*)
auth_proto=wpa+rsn
wpa_ciphers=$ciphers
rsn_ciphers=$ciphers
;;
psk2*|wpa2*)
auth_proto=rsn
rsn_ciphers=$ciphers
;;
psk*|wpa*)
auth_proto=wpa
wpa_ciphers=$ciphers
;;
none)
echo "$name: no remote access for security reasons (open network)" 1>&2
return 1
;;
wep*)
echo "$name: no remote access for security reasons (wep is insecure)" 1>&2
return 1
;;
*)
echo "$name: unrecognized encryption type $enc" 1>&2
return 1
;;
esac
# Resolve authenticator mode (PSK or 802.1X)
case "$enc" in
psk*)
auth_mode=psk
passphrase=$key
[ -n "$passphrase" ] || return 1
;;
wpa*)
auth_mode=eap
config_get auth_server "$vif" radius_server
config_get auth_port "$vif" radius_port
config_get auth_secret "$vif" radius_secret
config_get acct_server "$vif" acct_server
config_get acct_port "$vif" acct_port
config_get acct_secret "$vif" acct_secret
config_get auth_cache "$vif" auth_cache
config_get group_rekey "$vif" wpa_group_rekey
[ -n "$auth_server" ] || return 1
[ -n "$auth_secret" ] || auth_secret="$key"
[ -n "$acct_server" -a -z "$acct_secret" ] && acct_secret="$key"
;;
none)
;;
*)
echo "$name: no remote access ('encryption' not configured)" 1>&2
return 1
;;
esac
# Optional RADIUS authorization and accounting for Anyfi.net
config_get autz_server "$vif" anyfi_autz_server
config_get autz_port "$vif" anyfi_autz_port
config_get autz_secret "$vif" anyfi_autz_secret
config_get acct2_server "$vif" anyfi_acct_server
config_get acct2_port "$vif" anyfi_acct_port
config_get acct2_secret "$vif" anyfi_acct_secret
config_get radius_nasid "$vif" radius_nasid
# Generate common config file options
cat <<EOF
ssid = '$ssid'
bridge = br-$net
auth_proto = $auth_proto
EOF
# Generate dependent config file options
[ "$isolate" = 1 ] && echo "isolation = 1"
[ -n "$ifname" ] && echo "local_ap = $ifname"
[ -n "$auth_mode" ] && echo "auth_mode = $auth_mode"
[ -n "$auth_cache" ] && echo "auth_cache = $auth_cache"
[ -n "$rsn_ciphers" ] && echo "rsn_ciphers = $rsn_ciphers"
[ -n "$wpa_ciphers" ] && echo "wpa_ciphers = $wpa_ciphers"
[ -n "$group_rekey" ] && echo "group_rekey = $group_rekey"
[ -n "$passphrase" ] && echo "passphrase = '$passphrase'"
[ -n "$radius_nasid" ] && echo "radius_nas_id = $radius_nas_id"
if [ -n "$auth_server" ] && [ -n "$auth_secret" ]; then
echo "radius_auth_server = $auth_server"
echo "radius_auth_port = ${auth_port:-1812}"
echo "radius_auth_secret = $auth_secret"
fi
if [ -n "$acct_server" ] && [ -n "$acct_secret" ]; then
echo "radius_acct_server = $acct_server"
echo "radius_acct_port = ${acct_port:-1813}"
echo "radius_acct_secret = $acct_secret"
fi
if [ -n "$autz_server" ] && [ -n "$autz_secret" ]; then
echo "radius_autz_server = $autz_server"
echo "radius_autz_port = ${autz_port:-1812}"
echo "radius_autz_secret = $autz_secret"
fi
if [ -n "$acct2_server" ] && [ -n "$acct2_secret" ]; then
echo "radius_acct2_server = $acct2_server"
echo "radius_acct2_port = ${acct2_port:-1813}"
echo "radius_acct2_secret = $acct2_secret"
fi
return 0
}
# Get the current value from a myfid configuration file.
# anyfi_vif_get_config <file> <config>
anyfi_vif_get_config() {
local file="$1"
local key="$2"
[ -e "$file" ] || return 1
# Assume the format is exactly "key = value",
# where value may or may not be in ''
grep "$key = " $file | cut -d '=' -f2- | cut -b2- | \
sed -e "/^'.*'$/s/^'\\(.*\\)'$/\\1/"
}
# Start the Anyfi.net tunnel-termination daemon myfid on an interface.
# anyfi_vif_start <vif> <controller> <controller_key> <optimizer_key>
anyfi_vif_start()
{
local vif="$1"
local controller="$2"
local controller_key="$3"
local optimizer_key="$4"
local name="$(anyfi_vif_get_name $vif)"
local pid_file="$RUNDIR/myfid_$name.pid"
local conf_file="$CONFDIR/myfid_$name.conf"
local new_conf_file="$RUNDIR/myfid_$name.conf"
# GENERATE a config file for myfid
if (anyfi_vif_gen_config $vif) > $new_conf_file; then
local controller_key optimizer_key
local key old_key wanif port
local args=""
config_get key "$vif" key
config_get wanif "$vif" anyfi_iface
config_get port "$vif" anyfi_port
# ADD optional arguments
[ -n "$wanif" ] && args="$args --bind-if=$wanif"
[ -n "$port" ] && args="$args --bind-port=$port"
[ -n "$controller_key" ] && \
args="$args --controller-key=$controller_key"
[ -n "$optimizer_key" ] && \
args="$args --optimizer-key=$optimizer_key"
# ADD the --reset flag to myfid arguments if the passphrase
# has changed or myfid is started for the first time
old_key="$(anyfi_vif_get_config $conf_file passphrase)"
[ "$key" == "$old_key" ] || args="$args --reset"
# Update the myfid config file in flash only if needed
if ! cmp -s $new_conf_file $conf_file; then
mv $new_conf_file $conf_file
else
rm -f $new_conf_file
fi
# START myfid
echo "$name: starting myfid"
/sbin/myfid --accept-license -C "$controller" -B -P $pid_file \
$args $conf_file
fi
}
# Stop an Anyfi.net daemon gracefully
# anyfi_stop_daemon <pidfile>
anyfi_stop_daemon() {
local pidfile="$1"
kill -TERM $(cat $pidfile)
for t in $(seq 0 5); do
[ -e $pidfile ] || return 0
sleep 1
done
echo "Timeout waiting for daemon assocated with $pidfile to exit" 1>&2
kill -KILL $(cat $pidfile)
rm -f $pidfile
return 1
}
# Enable Anyfi.net for a Wi-Fi device.
# Run from ENABLE_HOOKS
anyfi_enable()
{
local device="$1"
local controller
local type vif vifs
# A controller IP or FQDN is required
controller="$(uci get anyfi.controller.hostname 2>/dev/null)"
[ -n "$controller" ] || return 0
# Optional controller and optimizer public keys
controller_key="$(uci get anyfi.controller.key 2>/dev/null)"
optimizer_key="$(uci get anyfi.optimizer.key 2>/dev/null)"
# Reload the wireless config to get the assigned ifnames right
config_load wireless
config_get type "$device" type
vifs=$(anyfi_get_vifs "$device")
# START anyfid on this device
if [ "$(config_get $device anyfi_disabled)" != 1 ] && \
/sbin/anyfi-probe "$type"
then
anyfi_dev_start $device $type "$controller" "$controller_key"
fi
# FOREACH Wi-Fi interface of this device
for vif in $vifs; do
if [ "$(config_get $vif disabled)" != 1 ] && \
[ "$(config_get $vif anyfi_disabled)" != 1 ]
then
anyfi_vif_start $vif "$controller" \
"$controller_key" "$optimizer_key"
fi
done
}
# Disable Anyfi.net for a Wi-Fi device.
# Run from DISABLE_HOOKS
anyfi_disable()
{
local device="$1"
local type vif vifs
# Reload the wireless config to get the assigned ifnames right
config_load wireless
config_get type "$device" type
vifs=$(anyfi_get_vifs "$device")
# STOP anyfid on this device (if anyfid is running)
if [ -e $RUNDIR/anyfid_$device.pid ]; then
echo "$device: stopping anyfid"
anyfi_stop_daemon $RUNDIR/anyfid_$device.pid
anyfi_${type}_release_iflist $device
anyfi_${type}_release_monitor $device
fi
# FOREACH Wi-Fi interface of this device (with myfid running)
for vif in $vifs; do
local name="$(anyfi_vif_get_name $vif)"
local pidfile="$RUNDIR/myfid_$name.pid"
if [ -e $pidfile ]; then
echo "$name: stopping myfid"
anyfi_stop_daemon $pidfile
fi
done
}

View File

@@ -0,0 +1,86 @@
#!/bin/sh
#
# Copyright (C) 2013-2014 Anyfi Networks AB.
# Anyfi.net setup functions for Broadcom wl driver.
# Get monitor name interface based for a device.
# anyfi_dev_monitor_name <device>
anyfi_broadcom_name_monitor() {
local device="$1"
# Map wlX => radiotapX
echo "$device" | sed 's/^.*\([0-9]\)$/radiotap\1/'
}
# Get BSS index of the last wl interface that is used (=up)
# wl0.2 => 2
# wl0 => (empty)
anyfi_broadcom_get_wlindex() {
ifconfig | grep -o "^$1\..." | cut -d'.' -f2 | sort -n | tail -n 1
}
# Allocate virtual Wi-Fi interfaces for anyfid.
# anyfi_broadcom_alloc_iflist <device> <bssids>
anyfi_broadcom_alloc_iflist() {
local device="$1"
local bssids="$2"
local count=0
local wlindex num
# Enable MBSS mode if not already enabled
if [ "$(wlctl -i $device mbss)" = 0 ]; then
wlctl -i $device down
wlctl -i $device mbss 1
wlctl -i $device up
fi
wlindex=$(anyfi_broadcom_get_wlindex $device)
# Create WLAN interfaces and let the driver assign the BSSIDs
for num in $(seq $bssids); do
local idx=$(($wlindex + $num))
local wlif=$device.$idx
# Do the 'wlctl' dance to make the driver assign proper BSSIDs
wlctl -i $device bss -C $idx up > /dev/null || break
wlctl -i $device ssid -C $idx "dummy" > /dev/null
wlctl -i $device bss -C $idx up > /dev/null
wlctl -i $device bss -C $idx down > /dev/null
wlctl -i $device ssid -C $idx "" > /dev/null
local bssid=$(wlctl -i $wlif cur_etheraddr | cut -d' ' -f2)
ifconfig $wlif hw ether $bssid > /dev/null
count=$(($count + 1))
done
[ "$count" -gt 0 ] && echo $device.$(($wlindex + 1))/$count
}
# Release virtual Wi-Fi interfaces allocated for anyfid.
# anyfi_broadcom_release_iflist <device>
anyfi_broadcom_release_iflist() {
true
}
# Allocate a monitor interface for anyfid.
# anyfi_broadcom_alloc_monitor <device>
anyfi_broadcom_alloc_monitor() {
local device="$1"
local monitor=$(anyfi_broadcom_name_monitor $device)
wlctl -i $device monitor 0 || return 1
wlctl -i $device monitor 3 || return 1
ifconfig $monitor down || return 1
ifconfig $monitor up || return 1
echo $monitor
}
# Release the monitor interface for anyfid.
# anyfi_broadcom_release_monitor <device>
anyfi_broadcom_release_monitor() {
local device="$1"
local monitor=$(anyfi_broadcom_name_monitor $device)
ifconfig $monitor down 2> /dev/null
wlctl -i $device monitor 0 2> /dev/null
}

58
anyfi/files/sbin/anyfi-probe Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Check if a WLAN driver type is supported by Anyfi.net radio software."
echo "Usage: $0 {mac80211|...}"
exit 1
fi
number() {
echo $2 | sed -e 's/[^0-9]/ /g' | cut -d' ' -f $1
}
major() {
number 1 $1
}
minor() {
number 2 $1
}
case $1 in
mac80211)
COMPAT_VER=$(opkg list-installed kmod-mac80211 | cut -d'+' -f2)
KERNEL_VER=$(uname -r)
# Future kernels > 3.x are OK
[ "$(major $KERNEL_VER)" -gt 3 ] && return 0
# The required commit 86c228a7627f3f2776893da47592234140fbfba8
# for mac80211 support was introduced in kernel 3.12.
[ "$(major $KERNEL_VER)" -eq 3 ] && \
[ "$(minor $KERNEL_VER)" -ge 12 ] && return 0
[ "$(major $COMPAT_VER)" -gt 2013 ] && return 0
[ "$(major $COMPAT_VER)" -eq 2013 ] && \
[ "$(minor $COMPAT_VER)" -ge 11 ] && return 0
cat <<EOF
Support for mac80211 requires Linux kernel >= 3.12 or
compat-wireless >= 2013-11-05. Please update your system.
EOF
;;
broadcom)
return 0
;;
*)
cat<<EOF
WLAN driver \"$1\" is not supported by the Anyfi.net radio software.
Improved drivers with Anyfi.net support are available for Broadcom,
Qualcomm Atheros, Ralink and Realtek chipsets. Please contact
support@anyfi.net for updated drivers, reference integrations and
commercial integration services.
EOF
;;
esac
exit 1

View File

@@ -1,65 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bashdb
PKG_VERSION:=4.4-0.92
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
#PKG_SOURCE_URL:=http://sourceforge.net/projects/bashdb/files/bashdb/$(PKG_VERSION)
PKG_SOURCE_URL:=@SF/bashdb/
PKG_MD5SUM:=b72c17870bfab2fd791b1f6de4d79f9e
#PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=none
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Bash script debugging utility.
URL:=http://sourceforge.net/projects/bashdb/
endef
define Package/$(PKG_NAME)/description
Bash script debugging utility.
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \
-I./src" \
LIBS="$(TARGET_LDFLAGS)" \
DESTDIR="$(PKG_INSTALL_DIR)"
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bashdb $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/share
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.sh $(1)/usr/share/$(PKG_NAME)/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.inc $(1)/usr/share/$(PKG_NAME)/
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/init
$(INSTALL_DATA) $(PKG_BUILD_DIR)/init/*.sh $(1)/usr/share/$(PKG_NAME)/init/
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/command
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/command/show_sub
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/command/set_sub
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/command/info_sub
$(INSTALL_DATA) $(PKG_BUILD_DIR)/command/*.sh $(1)/usr/share/$(PKG_NAME)/command/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/command/show_sub/*.sh $(1)/usr/share/$(PKG_NAME)/command/show_sub/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/command/set_sub/*.sh $(1)/usr/share/$(PKG_NAME)/command/set_sub/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/command/info_sub/*.sh $(1)/usr/share/$(PKG_NAME)/command/info_sub/
$(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/lib
$(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/*.sh $(1)/usr/share/$(PKG_NAME)/lib/
endef
$(eval $(call BuildPackage,bashdb))

View File

@@ -1,23 +0,0 @@
config BBF_VENDOR_EXTENSION
bool "Enable Vendor Extension"
default y
config BBF_VENDOR_LIST
string "Vendor List"
default "iopsys"
config BBF_VENDOR_PREFIX
string "Vendor Prefix"
default "X_IOPSYS_EU_"
config BBF_TR143
bool "Enable TR-143 Data Model Support"
default y
config BBF_TR471
bool "Enable TR-471 Data Model Support"
default y
config BBF_MAX_OBJECT_INSTANCES
int "Maximum number of instances per object"
default 255

View File

@@ -1,188 +0,0 @@
#
# Copyright (C) 2023 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.5.1
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=822b4b2117d23ae162318782a344450db34806f7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libbbfdm-api
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF datamodel library, provides API to extend datamodel using DotSO plugins
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
ABI_VERSION:=1.0
endef
define Package/libbbfdm
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl +libbbfdm-api \
+BBF_TR471:obudpst +libopenssl
endef
define Package/bbfdmd
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Datamodel ubus backend
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +libbbfdm
endef
define Package/userinterface
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Package to add Device.UserInterface. datamodel support
endef
define Package/userinterface/description
Package to add Device.UserInterface. datamodel support
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
endef
define Package/libbbfdm-api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
define Package/libbbfdm/description
Library contains the data model tree. It includes TR181, TR143 data models
endef
ifeq ($(USE_LOCAL),1)
define Build/Prepare
$(CP) ~/git/bbfdm/* $(PKG_BUILD_DIR)/
endef
endif
CMAKE_OPTIONS += \
-DBBF_TR181=ON
-DBBF_WIFI_DATAELEMENTS=ON
ifeq ($(CONFIG_BBF_TR143),y)
CMAKE_OPTIONS += \
-DBBF_TR143=ON
endif
ifeq ($(CONFIG_BBF_TR471),y)
CMAKE_OPTIONS += \
-DBBF_TR471=ON
endif
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
CMAKE_OPTIONS += \
-DBBF_VENDOR_EXTENSION=ON
CMAKE_OPTIONS += \
-DBBF_VENDOR_LIST:String="$(CONFIG_BBF_VENDOR_LIST)" \
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES)
endif ##CONFIG_BBF_VENDOR_EXTENSION
ifeq ($(CONFIG_PACKAGE_bbfdmd),y)
CMAKE_OPTIONS += \
-DBBFDMD_MAX_MSG_LEN:Integer=10485760
endif
define Package/libbbfdm-api/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/lib/
endef
define Package/libbbfdm/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/lib/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
$(INSTALL_BIN) ./files/etc/uci-defaults/95-portmap-firewall $(1)/etc/uci-defaults/95-portmap-firewall
$(INSTALL_BIN) ./files/etc/uci-defaults/97-firewall-service $(1)/etc/uci-defaults/97-firewall-service
$(INSTALL_BIN) ./files/etc/uci-defaults/99-link-core-plugins $(1)/etc/uci-defaults/99-link-core-plugins
$(INSTALL_BIN) ./files/etc/firewall.portmap $(1)/etc/firewall.portmap
$(INSTALL_BIN) ./files/etc/firewall.service $(1)/etc/firewall.service
ifeq ($(CONFIG_BBF_TR143),y)
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
endif
endef
define Package/libbbfdm/prerm
#!/bin/sh
rm -rf /etc/bbfdm/dmmap/*
exit 0
endef
define Package/bbfdmd/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/ubus/bbfdmd $(1)/usr/sbin/
$(INSTALL_DATA) ./files/etc/bbfdm/input.json $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_BIN) ./files/etc/bbfdm/bbfdm_services.sh $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
endef
define Package/userinterface/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_DATA) ./files/etc/config/userinterface $(1)/etc/config/userinterface
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/userinterface $(1)/lib/upgrade/keep.d/userinterface
$(INSTALL_BIN) ./files/etc/init.d/userinterface $(1)/etc/init.d/userinterface
$(INSTALL_BIN) ./files/etc/uci-defaults/93-userinterface-firewall $(1)/etc/uci-defaults/93-userinterface-firewall
$(INSTALL_BIN) ./files/etc/uci-defaults/94-userinterface-json $(1)/etc/uci-defaults/94-userinterface-json
$(INSTALL_BIN) ./files/etc/firewall.userinterface $(1)/etc/firewall.userinterface
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
$(INSTALL_DIR) $(1)/usr/include/libbbfdm-api
$(INSTALL_DIR) $(1)/usr/include/libbbf_api
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm/dmtree/tr181/device.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm/dmtree/vendor/vendor.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/*.h $(1)/usr/include/libbbfdm-api/
# Work around for backward compatibility
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/*.h $(1)/usr/include/libbbf_api/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/libbbfdm_api.h $(1)/usr/include/libbbf_api.h
endef
$(eval $(call BuildPackage,libbbfdm-api))
$(eval $(call BuildPackage,libbbfdm))
$(eval $(call BuildPackage,bbfdmd))
$(eval $(call BuildPackage,userinterface))

View File

@@ -1,9 +0,0 @@
#
# Copyright (C) 2023 IOPSYS
#
define BbfdmInstallPlugin
$(INSTALL_DIR) $(1)/etc/bbfdm/plugins
$(INSTALL_DATA) $(2) $(1)/etc/bbfdm/plugins/
endef

View File

@@ -1,47 +0,0 @@
#!/bin/sh
BBFDMD="/usr/sbin/bbfdmd"
bbfdm_add_service()
{
local name path
name="${1}"
path="${2}"
if [ -z "${name}" -o -z "$path" ]; then
return 0;
fi
ubus call service add "{'name':'bbfdm.services','instances':{'$name':{'command':['$BBFDMD','-m','$path']}}}"
}
bbfdm_stop_service()
{
local name
name="${1}"
if [ -z "${name}" ]; then
return 0;
fi
if ubus call service list '{"name":"bbfdm.services"}' |grep -q "bbfdm.$name"; then
ubus call service delete "{'name':'bbfdm.services','instance':'bbfdm.$name'}"
fi
}
usages()
{
echo "Usages $0: <OPTIONS>..."
echo
echo " -h show help"
echo " -k micro-service name to stop"
echo
}
while getopts "s:k:h" opts; do
case "$opts" in
h) usages; exit 0;;
k) bbfdm_stop_service "${OPTARG}";;
esac
done

View File

@@ -1,28 +0,0 @@
{
"daemon": {
"config": {
},
"input": {
"type": "DotSo",
"name": "/lib/libbbfdm.so",
"plugin_dir": "/etc/bbfdm/plugins"
},
"output": {
"type": "UBUS",
"name": "bbfdm"
}
},
"cli": {
"config": {
"proto": "both",
"instance_mode": 0
},
"input": {
"type": "UBUS",
"name": "bbfdm"
},
"output": {
"type": "CLI"
}
}
}

View File

@@ -1,8 +0,0 @@
config bbfdmd 'bbfdmd'
option enabled '1'
option loglevel '1'
option refresh_time '10'
option transaction_timeout '30'
option subprocess_level '2'

View File

@@ -1,3 +0,0 @@
config userinterface 'global'
option enable '1'

View File

@@ -1,74 +0,0 @@
#!/bin/sh
. /lib/functions.sh
log() {
echo "${@}"|logger -t firewall.dnat -p info
}
exec_cmd() {
if ! eval "$*"; then
log "Failed to run [$*]"
fi
}
reorder_dnat_rules() {
nat_chains=$(iptables -t nat -S | grep -E "^-N zone[a-zA-Z0-9_]+prerouting$" | cut -d' ' -f 2)
for chain in ${nat_chains}; do
# Collect empty remote host & empty dport rules
EMPTY_HOST_PORT=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep -v "\-\-dport" | grep -v "\-s ")
if [ -n "${EMPTY_HOST_PORT}" ]; then
echo "${EMPTY_HOST_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
exec_cmd $cmd1
done
fi
# Collect empty remote host but non empty dport rules
EMPTY_HOST=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep "\-\-dport" | grep -v "\-s ")
if [ -n "${EMPTY_HOST}" ]; then
echo "${EMPTY_HOST}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
exec_cmd $cmd1
done
fi
# Collect non empty remote host but empty dport rules
EMPTY_PORT=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep -v "\-\-dport" | grep "\-s ")
if [ -n "${EMPTY_PORT}" ]; then
echo "${EMPTY_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
exec_cmd $cmd1
done
fi
# Now add rules as per datamodel precedence shown below
## Non empty remote host, empty dport
## empty remote host, non empty dport
## empty remote host, empty dport
if [ -n "${EMPTY_PORT}" ]; then
echo "${EMPTY_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd)"
exec_cmd $cmd1
done
fi
if [ -n "${EMPTY_HOST}" ]; then
echo "${EMPTY_HOST}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd)"
exec_cmd $cmd1
done
fi
if [ -n "${EMPTY_HOST_PORT}" ]; then
echo "${EMPTY_HOST_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd)"
exec_cmd $cmd1
done
fi
done
}
# Re-order portmapping rules according to precedence hierarchy
reorder_dnat_rules

View File

@@ -1,163 +0,0 @@
#!/bin/sh
. /lib/functions.sh
log() {
echo "${@}"|logger -t firewall.service -p info
}
exec_cmd() {
if ! eval "$*"; then
log "Failed to run [$*]"
echo "-1"
return 0
fi
echo "0"
return 0
}
add_iptable_rule() {
chain_name=$1
protocol=$2
dest_port=$3
icmp_type=$4
family=$5
src_prefix=$6
action=$7
res=-1
cmd="-I ${chain_name}"
if [ -n "${protocol}" ]; then
cmd="${cmd} -p $protocol"
if [ "${protocol}" -eq 41 ] || [ "${protocol}" -eq 43 ] || [ "${protocol}" -eq 44 ] ||
[ "${protocol}" -eq 58 ] || [ "${protocol}" -eq 59 ] || [ "${protocol}" -eq 60 ]; then
# Explicit v6 protocols
if [ "${family}" = "ipv4" ]; then
echo $res
return 0
else
family="ipv6"
fi
elif [ "${protocol}" -eq 1 ]; then
# Explicit v4 protocols
if [ "${family}" = "ipv6" ]; then
echo $res
return 0
else
family="ipv4"
fi
fi
# Limitation:: iptables do not accept dport without specific protocol
count=$(echo "${dest_port}" | sed -n "/-1/p" | wc -l)
if [ "${count}" -eq 0 ]; then
# dest_port not contains -1 so need to have this match criteria
count=$(echo "${dest_port}" | wc -w)
if [ "${count}" -gt 1 ]; then
# multiple ports present
port=$(echo "${dest_port}" | sed "s/ /,/g")
cmd="${cmd} -m multiport --dports ${port}"
else
cmd="${cmd} --dport ${dest_port}"
fi
fi
fi
if [ "${family}" = "ipv4" ] || [ "${family}" = "-1" ]; then
if [ "${protocol}" -eq 1 ] && [ "${icmp_type}" -ge 0 ]; then
cmd="${cmd} --icmp-type ${icmp_type}"
fi
if [ -z "${src_prefix}" ]; then
res=$(exec_cmd "iptables ${cmd} -m comment --comment IPtables_service_rule -j ${action}")
else
#Add ipv4 sources if any
src_list=""
for src in $src_prefix; do
ret=$(echo $src | grep ":" | wc -l)
if [ "${ret}" -eq 0 ]; then
src_list="$src,$src_list"
fi
done
if [ -n "$src_list" ]; then
src_list=$(echo "${src_list}" | sed "s/,$//")
res=$(exec_cmd "iptables -s $src_list ${cmd} -m comment --comment IPtables_service_rule -j ${action}")
fi
fi
fi
if [ "${family}" = "ipv6" ] || [ "${family}" = "-1" ]; then
if [ "${protocol}" -eq 58 ] && [ "${icmp_type}" -ge 0 ]; then
cmd="${cmd} --icmpv6-type ${icmp_type}"
fi
if [ -z "${src_prefix}" ]; then
res=$(exec_cmd "ip6tables ${cmd} -m comment --comment IP6tables_service_rule -j ${action}")
else
#Add ipv6 sources if any
src_list=""
for src in $src_prefix; do
ret=$(echo $src | grep ":" | wc -l)
if [ "${ret}" -eq 1 ]; then
src_list="$src,$src_list"
fi
done
if [ -n "$src_list" ]; then
src_list=$(echo "${src_list}" | sed "s/,$//")
res=$(exec_cmd "ip6tables -s $src_list ${cmd} -m comment --comment IP6tables_service_rule -j ${action}")
fi
fi
fi
echo $res
}
add_service() {
local enable proto family dest_port interface target icmp_type
config_get enable "$1" enable "0"
config_get icmp_type "$1" icmp_type "-1"
config_get target "$1" target "Accept"
config_get interface "$1" interface ""
config_get family "$1" family "-1"
config_get dest_port "$1" dest_port "-1"
config_get proto "$1" proto "-1"
config_get src_prefix "$1" src_prefix ""
if [ "${enable}" -eq 0 ] || [ -z "${interface}" ]; then
return 0
fi
action=$(echo "${target}" | tr a-z A-Z)
chain_name="zone_${interface}_input"
res=0
count=$(echo "${proto}" | sed -n "/-1/p" | wc -l)
if [ "${count}" -eq 0 ]; then
# proto not contains -1 so need to have this match criteria
for protocol in $proto; do
res=$(add_iptable_rule "$chain_name" "$protocol" "$dest_port" "$icmp_type" "$family" "$src_prefix" "$action")
done
else
# proto contains -1 so no need to have this match criteria
res=$(add_iptable_rule "$chain_name" "" "$dest_port" "$icmp_type" "$family" "$src_prefix" "$action")
fi
if [ "${res}" -ne 0 ]; then
uci -q set firewall."${1}".status="Error"
else
uci -q set firewall."${1}".status=""
fi
uci commit firewall
}
config_load firewall
config_foreach add_service "service"

View File

@@ -1,125 +0,0 @@
#!/bin/sh
. /lib/functions.sh
IDENTIFIER="UI-REMOTE-ACCESS-WAN"
log() {
echo "${@}"|logger -t firewall.userinterface -p info
}
if [ ! -f "/etc/config/userinterface" ] || [ ! -f "/etc/config/nginx" ]; then
exit 0;
fi
exec_cmd() {
if ! "$@"; then
log "Failed to run [$*]"
fi
}
delete_ui_firewall_rules() {
input_chains=$(iptables -S | grep -E "^-N zone[a-zA-Z0-9_]+input$" | cut -d' ' -f 2)
output_chains=$(iptables -S | grep -E "^-N zone[a-zA-Z0-9_]+output$" | cut -d' ' -f 2)
for chain in ${input_chains}; do
CMD="iptables -w 1 -t filter -nL ${chain} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd iptables -w 1 -t filter -D "${chain}" "${rule_num}";
fi
done
done
for chain in ${output_chains}; do
CMD="iptables -w 1 -t filter -nL ${chain} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd iptables -w 1 -t filter -D "${chain}" "${rule_num}";
fi
done
done
input6_chains=$(ip6tables -S | grep -E "^-N zone[a-zA-Z0-9_]+input$" | cut -d' ' -f 2)
output6_chains=$(ip6tables -S | grep -E "^-N zone[a-zA-Z0-9_]+output$" | cut -d' ' -f 2)
for chain in ${input6_chains}; do
CMD="ip6tables -w 1 -t filter -nL ${chain} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd ip6tables -w 1 -t filter -D "${chain}" "${rule_num}";
fi
done
done
for chain in ${output6_chains}; do
CMD="ip6tables -w 1 -t filter -nL ${chain} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd ip6tables -w 1 -t filter -D "${chain}" "${rule_num}";
fi
done
done
}
configure_ui_firewall_rule() {
local sec="${1}"
local enabled access interface
local port=""
config_get_bool enabled "${sec}" uci_enable '1'
config_get access "${sec}" uci_access ""
config_get interface "${sec}" uci_interface ""
if [ "${enabled}" -eq "1" ] && [ "${access}" == "remote" ] && [ -n "${interface}" ]; then
port_list=$(uci -q show nginx."${1}".listen|cut -d'=' -f 2|sed "s/'/ /g"|sed "s/\[\:\:\]\://g")
for item in ${port_list}; do
if [ -z "${item##[0-9]*}" ]; then
port="${item}"
break
fi
done
if [ -z "${port}" ]; then
return 0
fi
zone="zone_${interface}_input"
iptables -w 1 -t filter -nL ${zone} 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate NEW,ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
ip6tables -w 1 -t filter -nL ${zone} 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
ip6tables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate NEW,ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
zone="zone_${interface}_output"
iptables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
ip6tables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
ip6tables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
fi
}
# Delete existing remote access rules
delete_ui_firewall_rules
config_load userinterface
config_get_bool serv_enable global enable 1
if [ "${serv_enable}" -eq "1" ]; then
config_load nginx
# Configure the User Interface rule
config_foreach configure_ui_firewall_rule server
fi

View File

@@ -1,17 +0,0 @@
#!/bin/sh
[ "$ACTION" = "ifup" ] || exit 0
apply_sysctl_configuration() {
local sysctl_conf
sysctl_conf="/etc/bbfdm/sysctl.conf"
[ -f "${sysctl_conf}" ] || touch "${sysctl_conf}"
sysctl -e -p "${sysctl_conf}" >&-
}
ubus -t 10 wait_for network.device
apply_sysctl_configuration

View File

@@ -1,76 +0,0 @@
#!/bin/sh /etc/rc.common
START=65
STOP=10
USE_PROCD=1
PROG=/usr/sbin/bbfdmd
BBFDM_JSON_INPUT="/etc/bbfdm/input.json"
BBFDM_TEMP_JSON="/tmp/bbfdm/input.json"
log() {
echo "${@}"|logger -t bbfdmd.init -p info
}
validate_bbfdm_bbfdmd_section()
{
uci_validate_section bbfdm bbfdmd "bbfdmd" \
'enabled:bool:true' \
'sock:string' \
'debug:bool:false' \
'loglevel:uinteger:1' \
'refresh_time:uinteger:0' \
'transaction_timeout:uinteger:30' \
'subprocess_level:uinteger'
}
configure_bbfdmd()
{
local enabled debug sock update
local jlog jrefresh jtimeout jlevel
update=0
config_load bbfdm
validate_bbfdm_bbfdmd_section || {
log "Validation of bbfdmd section failed"
return 1;
}
[ "${enabled}" -eq 0 ] && return 0
if [ -f "${BBFDM_JSON_INPUT}" ]; then
echo "$(jq --arg log ${loglevel} --arg tran ${transaction_timeout} --arg refresh ${refresh_time} --arg level ${subprocess_level} '.daemon.config += {"loglevel": $log, "refresh_time": $refresh, "transaction_timeout": $tran, "subprocess_level": $level}' ${BBFDM_JSON_INPUT})" > ${BBFDM_TEMP_JSON}
fi
procd_set_param command ${PROG}
if [ "${debug}" -eq 1 ]; then
procd_set_param stdout 1
procd_set_param stderr 1
fi
if [ -f "${sock}" ]; then
procd_append_param command -s "${sock}"
fi
}
start_service()
{
mkdir -p /tmp/bbfdm
procd_open_instance "bbfdm"
configure_bbfdmd
procd_set_param respawn
procd_close_instance "bbfdm"
ubus call service state '{"name":"bbfdm.services", "spawn":true}'
}
stop_service()
{
ubus call service state '{"name":"bbfdm.services", "spawn":false}'
}
service_triggers()
{
procd_add_reload_trigger "bbfdm"
}

View File

@@ -1,33 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
STOP=01
USE_PROCD=1
start_service() {
local enable
config_load userinterface
config_get_bool enable global enable 1
if [ ! -f "/etc/config/nginx" ]; then
return 0
fi
if [ "${enable}" -eq "1" ]; then
ubus call service state '{"name":"nginx", "spawn":true}'
else
ubus call service state '{"name":"nginx", "spawn":false}'
fi
# Inject firewall rules
procd_open_instance userinterface
/etc/firewall.userinterface
procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger "userinterface" "nginx"
}

View File

@@ -1,12 +0,0 @@
#!/bin/sh
uci -q batch <<-EOT
delete firewall.userinterface
set firewall.userinterface=include
set firewall.userinterface.path=/etc/firewall.userinterface
set firewall.userinterface.reload=1
commit firewall
EOT
exit 0

View File

@@ -1,9 +0,0 @@
#!/bin/sh
# This deletes the userinterface json plugin if exists in case of upgrade
if [ -f "/etc/bbfdm/json/UserInterface.json" ]; then
rm /etc/bbfdm/json/UserInterface.json
fi
exit 0

View File

@@ -1,12 +0,0 @@
#!/bin/sh
uci -q batch <<-EOT
delete firewall.port_hook
set firewall.port_hook=include
set firewall.port_hook.path=/etc/firewall.portmap
set firewall.port_hook.reload=1
commit firewall
EOT
exit 0

View File

@@ -1,62 +0,0 @@
#!/bin/sh
. /lib/functions.sh
bbfdm_sysctl_conf="/etc/bbfdm/sysctl.conf"
update_device_section() {
local section="${1}"
local dev_name="${2}"
local ipv6="${3}"
local name
# Get name value
config_get name "${section}" name
# Retrun if the name value is different to the dev_name value
[ "${name}" != "${dev_name}" ] && return
if [ "${ipv6}" = "0" ]; then
ipv6="1"
else
ipv6="0"
fi
# Add ipv6 option
uci -q set network.${section}.ipv6="${ipv6}"
}
parse_bbfdm_sysctl_conf_file() {
# Check if the file exists
[ -f "${bbfdm_sysctl_conf}" ] || return
# Create a temporary file
tmpfile=$(mktemp)
# Load network config
config_load network
# Read each line of the file
while read -r line; do
if echo "$line" | grep -Eq '^net\.ipv6\.conf\.(.+)\.disable_ipv6=([0-1])$'; then
name=$(echo "$line" | sed -n 's/^net\.ipv6\.conf\.\(.*\)\.disable_ipv6=[0-1]$/\1/p')
value=$(echo "$line" | sed -n 's/^net\.ipv6\.conf\.\(.*\)\.disable_ipv6=\([0-1]\)$/\2/p')
config_foreach update_device_section device "${name}" "${value}"
else
# If the line doesn't match, preserve it in the temporary file
echo "$line" >> "$tmpfile"
fi
done < "${bbfdm_sysctl_conf}"
# Replace the original file with the modified content
mv "$tmpfile" "${bbfdm_sysctl_conf}"
# Apply the changes
uci commit network
sysctl -e -p "${bbfdm_sysctl_conf}" >&-
}
parse_bbfdm_sysctl_conf_file
exit 0

View File

@@ -1,12 +0,0 @@
#!/bin/sh
uci -q batch <<-EOT
delete firewall.service_hook
set firewall.service_hook=include
set firewall.service_hook.path=/etc/firewall.service
set firewall.service_hook.reload=1
commit firewall
EOT
exit 0

View File

@@ -1,18 +0,0 @@
#!/bin/sh
UNIFIED_PATH="/etc/bbfdm/plugins/"
# Link JSON plugins
for f in `ls -1 /etc/bbfdm/json/*.json`; do
echo "# BBFDM JSON plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
# Link DotSo plugins
for f in `ls -1 /usr/lib/bbfdm/*.so`; do
echo "# BBFDM DotSO plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
exit 0

View File

@@ -1 +0,0 @@
/etc/bbfdm/sysctl.conf

View File

@@ -1 +0,0 @@
/etc/nginx/allow_host_*

View File

@@ -1,42 +0,0 @@
#
# Copright (C) 2018 The Internet Foundation In Sweden
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bbk_cli
PKG_SOURCE_VERSION:=7b810a696c78b746185c11282bdbe3fb7f8c5d4b
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/dotse/bbk.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/bbk_cli
CATEGORY:=Utilities
DEPENDS:=+libpthread +libstdcpp
TITLE:=Bredbandskollen CLI - A bandwidth measurement tool
endef
define Package/bbk_cli/description
To measure connection speed in an environment that is missing a web browser,
for example, in a server, you can use our command line interface bbk_cli,
which is available for some of the most common operating systems.
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/src/cli CROSS_COMPILE="$(TARGET_CROSS)"
endef
define Package/bbk_cli/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/cli/cli $(1)/sbin/bbk_cli
endef
$(eval $(call BuildPackage,bbk_cli))

View File

@@ -1,25 +0,0 @@
diff --git a/src/framework/engine.h b/src/framework/engine.h
index 57a48ad..9e1bc36 100644
--- a/src/framework/engine.h
+++ b/src/framework/engine.h
@@ -10,6 +10,7 @@
#include <map>
#include <vector>
#include <string>
+#include <sys/select.h>
#include "logger.h"
diff --git a/src/framework/mk.inc b/src/framework/mk.inc
index 793e211..13275be 100644
--- a/src/framework/mk.inc
+++ b/src/framework/mk.inc
@@ -7,7 +7,7 @@ OS:=$(shell uname)
CXXFLAGS += -O2 -W -Wall -I$(DIRLEVEL)
ifeq ($(OS),Linux)
-CXX = g++
+CXX = $(CROSS_COMPILE)g++
endif
ifeq ($(OS),Darwin)

View File

@@ -1,46 +0,0 @@
#
# Copyright (C) 2007-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bootchart2
PKG_VERSION:=0.14.7
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mmeeks/bootchart.git
PKG_SOURCE_VERSION:=3ab81137cafe25c2ca4bc3a5f322a63646f9ce8d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=none
include $(INCLUDE_DIR)/package.mk
define Package/bootchart2
SECTION:=base
CATEGORY:=Utilities
TITLE:=Bootchart2
URL:=https://github.com/mmeeks/bootchart
endef
define Package/bootchart2/description
Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process.
endef
define Package/bootchart2/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bootchart-collector $(1)/sbin
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,bootchart2))

View File

@@ -1,10 +0,0 @@
do_bootchart()
{
[ -f /dev/null ] || mknod /dev/null c 1 3
mkdir -p /lib/bootchart/tmpfs
echo "starting bootchart"
/sbin/bootchart_run_preinit boot &
}
boot_hook_add preinit_essential do_bootchart

View File

@@ -1,7 +0,0 @@
bootchart_rootfs_pivot()
{
mount -o move /rom/lib/bootchart/tmpfs /lib/bootchart/tmpfs
}
boot_hook_add preinit_mount_root bootchart_rootfs_pivot

View File

@@ -1,59 +0,0 @@
#! /bin/sh
# this is intended to be started in preinit.
# 11_bootchart, starts it
# 72_bootchart, fixup mount point after pivot
#
# program can be killed early with
# bootchart_run_preinit stop
trap "stop; exit 0;" SIGINT SIGTERM
STOP_AFTER=250
HZ=50
if [ -z "$1" ]
then
echo "you need to specify start or stop"
exit 1
fi
start()
{
/sbin/bootchart-collector $HZ &
}
stop()
{
echo "bootchart DUMP"
mkdir /tmp/bootchart
/sbin/bootchart-collector --dump /tmp/bootchart
cd /tmp/bootchart
tar -zcf /tmp/bootchart.tgz header *.log
cd /
rm -rf /tmp/bootchart
}
case $1 in
boot) # secret option for preinit
start
sleep $STOP_AFTER
# test to see if someone has manually killed us
if [ -f /tmp/bootchart.tgz ]
then
exit 0
fi
stop
;;
start)
start
;;
stop)
stop
;;
*)
echo "you need to specify start or stop, not $1"
exit 1
;;
esac

View File

@@ -1,40 +0,0 @@
diff --git a/pybootchartgui/draw.py b/pybootchartgui/draw.py
index 7c3f60c..5c9f046 100644
--- a/pybootchartgui/draw.py
+++ b/pybootchartgui/draw.py
@@ -63,6 +63,7 @@ AXIS_FONT_SIZE = 11
LEGEND_FONT_SIZE = 12
# CPU load chart color.
+CPU_SYS_COLOR = (0.65, 0.13, 0.36, 1.0)
CPU_COLOR = (0.40, 0.55, 0.70, 1.0)
# IO wait chart color.
IO_COLOR = (0.76, 0.48, 0.48, 0.5)
@@ -300,21 +301,19 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
# render bar legend
ctx.set_font_size(LEGEND_FONT_SIZE)
- draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, leg_s)
- draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, leg_s)
+ draw_legend_box(ctx, "CPU (user)", CPU_COLOR, off_x, curr_y+20, leg_s)
+ draw_legend_box(ctx, "CPU (sys)", CPU_SYS_COLOR, off_x + 120, curr_y+20, leg_s)
+ draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120 + 120 , curr_y+20, leg_s)
# render I/O wait
chart_rect = (off_x, curr_y+30, w, bar_h)
if clip_visible (clip, chart_rect):
draw_box_ticks (ctx, chart_rect, sec_w)
draw_annotations (ctx, proc_tree, trace.times, chart_rect)
- draw_chart (ctx, IO_COLOR, True, chart_rect, \
- [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], \
- proc_tree, None)
+ draw_chart (ctx, IO_COLOR, True, chart_rect, [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], proc_tree, None)
# render CPU load
- draw_chart (ctx, CPU_COLOR, True, chart_rect, \
- [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], \
- proc_tree, None)
+ draw_chart (ctx, CPU_SYS_COLOR, True, chart_rect, [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], proc_tree, None)
+ draw_chart (ctx, CPU_COLOR, True, chart_rect, [(sample.time, sample.user ) for sample in trace.cpu_stats], proc_tree, None)
curr_y = curr_y + 30 + bar_h

View File

@@ -1,52 +0,0 @@
#
# Copyright (C) 2022 iopsys Software Solutions AB
#
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.1.3
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
PKG_SOURCE_VERSION:=f556410b51a2248f11358793f11ae54d3e53e85e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json +zlib
endef
TARGET_CFLAGS += \
-D_GNU_SOURCE \
-Wall -Werror
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/bulkdata/* $(PKG_BUILD_DIR)/
endef
endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/bulkdata
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.json $(1)/etc/bulkdata
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,15 +0,0 @@
{
"daemon": {
"input": {
"type": "JSON",
"name": "/etc/bulkdata/bulkdata.json"
},
"output": {
"type": "UBUS",
"name": "bbfdm.bulkdata",
"parent_dm": "Device.",
"object": "BulkData",
"root_obj": "bbfdm"
}
}
}

View File

@@ -1,6 +0,0 @@
config bulkdata 'bulkdata'
option enable '0'
#Log levels: Error=1, Warning=2, Info=3, Debug=4
option log_level '3'

View File

@@ -1,36 +0,0 @@
#!/bin/sh /etc/rc.common
START=60
STOP=10
. /etc/bbfdm/bbfdm_services.sh
USE_PROCD=1
PROG="/usr/sbin/bulkdatad"
BULKDATA_JSON_INPUT="/etc/bulkdata/input.json"
start_service() {
local enable
config_load bulkdata
config_get_bool enable bulkdata enable 1
[ "$enable" -eq "1" ] && {
procd_open_instance "bulkdata"
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance "bulkdata"
}
bbfdm_add_service "bbfdm.bulkdata" "${BULKDATA_JSON_INPUT}"
}
reload_service() {
stop
start
}
service_triggers()
{
procd_add_reload_trigger bulkdata
}

View File

@@ -1,75 +0,0 @@
#!/bin/sh
. /lib/functions.sh
PROFILE_COUNT=1
get_next_count()
{
local config="$1"
local default_name="${2}"
local count=${3}
local found=0
if [ -z "$count" ]; then
count=1
fi
while [ "${found}" -ne 1 ]; do
uci -q get "${config}"."${default_name}"_${count} >/dev/null
if [ "$?" -eq 0 ]; then
count=$((count + 1))
else
found=1;
fi
done
echo "${default_name}_${count}"
}
translate_profile_id_to_profile_name() {
local section="${1}"
local profile_id="${2}"
local profile_name="${3}"
local curr_profile_id
config_get curr_profile_id "${section}" profile_id
[ -n "${curr_profile_id}" ] || return
[ "${curr_profile_id}" != "${profile_id}" ] && return
uci -q set bulkdata."${section}".profile_name="${profile_name}"
uci -q set bulkdata."${section}".profile_id=""
}
update_profile_sections() {
local section="${1}"
local default="${2}"
local profile_name
config_get profile_id "${section}" profile_id
[ -n "${profile_id}" ] || return
case "${section}" in
"cfg"*)
profile_name="$(get_next_count bulkdata "${default}" ${PROFILE_COUNT})"
uci_rename bulkdata "${section}" "${profile_name}"
;;
esac
PROFILE_COUNT=$((PROFILE_COUNT + 1))
[ -n "$profile_name" ] && section="${profile_name}"
uci -q set bulkdata."${section}".profile_id=""
config_foreach translate_profile_id_to_profile_name profile_parameter "${profile_id}" "${profile_name}"
config_foreach translate_profile_id_to_profile_name profile_http_request_uri_parameter "${profile_id}" "${profile_name}"
}
config_load bulkdata
config_foreach update_profile_sections profile profile
uci commit bulkdata
exit 0

View File

@@ -1,38 +0,0 @@
#
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bulut
PKG_VERSION:=0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bulut/bulut-gw-client.git
PKG_SOURCE_VERSION:=227700c44817afa2c392fa08bf4cf70fa6177f01
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/bulut
CATEGORY:=Utilities
DEPENDS:=
TITLE:=bulut
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include
define Package/bulut/description
obuspa keys
endef
define Package/bulut/install
$(CP) $(PKG_BUILD_DIR)/files/* $(1)/
endef
$(eval $(call BuildPackage,bulut))

View File

@@ -1,57 +0,0 @@
#
# Copyright (C) 2021-2023 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=capiagent
PKG_VERSION:=2.1.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3e671db8f567b19c109fc13b25bc571c4c73a962
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/capiagent.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
#define Package/capiagent/config
# source "$(SOURCE)/Config.in"
#endef
define Package/capiagent
TITLE+= capiagent (daemon implementing Wi-Fi Alliance's CAPI commands)
DEPENDS= +libubox +libuci +libubus +libnl-genl +libeasy +libwifi \
+libjson-c +libblobmsg-json +ubus +libieee1905
endef
define Package/capiagent/description
This package provides agent for the WiFi Alliance's CAPI specification.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
MAKE_PATH:=src
define Package/capiagent/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/lib/wifi/capi
$(CP) $(PKG_BUILD_DIR)/src/capiagent $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/src/scripts/* $(1)/lib/wifi/capi
endef
$(eval $(call BuildPackage,capiagent))

View File

@@ -1,35 +0,0 @@
#!/bin/sh /etc/rc.common
START=98
STOP=20
USE_PROCD=1
start_service() {
if [ -e "/etc/config/mapagent" -o -e "/etc/config/mapcontroller" ]; then
config_load mapagent
config_get_bool agent_enabled agent enabled 1
config_load mapcontroller
config_get_bool controller_enabled controller enabled 1
if [ $agent_enabled -eq 1 -o $controller_enabled -eq 1 ]; then
procd_open_instance
procd_set_param command "/usr/sbin/capiagent" "-p 9000"
procd_set_param limits core="unlimited"
#procd_set_param respawn
#procd_set_param stdout 1
#procd_set_param stderr 1
procd_close_instance
fi
fi
}
service_triggers()
{
procd_add_reload_trigger "capiagent"
}
reload_service() {
stop
start
}

View File

@@ -1,40 +0,0 @@
#
# Copyright (C) 2018 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=catv
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=none
include $(INCLUDE_DIR)/package.mk
define Package/catv
CATEGORY:=Utilities
TITLE:=CATV
endef
define Package/catv/description
CATV configuration utility
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/catv/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,catv))

View File

@@ -1,4 +0,0 @@
config service 'catv'
option enable 'no'
option filter '3'

View File

@@ -1,27 +0,0 @@
#!/bin/sh /etc/rc.common
START=71
USE_PROCD=1
. /lib/functions.sh
start_service() {
local enable=0
local filter=0
config_load catv
config_get_bool enable catv enable 0
config_get filter catv filter
if [ $enable -eq 0 ]; then
ubus call catv set-enable "{\"enable\":\"off\"}"
else
ubus call catv set-enable "{\"enable\":\"on\"}"
fi
ubus call catv set-filter "{\"filter\":\"$filter\"}"
}
service_triggers() {
procd_add_reload_trigger catv
}

32
crashlog/Makefile Normal file
View File

@@ -0,0 +1,32 @@
#
include $(TOPDIR)/rules.mk
PKG_NAME:=crashlog
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/crashlog
CATEGORY:=Utilities
TITLE:=Handling kernel crash logs
endef
define Package/crashlog/description
Handling kernel crash logs.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/crashlog/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,crashlog))

Binary file not shown.

View File

@@ -0,0 +1,11 @@
#!/bin/sh /etc/rc.common
START=01
start()
{
if [ -e /proc/sys/kernel/core_pattern ]
then
echo "|/sbin/logcore %e %s" > /proc/sys/kernel/core_pattern
fi
}

View File

@@ -0,0 +1,56 @@
#!/bin/sh /etc/rc.common
START=99
send_log()
{
nr=$(db get hw.board.serialNumber)
hw=$(db get hw.board.hardware)
hwv=$(db get hw.board.hardwareVersion)
bid=$(db get hw.board.boardId)
sw=$(db get hw.board.iopVersion)
server=$(/sbin/uci get system.crashlog.server)
while true
do
scp -S /usr/sbin/logssh /proc/last_kmsg log@${server}:log/${bid}_${hwv}_${hw}_${sw}_${nr}
if [ $? == 0 ]
then
break;
fi
# wait for another minute then try again
sleep 60
done
}
fill_in_default()
{
/sbin/uci add system log
/sbin/uci rename system.@log[-1]=crashlog
/sbin/uci set system.crashlog.enable=no
/sbin/uci set system.crashlog.server="crash.inteno.se"
/sbin/uci commit
}
boot()
{
# is crashlog enabled ?
enable=$(/sbin/uci get system.crashlog.enable)
case $enable in
0|no|NO|false|FALSE)
exit 0
;;
"")
fill_in_default
exit 0
;;
esac
# is this boot a result from a crash ?
reason=$(cat /etc/boot_reason)
case $reason in
HW|WD)
send_log&
;;
esac
}

61
crashlog/files/sbin/logcore Executable file
View File

@@ -0,0 +1,61 @@
#! /bin/sh
TMP_CORE=/tmp/new_core
# first test if we can contact the log server.
# if not abort directly the core file takes up memory
alive()
{
ping -c1 $server
if [ $? != 0 ]
then
# drain core file from kernel
cat >/dev/null
exit 0
fi
}
fill_in_default()
{
/sbin/uci add system log
/sbin/uci rename system.@log[-1]=corelog
/sbin/uci set system.corelog.enable=no
/sbin/uci set system.corelog.server="crash.inteno.se"
/sbin/uci commit
}
# is corelog enabled ?
enable=$(/sbin/uci get system.corelog.enable)
case $enable in
0|no|NO|false|FALSE)
# drain core file from kernel
cat >/dev/null
exit 0
;;
"")
fill_in_default
exit 0
;;
esac
server=$(/sbin/uci get system.corelog.server)
alive
# dump out the core to disk we need this as scp needs a size before we send data
# and this is the only way to know how much data there is
cat >$TMP_CORE
# in case filesystem/memory is full at least kill the core in the kernel memory should give us some
# more memory to work with. normally this would do nothing.
cat >/dev/null
nr=$(db get hw.board.serialNumber)
hw=$(db get hw.board.hardware)
hwv=$(db get hw.board.hardwareVersion)
bid=$(db get hw.board.boardId)
sw=$(db get hw.board.iopVersion)
scp -S /usr/sbin/logssh $TMP_CORE log@${server}:log/core_${1}_${2}_${bid}_${hwv}_${hw}_${sw}_${nr}
rm $TMP_CORE

6
crashlog/files/usr/sbin/logssh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
# we need to have the -y option to dropbear to not halt the scp when
# transfering the log file to a new server for the first time.
# since we already need this also put in the keyfile
ssh -y -i /etc/dropbear/logid $@

42
crashlog/readme Normal file
View File

@@ -0,0 +1,42 @@
Install scp server.
Create a user account on a server and make sure it's possible to login to it
using ssh.
For now the user has to be called "log"
USER is the user name of the account
HOME is the user home directory.
Both should be changed to the correct value in all following example commands.
create HOME/bin
Put scp_upload in HOME/bin
make it executable "chmod a+x HOME/bin/scp_upload"
create home/.ssh (observer the dot .shh)
create an empty file HOME/.ssh/authorized_keys
-------------------------------
Now everyhting is setup for use but we have not added any clients.
What we need is the public key for the clients.
For dropbear "dropbearkey -y -f files/etc/dropbear/logid" will generate the public key.
----------
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwn9RaDAzxW1dTmIhXgFBnpi1lhj8xhYpCVQiPxxdk9IEmH8zjo4y9j3sPkqKOlRnkwjpZIpLEKBnpQTwVIMCU/AG7nDJX3OH9RfS9mLJQLfFL8HyGCyqDezFWldbyovhJZvdUeK4tAXJWv2W3OVHiz2L8IlncBgP/E9DJElsyhhQHsM96UE6tBkXsvXkoDbMSYXFcLbgiUwBKfmM2BF/aPDL45iznGur7/2j9v95PwJ0gtMu9jjNRq+pXCXhTh3bsnczm0MpZC1aiRc9nJAeGIMmhrf15E4jBKgTnrstzJxGVAdajKeR954KcNsS33cS2Wmui2YjmPbBXjqf1frzJ log@inteno
----------
The public key should be just one line. Add that line to the
HOME/.ssh/authorized_keys file on the scp server. Then add the follwoing as
the first text on the same line. that is insert before the key data.
command="HOME/bin/scp_upload",no-port-forwarding,no-agent-forwarding,no-X11-forwarding
Do not forget to change HOME to the correct value for the server and there
should be one space separating the key data and the above text.
---------------------------------
Now test to make sure that you can upload new files, not download files
and not overwrite files from the client.

53
crashlog/scp_upload Normal file
View File

@@ -0,0 +1,53 @@
#! /bin/bash
# authorized_keys command="/home/boxi/my_scp",no-port-forwarding,no-agent-forwarding,no-X11-forwarding
val=`expr match "$SSH_ORIGINAL_COMMAND" "scp"`
if [ $val != 3 ]
then
echo "only scp is allowed for this rsa key"
exit 1
fi
#strip out "scp" as getopts barf on anything not an option
args=${SSH_ORIGINAL_COMMAND:3}
# we must set args to positional paramters otherwise it's next to impossible
# to get to the rest of the line that is not arguments.
set -- $args
while getopts "rftdvpq" Option
do
case $Option in
r ) echo "recursive not allowed";exit 1;;
f ) echo "reading files not allowed";exit 1;;
t ) ;;
d ) ;;
v ) ;;
p ) ;;
q ) ;;
* ) ;; # Default.
esac
done
shift $(($OPTIND - 1))
file="$*"
dir=$(dirname "$file")
if [ "$dir" != "log" ]
then
echo "only allowed to write to log/"
exit 1
fi
# try to create uniq files
EXTRA=$((0))
while [ -e "${file}_${EXTRA}" ]
do
EXTRA=$((EXTRA +1))
done
logger -t scp_upload "${SSH_ORIGINAL_COMMAND}_${EXTRA}"
exec ${SSH_ORIGINAL_COMMAND}_${EXTRA}

View File

@@ -1,7 +0,0 @@
menu "Configuration"
config DECOLLECTOR_EASYMESH_VERSION
int "Support Easymesh version"
default 4
endmenu

View File

@@ -1,80 +0,0 @@
#
# Copyright (C) 2021-2023 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=4.2.1.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ae836adb0779979686d0dad34b941f319ffed1b8
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/decollector
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi DataElements Collector Proxy
DEPENDS:=+libuci +libubox +ubus +libpthread +libnl-genl \
+libeasy +libwifiutils +libieee1905 +map-plugin
endef
define Package/decollector/description
It implements the WiFi DataElements Agent as defined in the Wi-Fi Alliance's
DataElements specification.
endef
define Package/decollector/config
source "$(SOURCE)/Config.in"
endef
ifneq (,$(findstring ALPHA,$(CONFIG_VERSION_CODE)))
MAKE_FLAGS += DEBUG=1
endif
ifneq (,$(findstring BETA,$(CONFIG_VERSION_CODE)))
MAKE_FLAGS += DEBUG=1
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/decollector/ $(PKG_BUILD_DIR)/
endef
endif
MAKE_PATH:=src
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_DECOLLECTOR_EASYMESH_VERSION)
EXECS := \
$(if $(CONFIG_PACKAGE_decollector),decollector)
MAKE_FLAGS += EXECS="$(EXECS)"
define Package/decollector/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/decollector.init $(1)/etc/init.d/decollector
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/decollector $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,decollector))

View File

@@ -1,30 +0,0 @@
#!/bin/sh /etc/rc.common
START=98
STOP=11
USE_PROCD=1
PROG=/usr/sbin/deagent
service_running() {
ubus -t 2 wait_for wifi ieee1905 ieee1905.map
}
start_service() {
procd_open_instance
procd_set_param command "$PROG" "-d" "-t 10"
#procd_set_param stdout 1
#procd_set_param stderr 1
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers()
{
procd_add_reload_trigger wireless
}

View File

@@ -1,43 +0,0 @@
#!/bin/sh /etc/rc.common
START=98
STOP=11
USE_PROCD=1
PROG=/usr/sbin/decollector
service_running() {
ubus -t 2 wait_for ieee1905 ieee1905.map
}
start_service() {
sleep 3
[ -e "/etc/config/mapcontroller" ] && {
local en
config_load mapcontroller
config_get en controller enabled "0"
config_get collect_int controller de_collect_interval
[ -n "$collect_int" -a $collect_int -lt 30 ] && collect_int=""
[ $en -gt 0 ] && {
procd_open_instance
procd_set_param command "$PROG" "-d" "${collect_int:+-t $collect_int}"
#procd_set_param stdout 1
#procd_set_param stderr 1
procd_set_param respawn
procd_close_instance
}
}
}
reload_service() {
stop
start
}
service_triggers()
{
procd_add_reload_trigger mapcontroller
}

View File

@@ -1,11 +0,0 @@
if PACKAGE_dectmngr
menu "Configuration"
config ENABLE_LINE_SETTINGS_EXTENSION
bool "Enable Line Settings List extension "
default y
endmenu
endif

View File

@@ -1,68 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.6.4
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d9cc11c81ce1ff625e4e789afa180b301c7fcf74
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=DECT Manager
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c +gpiod-tools
endef
define Package/$(PKG_NAME)/description
DECT manager is a daemon that provides UBUS RPC objects and sends UBUS events for communication with the DECT chip.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* ~/git/voip/dectmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-Wall \
-Werror \
-I$(STAGING_DIR)/usr/include/libxml2
ifeq ($(CONFIG_ENABLE_LINE_SETTINGS_EXTENSION),y)
TARGET_CFLAGS += -DENABLE_LINE_SETTINGS_EXTENSION
endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/app/dectmngr $(1)/usr/sbin/
$(STRIP) $(1)/usr/sbin/dectmngr
$(CP) ./files/etc/* $(1)/etc/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/dect $(1)/lib/upgrade/keep.d/dect
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,3 +0,0 @@
config dect 'global'
option log_dect_cmbs 'syslog'
option log_level 'realtime,warning,error'

Binary file not shown.

View File

@@ -1,137 +0,0 @@
#!/bin/sh /etc/rc.common
source /lib/functions/uci-defaults.sh
START=70
STOP=12
USE_PROCD=1
PROG=/usr/sbin/dectmngr
LOG_PATH=/var/log/dectmngr
DB_PATH=/etc/dect
DCX81_UART_DT_ALIAS=/proc/device-tree/aliases/dcx81-uart
DECT_GPIO="$(gpiofind DCX81_RSTN | cut -d ' ' -f 2 2>/dev/null)"
# Ask dectmngr to exit nicely and wait for it to clean up, which is a slow process.
stop_and_wait_dectmngr() {
dect_pid=$(pidof $PROG)
[ -n "$dect_pid" ] && kill $dect_pid
pidof $PROG > /dev/null 2>&1 && sleep 2 # wait for the process to stop gracefully
while pidof $PROG > /dev/null 2>&1; do
dect_pid=$(pidof $PROG)
[ -n "$dect_pid" ] && kill -9 $dect_pid
sleep 1
done
}
has_dect() {
[ -f "$DCX81_UART_DT_ALIAS" ]
}
get_dcx81_device() {
readonly dcx81_uart_dt_node="/proc/device-tree/$(cat "$DCX81_UART_DT_ALIAS" 2>/dev/null)"
[ -e "$dcx81_uart_dt_node" ] || return 1
for tty_dt_node in /sys/class/tty/*/device/of_node; do
if [ "$tty_dt_node" -ef "$dcx81_uart_dt_node" ]; then
readonly uevent_file="${tty_dt_node%%/device/of_node}/uevent"
local device_name_line
device_name_line="$(grep '^DEVNAME=' "$uevent_file")" || return 1
readonly device="/dev/${device_name_line##DEVNAME=}"
[ -c "$device" ] || return 1
printf "%s" "$device"
return 0
fi
done
return 1
}
start_service() {
local opt_ext=
local rfpi=
local model_id=
local rxtun=
if ! has_dect; then
logger -t "$PROG" "Not starting because no DECT hardware is available."
return 0
fi
local dcx81_uart_device
if ! dcx81_uart_device="$(get_dcx81_device)"; then
logger -t "$PROG" -p daemon.warning "Could not determine DCX81 UART device. Falling back to default ttyH0."
dcx81_uart_device=/dev/ttyH0
fi
[ -n "$DECT_GPIO" ] && echo 1 > /sys/class/gpio/gpio${DECT_GPIO}/value
rfpi=$(db -q get hw.board.dect_rfpi)
[ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi"
model_id=$(db -q get hw.board.dect_model_id)
[ -n "$model_id" -a ${#model_id} -eq 8 ] || {
echo "Invalid hw.board.dect_model_id:$model_id. Set to 30.3B.06"
model_id="30.3B.06"
}
opt_ext="$opt_ext -model $model_id"
rxtun=$(db -q get hw.board.dect_rxtun)
[ -n "$rxtun" -a ${#rxtun} -eq 2 ] && opt_ext="$opt_ext -rxtun $rxtun"
config_load dect
config_get log_dect_cmbs global log_dect_cmbs syslog
procd_open_instance
# dectmngr takes expects device without /dev
readonly dcx81_uart_device_wo_dev="${dcx81_uart_device##/dev/}"
case "$log_dect_cmbs" in
none)
echo "Starting dectmngr with cmbs logging disabled"
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" $opt_ext
rm -f $LOG_PATH/*
;;
file)
echo "Starting dectmngr with cmbs logging enabled to file"
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -log $LOG_PATH/dect-cmbs.log $opt_ext
;;
*)
echo "Starting dectmngr with cmbs logging enabled to syslog"
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -syslog $opt_ext
rm -f $LOG_PATH/*
;;
esac
procd_set_param respawn 6 2 3
procd_set_param term_timeout 20
procd_set_param triggers asterisk
procd_close_instance
}
stop_service() {
has_dect || return 0
[ -n "$DECT_GPIO" ] && echo 0 > /sys/class/gpio/gpio${DECT_GPIO}/value
stop_and_wait_dectmngr
}
reload_service() {
ubus call dect reload
}
service_triggers() {
procd_add_config_trigger "config.change" "asterisk" /etc/init.d/dectmngr restart
procd_add_config_trigger "config.change" "dect" /etc/init.d/dectmngr reload
}
boot() {
[ -n "$DECT_GPIO" ] && {
echo ${DECT_GPIO} > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio${DECT_GPIO}/direction
}
[ ! -d $LOG_PATH ] && mkdir -p $LOG_PATH
[ ! -d $DB_PATH ] && mkdir -p $DB_PATH
start
}

View File

@@ -1 +0,0 @@
/etc/dect/LA_DB

View File

@@ -1,79 +0,0 @@
#
# Copyright (C) 2018 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.2.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=43dec92b1c86be7859521da337e7bd1168848b26
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
else
$(info Unexpected CONFIG_TARGET)
endif
export TARGET_PLATFORM
define Package/dslmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=XDSL status and configration utility
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
endef
define Package/dslmngr/description
This package can be used to configure and provide status about
the XDSL subsystem through UBUS.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-I$(STAGING_DIR)/usr/include/xdsl \
-D_GNU_SOURCE
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)"
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/dslmngr/ $(PKG_BUILD_DIR)/
endef
endif
define Build/Compile
+$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
endef
define Package/dslmngr/install
$(CP) ./files/common/* $(1)/
ifeq ($(CONFIG_TARGET_brcmbca),y)
$(CP) ./files/broadcom/* $(1)/
endif
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
endef
$(eval $(call BuildPackage,dslmngr))

View File

@@ -1,313 +0,0 @@
#!/bin/sh
. /lib/functions.sh
# ATM #
check_pvc() {
local vpi=$1
local vci=$2
local ret
ret=$(xtmctl operate conn --show | awk -v test="$vpi/$vci" '{if ($3==test ) print $5 }')
case $ret in
''|*[!0-9]*) return 0 ;;
*) return $ret ;;
esac
}
check_xtm_list() {
local qclass=$1
local pcr scr mbs
local ret
case $# in
1)
pcr=0
scr=0
mbs=0
;;
2)
pcr=$2
scr=0
mbs=0
;;
4)
pcr=$2
scr=$3
mbs=$4
;;
esac
ret=$(xtmctl operate tdte --show | awk -v test="$qclass" -v pcr="$pcr" -v scr="$scr" -v mbs="$mbs" '{if ($2==test && $3==pcr && $4==scr && $5==mbs ) print $1 }')
case $ret in
''|*[!0-9]*) return 0 ;;
*) return $ret ;;
esac
}
configure_atm_device() {
local name vpi vci device link_type encapsulation qos_class pcr mbs scr i
config_get name $1 name "ATM"
config_get vpi $1 vpi "8"
config_get vci $1 vci "35"
config_get device $1 device "atm0"
config_get link_type $1 link_type "eoa"
config_get encapsulation $1 encapsulation "llc"
config_get qos_class $1 qos_class "ubr"
config_get pcr $1 pcr
config_get mbs $1 mbs
config_get scr $1 scr
check_pvc $vpi $vci
ret=$?
if [ "$ret" -eq 0 ]; then
check_xtm_list $qos_class $pcr $scr $mbs
ret=$?
if [ "$ret" -eq 0 ]; then
case $qos_class in # ubr, cbr, gfr, vbr-nrt, vbr-rt, ubr+, abr
ubr)
xtmctl operate tdte --add "$qos_class"
;;
ubr_pcr|ubr+)
xtmctl operate tdte --add "$qos_class" $pcr
;;
cbr)
xtmctl operate tdte --add "$qos_class" $pcr
;;
nrtvbr|vbr-nrt)
xtmctl operate tdte --add "$qos_class" $pcr $scr $mbs
;;
rtvbr|vbr-rt)
xtmctl operate tdte --add "$qos_class" $pcr $scr $mbs
;;
gfr)
;;
abr)
;;
esac
fi
case $link_type in # EoA, IPoA, PPPoA, CIP
EoA|eoa)
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_eth" || encapsulation="llcsnap_eth"
;;
PPPoA|pppoa)
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_pppoa" || encapsulation="llcencaps_ppp"
;;
IPoA|ipoa)
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_ipoa" || encapsulation="llcsnap_rtip"
;;
CIP|cip)
;;
esac
check_xtm_list $qos_class $pcr $scr $mbs
ret="$?"
xtmctl operate conn --add 1.$vpi.$vci aal5 $encapsulation 0 1 $ret
for i in `seq 0 7`; do
xtmctl operate conn --addq 1.$vpi.$vci $i wrr 1 dt # queue priority 0-7
done
xtmctl operate conn --createnetdev 1.$vpi.$vci $device
xtmctl operate intf --state 1 enable
fi
}
remove_atm_devices() {
local vpi vci rest
local vpivci=`xtmctl operate conn --show | grep "ATM\|mode" | awk '{if (NR!=1 && $1!="PTM") {print $3}}'`
for i in $vpivci
do
rest=${i#\/}
vpi=${rest%%\/*}
vci=${rest#*\/}
echo "xtmctl operate conn --delete 1.$vpi.$vci"
xtmctl operate conn --delete 1.$vpi.$vci
echo "xtmctl operate conn --deletenetdev 1.$vpi.$vci"
xtmctl operate conn --deletenetdev 1.$vpi.$vci
done
}
create_atm_devices() {
echo "Creating ATM Device(s)"
config_load dsl
config_foreach configure_atm_device atm-device
}
# ATM END #
# PTM #
check_ptm() {
local ret
local ptmprio=$1
local dslat=$2
if [ "$ptmprio" -eq 2 ]; then
ptmprio="high"
else
ptmprio="low"
fi
ret=$(xtmctl operate conn --show | awk -v dslat="$dslat" -v ptmprio="$ptmprio" '{if ($2 == dslat && $3 == ptmprio ) print $2 }')
case $ret in
''|*[!0-9]*) return 0 ;;
*) return $ret ;;
esac
}
configure_ptm_device() {
local name device priority portid i
config_get name $1 name "PTM"
config_get device $1 device "ptm0"
config_get priority $1 priority 1
config_get portid $1 portid 1
check_ptm $priority $portid
ret=$?
if [ "$ret" -eq 0 ]; then
xtmctl operate conn --add $portid.$priority
for i in `seq 0 7`; do
xtmctl operate conn --addq $portid.$priority $i wrr 1 dt -1 -1 3000 # queue priority 0-7
done
echo "xtmctl operate conn --createnetdev $portid.$priority $device"
xtmctl operate conn --createnetdev $portid.$priority $device
xtmctl operate intf --state 1 enable
fi
}
remove_ptm_devices() {
local delptm
local x=0
IFS=$'\n'
for i in `xtmctl operate conn --show | grep "PTM\|mode"`
do
if [ $x -eq 1 ]; then
delptm=$(echo $i | awk '{if ($1!="ATM") print $2"."$11}')
echo "xtmctl operate conn --delete $delptm"
xtmctl operate conn --delete $delptm
xtmctl operate conn --deletenetdev $delptm
fi
x=1
done
unset IFS
}
create_ptm_devices() {
echo "Creating PTM Device(s)"
config_load dsl
config_foreach configure_ptm_device ptm-device
}
# PTM END #
prioritize_arp()
{
ebtables -t nat -D POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
ebtables -t nat -A POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
}
xtm_remove_devices() {
remove_atm_devices
remove_ptm_devices
}
xtm_create_devices() {
local tpstc="$(xdslctl info --show | grep TPS-TC)"
if echo "$tpstc" | grep -q "ATM Mode"; then
create_atm_devices
elif echo "$tpstc" | grep -q "PTM Mode"; then
create_ptm_devices
fi
}
xdsl_configure() {
local VDSL=0
local GFAST=0
local mod=""
local modes=""
local profile=""
config_load dsl
# Modes
config_get mode line mode
for mod in $mode; do
[ $mod == "gdmt" ] && modes="${modes}d"
[ $mod == "glite" ] && modes="${modes}l"
[ $mod == "t1413" ] && modes="${modes}t"
[ $mod == "adsl2" ] && modes="${modes}2"
[ $mod == "adsl2p" ] && modes="${modes}p"
[ $mod == "annexl" ] && modes="${modes}e"
[ $mod == "annexm" ] && modes="${modes}m"
[ $mod == "vdsl2" ] && modes="${modes}v" && VDSL=1
[ $mod == "gfast" ] && modes="${modes}f" && GFAST=1
done
# VDSL Profiles
config_get profile line profile
# Capabilities
config_get_bool bitswap line bitswap 1
[ $bitswap -eq 1 ] && bitswap="on" || bitswap="off"
config_get_bool sra line sra 1
[ $sra -eq 1 ] && sra="on" || sra="off"
# config_get_bool trellis line trellis 1
config_get_bool sesdrop line sesdrop 0
[ $sesdrop -eq 1 ] && sesdrop="on" || sesdrop="off"
# VDSL2 only
config_get_bool us0 line us0 1
[ $us0 -eq 1 ] && us0="on" || us0="off"
# config_get_bool dynamicd line dynamicd 1
# config_get_bool dynamicf line dynamicf 1
config_get_bool sos line sos 0
[ $sos -eq 1 ] && sos="on" || sos="off"
config_get_bool phyReXmtUs line phyReXmtUs 0
config_get_bool phyReXmtDs line phyReXmtDs 1
phyReXmt=$(( $((phyReXmtUs<<1)) + phyReXmtDs))
if [ $VDSL -eq 1 -o $GFAST -eq 1 ]; then
echo "xdslctl start --up --mod $modes --profile "$profile" --sra $sra --bitswap $bitswap --us0 $us0 --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt"
xdslctl start --up --mod $modes --profile "$profile" --sra $sra --bitswap $bitswap --us0 $us0 --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt
# G.Fast hardware to VDSL hardware, to set the driver bit kPhyCfg2EnableGfastVdslMMTimeOut0.
# Enable V43 tone for GFAST.
echo "xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400"
xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400
else
echo "xdslctl start --up --mod $modes --sra $sra --bitswap $bitswap --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt"
xdslctl start --up --mod $modes --sra $sra --bitswap $bitswap --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt
fi
if [ $GFAST -eq 1 ]; then
# G.Fast hardware to VDSL hardware, to set the driver bit kPhyCfg2EnableGfastVdslMMTimeOut0.
# Enable V43 tone for GFAST.
echo "xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400"
xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400
fi
}
xdsl_stop() {
# echo "Stopping DSL"
# stop causes IRQ issues
# xdslctl stop
return 0
}
xdsl_init() {
[ -d /sys/class/net/dsl0/ ] || exit
prioritize_arp
echo "Starting DSL"
xtmctl start
xtmctl operate intf --state 1 enable
}

View File

@@ -1,53 +0,0 @@
# OEM specific parameters
config oem-parameters 'oem'
# option country_code "0000" # 2 bytes hex
# option vendor_id "IO" # 4 bytes string
# option vendor_suffix "0000" # 2 bytes hex
# option sw_version "iopsys" # 16 bytes string
# option serial_nr "00000000" # 32 bytes string
# DSL Modes
config dsl-line line
list mode gdmt
list mode glite
list mode t1413
list mode adsl2
list mode adsl2p
list mode annexl
list mode annexm
list mode vdsl2
# VDSL2 profiles
list profile 8a
list profile 8b
list profile 8c
list profile 8d
list profile 12a
list profile 12b
list profile 17a
list profile 30a
option bitswap 1
option sra 1
option us0 1 # VDSL2 only
option sesdrop 0
option sos 0
option phyReXmtUs 0
option phyReXmtDs 1
config atm-device atm0
option name 'ATM'
option vpi '8'
option vci '35'
option device atm0
option link_type 'eoa' # EoA, IPoA, PPPoA, CIP
option encapsulation 'llc' # llc, vcmux
option qos_class 'ubr' # ubr, cbr, gfr, vbr-nrt, vbr-rt, ubr+, abr
# option pcr '512'
# option scr '256'
# option mbs '1024'
config ptm-device ptm0
option name 'PTM'
option device 'ptm0'
option priority '1'
option portid '1'

View File

@@ -1,7 +0,0 @@
[ "$STATUS" == "up" -o "$STATUS" == "down" ] || exit 0
. /lib/functions.sh
include /lib/dsl
xtm_remove_devices
xtm_create_devices

View File

@@ -1,7 +0,0 @@
if [ "$STATUS" == "up" ]; then
ubus call led.dsl set '{"state":"ok"}'
elif [ "$STATUS" == "down" ]; then
ubus call led.dsl set '{"state":"off"}'
elif [ "$STATUS" == "training" ]; then
ubus call led.dsl set '{"state":"alert"}'
fi

View File

@@ -1,41 +0,0 @@
#!/bin/sh /etc/rc.common
. /lib/functions.sh
include /lib/dsl
START=20
USE_PROCD=1
DSLMNGR=$(which dslmngr)
start_service() {
[ -n "$DSLMNGR" ] && {
procd_open_instance
procd_set_param command "$DSLMNGR"
procd_set_param respawn
procd_close_instance
}
xdsl_configure
xtm_create_devices
}
stop_service() {
xtm_remove_devices
xdsl_stop
}
boot() {
xdsl_init
start
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger dsl
}

View File

@@ -1,47 +0,0 @@
#
# Copyright (C) 2019 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-qos
PKG_VERSION:=1.1
PKG_RELEASE:=0
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=none
include $(INCLUDE_DIR)/package.mk
define Package/easy-qos
SECTION:=net
CATEGORY:=Network
TITLE:=Easy QoS
DEPENDS:=@(TARGET_brcmbca||TARGET_airoha)
endef
define Package/easy-qos/description
This package contains Easy QoS utility
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/easy-qos/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(CP) ./files/etc/config/easy_qos $(1)/etc/config/
$(CP) ./files/etc/init.d/easy_qos.iptables $(1)/etc/init.d/easy_qos
$(CP) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
$(CP) ./files/etc/firewall.easyqos $(1)/etc/firewall.easyqos
endef
$(eval $(call BuildPackage,easy-qos))

View File

@@ -1 +0,0 @@
/etc/init.d/easy_qos reload

View File

@@ -1,140 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
log() {
echo "${@}"|logger -t easy_qos.ebtable -p debug
}
exec_log() {
${@}
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
fi
}
get_priority() {
local prio=$(echo $1|tr 'A-Z' 'a-z');
case "${prio}" in
"lowest")
echo 0;;
"low")
echo 1;;
"besteffort")
echo 2;;
"normal")
echo 3;;
"video")
echo 4;;
"medium")
echo 5;;
"high")
echo 6;;
"highest")
echo 7;;
esac
}
validate_rule_section()
{
uci_validate_section easy_qos rule "${1}" \
'priority:string' \
'macaddr:string' \
'proto:string:none' \
'port:list(uinteger)' \
'comment:string:none'
}
# Clear existing rules before applying new rules
clear_existing_rules() {
local rule=$(ebtables -t broute -L BROUTING|grep -m 1 mark)
while [ -n "${rule}" ]; do
exec_log ebtables -t broute -D BROUTING ${rule}
rule=$(ebtables -t broute -L BROUTING|grep -m 1 mark)
done
}
create_rule() {
local protocol=$1; shift
local mac=$1; shift
local mark="0x$1"; shift
local forward_port=$1;
local cmd="";
local protocol_number
cmd="-j mark --mark-or ${mark}";
if [ -n "${forward_port}" ]; then
cmd="--ip-destination-port ${forward_port} ${cmd}";
fi
case "${protocol}" in
"tcp")
protocol_number=6;;
"udp")
protocol_number=17;;
"dccp")
protocol_number=33;;
"sctp")
protocol_number=132;;
*)
log "Protocol ${protocol} not supported in ebtables"
return;;
esac
cmd="--ip-proto ${protocol_number} $cmd"
cmd="-p ip $cmd"
cmd="-s ${mac} $cmd"
exec_log ebtables -t broute -A BROUTING ${cmd}
}
manage_rule() {
local cfg="$1"
local priority macaddr proto port comment prio_num protocol
validate_rule_section "${1}" || {
log "Validation of section failed"
return 1;
}
protocol=$(echo ${proto}|tr 'A-Z' 'a-z')
prio_num=$(get_priority ${priority})
if [ -n "${macaddr}" -a -n "${prio_num}" ]; then
for p in ${port}; do
if [ "${protocol}" == "none" -o "${protocol}" == "tcpudp" ]; then
create_rule tcp ${macaddr} ${prio_num} ${p}
create_rule udp ${macaddr} ${prio_num} ${p}
else
create_rule ${protocol} ${macaddr} ${prio_num} ${p}
fi
done
# Create rule for all ports if port is not mentioned in uci
if [ -z "${port}" ]; then
if [ "${protocol}" == "none" -o "${protocol}" == "tcpudp" ]; then
create_rule tcp ${macaddr} ${prio_num}
create_rule udp ${macaddr} ${prio_num}
else
create_rule ${protocol} ${macaddr} ${prio_num}
fi
fi
fi
}
reload_service() {
# Do not apply rules if ebtables is not present in system
[ -x /usr/sbin/ebtables ] || return;
clear_existing_rules
config_load easy_qos
config_foreach manage_rule rule
}
start_service() {
reload_service
}
service_triggers() {
procd_add_reload_trigger "easy_qos"
}

View File

@@ -1,186 +0,0 @@
#!/bin/sh /etc/rc.common
. /usr/share/libubox/jshn.sh
START=99
USE_PROCD=1
CLIENT_LIST="/tmp/easy_qos_client.list"
log() {
echo "${@}"|logger -t easy_qos -p debug
}
exec_log() {
${@}
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
fi
}
get_priority() {
local prio=$(echo $1|tr 'A-Z' 'a-z');
case "${prio}" in
"lowest")
echo 0;;
"low")
echo 1;;
"besteffort")
echo 2;;
"normal")
echo 3;;
"video")
echo 4;;
"medium")
echo 5;;
"high")
echo 6;;
"highest")
echo 7;;
esac
}
clean_client_entries() {
[ -f ${CLIENT_LIST} ] && rm ${CLIENT_LIST}
}
map_client_entries() {
local clients ip mac host
json_load "$(ubus call router.network 'clients')"
json_get_keys keys
for key in ${keys};
do
json_select ${key}
json_get_vars ipaddr macaddr hostname
clients="${macaddr} ${ipaddr} ${hostname};${clients}"
json_select ..
done
json_init
# json_add_array "clients"
IFS=";"
for client in ${clients};
do
macaddr=$(echo ${client} | cut -d" " -f1)
json_add_object "${macaddr//:/_}"
json_add_string "ip" "$(echo ${client} | cut -d" " -f2)"
json_add_string "macaddr" "$(echo ${client} | cut -d" " -f1)"
json_add_string "host" "$(echo ${client} | cut -d" " -f3)"
json_close_object
done
IFS=' '
echo `json_dump` > ${CLIENT_LIST}
json_cleanup
}
# Find the IP of a corresponding mac from arp table
get_ipaddress() {
local clients ip mac host
json_load "$(cat ${CLIENT_LIST})"
json_get_keys keys
# jshn seems a bit iffy on having : in key, replace by _
json_select "${1//:/_}" 2 > /dev/null
json_get_var ip ip
echo "$ip"
}
validate_rule_section()
{
uci_validate_section easy_qos rule "${1}" \
'priority:string' \
'macaddr:string' \
'proto:string:none' \
'port:list(uinteger)' \
'comment:string:none'
}
# Clear existing rules before applying new rules
clear_existing_rules() {
local rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
while [ -n "${rule}" ]; do
exec_log iptables -t mangle ${rule}
rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
done
}
check_and_create() {
iptables -t mangle -C PREROUTING ${@} 2>/dev/null
# Create rule if not exists
if [ ${?} -ne 0 ]; then
exec_log iptables -t mangle -A PREROUTING ${@}
else
log "Rule exists for ${@}"
fi
}
create_rule() {
local proto=$1; shift
local src_ip=$1; shift
local mark="0x$1/0x$1"; shift
local ports=$1;
local cmd="";
cmd="-j MARK --set-xmark ${mark}";
if [ -n "${ports}" ]; then
cmd="--match multiport --dports ${ports} ${cmd}";
fi
if [ "${proto}" == "icmp" ]; then
cmd="-p icmp -m icmp --icmp-type 8 $cmd"
elif [ "${proto}" == "all" ]; then
cmd="-p all $cmd"
else
cmd="-p ${proto} -m ${proto} $cmd"
fi
cmd="-s ${src_ip} $cmd"
check_and_create ${cmd}
}
manage_rule() {
local cfg="$1"
local priority macaddr proto port comment prio_num ip port_list
validate_rule_section "${1}" || {
log "Validation of section failed"
return 1;
}
prio_num=$(get_priority ${priority})
ip=$(get_ipaddress ${macaddr})
port_list=$(echo ${port}|sed 's/ /,/g')
if [ -n "${ip}" -a -n "${prio_num}" ]; then
if [ "${proto}" == "none" -o "${proto}" == "tcpudp" ]; then
create_rule tcp ${ip} ${prio_num} ${port_list}
create_rule udp ${ip} ${prio_num} ${port_list}
else
create_rule ${proto} ${ip} ${prio_num} ${port_list}
fi
fi
}
reload_service() {
clear_existing_rules
map_client_entries
config_load easy_qos
config_foreach manage_rule rule
clean_client_entries
}
start_service() {
reload_service
echo "Easy QoS installed">/dev/console;
}
service_triggers() {
procd_add_reload_trigger "easy_qos"
}

View File

@@ -1,8 +0,0 @@
# Add firewall include
uci -q batch <<-EOT
delete firewall.easyqos
set firewall.easyqos=include
set firewall.easyqos.path=/etc/firewall.easyqos
set firewall.easyqos.reload=1
commit firewall
EOT

View File

@@ -1,110 +0,0 @@
# All rights reserved.
# See LICENSE for more information.
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=easy-soc-events
PKG_VERSION:=1.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/easy-soc-events.git
PKG_SOURCE_VERSION:=5c582b0165b574dc94e4865f82e0bb91fa561754
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
PKG_BUILD_DIR:=$(BUILD_DIR)/easy-soc-events-$(PKG_VERSION)
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
include $(INCLUDE_DIR)/package.mk
-include $(TOPDIR)/.config
ifneq ($(CONFIG_TARGET_brcmbca),)
LINUX_DIR=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.1
LINUX_VERSION := 4.1.52
LINUXINCLUDE=-Iarch/$(LINUX_KARCH)/mach-bcm963xx/include
BCM_BS_PROFILE := $(patsubst "%",%,$(CONFIG_BCM_KERNEL_PROFILE))
FS_DIR := $(BUILD_DIR)/bcmkernel/bcm963xx/targets/$(BCM_BS_PROFILE)/fs
MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)/extra
TARGET_MODULES_DIR:=/$(MODULES_SUBDIR)
endif
define KernelPackage/easy-soc-events/default
SUBMENU:=Other modules
endef
define KernelPackage/easy-soc-events
$(KernelPackage/easy-soc-events/default)
TITLE:=Helper module for netlink event notification
FILES:=$(PKG_BUILD_DIR)/easyevent.ko
AUTOLOAD:=$(call AutoLoad,11,easyevent)
endef
define KernelPackage/easy-soc-events-test
$(KernelPackage/easy-soc-events/default)
TITLE:=Test module for event notification through easyevent
DEPENDS+=+kmod-easy-soc-events
FILES+=$(PKG_BUILD_DIR)/test/testevent.ko
endef
define KernelPackage/easy-soc-events/description
This is a helper module to generate and pass netlink events from
kernel to user applications.
endef
#NOSTDINC_FLAGS :=
ifdef CONFIG_PACKAGE_kmod-easy-soc-events
PKG_MAKE_FLAGS += CONFIG_EASYEVENT=y
endif
LINUXINCLUDE += \
-I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/$(LINUX_UAPI_DIR) \
-Iarch/$(LINUX_KARCH)/include \
-Iarch/$(LINUX_KARCH)/include/generated \
-Iarch/$(LINUX_KARCH)/include/generated/$(LINUX_UAPI_DIR) \
-I$(LINUX_DIR)/include/generated/uapi \
-Iarch/$(LINUX_KARCH)/include/$(LINUX_UAPI_DIR) \
-include ./include/linux/kconfig.h
define Build/Prepare
$(call Build/Prepare/Default)
endef
define Build/Compile
$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) V=1 \
$(PKG_MAKE_FLAGS) \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
LINUXINCLUDE="$(LINUXINCLUDE)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
modules
endef
ifneq ($(CONFIG_TARGET_brcmbca),)
define KernelPackage/easy-soc-events/install-extra
cp $(PKG_BUILD_DIR)/easyevent.ko $(FS_DIR)/lib/modules/$(LINUX_VERSION)/extra
endef
endif
define KernelPackage/easy-soc-events/install
$(call KernelPackage/easy-soc-events/install-extra)
endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
#$(INSTALL_DIR) $(STAGING_DIR)/usr/include/linux
#$(CP) $(PKG_BUILD_DIR)/easysoc-event.h $(STAGING_DIR)/usr/include/linux/
#$(CP) $(PKG_BUILD_DIR)/easysoc-event.h $(LINUX_DIR)/include/linux/
$(CP) $(PKG_BUILD_DIR)/easyevent.h $(STAGING_DIR)/usr/include/
$(CP) $(PKG_BUILD_DIR)/wifievent.h $(STAGING_DIR)/usr/include/
$(CP) $(PKG_BUILD_DIR)/easyevent.h $(LINUX_DIR)/include/generated/uapi
$(CP) $(PKG_BUILD_DIR)/wifievent.h $(LINUX_DIR)/include/generated/uapi
endef
$(eval $(call KernelPackage,easy-soc-events-test))
$(eval $(call KernelPackage,easy-soc-events))

46
endptcfg-open/Makefile Normal file
View File

@@ -0,0 +1,46 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=endptcfg-open
PKG_VERSION:=15-06-24
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ihgsp.inteno.se/ihgsp/consumer/
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
define Package/endptcfg-open
CATEGORY:=Utilities
TITLE:=Broadcom endpoint driver configuration application pre compiled for open SDK
URL:=
endef
define Package/endptcfg-open/description
Broadcom endpoint driver configuration application pre compiled for open SDK
endef
define Package/endptcfg-open/install
mkdir -p $(1)/usr/bin/
ifeq ($(CONFIG_BCM_CHIP_ID),"63138")
$(CP) $(PKG_BUILD_DIR)/endptcfg_arm $(1)/usr/bin/endptcfg
else
$(CP) $(PKG_BUILD_DIR)/endptcfg_mips $(1)/usr/bin/endptcfg
endif
endef
$(eval $(call BuildPackage,endptcfg-open))

View File

@@ -1,53 +0,0 @@
#
# Copyright (C) 2020 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=2.1.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b81d06867d895245ef47004c6949f9d6dedd10ef
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ethmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/ethmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Ethernet status and configration utility
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_ipq53xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl
endef
define Package/ethmngr/description
This package can be used to configure and provide status about
the ethernet interfaces and ports through UBUS.
It uses APIs from the libethernet.so library.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
ifeq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_ipq53xx)$(CONFIG_TARGET_mediatek),)
define Build/Compile
endef
endif
define Package/ethmngr/install
$(CP) ./files/* $(1)/
ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_ipq53xx)$(CONFIG_TARGET_mediatek),)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
endif
endef
$(eval $(call BuildPackage,ethmngr))

View File

@@ -1,28 +0,0 @@
#!/bin/sh /etc/rc.common
START=15
STOP=90
USE_PROCD=1
PROG=/usr/sbin/ethmngr
. /lib/functions.sh
include /lib/ethernet
start_service() {
if [ -f $PROG ]; then
procd_open_instance
procd_set_param command ${PROG}
procd_set_param respawn
procd_close_instance
fi
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger network
}

View File

@@ -1,61 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=fatrace
PKG_VERSION:=0.12
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=98af6019a4a1b478a6fa35f74528cb3cd404ae40
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.launchpad.net/fatrace
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE
# support parallel build
#PKG_BUILD_PARALLEL:=1
#re create configure scripts if not present.
#PKG_FIXUP:=autoreconf
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
# this way we don't need to pick out the resulting files from the build dir.
PKG_INSTALL:=1
PKG_CONFIG_DEPENDS := CONFIG_KERNEL_FANOTIFY
include $(INCLUDE_DIR)/package.mk
define Package/fatrace
CATEGORY:=Utilities
TITLE:=Report system wide file access events
URL:=
DEPENDS := +@KERNEL_FANOTIFY
endef
define Package/fatrace/description
Report system wide file access events.
endef
MAKE_INSTALL_FLAGS += PREFIX="/"
define Package/fatrace/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/fatrace $(1)/sbin/
# $(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,fatrace))

View File

@@ -1,14 +0,0 @@
diff --git a/fatrace.c b/fatrace.c
index 1c0899a..b7d1560 100644
--- a/fatrace.c
+++ b/fatrace.c
@@ -44,7 +44,8 @@
* http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1e2ee49f7
* O_LARGEFILE is usually 0, so hardcode it here
*/
-#define KERNEL_O_LARGEFILE 00100000
+//#define KERNEL_O_LARGEFILE 00100000
+#define KERNEL_O_LARGEFILE O_LARGEFILE
/* command line options */
static char* option_output = NULL;

View File

@@ -1,12 +0,0 @@
diff --git a/fatrace.c b/fatrace.c
index b7d1560..6179272 100644
--- a/fatrace.c
+++ b/fatrace.c
@@ -149,6 +149,7 @@ print_event(const struct fanotify_event_metadata *data,
printf ("%li.%06li ", event_time->tv_sec, event_time->tv_usec);
}
printf ("%s(%i): %s %s\n", procname, data->pid, mask2str (data->mask), pathname);
+ fflush(stdout);
}
/**

View File

@@ -1,48 +0,0 @@
#
# Copyright (C) 2021 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fdtextract
PKG_RELEASE:=1
PKG_VERSION:=1.0
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/fdtextract.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e3cefda3b26c9aea3021b20725ce7b31b33eebc4
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=fdtextract
DEPENDS:= +libfdt
endef
define Package/$(PKG_NAME)/description
Command to extract sub images from FIT images.
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fdtextract $(1)/usr/sbin/
$(STRIP) $(1)/usr/sbin/fdtextract
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,42 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-only
include $(TOPDIR)/rules.mk
PKG_NAME:=fscryptctl
PKG_VERSION:=1.1.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/google/fscryptctl.git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Encryption
TITLE:=Fscryptctl
endef
define Package/$(PKG_NAME)/description
fscryptctl is a low-level tool written in C that handles raw keys and manages policies for Linux filesystem encryption,
specifically the "fscrypt" kernel interface which is supported by the ext4, f2fs, and UBIFS filesystems
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
fscryptctl
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fscryptctl $(1)/usr/bin/fscryptctl
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,66 +0,0 @@
# Copyright (c) 2017 Genexis B.V.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# 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., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=gryphon-led-kernel-module
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define KernelPackage/$(PKG_NAME)
SUBMENU:=LED modules
TITLE:=LED driver for Gryphon
FILES:=$(PKG_BUILD_DIR)/$(PKG_NAME).$(LINUX_KMOD_SUFFIX)
KCONFIG:=CONFIG_PACKAGE_kmod-gryphon-led-kernel-module=y
AUTOLOAD:=$(call AutoLoad,60,$(PKG_NAME))
DEPENDS:= +(TARGET_brcmbca):bcmkernel
PKG_LICENSE:=GPLv2
PKG_LICENSE_URL:=
endef
define KernelPackage/$(PKG_NAME)/description
This package contains the LED driver for Gryphon devices.
endef
EXTRA_KCONFIG:= CONFIG_RGB_LED=m
MODULE_INCLUDE=-I$(PKG_BUILD_DIR)
# support compilation against BCM SDK kernel
include ../../broadcom/bcmkernel/bcm-kernel-toolchain.mk
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)/kdevlinks/
$(CP) -s `pwd`/src/* $(PKG_BUILD_DIR)/kdevlinks/
$(CP) src/* $(PKG_BUILD_DIR)
endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="-DKERNEL_MODULE $(BUILDFLAGS) -I$(LINUX_DIR)/include -include generated/autoconf.h $(MODULE_INCLUDE)" \
modules
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
endef
$(eval $(call KernelPackage,$(PKG_NAME)))

View File

@@ -1,26 +0,0 @@
# Copyright (c) 2017 Genexis B.V.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# 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., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
MODULE_NAME = gryphon-led-kernel-module
obj-m := $(MODULE_NAME).o
GENEXIS_FILES= \
main.o \
sk9822.o \
sk9822_bitbang.o
$(MODULE_NAME)-objs := $(GENEXIS_FILES)

View File

@@ -1,330 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#define DEBUG 1
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/printk.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/gpio/consumer.h>
#include <linux/of.h>
#include <linux/version.h>
#include "sk9822.h"
#define DRIVER_NAME "canyon_led"
#define DRIVER_AUTHOR "Genexis B.V."
#define DRIVER_DESC "Canyon LED driver for SK9822"
#define DRIVER_VERSION "1"
/**
* sysfs interfaces
*/
static ssize_t get_led_color(struct device *dev,
struct device_attribute *attr, char *buf)
{
int len;
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
if (IS_ERR(sk9822)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -EIO;
}
len = scnprintf(buf, PAGE_SIZE, "%02x%02x%02x\n", sk9822->led_colors[0].r, sk9822->led_colors[0].g, sk9822->led_colors[0].b);
if (len <= 0) {
dev_err(dev, "sk9822: Invalid sprintf len: %d\n", len);
return -EIO;
}
return len;
}
/**
* @brief Set complete LED strip to a specific color
* @retval count number of bytes written
* @retval -EMSGSIZE if the message is too big
* @retval -EIO for all other errors (e.g. leds cannot be configured)
*/
static ssize_t set_led_color(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
size_t buflen = count;
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
if (IS_ERR(sk9822)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -EIO;
}
/* strip newline */
if ((count > 0) && (buf[count-1] == '\n')) {
buflen--;
}
if (buflen != 6) { // RRGGBB\0
return -EMSGSIZE;
}
// Update the LED array here
ret = sk9822_set_color_str(sk9822, buf);
if (ret != 0) {
printk(KERN_ERR "Failed to set led color\n");
return -EIO;
}
// Now push to the HW
ret = sk9822_update(sk9822);
if (ret != 0) {
printk(KERN_ERR "Failed to update led\n");
return -EIO;
}
return count;
}
static DEVICE_ATTR(led_color, S_IRUGO | S_IWUSR, get_led_color, set_led_color);
static ssize_t get_led_brightness(struct device *dev,
struct device_attribute *attr, char *buf)
{
int len;
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
if (IS_ERR(sk9822)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -EIO;
}
len = scnprintf(buf, PAGE_SIZE, "%x\n", sk9822->led_brightness);
if (len <= 0) {
dev_err(dev, "sk9822: Invalid sprintf len: %d\n", len);
return -EIO;
}
return len;
}
/**
* @brief Set LED brightness
* @retval count number of bytes written
* @retval -EINVAL if the message is not a valid hexadecimal number
* @retval -EIO for all other errors (e.g. leds cannot be configured)
*/
static ssize_t set_led_brightness(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
unsigned long val = SK9822_DEFAULT_BRIGHTNESS;
if (IS_ERR(sk9822)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -EIO;
}
if (kstrtoul(buf, 16, &val)) {
return -EINVAL;
}
if(val > SK9822_DEFAULT_BRIGHTNESS) {
val = SK9822_DEFAULT_BRIGHTNESS;
}
sk9822->led_brightness = (uint8_t)val;
// Now push to the HW
ret = sk9822_update(sk9822);
if (ret != 0) {
printk(KERN_ERR "Failed to update led\n");
return -EIO;
}
return count;
}
static DEVICE_ATTR(led_brightness, S_IRUGO | S_IWUSR, get_led_brightness, set_led_brightness);
static struct attribute *sk9822_dev_attrs[] = {
&dev_attr_led_color.attr,
&dev_attr_led_brightness.attr,
NULL
};
static struct attribute_group sk9822_dev_attr_group = {
.name = "sk9822",
.attrs = sk9822_dev_attrs,
};
/**
* device prope and removal
*/
static int canyon_led_probe(struct platform_device *pdev)
{
int ret;
struct sk9822_leds *leds;
leds = devm_kzalloc(&pdev->dev, sizeof(*leds), GFP_KERNEL);
if (!leds) {
return -ENOMEM;
}
leds->dev = &pdev->dev;
leds->led_brightness = SK9822_DEFAULT_BRIGHTNESS;
ret = of_property_read_u16(pdev->dev.of_node, "led-count", &leds->led_count);
if (ret < 0) {
dev_warn(&pdev->dev, "Could not read led-count property\n");
leds->led_count = SK9822_DEFAULT_NUM_LEDS;
} else {
printk(KERN_INFO "Got led count: %u\n", leds->led_count);
}
leds->led_colors = devm_kzalloc(&pdev->dev,
(sizeof(cRGB) * leds->led_count), GFP_KERNEL);
if (!leds->led_colors) {
return -ENOMEM;
}
platform_set_drvdata(pdev, leds);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
leds->clock_gpio = gpiod_get_index(&pdev->dev, "led", 0);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
leds->clock_gpio = gpiod_get_index(&pdev->dev, "led", 0, GPIOD_OUT_HIGH);
#else
dev_warn(&pdev->dev, "Kernel version Not supported\n");
exit(1);
#endif
if (IS_ERR(leds->clock_gpio)) {
dev_err(&pdev->dev, "Failed to acquire clock GPIO %ld\n",
PTR_ERR(leds->clock_gpio));
return PTR_ERR(leds->clock_gpio);
}
gpiod_direction_output(leds->clock_gpio, 1);
if (IS_ERR(leds->clock_gpio)) {
dev_err(&pdev->dev, "Failed to acquire clock GPIO %ld\n",
PTR_ERR(leds->clock_gpio));
return PTR_ERR(leds->clock_gpio);
} else {
printk(KERN_INFO "Got clock gpio\n");
gpiod_set_value(leds->clock_gpio, 0);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
leds->data_gpio = gpiod_get_index(&pdev->dev, "led", 1);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
leds->data_gpio = gpiod_get_index(&pdev->dev, "led", 1, GPIOD_OUT_HIGH);
#else
dev_warn(&pdev->dev, "Kernel version Not supported\n");
exit(1);
#endif
if (IS_ERR(leds->data_gpio)) {
dev_err(&pdev->dev, "Failed to acquire data GPIO %ld\n",
PTR_ERR(leds->data_gpio));
return PTR_ERR(leds->data_gpio);
}
gpiod_direction_output(leds->data_gpio, 1);
if (IS_ERR(leds->data_gpio)) {
dev_err(&pdev->dev, "Failed to acquire data GPIO %ld\n",
PTR_ERR(leds->data_gpio));
return PTR_ERR(leds->data_gpio);
} else {
printk(KERN_INFO "Got data gpio\n");
gpiod_set_value(leds->data_gpio, 0);
}
printk(KERN_INFO "Attempt to set filefs stuff\n");
ret = sysfs_create_group(&pdev->dev.kobj, &sk9822_dev_attr_group);
if (ret) {
dev_err(&pdev->dev, "sysfs creation failed\n");
return ret;
}
#if 0
printk(KERN_INFO "Flash LEDs to verify they work\n");
sk9822_set_color_str(leds, "00FF00");
sk9822_update(leds);
msleep(200);
sk9822_set_color_str(leds, "000000");
sk9822_update(leds);
#endif
printk(KERN_INFO "canyon led successfully probed\n");
return 0;
}
static int canyon_led_remove(struct platform_device *pdev)
{
struct sk9822_leds *leds;
sysfs_remove_group(&pdev->dev.kobj, &sk9822_dev_attr_group);
leds = platform_get_drvdata(pdev);
if (IS_ERR(leds)) {
printk(KERN_ERR "Platform get drvdata returned NULL\n");
return -1;
}
if (leds->clock_gpio) {
gpiod_put(leds->clock_gpio);
}
if (leds->data_gpio) {
gpiod_put(leds->data_gpio);
}
printk(KERN_NOTICE "Bye, bye\n");
return 0;
}
/**
* platform driver metadata
*/
static const struct of_device_id canyon_led_of_ids[] = {
{ .compatible = "canyon,led" },
{ }
};
static struct platform_driver canyon_led = {
.probe = &canyon_led_probe,
.remove = &canyon_led_remove,
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
.of_match_table = canyon_led_of_ids,
},
};
MODULE_DEVICE_TABLE(of, canyon_led_of_ids);
module_platform_driver(canyon_led);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_VERSION(DRIVER_VERSION);
MODULE_LICENSE("GPL");

View File

@@ -1,82 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#include <linux/kernel.h>
#include <linux/types.h>
#include "sk9822.h"
#include "sk9822_bitbang.h"
cRGB __hexs_to_rgb(const char *hex)
{
cRGB rgb;
int r, g, b;
sscanf(hex, "%02x%02x%02x", &r, &g, &b);
// This needs sanity checking
rgb.r = r;
rgb.g = g;
rgb.b = b;
return rgb;
}
/**
* @brief update the color over the given device struct to the provided HEX color
*/
int sk9822_set_color_str(struct sk9822_leds *sk9822, const char *hex)
{
int i;
cRGB color = __hexs_to_rgb(hex);
for (i = 0; i < sk9822->led_count; i++) {
sk9822->led_colors[i] = color;
}
return 0;
}
/**
* @brief write device struct to the device
*/
int sk9822_update(struct sk9822_leds *sk9822)
{
uint16_t i;
uint16_t led_count = sk9822->led_count;
// Start Frame
sk9822_bb_write(sk9822, 0x00);
sk9822_bb_write(sk9822, 0x00);
sk9822_bb_write(sk9822, 0x00);
sk9822_bb_write(sk9822, 0x00);
for (i = 0; i < led_count; i++) {
cRGB *p = &sk9822->led_colors[i];
sk9822_bb_write(sk9822, 0xe0+sk9822->led_brightness); // Maximum global brightness
sk9822_bb_write(sk9822, p->b);
sk9822_bb_write(sk9822, p->g);
sk9822_bb_write(sk9822, p->r);
}
// End frame
sk9822_bb_write(sk9822, 0xff);
sk9822_bb_write(sk9822, 0xff);
sk9822_bb_write(sk9822, 0xff);
sk9822_bb_write(sk9822, 0xff);
return 0;
}

View File

@@ -1,46 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef SK9822_H_
#define SK9822_H_
#include <linux/types.h>
#define SK9822_DEFAULT_NUM_LEDS 32 // U16, used if DT param fails
#define SK9822_DEFAULT_BRIGHTNESS 15 // 5-bit brightness, 0-31
typedef struct {
uint8_t b;
uint8_t g;
uint8_t r;
} cRGB; // BGR (SK9822 Standard)
struct sk9822_leds {
struct device *dev;
struct gpio_desc *clock_gpio;
struct gpio_desc *data_gpio;
cRGB *led_colors;
uint8_t led_brightness;
uint16_t led_count;
};
int sk9822_set_color_str(struct sk9822_leds *sk9822, const char *hex);
int sk9822_update(struct sk9822_leds *sk9822);
#endif /* SK9822_H_ */

View File

@@ -1,48 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <linux/types.h>
#include "sk9822.h"
/**
* @brief Bitbang write operation CLOCK+DATA
*
* Assumed state before call: CLOCK- Low, DATA- High
*/
void sk9822_bb_write(struct sk9822_leds *sk9822, uint8_t c)
{
uint8_t i;
for (i = 0; i < 8 ; i++) {
if (!(c&0x80)) {
gpiod_set_value(sk9822->data_gpio, 0); // set data low
} else {
gpiod_set_value(sk9822->data_gpio, 1); // set data high
}
gpiod_set_value(sk9822->clock_gpio, 1); // set clock high, data sampled here
c <<= 1;
udelay(1); // stretch clock
gpiod_set_value(sk9822->clock_gpio, 0); // set clock low
}
// State after call: SCK Low, Data high
}

View File

@@ -1,28 +0,0 @@
/*
* Copyright (c) 2017 Genexis B.V.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef _SK9822_BB_H_
#define _SK9822_BB_H_
#include <linux/types.h>
#include "sk9822.h"
void sk9822_bb_write(struct sk9822_leds *sk9822, uint8_t c);
#endif /* _SK9822_BB_H_ */

View File

@@ -1,15 +0,0 @@
if (PACKAGE_hostmngr)
menu "Configuration"
config HOSTMNGR_HOSTS_HISTORY
bool "Keep history of hosts"
default y
config HOSTMNGR_PLATFORM_HAS_WIFI
bool "Platform has WiFi"
default y if PACKAGE_libwifi
endmenu
endif

View File

@@ -1,76 +0,0 @@
#
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.1.4
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=edb5bbe57c5bc83035e217c73071c9b3e878dc22
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/hostmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Show and manage hosts in the network
DEPENDS= +libubox +libuci +libubus +ubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +libnfnetlink +libmnl \
+libnetfilter-conntrack \
+HOSTMNGR_PLATFORM_HAS_WIFI:libwifi +libbbfdm-api
endef
define Package/hostmngr/config
source "$(SOURCE)/Config.in"
endef
define Package/hostmngr/description
This package provides hostmngr that can detect and show host devices
present in the network.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-I$(STAGING_DIR)/usr/include/libnetfilter_conntrack \
-D_GNU_SOURCE
ifeq ($(CONFIG_HOSTMNGR_PLATFORM_HAS_WIFI),y)
TARGET_CFLAGS += -DHAS_WIFI
endif
MAKE_PATH:=src
define Package/hostmngr/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/hostmngr/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/hostmngr $(1)/usr/sbin/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1)/etc/hostmngr/
$(INSTALL_DATA) ./files/etc/hostmngr/input.json $(1)/etc/hostmngr/
$(INSTALL_DIR) $(1)/usr/share/hostmngr
$(INSTALL_DATA) ./files/scripts/hosts_acl.sh $(1)/usr/share/hostmngr/
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/hostmngr/ $(PKG_BUILD_DIR)/
endef
endif
$(eval $(call BuildPackage,hostmngr))

View File

@@ -1,9 +0,0 @@
config global 'global'
option enabled '1'
option history '1'
option history_file '/etc/hosts_history.json'
option history_timeout '86400'
config interface
list ifname 'br-lan'

View File

@@ -1,3 +0,0 @@
#!/bin/sh
sh /usr/share/hostmngr/hosts_acl.sh

View File

@@ -1,16 +0,0 @@
{
"daemon": {
"input": {
"type": "DotSo",
"name": "/etc/hostmngr/libhostmngr.so"
},
"output": {
"type": "UBUS",
"name": "bbfdm.hosts",
"parent_dm": "Device.",
"object": "Hosts",
"root_obj": "bbfdm"
}
}
}

View File

@@ -1,33 +0,0 @@
#!/bin/sh /etc/rc.common
START=65
STOP=20
. /etc/bbfdm/bbfdm_services.sh
USE_PROCD=1
HOSTS_JSON_INPUT="/etc/hostmngr/input.json"
start_service() {
procd_open_instance
procd_set_param command "/usr/sbin/hostmngr" "--config hosts" "-o" "/tmp/hostmngr.log" "-f"
# procd_set_param respawn
procd_set_param limits core="unlimited"
# procd_set_param stdout 1
# procd_set_param stderr 1
procd_close_instance
bbfdm_add_service "bbfdm.hosts" "${HOSTS_JSON_INPUT}"
sh /usr/share/hostmngr/hosts_acl.sh
}
service_triggers()
{
procd_add_reload_trigger "hosts"
}
reload_service() {
stop
start
}

View File

@@ -1,12 +0,0 @@
#!/bin/sh
if [ -f /etc/firewall.hosts ]; then
uci -q get firewall.hosts || {
uci -q set firewall.hosts=include
uci -q set firewall.hosts.path="/etc/firewall.hosts"
uci -q set firewall.hosts.reload=1
}
fi
exit 0

View File

@@ -1,23 +0,0 @@
#!/bin/sh
uci -q get hosts.global.ageing_timer || exit 0
# Old hosts UCI config is detected; Convert to new format
ageing_timer="$(uci -q get hosts.global.ageing_timer)"
history_timeout=$((ageing_timer*60))
uci -q set hosts.global.enabled=1
uci -q delete hosts.global.ageing_timer
uci -q set hosts.global.history_timeout="$history_timeout"
uci -q rename hosts.global.reboot_persistent=history
uci -q set hosts.global.history_file="/etc/hosts_history.json"
uci -q add hosts interface
for ifname in $(uci -q get hosts.global.ifname); do
uci -q add_list hosts.@interface[-1].ifname="$ifname"
done
uci -q delete hosts.global.ifname
exit 0

View File

@@ -1,233 +0,0 @@
#!/bin/sh
. /lib/functions.sh
day=""
next_days=""
prev_days=""
IP_RULE=""
IP_RULE1=""
get_next_day() {
local weekday="$1"
case "$weekday" in
"Mon"|"Monday") echo "Tuesday"
;;
"Tue"|"Tuesday") echo "Wednesday"
;;
"Wed"|"Wednesday") echo "Thursday"
;;
"Thu"|"Thursday") echo "Friday"
;;
"Fri"|"Friday") echo "Saturday"
;;
"Sat"|"Saturday") echo "Sunday"
;;
"Sun"|"Sunday") echo "Monday"
;;
esac
}
get_previous_day() {
local weekday="$1"
case "$weekday" in
"Mon"|"Monday") echo "Sunday"
;;
"Tue"|"Tuesday") echo "Monday"
;;
"Wed"|"Wednesday") echo "Tuesday"
;;
"Thu"|"Thursday") echo "Wednesday"
;;
"Fri"|"Friday") echo "Thursday"
;;
"Sat"|"Saturday") echo "Friday"
;;
"Sun"|"Sunday") echo "Saturday"
;;
esac
}
ip_rule_west_zone() {
local utc_start_t_h="$1"
local utc_stop_t_h="$2"
local local_start_t_h="$3"
local local_stop_t_h="$4"
local utc_start_time="$5"
local utc_stop_time="$6"
if [ "$utc_start_t_h" -lt "$local_start_t_h" ]; then
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop $utc_stop_time"
if [ -n "$next_days" ]; then
IP_RULE="$IP_RULE --weekdays $next_days"
fi
else
if [ "$utc_stop_t_h" -lt "$local_stop_t_h" ]; then
IP_RULE1="$IP_RULE"
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop 23:59"
IP_RULE1="$IP_RULE1 -m time --timestart 00:00 --timestop $utc_stop_time"
if [ -n "$next_days" ]; then
IP_RULE1="$IP_RULE1 --weekdays $next_days"
fi
else
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop $utc_stop_time"
fi
if [ -n "$day" ]; then
IP_RULE="$IP_RULE --weekdays $day"
fi
fi
}
ip_rule_east_zone() {
local utc_start_t_h="$1"
local utc_stop_t_h="$2"
local local_start_t_h="$3"
local local_stop_t_h="$4"
local utc_start_time="$5"
local utc_stop_time="$6"
if [ "$utc_start_t_h" -lt "$local_start_t_h" ]; then
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop $utc_stop_time"
if [ -n "$day" ]; then
IP_RULE="$IP_RULE --weekdays $day"
fi
else
if [ "$utc_stop_t_h" -lt "$local_stop_t_h" ]; then
IP_RULE1="$IP_RULE"
IP_RULE="$IP_RULE -m time --timestart 00:00 --timestop $utc_stop_time"
IP_RULE1="$IP_RULE1 -m time --timestart $utc_start_time --timestop 23:59"
if [ -n "$prev_days" ]; then
IP_RULE1="$IP_RULE1 --weekdays $prev_days"
fi
else
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop $utc_stop_time"
fi
if [ -n "$day" ]; then
IP_RULE="$IP_RULE --weekdays $day"
fi
fi
}
process_ac_schedule() {
local acs_id="$1"
local is_enabled
local access_control
local start_time=""
local mac=""
handle_day_list() {
local value=$1
val=$(echo $value | cut -c 1-3)
next_day_val=$(get_next_day $val)
prev_day_val=$(get_previous_day $val)
if [ -z $day ]; then
day="$val"
next_days="$next_day_val"
prev_days="$prev_day_val"
else
day="$day,$val"
next_days="$next_days,$next_day_val"
prev_days="$prev_days,$prev_day_val"
fi
}
config_list_foreach "$acs_id" "day" handle_day_list
config_get is_enabled "$acs_id" "enable" 1
config_get access_control "$acs_id" "dm_parent"
if [ "$is_enabled" == "0" ] || [ -z "$access_control" ]; then
return
fi
IP_RULE=""
IP_RULE1=""
config_get is_enabled "$access_control" "enable" 1
if [ "$is_enabled" == "0" ]; then
return
fi
mac=$(uci -q get hosts.$access_control.macaddr)
access_policy=$(uci -q get hosts.$access_control.access_policy)
config_get start_time "$acs_id" "start_time"
config_get duration "$acs_id" "duration"
if [ -z "$mac" ] && [ -z "$start_time" ] && [ -z "$duration" ] && [ -z "$day" ] && [ -z "$access_policy" ]; then
return
fi
if [ -n "$mac" ]; then
IP_RULE="$IP_RULE -m mac --mac-source $mac"
fi
zone=$(date +%z | cut -c 1)
local_start_time=$start_time
if [ -n "$duration" ]; then
hh=$(echo $local_start_time | awk -F: '{ print $1 }')
mm=$(echo $local_start_time | awk -F: '{ print $2 }')
hh_s=`expr $hh \* 3600`
mm_s=`expr $mm \* 60`
ss=$(( hh_s + mm_s ))
local_start_hh=$hh
stop_ss=$(( ss + duration ))
hh=$(( stop_ss / 3600 ))
rem_ss=$(( stop_ss % 3600 ))
mm=$(( rem_ss / 60 ))
ss=$(( rem_ss % 60 ))
local_stop_time="$hh:$mm:$ss"
local_stop_hh=$hh
fi
utc_start_time=$(date -u -d @$(date "+%s" -d "$local_start_time") +%H:%M)
utc_stop_time=$(date -u -d @$(date "+%s" -d "$local_stop_time") +%H:%M)
utc_start_hh=$(echo $utc_start_time | awk -F: '{ print $1 }')
utc_stop_hh=$(echo $utc_stop_time | awk -F: '{ print $1 }')
if [ "$zone" == "-" ]; then
ip_rule_west_zone $utc_start_hh $utc_stop_hh $local_start_hh $local_stop_hh $utc_start_time $utc_stop_time
else
ip_rule_east_zone $utc_start_hh $utc_stop_hh $local_start_hh $local_stop_hh $utc_start_time $utc_stop_time
fi
if [ "$access_policy" == "Deny" ]; then
IP_RULE="$IP_RULE -j DROP"
if [ -n "$IP_RULE1" ]; then
IP_RULE1="$IP_RULE1 -j DROP"
fi
else
IP_RULE="$IP_RULE -j ACCEPT"
if [ -n "$IP_RULE1" ]; then
IP_RULE1="$IP_RULE1 -j ACCEPT"
fi
fi
iptables -w -A hosts_forward ${IP_RULE}
ip6tables -w -A hosts_forward ${IP_RULE}
if [ -n "$IP_RULE1" ]; then
iptables -w -A hosts_forward ${IP_RULE1}
ip6tables -w -A hosts_forward ${IP_RULE1}
fi
day=""
next_days=""
prev_days=""
}
iptables -w -F hosts_forward
ip6tables -w -F hosts_forward
hosts_forward=$(iptables -t filter --list | grep hosts_forward)
if [ -z "$hosts_forward" ]; then
iptables -w -t filter -N hosts_forward
ret=$?
[ $ret -eq 0 ] && iptables -w -t filter -I FORWARD -j hosts_forward
ip6tables -w -t filter -N hosts_forward
ret=$?
[ $ret -eq 0 ] && ip6tables -w -t filter -I FORWARD -j hosts_forward
fi
# Load /etc/config/hosts UCI file
config_load hosts
config_foreach process_ac_schedule ac_schedule

Some files were not shown because too many files have changed in this diff Show More