Compare commits

...

140 Commits

Author SHA1 Message Date
Fredrik Åsberg
21f81a918f Merge branch 'fredrik_uci-diff' of public.inteno.se:feed-inteno-packages into fredrik_uci-diff 2016-07-01 14:22:23 +02:00
Fredrik Åsberg
c5048d8ea3 uci-diff: update 2016-07-01 14:01:01 +02:00
Fredrik Åsberg
33580c651a uci-diff: Makefile 2016-06-21 16:29:13 +02:00
Fredrik Åsberg
a7b955d5dc uci-diff: Makefile 2016-06-21 15:40:28 +02:00
Fredrik Åsberg
67f627bce9 Also build uci-diff before building iopsys. 2016-06-21 13:30:16 +02:00
Fredrik Åsberg
cb1cd287e2 uci-diff: update 2016-06-16 14:47:32 +02:00
Fredrik Åsberg
4c4ceacd10 uci-diff: fix library 2016-06-15 17:07:00 +02:00
Fredrik Åsberg
fc7df2af6d uci-diff: added 2016-06-15 13:24:03 +02:00
Sukru Senli
379c5677a4 iop: deselect nonexisting juci plugin 2016-06-15 11:12:31 +02:00
Ronny Nilsson
52f8ff2b5d Fix for dect unpair and re-pair with voice. refs #9463 2016-06-14 16:37:15 +02:00
Sukru Senli
57f9214964 asterisk: cdr module depends on libsqlite3 2016-06-14 16:20:43 +02:00
Ronny Nilsson
c41ccdaf89 Update feed [ feed_inteno_packages ] package [ asterisk18-mod ]
Debug printouts

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
2016-06-14 15:24:53 +02:00
Ronny Nilsson
5566c4b885 New wrapper script for dectmngr2 which reloads kernel module when necessary 2016-06-14 15:24:49 +02:00
Sukru Senli
e484e5ba8d iop: select ntfs-3g by default 2016-06-14 15:23:11 +02:00
Reidar Cederqvist
27959db5d6 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 6ad4d1e made enough space for the time to fixe logs in arm
-------------------------------------------------------------------------------
commit 6ad4d1ec64e17889ef5be674329234f948137837
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-06-14 12:05:14 +0200

    made enough space for the time to fixe logs in arm

Base directory -> /
 questd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-06-14 12:16:58 +02:00
Sukru Senli
0379fefdd5 iop: for now do not select ntfs-3g package 2016-06-13 17:57:28 +02:00
Reidar Cederqvist
a016f2f4ba Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* df6cbd5 added linkspeed call to router object
-------------------------------------------------------------------------------
commit df6cbd5cfc7fd324b98ec557f80d506a3220638e
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-06-13 14:41:42 +0200

    added linkspeed call to router object

Base directory -> /
 port.c   |  7 +++++--
 questd.c | 32 ++++++++++++++++++++++++++++++++
 questd.h |  2 +-
 tools.c  |  1 +
 4 files changed, 39 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2016-06-13 16:47:35 +02:00
Sukru Senli
42650be9ea icwmp: no need to depend on openssl; already depending on libopenssl 2016-06-13 16:44:21 +02:00
Sukru Senli
07292dd5cf iup: merget iup224 into iup script 2016-06-13 16:39:05 +02:00
Kenneth Johansson
b6d5ff232d icwmp: fix dependency. 2016-06-13 15:52:02 +02:00
Sukru Senli
33498543d8 iop: select mobiel support related packages 2016-06-13 13:42:22 +02:00
Sukru Senli
3bcfcdaa1e questd: do not install ueventd 2016-06-13 12:56:17 +02:00
Sukru Senli
523682006f 4g-support: send hotplug.usb events with dongle details 2016-06-10 17:30:34 +02:00
Reidar Cederqvist
cd640462c1 updated questd to have more client information in ports call and
set the device as the object name insted of name
2016-06-10 17:27:30 +02:00
Sukru Senli
97201fc0b9 iop: do not select luci-app-catv by default in luci.diff profile 2016-06-09 17:38:31 +02:00
Sukru Senli
5251859485 icwmp: depends on curl 2016-06-09 17:28:55 +02:00
Sukru Senli
9ddba9536f iop: remove uhttpd if profile is luci 2016-06-09 17:23:06 +02:00
Sukru Senli
23dea02d7b iop: genconfig applies luci profile correctly 2016-06-09 16:02:51 +02:00
Sukru Senli
ee521f9609 iop: select icwmp package 2016-06-09 11:58:01 +02:00
Sukru Senli
f788ac8368 icwmp: depend on openssl and bcmkernel to get required libraries 2016-06-09 11:56:05 +02:00
Mats Karrman
adcd3bca40 libcgroup: Reenable package in master config 2016-06-08 16:05:24 +02:00
Mats Karrman
315e29d78f libcgroup: Add missing dependency on librt 2016-06-08 15:49:44 +02:00
Sukru Senli
9ac0c35f4f layer2interface: set xtm qos weight to 1 2016-06-08 15:13:29 +02:00
Sukru Senli
fc74862f11 samba3: add mising files 2016-06-08 14:27:35 +02:00
Jonas Höglund
085d43c3a4 Add samba3 to feed_inteno_packages 2016-06-08 13:14:51 +02:00
Sukru Senli
72738752d9 install libwebsockets from feed_inteno_juci 2016-06-08 10:13:47 +02:00
Kenneth Johansson
6ed8c8527b Move setup_host to iop.
it needs to be present early.
2016-06-07 17:45:19 +02:00
Kenneth Johansson
b5003a80e1 setup_host: silence check for gcc5. 2016-06-07 16:06:24 +02:00
Kenneth Johansson
58bd42f827 Allow gcc5 to be used. 2016-06-07 15:54:51 +02:00
Sukru Senli
a2b9e5d674 specificly select iptables and some used modules 2016-06-07 15:04:36 +02:00
Mats Karrman
b5be4d7dd6 setup_host: Fix bugs in iop completion install, refs #9457 2016-06-07 11:53:36 +02:00
Mats Karrman
5a46f910df setup_host: Install bash completion for iop utility, refs #9457 2016-06-07 11:40:40 +02:00
Mats Karrman
5da8017639 Add bash completion script for iop utility, refs #9457 2016-06-07 11:36:00 +02:00
Jonas Höglund
bf2b51bd82 Remove unused tmpdir 2016-06-07 11:04:54 +02:00
Sukru Senli
adc94ff3a5 3.0-2016-06-02 2016-06-02 16:05:22 +02:00
Jonas Höglund
b1ce1a9b13 Added extract_core to iop 2016-06-02 09:40:34 +02:00
Kenneth Johansson
7bb3854889 setup_host: prep for restoring distro default gcc.
can activate this yet as build still fails with gcc-5.
2016-06-01 20:48:58 +02:00
Sukru Senli
adad2c8a75 updated questd 2016-06-01 17:30:05 +02:00
Sukru Senli
47b1d90487 questd-3.1.6 2016-06-01 17:02:07 +02:00
Kenneth Johansson
1bd79f9e7e setup_host: gcc check did not actually work.
check was not testing for current gcc version at all only that 4.8
was installed but that is not enough.
2016-06-01 16:32:04 +02:00
Kenneth Johansson
4fa973ad54 setup_host: Add sudo to commands that needs root. 2016-06-01 15:49:55 +02:00
Kenneth Johansson
1967f8895e setup_host: only install things that is not already installed. 2016-06-01 15:35:55 +02:00
Jonas Höglund
3c674b984c New defconfig syntax in customer configs 2016-06-01 14:37:24 +02:00
Jonas Höglund
aef3f9421e icwmp-curl does not build on cc 2016-06-01 13:21:05 +02:00
Sukru Senli
c103a267ff add mtd-utils-deubunize to config 2016-06-01 11:57:29 +02:00
Jonas Höglund
9be82ab295 Disable signed packages 2016-06-01 11:57:29 +02:00
Jonas Höglund
fb3ac14e5f Remove libcgroup due to missing depencency 2016-06-01 11:57:29 +02:00
Jonas Höglund
edf1d929d0 Allow Broadcom to override taskset 2016-06-01 11:56:30 +02:00
Jonas Höglund
fc3e9d0418 Remove packages provided by ubi-utils 2016-06-01 11:56:30 +02:00
Jonas Höglund
c39aca40fa Deselect ppp since we are selecting ppp-multilink 2016-06-01 11:56:30 +02:00
Jonas Höglund
a32f730626 Don't build jffs2 fs for NOR 2016-06-01 11:56:30 +02:00
Jonas Höglund
e498e91cde Disable ffmpeg due to broken flac package 2016-06-01 11:56:30 +02:00
Jonas Höglund
d5d0f963fb Delete chan-mobile to remove bluez dependency 2016-06-01 11:56:30 +02:00
Jonas Höglund
32d10209da Remove btle_alarm 2016-06-01 11:56:30 +02:00
Jonas Höglund
be6737b028 Delete bluez from inteno packages 2016-06-01 11:56:30 +02:00
Sukru Senli
09e4e7cde2 update icwmp version 2016-06-01 11:35:48 +02:00
Sukru Senli
b334565e90 icwmp-3.0-2016-05-31 2016-05-31 17:20:13 +02:00
imen.bhiri
eb07e8868f Add libjson-c and libexpact dependencies 2016-05-31 17:19:15 +02:00
imen.bhiri
728da91a8f Add option to enable/disable XMPP feature 2016-05-31 17:19:09 +02:00
Sukru Senli
26a44ab3e5 select busybox deluser by default 2016-05-31 11:18:01 +02:00
Sukru Senli
b1ba9c1826 select ipv6 packages 2016-05-31 10:15:49 +02:00
Kenneth Johansson
eadb49e55c Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 2a16b98 gpio_button remove unneeded state variable.
* 35b628c Print if button press is from ubus call.
* d415e87 typo.
-------------------------------------------------------------------------------
commit 2a16b98543580d376d5862a34415f24d8be15b27
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-26 19:42:01 +0200

    gpio_button remove unneeded state variable.

Base directory -> /
 src/gpio_button.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit 35b628c468000cf91a56cc7c2ef3564b56896f55
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-26 19:40:49 +0200

    Print if button press is from ubus call.

Base directory -> /
 src/button.c | 3 +++
 1 file changed, 3 insertions(+)
-------------------------------------------------------------------------------
commit d415e87b9e61cf5a2c607efd3272a17eca857ce3
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-23 15:27:27 +0200

    typo.

Base directory -> /
 src/catv_monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-05-30 16:48:01 +02:00
Christopher Nagy
68a39be532 added juci-snmpd to juci config 2016-05-30 13:49:24 +02:00
Christopher Nagy
333fbe25b1 selected juci-printer by default 2016-05-30 12:30:54 +02:00
Sukru Senli
c83a88ceb6 select juci-simple-gui 2016-05-30 11:25:59 +02:00
Sukru Senli
ae3d22ab45 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* d9a0a35 show duplex correctly
-------------------------------------------------------------------------------
commit d9a0a35d7fd75aae01e915c43e40ea3e08c477bc
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-28 12:45:44 +0200

    show duplex correctly

Base directory -> /
 questd.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
2016-05-28 12:46:14 +02:00
Sukru Senli
59285541e3 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 493f757 get fixed speed correctly
* 60f50e4 get correct device from brctl showbr output
-------------------------------------------------------------------------------
commit 493f757ad00fcea0255a680ff43be99750b8324f
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-28 11:34:33 +0200

    get fixed speed correctly

Base directory -> /
 questd.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 60f50e4d176c92898aeb66cb9f2b51033fee8c94
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-28 11:21:51 +0200

    get correct device from brctl showbr output

Base directory -> /
 questd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-05-28 11:42:15 +02:00
Ronny Nilsson
2f312659d8 Update feed [ feed_inteno_packages ] package [ asterisk18-mod ]
-------------------------------------------------------------------------------
* 6c098c4 It wasn't enough to just check of failed open
* aaf6936 - Kernel internal dect procesing in endpoint MUST only be started when it's available, or a crash occur. - Debug prints
-------------------------------------------------------------------------------
commit 6c098c4b82bf3ce4cf3e25b398198914c16c05ad
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-05-27 17:25:35 +0200

    It wasn't enough to just check of failed open

Base directory -> /
 channels/chan_brcm_dect.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit aaf6936820de345c05e60e3c2226e49223227402
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-05-27 15:03:16 +0200

    - Kernel internal dect procesing in endpoint MUST only be started when it's
    available, or a crash occur. - Debug prints

Base directory -> /
 channels/chan_brcm_dect.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2016-05-27 17:35:42 +02:00
Sukru Senli
659a36547b Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 82d7dbb show port speed for wired clients
-------------------------------------------------------------------------------
commit 82d7dbb928054f5e8dd834eecca2bd8dd7a0ce4d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-27 15:24:47 +0200

    show port speed for wired clients

Base directory -> /
 questd.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
-------------------------------------------------------------------------------
2016-05-27 16:51:46 +02:00
Ronny Nilsson
24700f6162 - We need modifed CFLAGS for pthreads to work on MIPS.
- Upstream update of Asterisk
2016-05-26 14:56:28 +02:00
Ronny Nilsson
17d2905283 - Upstream update of Dectmngr2
- Clenups, remove unused flags
2016-05-26 14:20:50 +02:00
Jonas Höglund
93e9c0e4cb Force rebuild of base-files on new profile selection 2016-05-26 12:46:13 +02:00
Kenneth Johansson
df039df5b3 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 7199297 Detect if touch panel is covered.
* 866b2c6 remove some whitespace.
* 77184fe Filter all button on proximity.
-------------------------------------------------------------------------------
commit 7199297d1c051782cf0d140253b325a3fa8d7eae
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-23 14:33:24 +0200

    Detect if touch panel is covered.

    If we have proximity event for more than 30 seconds assume that something
    covers the panel or box is put upside down.

Base directory -> /
 src/button.c       |  6 ++++-
 src/touch_sx9512.c | 77 ++++++++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 68 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
commit 866b2c6deb38439496e2d60265533d4d314c9a69
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-23 11:26:32 +0200

    remove some whitespace.

Base directory -> /
 src/touch_sx9512.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 77184fe0b43c82564a49dd03a9b0e048a3fb6861
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-20 18:54:32 +0200

    Filter all button on proximity.

    Only report button presses if we also have a proximity near state active.
    This is to make it a little harder to get ghost presses.

Base directory -> /
 src/led.c          |  2 +-
 src/touch_sx9512.c | 77 ++++++++++++++++++++++++++++++++++++------------------
 2 files changed, 52 insertions(+), 27 deletions(-)
-------------------------------------------------------------------------------
2016-05-23 15:20:32 +02:00
Sukru Senli
3a30ea8209 select juci-broadcom-xdsl by default 2016-05-21 11:20:07 +02:00
Sukru Senli
0e22871a96 iup: set dhcp options individually for each management interface 2016-05-20 10:28:07 +02:00
Sukru Senli
650f941dfc dectmngr2: copy over dect config 2016-05-19 18:47:30 +02:00
Sukru Senli
d563bfa099 remove juci-full-inteno from config 2016-05-19 17:39:55 +02:00
Sukru Senli
840670bf80 disable cgroups for now 2016-05-19 16:33:38 +02:00
Sukru Senli
645a9d919f dectmngr2: add dect.config file 2016-05-19 16:32:23 +02:00
Sukru Senli
aea3f66f51 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 41c19e8 give ssid and encryption via router object wl method
-------------------------------------------------------------------------------
commit 41c19e88f72c88bd84f843beb4eccaa227f3fae2
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-16 18:09:48 +0200

    give ssid and encryption via router object wl method

Base directory -> /
 broadcom.c | 20 ++++++++++++++++++++
 broadcom.h | 15 +++++++++++++++
 questd.c   |  9 ++++++++-
 3 files changed, 43 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-05-16 18:14:53 +02:00
Sukru Senli
650957082a iop: setup_host installs necessary perl modules 2016-05-13 12:54:46 +02:00
Sukru Senli
d893622fb3 peripheral_manager: wait for ubus button object to be created before exiting init script 2016-05-12 19:24:22 +02:00
Alex Oprea
82d4fef6a6 iup: option 224 fix ciclying reboot refs #9077 2016-05-12 18:19:33 +02:00
Jonas Höglund
92a6b78786 Fix ice-client consumer package generation 2016-05-11 17:36:56 +02:00
Alex Oprea
c32ced2cfe iup: delay iup224 untill dns is reacheable refs #9073 2016-05-10 18:55:18 +02:00
Alex Oprea
e0be33b76a config: add bind-host package refs #9073 2016-05-10 18:55:18 +02:00
Nabeel Sowan
117c5224cc Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* c819e97 sx9512: change block write to 31 bytes to fix constant NVM updates when starting up peripheral_manager
* 937f2c5 Restore timeout function.
-------------------------------------------------------------------------------
commit c819e97d219b7d11c1b78cbd130f7d7d2443cf39
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2016-05-10 15:02:56 +0200

    sx9512: change block write to 31 bytes to fix constant NVM updates when
    starting up peripheral_manager

Base directory -> /
 src/sx9512.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
-------------------------------------------------------------------------------
commit 937f2c58211e6f94f771585f83caea436b1cd517
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-05-10 12:01:44 +0200

    Restore timeout function.

Base directory -> /
 src/led.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
2016-05-10 15:04:44 +02:00
Nabeel Sowan
3917419263 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* 02edcda fix ubus button press and status read
-------------------------------------------------------------------------------
commit 02edcdaa628c4595a68bcc1da5dc5e398e851e87
Author: Nabeel Sowan <nabeel@vibes.se>
Date: 2016-05-09 16:55:06 +0200

    fix ubus button press and status read

Base directory -> /
 src/button.c | 18 ++++++++++++------
 src/button.h |  2 +-
 2 files changed, 13 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2016-05-09 17:15:01 +02:00
Sukru Senli
a6047dadbf voice-client: ringing schedule is off by default 2016-05-09 10:40:33 +02:00
Sukru Senli
906307df05 voice-client: call_filter0 is default call_filter 2016-05-09 10:40:30 +02:00
Sukru Senli
e8a6ff899b peripheral_manager: wait fir led.status ubus object to be created 2016-05-09 10:40:27 +02:00
Jonas Höglund
1d5ca37f1e Fix config path 2016-05-06 15:56:58 +02:00
Jonas Höglund
98170bdb79 Moved configs to iop package 2016-05-06 15:51:00 +02:00
Alex Oprea
97306df0a9 iup224: fix cicling reboot 2016-05-04 17:08:53 +02:00
Sukru Senli
a6abec5787 questd-3.1.5 2016-05-04 17:04:13 +02:00
Sukru Senli
88cf2ea0c2 iup: option 224 follows standard 2016-05-04 17:02:10 +02:00
Nabeel Sowan
103bbebad0 iop: fix cfe_upgrade script, wrong image type 2016-05-04 16:46:38 +02:00
Sukru Senli
c7b88666d8 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* e130cb0 Add enable for leds.
-------------------------------------------------------------------------------
commit e130cb0369b750d97cf2d4af081149cad7f6bb38
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-04-27 12:54:13 +0200

    Add enable for leds.

    when enable set to 0 the led function will internally be set to state OFF.
    it will still record any updates to state and when enable is set to 1 again
    will show whatever state has been set to during the time it was disabled.

Base directory -> /
 src/led.c | 37 ++++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2016-05-04 13:22:44 +02:00
Sukru Senli
22e014b587 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* ff58bac questd: add missing _ to parameters
* 0866c35 wificontrol: check arp list too
-------------------------------------------------------------------------------
commit ff58bac2696667ecab36afa2d93e7595fe9a992e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-04 13:21:39 +0200

    questd: add missing _ to parameters

Base directory -> /
 questd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 0866c3584e4ff0295b6b30afa30105fe3076a1bb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-04 13:13:08 +0200

    wificontrol: check arp list too

Base directory -> /
 wificontrol.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2016-05-04 13:22:32 +02:00
Sukru Senli
ce9ac288ff questd: install wificontrol 2016-05-03 12:37:00 +02:00
Sukru Senli
87df5f9117 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 9467625 add some more wireless info to clients
-------------------------------------------------------------------------------
commit 9467625ceb2636ca1487e400ef119f374946beb0
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-05-03 12:05:37 +0200

    add some more wireless info to clients

Base directory -> /
 questd.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-05-03 12:06:18 +02:00
Anis Ellouze
9073b24182 Add zlib to suuport http compression Add config choose to seltect daata model (TR098/TR181)
Signed-off-by: Sukru Senli <sukru.senli@inteno.se>
2016-05-02 18:39:23 +02:00
Sukru Senli
82d37cefd5 questd-3.1.3 2016-05-02 11:35:29 +02:00
Jonas Höglund
93eaaa0aa9 Fixed open config values in genconfig 2016-04-29 13:44:29 +02:00
Sukru Senli
b5db57ba45 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 36c8dc0 arping: use mempcpy in send_pack
-------------------------------------------------------------------------------
commit 36c8dc05fc27577c9ae8acf8ba6ab8e10b7ac2fd
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-27 17:39:57 +0200

    arping: use mempcpy in send_pack

Base directory -> /
 arping.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-04-27 17:45:39 +02:00
Nabeel Sowan
3db08a8ec8 add developer / fw update scripts to ./iop command 2016-04-27 17:24:39 +02:00
Alex Oprea
75ec580e89 iup224 file permissions 2016-04-27 16:16:32 +02:00
Jonas Höglund
12a7183a32 Fix ice-client download method 2016-04-27 14:30:28 +02:00
Sukru Senli
73e4a225bb Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 108befe questd: password_set: give permission denied if curpass is not given
-------------------------------------------------------------------------------
commit 108befec0fe83dbff15deddc0b4c015e0a7173da
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-27 10:51:02 +0200

    questd: password_set: give permission denied if curpass is not given

Base directory -> /
 questd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-04-27 10:51:50 +02:00
Sukru Senli
3a9685332d questd-3.1.2 2016-04-27 10:32:49 +02:00
Sukru Senli
12609ec471 Fix ice-client Makefile 2016-04-26 17:34:36 +02:00
Sukru Senli
c2788f796d questd-3.1.1 2016-04-26 15:11:25 +02:00
Erik Horemans
0144ce9606 new ice-client R3/4/1-RC11 2016-04-25 13:03:06 +02:00
Fredrik Åsberg
63ee5d4091 ice-client: added back support for CONFIG_ICE_OPEN 2016-04-22 17:00:06 +02:00
Fredrik Åsberg
0ab812d222 nevermind 2016-04-22 16:24:10 +02:00
Fredrik Åsberg
06679bd124 questd: update 2016-04-22 16:18:38 +02:00
Fredrik Åsberg
141b0c32e7 Added ifeq CONFIG_TARGET to EXTRA_CPPFLAGS 2016-04-22 16:15:32 +02:00
Fredrik Åsberg
9abc466d79 Makefile: fixed default ice-client settings 2016-04-22 15:11:50 +02:00
Fredrik Åsberg
93064cadd4 Fixed missed merge PKG_SOURCE_VERSION 2016-04-22 15:08:54 +02:00
Fredrik Åsberg
fc82c65364 Merge branch 'fredrik_lantiq' of public.inteno.se:feed-inteno-packages into devel
Conflicts:
	ice-client/Makefile
	questd/Makefile
2016-04-22 15:00:33 +02:00
Jonas Höglund
150b9bd694 Install feeds_inteno_openwrt 2016-04-21 12:47:49 +02:00
Mats Karrman
5ccec170d9 Add new package libcgroup 2016-04-20 16:55:00 +02:00
Mats Karrman
86cc70f753 icgroupd: Disable RT-scheduling control due to mips malfunction 2016-04-20 10:24:12 +02:00
Fredrik Åsberg
3a7e94e956 correct repo 2016-04-19 15:39:17 +02:00
Fredrik Åsberg
c1363317ba questd: lantiq 2016-04-19 15:20:31 +02:00
Fredrik Åsberg
667e0b1073 questd: lantiq 2016-04-19 15:16:00 +02:00
Fredrik Åsberg
f59e3fa4bf ice-client: missing pthread 2016-04-13 14:37:21 +02:00
Fredrik Åsberg
6fdf16fc81 Makefile: update 2016-04-13 14:31:31 +02:00
Fredrik Åsberg
905423d589 Makefile: update questd 2016-04-13 13:03:38 +02:00
Fredrik Åsberg
a2cf8beaed lantiq's build system does not like "tmp" directory name. 2016-04-13 12:58:14 +02:00
61 changed files with 4109 additions and 546 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
local usb_dir uVid uPid uMa uPr uSe bConf bNumConfs vendor product mdmtyp netdev comdev cdcdev ttydev usbno usbbr
local usb_dir uVid uPid uMa uPr uSe bConf bNumConfs vendor product mdmtyp netdev comdev cdcdev ttydev interface usbno usbbr
sanitize() {
sed -e 's/[[:space:]]\+$//; s/[[:space:]]\+/_/g' "$@"
@@ -20,6 +20,7 @@ find_usb_attrs() {
netdev=$(find $usb_dir -name wwan* | awk -F'/' '{print$NF}' | head -2 | tail -1)
cdcdev=$(find $usb_dir -name cdc-wdm* | awk -F'/' '{print$NF}' | head -2 | tail -1)
ttydev=$(ls $(find $usb_dir -name tty | head -2 | tail -1) | tail -1)
interface=$(cat $usb_dir/interface)
if [ -n "$cdcdev" ]; then
comdev=$cdcdev
mdmtyp=$(grep $uVid:$uPid /etc/modemdb | grep 'qmi\|mbim' | awk '{print$2}' | head -1)
@@ -48,6 +49,8 @@ case "$usbbr" in
*:*) usbbr=$(echo $DEVPATH | cut -d'/' -f6) ;;
esac
#devno=$(basename $DEVPATH)
find_usb_attrs
if [ "$ACTION" = add ]; then
convert_to_mbim "$uVid:$uPid"
@@ -55,6 +58,9 @@ if [ "$ACTION" = add ]; then
if [ -n "$usbno" ] && [ -n "$usbbr" ]; then
sed -i "/$usbno:$usbbr/ d" /var/usbnets
echo $usbno:$usbbr $uVid:$uPid $uMa $uPr $netdev $comdev $mdmtyp $vendor $product >> /var/usbnets
ubus send hotplug.usb "{'action': 'add', 'devpath': '$DEVPATH', 'manufacturer': '$uMa', 'product': '$uPr', 'serial': '$uSe', 'vendor_id': '$uVid', \
'product_id': '$uPid', 'driver_interface': '$interface', 'driver': '$DRIVER', 'devtype': '$DEVTYPE'}"
fi
fi
fi
@@ -62,5 +68,7 @@ fi
if [ "$ACTION" = remove ]; then
if [ -n "$usbno" ] && [ -n "$usbbr" ]; then
sed -i "/$usbno:$usbbr/ d" /var/usbnets
ubus send hotplug.usb "{'action': 'remove', 'devpath': '$DEVPATH', 'manufacturer': '$uMa', 'product': '$uPr', 'serial': '$uSe', 'vendor_id': '$uVid', \
'product_id': '$uPid', 'driver_interface': '$interface', 'driver': '$DRIVER', 'devtype': '$DEVTYPE'}"
fi
fi

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk18-mod
PKG_VERSION:=1.8.10.1
PKG_SOURCE_VERSION:=2239c2d0e790abfce7ac0684dbbac1cf9c0aff40
PKG_SOURCE_VERSION:=1618b4881a44ea493c602da5c60723c45509719a
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/asterisk-1.8.x
@@ -119,7 +119,7 @@ endef
define Package/asterisk18-mod-cdr
$(call Package/asterisk18-mod/Default)
TITLE:=CDR support
DEPENDS:= asterisk18-mod
DEPENDS:= asterisk18-mod +libsqlite3
endef
define Package/asterisk18-mod-cdr/description
@@ -188,17 +188,6 @@ $(call Package/asterisk18-mod/Default/description)
support to Asterisk.
endef
define Package/asterisk18-mod-chan-mobile
$(call Package/asterisk18-mod/Default)
TITLE:=Mobile channel support
DEPENDS:= asterisk18-mod +bluez-libs
endef
define Package/asterisk18-mod-chan-mobile/description
$(call Package/asterisk18-mod/Default/description)
This package provides the channel chan_mobile support to Asterisk.
endef
define Package/asterisk18-mod-res-timing-timerfd
$(call Package/asterisk18-mod/Default)
TITLE:= Timerfd Timing Interface
@@ -341,14 +330,6 @@ else
--without-spandsp
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-chan-mobile),)
CONFIGURE_ARGS+= \
--with-bluetooth="$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS+= \
--without-bluetooth
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mod-res-srtp),)
CONFIGURE_ARGS+= \
--with-srtp="$(STAGING_DIR)/usr"
@@ -392,6 +373,9 @@ CONFIGURE_ARGS+= \
--with-sounds-cache="$(DL_DIR)" \
--disable-xmldoc
# I've had strange errors with -fno-caller-saves
# in global CFLAGS so revert it. /Ronny
EXTRA_CFLAGS+= -O2 -fcaller-saves
EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
@@ -568,17 +552,6 @@ define Package/asterisk18-mod-chan-gtalk/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-chan-mobile/conffiles
/etc/asterisk/chan_mobile.conf
endef
define Package/asterisk18-mod-chan-mobile/install
$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/chan_mobile.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mobile.so $(1)/usr/lib/asterisk/modules/
endef
define Package/asterisk18-mod-res-timing-timerfd/install
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_timing_timerfd.so $(1)/usr/lib/asterisk/modules/
@@ -730,7 +703,6 @@ $(eval $(call BuildPackage,asterisk18-mod-cdr))
$(eval $(call BuildPackage,asterisk18-mod-res-musiconhold))
$(eval $(call BuildPackage,asterisk18-mod-res-voice))
$(eval $(call BuildPackage,asterisk18-mod-chan-gtalk))
$(eval $(call BuildPackage,asterisk18-mod-chan-mobile))
$(eval $(call BuildPackage,asterisk18-mod-res-fax))
$(eval $(call BuildPackage,asterisk18-mod-res-fax-spandsp))
$(eval $(call BuildPackage,asterisk18-mod-res-timing-timerfd))

View File

@@ -1,81 +0,0 @@
#
# Copyright (C) 2006-2012 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:=bluez
PKG_VERSION:=5.28
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/bluetooth
PKG_MD5SUM:=bc20a8285530758c68f6a60e4ca62a15
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/bluez
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libpthread +libusb-compat +glib2 +dbus +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS)
TITLE:=Bluetooth stack new version
URL:=http://www.bluez.org/
endef
define Package/bluez/conffiles
/etc/config/bluetooth
endef
TARGET_LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib/libiconv-full/lib \
CONFIGURE_ARGS += \
--enable-shared \
--disable-cups \
--enable-debug \
--disable-test \
--disable-obex \
--disable-systemd \
--disable-udev \
--enable-tools \
--enable-experimental \
--enable-library \
--disable-static \
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
LDFLAGS="$(TARGET_LDFLAGS) \
-L$(ICONV_PREFIX)/lib \
-L$(INTL_PREFIX)/lib -lm -lncurses" \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/bluetooth
$(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth/*.h $(1)/usr/include/bluetooth
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/
endef
define Package/bluez/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/bluetooth
$(INSTALL_DIR) $(1)/etc/dbus-1/system.d
$(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/bluetooth.conf $(1)/etc/dbus-1/system.d/
$(INSTALL_DIR) $(1)/usr/lib/bluetooth
$(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/* $(1)/usr/lib/bluetooth
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libblue* $(1)/usr/lib
endef
$(eval $(call BuildPackage,bluez))

View File

@@ -1,47 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=btle_alarm
PKG_VERSION:=1.0.6
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=b505d7ae1524a213ca3de7f8ee15a7d51c6bbbd5
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/btle_alarm
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)
include $(INCLUDE_DIR)/package.mk
define Package/btle_alarm
SECTION:=base
CATEGORY:=Utilities
TITLE:=Ethernet bridging configuration utility
#DESCRIPTION:=This variable is obsolete. use the Package/name/description define instead!
URL:=http://btle_alarm.sourceforge.net/
DEPENDS:=+bluez +libncurses
endef
define Package/btle_alarm/description
Ethernet bridging configuration utility
Manage ethernet bridging; a way to connect networks together to
form a larger network.
endef
define Package/btle_alarm/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/btle_alarm $(1)/sbin/
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_DATA) ./files/btle_alarm.conf $(1)/etc/config/btle_alarm
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d/
endef
$(eval $(call BuildPackage,btle_alarm))

View File

@@ -1,2 +0,0 @@
config info 'Device'
option mac 'D0:39:72:B6:23:D6'

View File

@@ -1,29 +0,0 @@
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2009 OpenWrt.org
#
START=99
start() {
for i in down reset up;do
hciconfig hci0 $i
done
mac=`uci get btle_alarm.Device.mac`
if [ $? -eq 0 ];then
hcitool lewladd $mac
else
hcitool lewladd D0:39:72:B6:43:8A
hcitool lewladd D0:39:72:B6:18:AA
fi
sleep 1
/sbin/btle_alarm &> /dev/null &
echo $! > /tmp/btle_alarm.pid
}
stop() {
hciconfig hci0 down
kill -9 `cat /tmp/btle_alarm.pid`
rm /tmp/btle_alarm.pid
sleep 1
}

View File

@@ -11,14 +11,10 @@ PKG_RELEASE:=1
PKG_VERSION:=1.1.0
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=666c3e93ad56e20493bae8a439e9655ce947f2f7
PKG_SOURCE_VERSION:=46658e95b19c35ff6194a9566bb5439720ec251d
PKG_NAME:=dectmngr2
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
RSTRIP:=true
export BUILD_DIR
@@ -43,12 +39,15 @@ endef
define Package/dectmngr2/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/dect/
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/nvs_default $(1)/etc/dect/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dectmngr-wrapper.sh $(1)/usr/sbin/
$(CP) ./files/dect.config $(1)/etc/config/dect
endef
$(eval $(call BuildPackage,dectmngr2))

View File

@@ -0,0 +1,4 @@
config dect 'dect'
option radio 'auto'

View File

@@ -16,26 +16,25 @@ export PLATFORM_INCLUDE:=platforms/iopsys/build.mk
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
export LOGIN:=$(shell whoami)
BASE_PKG_VERSION:=3.4.1
PKG_RELEASE:=RC9
PKG_RELEASE:=RC11
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
export PKG_VERSION
###########################--RELEASE--################################
PKG_SOURCE_URL:=ssh://git@private.inteno.se/ice-client.git
PKG_SOURCE_VERSION:=d3065ee24d72d3fffd5ff75b617bf54fb5377561
PKG_SOURCE_VERSION:=184d29446fe6103f567c968bf35569625326a82c
ifeq ($(CONFIG_ICE_OPEN),y)
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_KERNEL_PROFILE)-$(BASE_PKG_VERSION)$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
#PKG_NAME:=ice-client-open
else
PKG_SOURCE_URL:=ssh://git@private.inteno.se/ice-client.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@private.inteno.se:ice-client.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BASE_PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(BASE_PKG_VERSION)-$(PKG_RELEASE).tar.gz
PKG_SOURCE_PROTO:=git
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
endif
@@ -140,7 +139,7 @@ define Package/ice-client/install
$(CP) $(PKG_BUILD_DIR)/core/ice $(1)/bin
$(CP) $(PKG_BUILD_DIR)/modules/system/ubusevent/obj/iopsys/ubusevent $(1)/bin
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/core/lib/{systemService.so.1.0.1,libconfStore.so.1,networkService.so.1.0.1,packageService.so.1.0.1,monitorService.so.1.0.1,iperfService.so.1.0.1,logService.so.1.0.1} $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/core/lib/{systemService.so.1.0.1,libconfStore.so.1,networkService.so.1.0.1,packageService.so.1.0.1,monitorService.so.1.0.1,iperfService.so.1.0.1,logService.so.1.0.1,texecService.so.1.0.1} $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/wsice/obj/iopsys/libwsice.so $(1)/usr/lib
$(INSTALL_DIR) $(1)/bin/ifs/iperf/execute
$(INSTALL_DIR) $(1)/bin/ifs/iperf/progress
@@ -166,8 +165,8 @@ cp /tmp/iopsysserver.ini /etc/iopsys/server.ini
rm -f /tmp/iopsysserver.ini
cp /tmp/ice.back /etc/config/ice
rm -f /tmp/ice.back
if [ -f "/etc/rc.d/S99ice-client" ]; then
/etc/init.d/ice-client start
if [ -f "/etc/rc.d/S98ice-client" ]; then
/etc/init.d/ice-client restart
fi
exit 0
endef
@@ -887,6 +886,55 @@ fi
exit 0
endef
# texec
define Package/ice-client-texec
$(call Package/ice-client/Default)
TITLE:=texec
DEPENDS+=
endef
define Package/ice-client-texec/description
remote script execution module for ice-client
endef
define Package/ice-client-texec/prerm
#!/bin/sh
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
PROC_ID=$$(cat /tmp/ice.pid)
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
if [ -n "$$PROC_EXISTS" ]; then
read -t 1 <>/tmp/cfout
echo "system moduleRemove topic=texec" > /tmp/cfin
fi
exit 0
endef
define Package/ice-client-texec/preinst
#!/bin/sh
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
PROC_ID=$$(cat /tmp/ice.pid)
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
if [ -n "$$PROC_EXISTS" ]; then
read -t 1 <>/tmp/cfout
echo "system moduleRemove topic=tExecMgr" > /tmp/cfin
fi
exit 0
endef
define Package/ice-client-texec/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/core/lib/texecService.so.1.0.1 $(1)/usr/lib
endef
define Package/ice-client-texec/postinst
#!/bin/sh
read -t 1 <>/tmp/cfout
if [ -f /tmp/ice.pid ]; then
echo "system moduleAdd file=texecService.so.1.0.1" package="ice-client-texec" > /tmp/cfin
fi
exit 0
endef
# bmspeedtest
define Package/ice-client-bcmspeedmgr
$(call Package/ice-client/Default)
@@ -935,5 +983,6 @@ $(eval $(call BuildPackage,ice-client-rework))
$(eval $(call BuildPackage,ice-client-sip))
$(eval $(call BuildPackage,ice-client-monitor))
$(eval $(call BuildPackage,ice-client-gigaset))
$(eval $(call BuildPackage,ice-client-texec))
$(eval $(call BuildPackage,ice-client-bcmspeedmgr))
endif

View File

@@ -3,42 +3,42 @@ config cgroups cgroups
option defgroup iopsys/normal
config cgroup _root_
list option cpu.rt_runtime_us=50000
# list option cpu.rt_runtime_us=50000
list option memory.move_charge_at_immigrate=1
config cgroup iopsys
list option cpu.shares=4096
list option cpu.rt_runtime_us=40000
# list option cpu.rt_runtime_us=40000
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_normal
list option cpu.shares=1024
list option cpu.rt_runtime_us=10000
# list option cpu.rt_runtime_us=10000
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_high
list option cpu.shares=4096
list option cpu.rt_runtime_us=30000
# list option cpu.rt_runtime_us=30000
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup 3prt
list option cpu.shares=1024
list option cpu.rt_runtime_us=10000
# list option cpu.rt_runtime_us=10000
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_normal
list option cpu.shares=1024
list option cpu.rt_runtime_us=2500
# list option cpu.rt_runtime_us=2500
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_high
list option cpu.shares=4096
list option cpu.rt_runtime_us=7500
# list option cpu.rt_runtime_us=7500
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1

View File

@@ -15,10 +15,31 @@ config CWMP_ACS_HDM
bool "HDM"
endchoice
choice
prompt "Select Data Model"
default tr098
config DATAMODEL_TR098
bool "TR-098"
config DATAMODEL_TR181
bool "TR-181"
endchoice
config CWMP_DEBUG
bool "Compile with debug options"
default y
choice
prompt "enable xmpp feature"
default disable
config XMPP_DISABLE
bool "disable"
config XMPP_ENABLE
bool "enable"
endchoice
config CWMP_DEVEL_DEBUG
bool "Compile with development debug options"
default n

11
icwmp/Makefile Normal file → Executable file
View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=3.0-2016-03-30
PKG_VERSION:=3.0-2016-06-02
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5de240514b73aff51301df4d41b88f762bca89df
PKG_SOURCE_VERSION:=3796902ebf44c3cd00b3829ef7aca911cdde2cc7
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -34,7 +34,7 @@ define Package/icwmp/Default
SECTION:=utils
CATEGORY:=Utilities
TITLE:=CWMP client
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +libexpat +bcmkernel +curl
endef
define Package/icwmp/description
@@ -68,7 +68,7 @@ endif
TARGET_CFLAGS += \
-D_GNU_SOURCE -D_AADJ
ifneq ($(CWMP_REVISION)_,_)
ifneq ($(CWMP_REVISION),exported)
ifneq ($(CWMP_REVISION),Unversioned directory)
@@ -86,6 +86,9 @@ CONFIGURE_ARGS += \
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
--with-libubus-include-path=$(STAGING_DIR)/usr/include
CONFIGURE_ARGS += $(if $(CONFIG_DATAMODEL_TR181),--enable-datamodel=tr181,--enable-datamodel=tr098)
CONFIGURE_ARGS += $(if $(CONFIG_XMPP_ENABLE),--enable-xmpp=enable,--enable-xmpp=disable)
ifeq ($(BUILD_VARIANT),zstream)
CONFIGURE_ARGS += \
--enable-http=zstream \

192
iop/configs/config Normal file
View File

@@ -0,0 +1,192 @@
CONFIG_BUILD_NLS=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_CCACHE=y
CONFIG_DEBUG=y
CONFIG_DEVEL=y
CONFIG_LOCALMIRROR="http://mirror.inteno.se/mirror"
CONFIG_PACKAGE_6in4=y
CONFIG_PACKAGE_6rd=y
CONFIG_PACKAGE_6to4=y
CONFIG_PACKAGE_6tunnel=y
CONFIG_PACKAGE_alsa-lib=y
CONFIG_PACKAGE_bind-host=y
CONFIG_PACKAGE_chat=y
CONFIG_PACKAGE_comgt=y
CONFIG_PACKAGE_comgt-ncm=y
CONFIG_PACKAGE_crashlog=y
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_ds-lite=y
CONFIG_PACKAGE_gdb=m
CONFIG_PACKAGE_gdbserver=m
CONFIG_PACKAGE_getopt=y
CONFIG_PACKAGE_glib2=y
CONFIG_PACKAGE_ice-client=y
CONFIG_PACKAGE_ice-client-camerawatch=m
CONFIG_PACKAGE_ice-client-fileme=m
CONFIG_PACKAGE_ice-client-gigaset=m
CONFIG_PACKAGE_ice-client-guest=m
CONFIG_PACKAGE_ice-client-iperf=m
CONFIG_PACKAGE_ice-client-logreader=m
CONFIG_PACKAGE_ice-client-monitor=m
CONFIG_PACKAGE_ice-client-netrounds=m
CONFIG_PACKAGE_ice-client-rshell=m
CONFIG_PACKAGE_ice-client-texec=m
CONFIG_PACKAGE_icwmp-curl=y
CONFIG_PACKAGE_iperf-mt=y
CONFIG_PACKAGE_ipset=y
CONFIG_PACKAGE_iptables=y
CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
CONFIG_PACKAGE_iptables-mod-filter=y
CONFIG_PACKAGE_iptables-mod-ipopt=y
CONFIG_PACKAGE_iup=y
CONFIG_PACKAGE_iwatchdog=y
CONFIG_PACKAGE_juci=y
CONFIG_PACKAGE_juci-broadcom-dsl=y
CONFIG_PACKAGE_juci-broadcom-ethernet=y
CONFIG_PACKAGE_juci-broadcom-iptv=y
CONFIG_PACKAGE_juci-broadcom-pwrmgmt=y
CONFIG_PACKAGE_juci-broadcom-vlan=y
CONFIG_PACKAGE_juci-broadcom-wl=y
CONFIG_PACKAGE_juci-broadcom-xdsl=y
CONFIG_PACKAGE_juci-ddns=y
CONFIG_PACKAGE_juci-diagnostics=y
CONFIG_PACKAGE_juci-dnsmasq-dhcp=y
CONFIG_PACKAGE_juci-dropbear=y
CONFIG_PACKAGE_juci-ethernet=y
CONFIG_PACKAGE_juci-event=y
CONFIG_PACKAGE_juci-firewall-fw3=y
CONFIG_PACKAGE_juci-icwmp=y
CONFIG_PACKAGE_juci-igmpinfo=y
CONFIG_PACKAGE_juci-inteno-backup=y
CONFIG_PACKAGE_juci-inteno-multiwan=y
CONFIG_PACKAGE_juci-inteno-provisioning=y
CONFIG_PACKAGE_juci-inteno-qos=y
CONFIG_PACKAGE_juci-inteno-voice-client=y
CONFIG_PACKAGE_juci-macdb=y
CONFIG_PACKAGE_juci-minidlna=y
CONFIG_PACKAGE_juci-mod-status=y
CONFIG_PACKAGE_juci-mod-system=y
CONFIG_PACKAGE_juci-natalie-dect=y
CONFIG_PACKAGE_juci-netmode=y
CONFIG_PACKAGE_juci-network-netifd=y
CONFIG_PACKAGE_juci-printer=y
CONFIG_PACKAGE_juci-samba=y
CONFIG_PACKAGE_juci-simple-gui=y
CONFIG_PACKAGE_juci-snmpd=y
CONFIG_PACKAGE_juci-sysupgrade=y
CONFIG_PACKAGE_juci-theme-inteno=y
CONFIG_PACKAGE_juci-ubus-core=y
CONFIG_PACKAGE_juci-upnp=y
CONFIG_PACKAGE_juci-usb=y
CONFIG_PACKAGE_juci-utils=y
# CONFIG_PACKAGE_kmod-ipt-nathelper is not set
CONFIG_PACKAGE_kmod-nls-base=y
CONFIG_PACKAGE_kmod-siit=y
CONFIG_PACKAGE_layer2interface=y
CONFIG_PACKAGE_libcgroup-daemon=y
CONFIG_PACKAGE_libcgroup=y
# CONFIG_PACKAGE_libcgroup-utils is not set
CONFIG_PACKAGE_ldd=y
CONFIG_PACKAGE_libdaemon=y
CONFIG_PACKAGE_libgmp=y
CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_minidlna=y
CONFIG_PACKAGE_miniupnpd=y
CONFIG_PACKAGE_mtd-utils=y
CONFIG_PACKAGE_mtd-utils-deubinize=y
CONFIG_PACKAGE_mtd-utils-imagewrite=y
CONFIG_PACKAGE_mtd-utils-mkfs.jffs2=y
CONFIG_PACKAGE_mtd-utils-nanddump=y
CONFIG_PACKAGE_multiwan=y
CONFIG_PACKAGE_ndisc6=y
CONFIG_PACKAGE_netcheck=y
CONFIG_PACKAGE_ntfs-3g=y
CONFIG_PACKAGE_odhcp6c=y
CONFIG_PACKAGE_odhcpd=y
CONFIG_PACKAGE_openssl-util=y
CONFIG_PACKAGE_openvpn-easy-rsa=y
CONFIG_PACKAGE_openvpn-openssl=y
CONFIG_PACKAGE_p910nd=y
CONFIG_PACKAGE_peripheral_manager=y
CONFIG_PACKAGE_port-management=y
CONFIG_PACKAGE_power-management=y
CONFIG_PACKAGE_ppp-mod-pppoa=y
CONFIG_PACKAGE_ppp-mod-pppol2tp=y
CONFIG_PACKAGE_ppp-multilink=y
# CONFIG_PACKAGE_ppp is not set
CONFIG_PACKAGE_qos-scripts=y
CONFIG_PACKAGE_qrencode=y
CONFIG_PACKAGE_questd=y
CONFIG_PACKAGE_rdisc6=y
CONFIG_PACKAGE_rdnssd=y
CONFIG_PACKAGE_resolveip=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_samba3=y
CONFIG_PACKAGE_samba3-nmbd=y
CONFIG_PACKAGE_snmpd=y
CONFIG_PACKAGE_strace=y
CONFIG_PACKAGE_tc=y
CONFIG_PACKAGE_tcpdump=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_tptest=y
CONFIG_PACKAGE_traceroute6=y
CONFIG_PACKAGE_umbim=y
CONFIG_PACKAGE_uqmi=y
CONFIG_PACKAGE_usb-modeswitch=y
CONFIG_PACKAGE_usbreset=y
CONFIG_PACKAGE_wwan=y
CONFIG_PACKAGE_xl2tpd=y
CONFIG_PACKAGE_zoneinfo-core=y
CONFIG_PACKAGE_zoneinfo-europe=y
CONFIG_TARGET_CUSTOMER="INT"
CONFIG_TARGET_ROOTFS_TARGZ=y
# CONFIG_USE_SSTRIP is not set
CONFIG_USE_STRIP=y
CONFIG_BUILD_LOG=y
CONFIG_BUSYBOX_CONFIG_ADDUSER=y
CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y
CONFIG_BUSYBOX_CONFIG_DELUSER=y
# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q=y
CONFIG_BUSYBOX_CONFIG_FIRST_SYSTEM_ID=100
CONFIG_BUSYBOX_CONFIG_HTTPD=y
CONFIG_BUSYBOX_CONFIG_INSMOD=y
CONFIG_BUSYBOX_CONFIG_LAST_SYSTEM_ID=999
CONFIG_BUSYBOX_CONFIG_LOGIN=y
CONFIG_BUSYBOX_CONFIG_LSMOD=y
CONFIG_BUSYBOX_CONFIG_LSPCI=y
CONFIG_BUSYBOX_CONFIG_LSUSB=y
CONFIG_BUSYBOX_CONFIG_MICROCOM=y
CONFIG_BUSYBOX_CONFIG_RMMOD=y
CONFIG_BUSYBOX_CONFIG_STTY=y
CONFIG_BUSYBOX_CONFIG_TFTP=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_2_4_MODULES is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CGI=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_NOLOGIN is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_SECURETTY=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_GET=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y
# CONFIG_BUSYBOX_CONFIG_LOGIN_SCRIPTS is not set
# CONFIG_BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD is not set
# CONFIG_BUSYBOX_CONFIG_PAM is not set
# CONFIG_BUSYBOX_CONFIG_TFTP_DEBUG is not set
CONFIG_LIBCURL_CRYPTO_AUTH=y
CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y
# CONFIG_SAMBA3_CONFIG_NO_PRINTING is not set
# CONFIG_SIGNED_PACKAGES is not set

38
iop/configs/luci.diff Executable file
View File

@@ -0,0 +1,38 @@
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-mod-admin-core=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-app-ddns=y
CONFIG_PACKAGE_luci-app-dslstats=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-iup=y
CONFIG_PACKAGE_luci-app-mcpd=y
CONFIG_PACKAGE_luci-app-minidlna=y
CONFIG_PACKAGE_luci-app-multiwan=y
CONFIG_PACKAGE_luci-app-p910nd=y
CONFIG_PACKAGE_luci-app-parental-control=y
CONFIG_PACKAGE_luci-app-port-management=y
CONFIG_PACKAGE_luci-app-power-mgmt=y
CONFIG_PACKAGE_luci-app-samba=y
CONFIG_PACKAGE_luci-app-sfp=y
CONFIG_PACKAGE_luci-app-snmp=y
CONFIG_PACKAGE_luci-app-speedtest=y
CONFIG_PACKAGE_luci-app-upnp=y
CONFIG_PACKAGE_luci-app-voice=y
CONFIG_PACKAGE_luci-theme-base=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-i18n-english=y
CONFIG_PACKAGE_luci-proto-3g=y
CONFIG_PACKAGE_luci-proto-4g=y
CONFIG_PACKAGE_luci-proto-core=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-sgi-cgi=y
CONFIG_PACKAGE_luci-lib-core=y
CONFIG_PACKAGE_luci-lib-core_source=y
CONFIG_PACKAGE_luci-lib-ipkg=y
CONFIG_PACKAGE_luci-lib-json=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-lib-nixio_notls=y
CONFIG_PACKAGE_luci-lib-sys=y
CONFIG_PACKAGE_luci-lib-web=y

89
iop/iop.completion Normal file
View File

@@ -0,0 +1,89 @@
# Bash completion for IOPSYS "./iop" utility
# Source this file into the curent shell or copy it into
# /usr/share/bash-completion/completions/ and start a new shell
# for automatic availability.
_iop_get_profiles()
{
find feeds/feed_inteno_targets/iopsys-*/ -name '*.diff' \
|awk -F'/' '{print$NF}' \
|awk -F. '{print$1}'
}
_iop_get_models()
{
find feeds/feed_inteno_targets/iopsys-*/ -mindepth 1 -maxdepth 1 -type d \
|awk -F'/' '{print$NF}' \
|egrep '^(cg|dg|eg|vg|vox)[0-9]'
}
_iop_get_model_customers()
{
local model=$1
find customerconfigs/$prev -mindepth 1 -maxdepth 1 -type d \
|awk -F'/' '{print$NF}'
}
_iop()
{
local cur prev iopcmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
iopcmds="bootstrap cfe_upgrade cfe_upgrade_latest extract_core \
feeds_update genconfig generate_tarballs install_key \
scp_changes setup_host ssh_install_key ssh_sysupgrade \
ssh_sysupgrade_latest ssh_sysupgrade_latest_w status \
update_package"
if [ $COMP_CWORD -eq 1 ] ; then
# Complete the primary iop command
COMPREPLY=($(compgen -W "${iopcmds}" -- ${cur}))
return 0
else
# Complete the arguments to "iopcmds"
local cmd="${COMP_WORDS[1]}"
case "$cmd" in
extract_core)
if [ "$prev" == "-e" ] ; then
_filedir -d
else
COMPREPLY=( $(compgen -W "-e -h" -- ${cur}) )
fi
return 0
;;
genconfig)
if [ "$prev" == "-p" ] ; then
local profiles=$(_iop_get_profiles)
COMPREPLY=( $(compgen -W "juci $profiles" -- ${cur}) )
elif [[ $cur == -* ]] ; then
COMPREPLY=( $(compgen -W "-c -h -p -s -t -u -v" -- ${cur}) )
else
local models=$(_iop_get_models)
if echo $models |grep -qw -- $prev ; then
local customers=$(_iop_get_model_customers $prev)
COMPREPLY=( $(compgen -W "$customers" -- ${cur}) )
else
COMPREPLY=( $(compgen -W "$models" -- ${cur}) )
fi
fi
return 0
;;
*)
# No arguments or arguments not supported yet
;;
esac
fi
}
complete -F _iop ./iop
complete -F _iop iop

View File

@@ -0,0 +1,42 @@
# this is a developer helper script to install firmware on a remote host running in CFE mode
function usage {
echo "usage: $0 cfe_upgrade <host> <file>"
}
function cfe_upgrade {
if [ -z "$1" ] ; then
usage
echo "Error: host required"
exit 1
fi
if [ -z "$2" ] ; then
usage
echo "Error: firmware filename required"
exit 1
fi
if [ ! -e $2 ] ; then
usage
echo "Error: firmware file does not exist"
exit 1
fi
IMAGE=`basename $2`
echo "CFE upgrade host: $1 with file $IMAGE"
[ "$2" ] && [ -e "$2" ] && curl -i -F filedata=@$2 http://$1/upload.cgi && echo "upgrade done!"
}
register_command "cfe_upgrade" "<host> <file> Install firmware on remote host in CFE mode"
function cfe_upgrade_latest {
if [ -z "$1" ] ; then
echo "usage: $0 cfe_upgrade_latest <host>"
echo "Error: host required"
exit 1
fi
{ cd `dirname $0`
IMAGE=`ls -Art bin/*/*.w | tail -n1`
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop cfe_upgrade $1 $IMAGE
}
}
register_command "cfe_upgrade_latest" "<host> Install latest firmware on remote host in CFE mode"

88
iop/scripts/extract_core.sh Executable file
View File

@@ -0,0 +1,88 @@
#!/bin/bash
# Intermediate repo for core packages
core_repo=git@public.inteno.se:iopsys-cc-core.git
# Repo to which core packages should be imported
import_repo=git@public.inteno.se:feed-inteno-openwrt.git
import_branch=openwrt-cc-core
function export_core {
local path=$1
# export paths to their own branches in an intermediate repo
repo=$(basename $path)
git subtree push -q --prefix=$path $core_repo $repo
}
function update_core {
local path=$1
if [ ! -d $topdir/feeds/feed_inteno_openwrt ]; then
echo "You need to run ./iop feeds_update"
exit -1
fi
# ensure that we are synced with the remote
cd $topdir/feeds/feed_inteno_openwrt
git checkout $import_branch
git pull
# first install subtrees if they don't already exist
repo=$(basename $path)
git subtree add --prefix=$repo $core_repo $repo
# install subtrees in feed from intermediate repo
repo=$(basename $path)
echo "Exporting $repo"
git subtree pull -q -m "Exporting $repo" --prefix=$repo $core_repo $repo
# update import repo sync branch
git push origin $import_branch
}
function display_help {
echo "Usage: ./iop export_core -e path/to/package"
}
function extract_core {
# Dir of script location
topdir=$(pwd)
if [ $# -eq 0 ]; then
display_help
exit -1
fi
# Execute user command
while getopts "he:" opt; do
case $opt in
e)
path=${OPTARG}
echo "Extracting ${path} from core to ${import_repo}:${import_branch}"
export_core $path
update_core $path
;;
h)
display_help
exit 0
;;
\?)
display_help
exit -1
;;
esac
done
}
register_command "extract_core" "Extract core package to feeds_inteno_openwrt"

View File

@@ -30,6 +30,7 @@ function feeds_update {
fi
./scripts/feeds install -f -p feed_inteno_openwrt -a
./scripts/feeds install -f -p feed_inteno_juci -a
./scripts/feeds install -f -p feed_inteno_packages -a
./scripts/feeds install -f -p feed_inteno_broadcom -a
@@ -42,6 +43,9 @@ function feeds_update {
./scripts/feeds install -f -p feed_inteno_packages mtd-utils
./scripts/feeds uninstall qrencode
./scripts/feeds install -f -p feed_inteno_packages qrencode
./scripts/feeds uninstall libwebsockets
./scripts/feeds uninstall libwebsockets-openssl
./scripts/feeds install -f -p feed_inteno_juci libwebsockets
rm -rf package/feeds/oldpackages/libzstream # have to run this for now since uninstall is not working every time

View File

@@ -5,11 +5,10 @@ function genconfig {
export IMPORT=0
export SRCTREEOVERR=0
export FILEDIR="files/"
export CONFIGPATH="configs"
export CONFIGPATH="package/feeds/feed_inteno_packages/iop/configs"
export CUSTCONF="customerconfigs"
export VERBOSE=0
export DEVELOPER=0
export TMPDIR="/tmp/builder/"
LOCAL_MIRROR="http://mirror.inteno.se/mirror"
iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25"
@@ -140,15 +139,18 @@ function genconfig {
exit 1
fi
# Clean base-file package to force rebuild when changing profile
make package/base-files/clean
# Base config on master
v "Config $BOARDTYPE selected"
v "cp $CONFIGPATH/MASTER/config .config"
cp $CONFIGPATH/MASTER/config .config
v "cp $CONFIGPATH/config .config"
cp $CONFIGPATH/config .config
# Apply profile diff to master config if selected
if [ -n "$PROFILE" ]; then
if [ -e "$CONFIGPATH/MASTER/$PROFILE.diff" ]; then
generate_config configs/MASTER/$PROFILE.diff .config
if [ -e "$CONFIGPATH/$PROFILE.diff" ]; then
cat $CONFIGPATH/$PROFILE.diff >> .config
elif [ "$PROFILE" == "juci" ]; then
v "Default profile (juci) is selected."
else
@@ -172,7 +174,7 @@ function genconfig {
fi
if [ -e "$CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff" ]; then
v "Apply $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff"
generate_config $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff .config
cat $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff >> .config
fi
fi
@@ -186,27 +188,29 @@ function genconfig {
echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
# Set default values based on selected parameters
make defconfig
# developer mode selected ?
if [ $DEVELOPER -eq 1 ]; then
# rewrite url to clone with ssh instead of http
echo "CONFIG_GITMIRROR_REWRITE=y" >>.config
[ $bcmAllowed -eq 1 ] && sed -i 's/CONFIG_BCM_OPEN=y/# CONFIG_BCM_OPEN is not set/g' .config
[ $iceAllowed -eq 1 ] && echo "# CONFIG_ICE_OPEN is not set" >> .config || echo "CONFIG_ICE_OPEN=y" >> .config
[ $endptAllowed -eq 1 ] && echo "# CONFIG_ENDPT_OPEN is not set" >> .config || echo "CONFIG_ENDPT_OPEN=y" >> .config
[ $natalieAllowed -eq 1 ] && echo "# CONFIG_NATALIE_OPEN is not set" >> .config || echo "CONFIG_NATALIE_OPEN=y" >> .config
[ $bcmAllowed -eq 0 ] && echo "CONFIG_BCM_OPEN=y" >> .config
[ $iceAllowed -eq 0 ] && echo "CONFIG_ICE_OPEN=y" >> .config
[ $endptAllowed -eq 0 ] && echo "CONFIG_ENDPT_OPEN=y" >> .config
[ $natalieAllowed -eq 0 ] && echo "CONFIG_NATALIE_OPEN=y" >> .config
else
echo "CONFIG_BCM_OPEN=y" >> .config
echo "CONFIG_ICE_OPEN=y" >> .config
echo "CONFIG_ENDPT_OPEN=y" >> .config
echo "CONFIG_NATALIE_OPEN=y" >> .config
fi
# Set default values based on selected parameters
make defconfig
# Temporary fixup for juci/luci profile
if [ "$PROFILE" == "luci" ]; then
sed -i '/CONFIG_DEFAULT_juci/d' .config
sed -i '/CONFIG_PACKAGE_juci/d' .config
sed -i '/CONFIG_PACKAGE_uhttpd/d' .config
fi
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
@@ -245,10 +249,8 @@ function genconfig {
esac
shift;
done
[ -d $TMPDIR ] || mkdir $TMPDIR
setup_dirs
create_and_copy_files "$1" "$2"
[ -d $TMPDIR ] && rm -rf $TMPDIR
use_local_mirror
fi
}

View File

@@ -60,7 +60,7 @@ build_ice_consumer() {
icerelease=$(grep -w "PKG_RELEASE:" ./feeds/feed_inteno_packages/ice-client/Makefile | cut -d'=' -f2)
iceversion=$icebasever$icerelease
ssh inteno@iopsys.inteno.se "ls public/www/iopsys/consumer/ice-client-$profile-$iceversion-$icecommith.tar.gz" && return
cd ./build_dir/target-*_uClibc-0.9.33.*/ice-client-$icebasever/ipkg-brcm*
cd ./build_dir/target-*_uClibc-0.9.33.*/ice-client-$icebasever/ipkg-*
tar -czv ice-client -f ice-client-$profile-$iceversion-$icecommith.tar.gz
scp ice-client-$profile-$iceversion-$icecommith.tar.gz inteno@iopsys.inteno.se:/home/inteno/public/www/iopsys/consumer/
cp ice-client-$profile-$iceversion-$icecommith.tar.gz $curdir/

View File

@@ -0,0 +1,70 @@
# this is a developer helper script to SCP changed files to remote host
ROOT=build_dir/target-mips_uClibc-0.9.33.2/root-iopsys-brcm63xx-mips/
ROOT_OLD=tmp/root_old/
ROOT_TMP=tmp/root_tmp/
function scp_changes_reset {
{ cd `dirname $0`
rm -rf "$ROOT_OLD"
mkdir -p "$ROOT_OLD"
cp -a "$ROOT"* "$ROOT_OLD"
}
}
function scp_changes {
if [ -z "$1" ] ; then
echo "usage: $0 scp_changes <host/-r(eset)/-p(retend)>"
echo "Error: host required"
exit 1
fi
{ cd `dirname $0`
if [ ! -d $ROOT ]; then
echo "$ROOT does not exist"
echo "please build the project first"
exit 1;
fi
if [ "$1" = "-r" ]; then
echo "reset changes"
scp_changes_reset
exit 0
fi
if [ ! -d $ROOT_OLD ]; then
echo "$ROOT_OLD does not exist"
echo "you didn't store state of previous buildroot"
#echo "please run ./scp_changes_reset.sh"
echo "doing it now"
scp_changes_reset
exit 1;
fi
FILES=`diff -rq "$ROOT" "$ROOT_OLD" 2>&1 | sed -ne "s?^Files .* and $ROOT_OLD\\(.*\\) differ?\\1?p" -ne "s?^Only in $ROOT\\(.*\\): \\(.*\\)?\\1/\\2?p"`
if [ "$1" = "-p" ]; then
echo "files that would be copied:"
echo $FILES
exit 0
fi
for f in $FILES
do
mkdir -p "$ROOT_TMP`dirname $f`"
cp -af "$ROOT$f" "$ROOT_TMP$f"
done
if [ -d "$ROOT_TMP" ]; then
echo "scp changed files to $1"
pushd "$ROOT_TMP" 2>&1 >/dev/null
scp -r * root@$1:/
RETVAL=$?
popd 2>&1 >/dev/null
rm -rf "$ROOT_TMP"
if [ "$RETVAL" -eq 0 ]; then
scp_changes_reset
else
echo "scp error"
exit $RETVAL
fi
else
echo "no change"
fi
}
}
register_command "scp_changes" "<host/-r(eset)/-p(retend)> SCP only changed files to device"

View File

@@ -1,175 +0,0 @@
#!/bin/bash
function setup_host {
if [ "$(whoami)" != "root" ]; then
echo "Please run this script as root!"
exit 1
fi
packages_all="bison flex g++ g++-multilib zlib1g-dev gettext gawk svn-buildpackage libncurses5-dev ncurses-term git automake gtk-doc-tools liblzo2-dev uuid-dev execstack"
packages_x64="libc6-dev-i386 lib32z1"
packages_npm="npm nodejs yui-compressor"
curdir=$(pwd)
#===============#
# Prerequisites #
#===============#
mysh=$(ls -hl /bin/sh | awk -F'[ ,/]' '{print$NF}')
if [ "$mysh" != "bash" ]; then
echo "On Debian based systems, e.g. Ubuntu, /bin/sh must point to bash instead of $mysh"
read -p "Do you approve this change (y/n): " ans
if [ "$ans" == "y" ]; then
rm -f /bin/sh
ln -s bash /bin/sh
else
echo "Warning! You haven't pointed /bin/sh to bash."
cd $curdir
exit 1
fi
fi
echo "The packages below must be installed"
echo $packages_all
read -p "Do you approve insallation of these packages (y/n): " ans
if [ "$ans" == "y" ]; then
apt-get install $packages_all
else
cd $curdir
exit 1
fi
if [ "$(uname -m | awk '{print$1}')" == "x86_64" ]; then
echo "You are running a Linux Distribution based on 64-bit kernel"
echo "The packages below must be installed"
echo $packages_x64
read -p "Do you approve insallation of these packages (y/n): " ans
if [ "$ans" == "y" ]; then
apt-get install $packages_x64
else
cd $curdir
exit 1
fi
fi
echo "The packages below must be installed in order to be able to compile JUCI"
echo $packages_npm
read -p "Do you approve insallation of these packages (y/n): " ans
if [ "$ans" == "y" ]; then
apt-get install npm nodejs yui-compressor
npm install -g npm
npm install -g grunt-cli
npm install -g mocha
npm install -g bower
npm install -g uglify-js
npm install -g less
if [ "$(which node)" == "" ]; then
NODEJS=$(which nodejs)
if [ "$NODEJS" != "" ]; then
read -p "Found nodejs executable at $(which nodejs), but no path to 'node'. Do you want to create a symlink? (y/n): " ans
if [ "$ans" == "y" ]; then
ln -s "$NODEJS" "/usr/bin/node"
fi
fi
fi
user=$(who | head -1 | awk '{print$1}')
[ -n $user ] && chown -R $user:$user /home/$user/.npm/
else
cd $curdir
exit 1
fi
# Get the Broadcom toolchain from here and unpack the mips/arm package to /opt:
echo -n "Checking for Broadcom MIPS toolchain: "
if [ -d /opt/toolchains/crosstools-mips-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21 ]; then
install_mips=0
echo "YES"
else
install_mips=1
echo "NO"
fi
echo -n "Checking for Broadcom ARM toolchain: "
if [ -d /opt/toolchains/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL ]; then
install_arm=0
echo "YES"
else
install_arm=1
echo "NO"
fi
if [ $install_mips -eq 1 -o $install_arm -eq 1 ]; then
read -p "Do you approve insallation of missing toolchains (y/n): " ans
if [ "$ans" == "y" ]; then
echo "Downloading toolchain"
else
cd $curdir
exit 1
fi
cd ~
wget http://iopsys.inteno.se/iopsys/toolchain/crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2-full.tar.bz2
tar jxf crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2-full.tar.bz2
cd /
if [ $install_mips -eq 1 ]; then
echo "Installing MIPS toolchain"
tar jxf ~/crosstools-mips-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2.tar.bz2
fi
if [ $install_arm -eq 1 ]; then
echo "Installing ARM toolchain"
tar jxf ~/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL.Rel1.2.tar.bz2
fi
rm -f ~/crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-sources.tar.bz2
rm -f ~/crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2-full.tar.bz2
rm -f ~/crosstools-mip*-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2.tar.bz2
rm -f ~/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL.Rel1.2.tar.bz2
fi
gcc_ver=$(ls -l /usr/bin/gcc-[0-9]* | head -1 | awk '{print$NF}' | cut -d'-' -f2)
if [ "$gcc_ver" != "4.8" ]; then
echo "Your current gcc version is $gcc_ver, but it must be changed to 4.8"
read -p "Do you approve this change (y/n): " ans
if [ "$ans" == "y" ]; then
apt-get install gcc-4.8
apt-get install g++-4.8
apt-get install gcc-4.8-multilib
update-alternatives --install /usr/bin/g++ c++ /usr/bin/g++-4.8 100
update-alternatives --install /usr/bin/g++ c++ /usr/bin/g++-$gcc_ver 90
update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-4.8 100
update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-$gcc_ver 90
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-4.8 100
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-$gcc_ver 90
update-alternatives --set c++ /usr/bin/g++-4.8
update-alternatives --set cc /usr/bin/gcc-4.8
update-alternatives --set cpp /usr/bin/cpp-4.8
ln -s /etc/alternatives/cc /usr/bin/cc
echo "The deafult gcc version has now been changed from $gcc_ver to 4.8"
else
cd $curdir
exit 1
fi
fi
echo ""
echo ""
echo "You have successfully installed and configred prerequisites to be able to build an iopsys firmware"
echo ""
echo ""
cd $curdir
}
register_command "setup_host" "Install needed packets to host machine"

17
iop/scripts/ssh_install_key.sh Executable file
View File

@@ -0,0 +1,17 @@
# this is a developer helper script to install the public ssh key on host running dropbear
function ssh_install_key {
if [ -e ~/.ssh/id_rsa.pub ]; then
echo "Adding public RSA key to $1"
KEY=`cat ~/.ssh/id_rsa.pub`
elif [ -e ~/.ssh/id_dsa.pub ]; then
echo "Adding public DSA key to $1"
KEY=`cat ~/.ssh/id_dsa.pub`
else
echo "No public key found"
exit 1
fi
ssh root@$1 "echo '$KEY' >> /etc/dropbear/authorized_keys" && echo ok
}
register_command "ssh_install_key" "Install the users public ssh key on host running dropbear"

View File

@@ -0,0 +1,56 @@
# this is a developer helper script to install firmware on a remote host with SSH
function usage {
echo "usage: $0 ssh_sysupgrade <host> <file> [opts]"
}
function ssh_sysupgrade {
if [ -z "$1" ] ; then
usage
echo "Error: host required"
exit 1
fi
if [ -z "$2" ] ; then
usage
echo "Error: firmware filename required"
exit 1
fi
if [ ! -e $2 ] ; then
usage
echo "Error: firmware file does not exist"
exit 1
fi
IMAGE=`basename $2`
echo "sysupgrade host: $1 with file $IMAGE"
[ "$2" ] && [ -e "$2" ] && scp $2 root@$1:/tmp/ && ssh root@$1 "sysupgrade $3 /tmp/$IMAGE" && echo "sysupgrade done!"
}
register_command "ssh_sysupgrade" "<host> <file> [opts] Install firmware on remote host with SSH"
function ssh_sysupgrade_latest {
if [ -z "$1" ] ; then
echo "usage: $0 ssh_sysupgrade_latest <host> [opts]"
echo "Error: host required"
exit 1
fi
{ cd `dirname $0`
IMAGE=`ls -Art bin/*/*.y | tail -n1`
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop ssh_sysupgrade $1 $IMAGE $2
}
}
register_command "ssh_sysupgrade_latest" "<host> [opts] Install latest ubifs firmware on remote host with SSH"
function ssh_sysupgrade_latest_w {
if [ -z "$1" ] ; then
echo "usage: $0 ssh_sysupgrade_latest_w <host> [opts]"
echo "Error: host required"
exit 1
fi
{ cd `dirname $0`
IMAGE=`ls -Art bin/*/*.w | tail -n1`
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop ssh_sysupgrade $1 $IMAGE $2
}
}
register_command "ssh_sysupgrade_latest_w" "<host> [opts] Install latest jffs2 firmware on remote host with SSH"

View File

@@ -17,7 +17,7 @@ define Package/iup
SECTION:=net
CATEGORY:=Network
TITLE:=iup client
DEPENDS:=+libuci +uci +busybox
DEPENDS:=+libuci +uci +busybox
endef
define Package/iup/description

View File

@@ -48,32 +48,35 @@ init_iup() {
config_get starttime polling starttime
### Ask for IUP related DHCP options only if IUP is enabled ###
local enabled
local newreqopts=
local baseopts=
local reqopts="$(uci -q get network.wan.reqopts)"
local iupopts="66 67 128 224"
local ropt iopt
local net
config_get enabled iup enabled "on"
for ropt in $reqopts; do
case $ropt in
66|67|128|224) ;;
*) baseopts="$baseopts $ropt" ;;
esac
done
ropt=""
reqopts="$baseopts $iupopts"
for ropt in $reqopts; do
case $ropt in
66|67|128|224) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
*) newreqopts="$newreqopts $ropt" ;;
esac
done
new_reqopts() {
local net=$1
local enabled
local newreqopts=
local baseopts=
local reqopts="$(uci -q get network.$net.reqopts)"
local iupopts="66 67 128 224"
local ropt iopt
config_get enabled iup enabled "on"
for ropt in $reqopts; do
case $ropt in
66|67|128|224) ;;
*) baseopts="$baseopts $ropt" ;;
esac
done
ropt=""
reqopts="$baseopts $iupopts"
for ropt in $reqopts; do
case $ropt in
66|67|128|224) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
*) newreqopts="$newreqopts $ropt" ;;
esac
done
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
echo "$newreqopts"
}
for net in $(management_interfaces); do
uci -q set network.$net.reqopts="$newreqopts"
uci -q set network.$net.reqopts="$(new_reqopts $net)"
done
uci commit network
ubus call network reload

View File

@@ -1,6 +1,9 @@
#!/bin/sh
echo $$ > /var/run/iup.pid
. /lib/functions.sh
. /lib/functions/network.sh
. /usr/share/libubox/jshn.sh
include /lib/upgrade
@@ -52,8 +55,8 @@ get_packages()
local pack
pack=$(grep -w 'package' $1)
pack=${pack//package/}
pack=${pack//[\'|\"]/}
echo $pack
#pack=${pack//[\'|\"]/}
echo $pack | tr -d '\"' | tr -d "'"
}
reload ()
@@ -231,10 +234,141 @@ handle_Downloaded_file()
fi
}
###main
# function: change_to_vlan
# arg 1 = vlan id
# arg 2 = vlan priority
# arg 3 = $INTERFACE
change_to_vlan() {
# local variables.
local name="vlan$1" # construct name = vlan + vlanid.
local base_dev # varible holding device name of wan port.
local wan_if # variable holding wan interfaces.
local new_wan_if #
# extract device name.
network_get_device base_dev $3
# bring down old interface/device.
ifdown "${base_dev}"
logger -t dhcp_opt132 "bringing down old if: ${base_dev}"
# extract base name of device.
base_dev=$(echo ${base_dev} | cut -d. -f1)
# add "VLAN interface" to the "end of the file".
uci add layer2_interface_vlan vlan_interface
uci set layer2_interface_vlan.@vlan_interface[-1].name=${name}
uci set layer2_interface_vlan.@vlan_interface[-1].vlan8021q=${1}
uci set layer2_interface_vlan.@vlan_interface[-1].vlan8021p=${2}
uci set layer2_interface_vlan.@vlan_interface[-1].ifname="${base_dev}.${1}"
uci set layer2_interface_vlan.@vlan_interface[-1].baseifname=${base_dev}
# and commit the change.
uci commit layer2_interface_vlan
logger -t dhcp_opt132 "committed update to file layer2_interface_vlan"
# reload configuration files.
/etc/init.d/layer2_interface_vlan reload
logger -t dhcp_opt132 "reload layer2_interface_vlan config"
# replace old interface (like eth0.1 with new eth0.101).
wan_if=$(uci get network.$3.ifname)
logger -t dhcp_opt132 "old network.${3}.ifname: $wan_if"
# loop through the string, remove any word close to "base_dev".
for word in ${wan_if}; do
#echo $word
case $word in
${base_dev}*) # don't add if.
;;
*) new_wan_if=${word}' '${new_wan_if} # add if.
#new_wan_if+=" ${word}" # probably not working in ash.
;;
esac
done
# append new interface.
new_wan_if=${new_wan_if}${base_dev}.${1}
uci set network.wan.ifname="${new_wan_if}"
# and commit the change.
uci commit network
logger -t dhcp_opt132 "committed update to file network: ifname=${new_wan_if}"
# reboot into new if configuration.
reboot
}
handle_option224()
{
if [ -z "$1" ] ; then
echo "No argument"
return 1
fi
if [ $(echo $1|grep -o "," | wc -l) -eq 0 ] ; then
url=$1
else
url=$(echo $1|cut -d',' -f1)
a=$(echo $1|cut -d',' -f2)
b=$(echo $1|cut -d',' -f3)
c=$(echo $1|cut -d',' -f4)
fi
echo "url" $url
echo "a" $a
echo "b" $b
echo "c" $c
currdate=$(date +"%Y-%m-%d")
active=0
if [ -z $a ] ; then
active=1
elif [ $a ] && [ $b ] && [ $a -lt 25 ] ; then
#Time
begin=$(date +%s -d"$currdate $a")
now=$(date +%s)
end=$((begin+3600*$b))
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
active=1
fi
elif [ $a ] && [ $b ] && [ $c ] && [ $a -gt 25 ] ; then
#Date
y=$(echo $a| cut -c1-4)
m=$(echo $a| cut -c5-6)
d=$(echo $a| cut -c7-8)
begin=$(date +%s -d"$y-$m-$d $b")
now=$(date +%s)
end=$((begin+3600*$c))
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
active=1
fi
else
echo "Bad format"
return 1
fi
softwareminuspath=${url##*/}
if [ $url ] && [ $active -eq 1 ]; then
echo "Software version to download $softwareminuspath"
local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }")
json_load "$sysinfo"
json_get_var firmware firmware
local firmware_new=${softwareminuspath%.*} # remove extension (.w, .y or .y2) from filename
if [ "$firmware_new" != "$firmware" ] ; then
echo "Image found $url will start flashing"
wait_for_dns $url
/sbin/sysupgrade -v $url &
return 1
else
echo "Will not update software, already up to date"
return 0
fi
fi
}
### MAIN ###
while [ -n "$1" ]; do
case "$1" in
-v) export VERBOSE="$(($VERBOSE + 1))";;
-q) export VERBOSE="$(($VERBOSE - 1))";;
-*)
@@ -246,15 +380,65 @@ while [ -n "$1" ]; do
shift;
done
# Process IUP related DHCP options #
if [ -n "$1" ]; then
local privopt224 vendorspecinf httpurl128
local tftp bootfile vlanid vlanpriority interface
json_load "$1"
json_get_var interface interface
json_get_var privopt224 privopt224
json_get_var vendorspecinf vendorspecinf
json_get_var httpurl128 httpurl128
json_get_var tftp tftp
json_get_var bootfile bootfile
json_get_var vlanid vlanid
json_get_var vlanpriority vlanpriority
if [ $privopt224 ]; then
echo "Option224 recived " $privopt224 > /dev/console
handle_option224 $privopt224
[ $? -eq 1 ] && exit
fi
if [ $vendorspecinf ]; then
url=${vendorspecinf%%,*}; rest=${vendorspecinf#*,}
provisioningcode=${rest%%,*};
uci_set_state provisioning iup url "$url"
uci_set_state provisioning iup provisioningcode "$provisioningcode"
elif [ $httpurl128 ]; then
uci_set_state provisioning iup urliup "$httpurl128"
elif [ $tftp ]; then
if [ ${bootfile:0:1} == '/' ]; then
uci_set_state provisioning iup urliup "tftp://$tftp$bootfile"
else
uci_set_state provisioning iup urliup "tftp://$tftp/$bootfile"
fi
fi
# if we get vlanid and maybe vlanpriority, configure for that.
if [ -n "$vlanid" -a -n "$vlanpriority" ]; then
logger -t dhcp_opt132 "vlanid: ${vlanid}, vlanpriority: ${vlanpriority}"
change_to_vlan ${vlanid} ${vlanpriority} ${interface}
elif [ -n "$vlanid" ]; then
logger -t dhcp_opt132 "vlanid: ${vlanid}"
change_to_vlan ${vlanid} 0 ${interface}
else
logger -t dhcp_opt132 "no vlanid given"
fi
fi
local iupurl
local configurl
local software
local sofwareminuspath
config_load provisioning
#check if iup should be used or if its overridden by /etc/config
config_get configurl configserver url
config_get reboot configserver reboot
config_get iupurl iup urliup
if [ $configurl ]; then
handle_provisioning configserver "0"
elif [ $iupurl ]; then
@@ -263,6 +447,7 @@ else
v "No Provisioning Server Found"
exit
fi
config_load provisioning
config_foreach handle_provisioning subconfig "0"
config_get software uppgradeserver url
@@ -295,4 +480,5 @@ if [ "$reboot" == "on" ]; then
v "Reboot Signaled"
/sbin/reboot
fi
rm -rf /var/run/iup.pid

View File

@@ -1,75 +0,0 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
if [ -z $1 ] ; then
echo "No argument"
exit 1
fi
if [ $(echo $1|grep -o "," | wc -l) -eq 0 ] ; then
url=$1
else
url=$(echo $1|cut -d',' -f1)
a=$(echo $1|cut -d',' -f2)
b=$(echo $1|cut -d',' -f3)
c=$(echo $1|cut -d',' -f4)
fi
echo "url" $url
echo "a" $a
echo "b" $b
echo "c" $c
currdate=$(date +"%Y-%m-%d")
active=0
if [ -z $a ] ; then
active=1
elif [ $a ] && [ $b ] && [ $a -lt 25 ] ; then
#Time
begin=$(date +%s -d"$currdate $a")
now=$(date +%s)
end=$((begin+3600*$b))
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
active=1
fi
elif [ $a ] && [ $b ] && [ $c ] && [ $a -gt 25 ] ; then
#Date
y=$(echo $a| cut -c1-4)
m=$(echo $a| cut -c5-6)
d=$(echo $a| cut -c7-8)
begin=$(date +%s -d"$y-$m-$d $b")
now=$(date +%s)
end=$((begin+3600*$c))
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
active=1
fi
else
echo "Bad format"
exit 1
fi
sofwareminuspath=${url##*/}
if [ $url ] && [ $active -eq 1 ]; then
echo "Software version to download $sofwareminuspath"
local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }")
json_load "$sysinfo"
json_get_var firmware firmware
json_get_var filesystem filesystem
if [ "$filesystem" == "JFFS2" ] ; then
firmware=$firmware.w
else
firmware=$firmware.y
fi
if [ "$sofwareminuspath" == "${sofwareminuspath/$firmware/}" ] ; then
echo "Image found $url will start flashing"
/sbin/sysupgrade -v $url
else
echo "Will not update software, already up to date"
fi
fi

View File

@@ -99,9 +99,9 @@ atm_inf_conf() {
checkxtmlist $atmtype $pcr $scr $mbs
ret="$?"
xtmctl operate conn --add 1.$vpi.$vci aal5 $encaps 0 $ret $ret
xtmctl operate conn --addq 1.$vpi.$vci 0 wrr 1
xtmctl operate conn --addq 1.$vpi.$vci 7 wrr 1 # fixes pppoe disconnect issue
xtmctl operate conn --add 1.$vpi.$vci aal5 $encaps 0 1 $ret
xtmctl operate conn --addq 1.$vpi.$vci 0 wrr 1 # low priority queue
xtmctl operate conn --addq 1.$vpi.$vci 7 wrr 1 # high priority queue
xtmctl operate conn --createnetdev 1.$vpi.$vci ${ifname%%.*}
xtmctl operate intf --state 1 enable

105
libcgroup/Makefile Normal file
View File

@@ -0,0 +1,105 @@
#
# Copyright (C) 2016 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:=libcgroup
PKG_VERSION:=0.41
PKG_RELEASE:=1
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE_VERSION:=2186c97f60df7efe86ddadd5e3d9d36dd4923b98
PKG_SOURCE_URL:=git://git.code.sf.net/p/libcg/libcg
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)+git$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
#PKG_BUILD_PARALLEL:=1
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
include $(INCLUDE_DIR)/package.mk
define Package/libcgroup
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libpthread
TITLE:=Control group configuration library
URL:=https://sourceforge.net/p/libcg/
endef
define Package/libcgroup/description
Control groups, a new kernel feature in Linux 2.6.24 provides a file system
interface to manipulate and control the details on task grouping including
creation of new task groups (control groups), permission handling and task
assignment.
endef
define Package/libcgroup-daemon
SECTION:=base
CATEGORY:=Base system
DEPENDS:=+libcgroup +librt
TITLE:=Control group management daemon
URL:=https://sourceforge.net/p/libcg/
endef
define Package/libcgroup-utils
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libcgroup
TITLE:=Control group configuration utilities
URL:=https://sourceforge.net/p/libcg/
endef
#define Package/libcgroup/conffiles
# /etc/config/cgroups
#endef
CONFIGURE_ARGS += \
--disable-bindings \
--disable-pam \
--enable-static \
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libcgroup
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libcgroup/*.h $(1)/usr/include/libcgroup/
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.* $(1)/usr/lib/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcgroup.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libcgroup/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.so* $(1)/usr/lib/
endef
define Package/libcgroup-daemon/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
# move to its own package?
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
$(INSTALL_CONF) ./files/cgroups.config $(1)/etc/config/cgroups
$(INSTALL_BIN) ./files/cgroups.init $(1)/etc/init.d/cgroups
endef
define Package/libcgroup-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
endef
$(eval $(call BuildPackage,libcgroup))
$(eval $(call BuildPackage,libcgroup-daemon))
$(eval $(call BuildPackage,libcgroup-utils))

View File

@@ -0,0 +1,40 @@
config cgroups cgroups
option enabled 1
option defgroup iopsys/normal
config cgroup _root_
list option memory.move_charge_at_immigrate=1
config cgroup iopsys
list option cpu.shares=4096
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_normal
list option cpu.shares=1024
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup iopsys_high
list option cpu.shares=4096
list option memory.limit_in_bytes=-1
list option memory.move_charge_at_immigrate=1
config cgroup 3prt
list option cpu.shares=1024
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_normal
list option cpu.shares=1024
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config cgroup 3prt_high
list option cpu.shares=4096
list option memory.limit_in_bytes=75M
list option memory.move_charge_at_immigrate=1
config procmap procmap
list procmap minidlna=3prt/normal

123
libcgroup/files/cgroups.init Executable file
View File

@@ -0,0 +1,123 @@
#!/bin/sh /etc/rc.common
START=01
USE_PROCD=1
#PROCD_DEBUG=1
NAME=cgrulesengd
CGBASEDIR=/sys/fs/cgroup
CGCONFIG="cgroups"
CGRULESCONF=/tmp/cgrules.conf
CGCONFIGCONF=/tmp/cgconfig.conf
cgroupinit_add_knob_val_to_list () {
CG_KNOB_VAL_LIST="$CG_KNOB_VAL_LIST
$1"
}
cgroupinit_create_group () {
local cgrp=$1
local dir curr
if [ "$cgrp" == "_root_" ]; then
dir=.
else
dir=$(echo $cgrp |tr '_' '/')
fi
echo -e "group $dir {" >> $CGCONFIGCONF
CG_KNOB_VAL_LIST=
config_list_foreach $cgrp option cgroupinit_add_knob_val_to_list
CG_KNOB_VAL_LIST=$(echo "$CG_KNOB_VAL_LIST" |sort)
curr="_none_"
for knob_val in $CG_KNOB_VAL_LIST ; do
local ctrlr knob val
knob=$(echo $knob_val |awk -F= '{print $1}')
ctrlr=$(echo $knob |awk -F. '{print $1}')
val=$(echo $knob_val |awk -F= '{print $2}')
if [ "$curr" != "$ctrlr" ]; then
[ "$curr" == "_none_" ] || echo -e "\t}" >> $CGCONFIGCONF
curr=$ctrlr
echo -e "\t$curr {" >> $CGCONFIGCONF
fi
echo -e "\t\t$knob = \"$val\";" >> $CGCONFIGCONF
done
[ "$curr" == "_none_" ] || echo -e "\t}" >> $CGCONFIGCONF
echo -e "}\n" >> $CGCONFIGCONF
}
cgroupinit_add_to_rules () {
local name_grp=$1
local name grp
name=$(echo $name_grp |awk -F= '{print $1}')
grp=$(echo $name_grp |awk -F= '{print $2}')
echo -e "*:$name\t*\t$grp" >> $CGRULESCONF
}
cgroupinit_generate_config () {
local enab defgrp
config_load $CGCONFIG
config_get enab cgroups enabled "1"
[ $enab -eq 0 ] && return 1
config_get defgrp cgroups defgroup "_undef_"
[ "$defgrp" == "_undef_" ] && return 1
# mount here instead of in cgconfigparser to get all options right
# mounting without any controllers listed means mount all available
if ! grep -q " $CGBASEDIR cgroup " /proc/mounts; then
mount -t cgroup -o nodev,noexec,nosuid cgroup $CGBASEDIR
[ $? -eq 0 ] || return 1
fi
echo -n '' > $CGCONFIGCONF
config_foreach cgroupinit_create_group cgroup
echo -n '' > $CGRULESCONF
config_list_foreach procmap procmap cgroupinit_add_to_rules
echo -e "*\t*\t$defgrp" >> $CGRULESCONF
return 0
}
# cgrulesengd has hardcoded paths for configuration files
# use symlinks to point to generated config files
cgroupinit_cgrulesengd_fixup () {
[ -r /etc/cgrules.conf ] || ln -s $CGRULESCONF /etc/cgrules.conf
[ -r /etc/cgconfig.conf ] || ln -s $CGCONFIGCONF /etc/cgconfig.conf
[ -d /etc/cgconfig.d ] || mkdir /etc/cgconfig.d
}
start_service () {
cgroupinit_generate_config
[ $? -eq 0 ] || return
cgroupinit_cgrulesengd_fixup
/usr/sbin/cgconfigparser -l $CGCONFIGCONF || return
procd_open_instance
procd_set_param command /usr/sbin/cgrulesengd --nodaemon --syslog
procd_set_param respawn
procd_close_instance
}
stop_service () {
/usr/sbin/cgclear
}
service_triggers() {
procd_add_reload_trigger $CGCONFIG
}

View File

@@ -12,7 +12,7 @@ PKG_NAME:=peripheral_manager
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=bc5b8227410dac75d2525ef1946b842766982830
PKG_SOURCE_VERSION:=2a16b98543580d376d5862a34415f24d8be15b27
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se/peripheral_manager

View File

@@ -15,8 +15,9 @@ start_service() {
}
service_running() {
ubus -t 2 wait_for leds
ubus -t 2 wait_for led.status
ubus call led.status set '{"state":"ok"}'
ubus -t 2 wait_for button
}
stop() {

View File

@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=3.1.0
PKG_VERSION:=3.1.7
PKG_SOURCE_VERSION:=f7e856ec68627842c1e79eadb5b856ec629bb637
PKG_SOURCE_VERSION:=6ad4d1ec64e17889ef5be674329234f948137837
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/questd
@@ -18,16 +18,21 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
ifeq ($(CONFIG_PACKAGE_bcmkernel),y)
BCMKERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
QUESTD_CLFAGS:=-DIOPSYS_BROADCOM
KERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
QUESTD_CLFAGS:=-DIOPSYS_BROADCOM
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
QUESTD_CLFAGS:=-DIOPSYS_MARVELL
else ifeq ($(CONFIG_TARGET_lantiq_xrx500),y)
QUESTD_CLFAGS:=-DIOPSYS_LANTIQ
else
BCMKERNEL_DIR:=$(BUILD_DIR)/bcmopen-consumer/bcm963xx
$(info (UNEXPECTED CONFIG TARGET))
endif
export BCMKERNEL_DIR
export KERNEL_DIR
export QUESTD_CLFAGS
define Package/questd
CATEGORY:=Utilities
@@ -43,10 +48,9 @@ endef
define Package/questd/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/tmp
$(INSTALL_BIN) $(PKG_BUILD_DIR)/questd $(1)/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ueventd $(1)/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uscriptd $(1)/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wificontrol $(1)/sbin/
endef
$(eval $(call BuildPackage,questd))

View File

@@ -16,17 +16,11 @@ start_service() {
procd_set_param command "/sbin/uscriptd"
procd_set_param respawn
procd_close_instance
procd_open_instance
procd_set_param command "/sbin/ueventd"
procd_set_param respawn
procd_close_instance
}
stop() {
service_stop /sbin/questd
service_stop /sbin/uscriptd
service_stop /sbin/ueventd
}
service_triggers()

View File

@@ -1,5 +0,0 @@
igmp snooping 2 proxy 1 lan2lan-snooping 0/0, rate-limit 0pps, priority -1
bridge device src-dev #tags lan-tci wan-tci group mode RxGroup source reporter timeout Index ExcludPt
br-lan eth5 eth2.1 00 0x0000 0xffffffff 0xe0027ffe EX 0xe0027ffe 0x00000000 0xc0a801f1 258 0x401e0001 -1
br-lan eth5 eth2.1 00 0x0000 0xffffffff 0xefc3ffff EX 0xefc3ffff 0x00000000 0xc0a801f1 258 0x400e0001 -1
br-lan eth5 eth2.1 00 0x0000 0xffffffff 0xefffffff EX 0xefffffff 0x00000000 0xc0a801f1 258 0x40070001 -1

23
samba3/Config.in Normal file
View File

@@ -0,0 +1,23 @@
config SAMBA3_CONFIG_DEBUG
bool "Enable Logging for samba3"
depends on PACKAGE_samba3
default n
help
Enables debugging support (will make binaries *much* bigger)
Also increases MAX_DEBUG_LEVEL to get more messages (also increases binary sizes!)
config SAMBA3_CONFIG_SMALLER
bool "Make samba3 even smaller"
depends on PACKAGE_samba3
default y
help
Removes support for ???
Saves about 18kB for smbd, about 16kB for nmbd and about 17kB for smbpasswd
config SAMBA3_CONFIG_NO_PRINTING
bool "Remove shared printing support"
depends on PACKAGE_samba3
default y
help
Removes shared printing support.
Saves about 18kB for smbd, about 15kB for nmbd and about 18kB for smbpasswd

146
samba3/Makefile Normal file
View File

@@ -0,0 +1,146 @@
#
# Copyright (C) 2008-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:=samba3
PKG_VERSION:=3.0.37
PKG_RELEASE:=1
PKG_MD5SUM:=11ed2bfef4090bd5736b194b43f67289
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions/
PKG_SOURCE:=samba-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/samba-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
#PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/samba3/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
URL:=http://www.samba.org/
endef
define Package/samba3
$(call Package/samba3/Default)
TITLE:=SMB server for file and printer sharing
DEPENDS:=+libpthread +libpopt $(ICONV_DEPENDS) +libattr
endef
define Package/samba3-nmbd
$(call Package/samba3/Default)
TITLE:=NetBIOS name server
DEPENDS:=+samba3
endef
define Package/samba3-mountcifs
$(call Package/samba3/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Mount utility for samba shares
endef
define Package/samba3/description
SMB server for file and printer sharing
Also contains a SMB password utility (smbpasswd)
Made small with patches taken from AVM GPL releases and freetz
endef
define Package/samba3-nmbd/description
NetBIOS name server
Made small with patches taken from AVM GPL releases and freetz
endef
define Package/cifsmount/description
An user space helper utility for mounting remote CIFS shares.
endef
define Package/samba3/conffiles
/etc/config/samba
/etc/samba/smb.conf.template
endef
define Package/samba3/config
source "$(SOURCE)/Config.in"
endef
TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_CONFIG_DEBUG),-DSAMBA_DEBUG,-DMAX_DEBUG_LEVEL=2)
TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_CONFIG_SMALLER),-DAVM_SMALLER)
TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_CONFIG_NO_PRINTING),-DAVM_NO_PRINTING)
CONFIGURE_PATH:=source
CONFIGURE_ARGS+= \
$(if $(CONFIG_SAMBA3_CONFIG_DEBUG),--enable-debug) \
--without-krb5 \
--without-ads \
--without-ldap \
--enable-largefile \
--with-configdir=/etc/samba \
--with-libiconv=$(ICONV_PREFIX) \
--with-privatedir=/etc/samba
# Make sure we tell the configure script that we support negative enum values and want to use setresuid
CONFIGURE_VARS+= \
SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \
samba_cv_USE_SETEUID=no \
samba_cv_have_setresuid=yes \
samba_cv_USE_SETRESUID=yes \
samba_cv_HAVE_C99_VSNPRINTF=yes \
samba_cv_have_longlong=yes \
ac_cv_type_long_long=yes \
MAKE_PATH=source
MAKE_FLAGS += \
$(if $(CONFIG_SAMBA3_CONFIG_NO_PRINTING),OWRT_NO_PRINTING=1) \
$(if $(CONFIG_SAMBA3_CONFIG_SMALLER),OWRT_SMALLER=1)
#define Build/Configure
# $(SH) pushd $(PKG_BUILD_DIR)/source && ./autogen.sh ; popd
# $(Build/Configure/Default)
#endef
define Build/Compile
# Ugly fix for parallel building (without this some generated files will be missing upon clean build)
$(call Build/Compile/Default, proto_exists)
$(call Build/Compile/Default, \
$(if $(CONFIG_PACKAGE_samba3),bin/smbd bin/smbpasswd) \
$(if $(CONFIG_PACKAGE_samba3-nmbd),bin/nmbd) \
$(if $(CONFIG_PACKAGE_samba3-mountcifs),bin/mount.cifs bin/umount.cifs) \
)
endef
define Package/samba3/install
$(INSTALL_DIR) $(1)/etc/{samba,init.d,config}
$(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
$(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
$(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba/
touch $(1)/etc/samba/smbpasswd
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd $(1)/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd $(1)/bin/
endef
define Package/samba3-nmbd/install
$(INSTALL_DIR) $(1)/etc/init.d
# $(INSTALL_BIN) ./files/samba-nmbd.init $(1)/etc/init.d/samba-nmbd
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd $(1)/bin/
endef
define Package/samba3-mountcifs/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/mount.cifs $(1)/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/umount.cifs $(1)/bin/
endef
$(eval $(call BuildPackage,samba3))
$(eval $(call BuildPackage,samba3-nmbd))
$(eval $(call BuildPackage,samba3-mountcifs))

56
samba3/files/config-lfs.h Normal file
View File

@@ -0,0 +1,56 @@
#undef HAVE_CREAT64
#define HAVE_CREAT64 1
#undef HAVE_FSEEKO64
#define HAVE_FSEEKO64 1
#undef HAVE_FSTAT64
#define HAVE_FSTAT64 1
#undef HAVE_FTELLO64
#define HAVE_FTELLO64 1
#undef HAVE_FTRUNCATE64
#define HAVE_FTRUNCATE64 1
#undef HAVE_LSEEK64
#define HAVE_LSEEK64 1
#undef HAVE_LSTAT64
#define HAVE_LSTAT64 1
#undef HAVE_OPEN64
#define HAVE_OPEN64 1
#undef HAVE_PREAD64
#define HAVE_PREAD64 1
#undef HAVE_PWRITE64
#define HAVE_PWRITE64 1
#undef HAVE_READDIR64
#define HAVE_READDIR64 1
#undef HAVE_STAT64
#define HAVE_STAT64 1
#undef HAVE_STRUCT_FLOCK64
#define HAVE_STRUCT_FLOCK64 1
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#undef SIZEOF_OFF_T
#define SIZEOF_OFF_T 8
#undef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#undef _GNU_SOURCE
#define _GNU_SOURCE 1
#undef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE 1
#undef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE 1

View File

@@ -0,0 +1,12 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2011 OpenWrt.org
START=61
start() {
service_start /bin/nmbd -D
}
stop() {
service_stop /bin/nmbd
}

View File

@@ -0,0 +1,81 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2011 OpenWrt.org
START=60
smb_header() {
local name
local workgroup
local description
local homes
local interface
config_get name $1 name
config_get workgroup $1 workgroup
config_get description $1 description
config_get homes $1 homes
config_get interface $1 interface "lan"
# resolve interfaces
local interfaces=$(
include /lib/network
scan_interfaces
local net ifname; for net in $interface; do
config_get ifname "$net" ifname "$net"
echo -n "$ifname "
done
)
[ -z "$name" ] && name=openwrt
[ -z "$workgroup" ] && workgroup=openwrt
[ -z "$description" ] && description=openwrt
mkdir -p /var/etc
cp /etc/samba/smb.conf.template /var/etc/smb.conf
[ -L /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
sed -i "s/|NAME|/$name/g" /var/etc/smb.conf
sed -i "s/|WORKGROUP|/$workgroup/g" /var/etc/smb.conf
sed -i "s/|DESCRIPTION|/$description/g" /var/etc/smb.conf
sed -i "s/|INTERFACES|/$interfaces/g" /var/etc/smb.conf
[ "$homes" == "1" ] && {
echo -e "\n[homes]\n\tcomment = Home Directories\n\tbrowseable = no\n\tread only = no\n\tcreate mode = 0750" >> /var/etc/smb.conf
}
}
smb_add_share() {
local name
local path
local users
local read_only
local guest_ok
local create_mask
local dir_mask
config_get name $1 name
config_get path $1 path
config_get users $1 users
config_get read_only $1 read_only
config_get guest_ok $1 guest_ok
config_get create_mask $1 create_mask
config_get dir_mask $1 dir_mask
[ -z "$name" -o -z "$path" ] && return
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
[ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
}
start() {
config_load samba
config_foreach smb_header samba
config_foreach smb_add_share sambashare
service_start /bin/smbd -D
}
stop() {
service_stop /bin/smbd
}

View File

@@ -0,0 +1,7 @@
config samba
option 'name' 'IntenoSMB'
option 'workgroup' 'IntenoSMB'
option 'description' 'IntenoSMB'
option 'homes' '0'
option 'interface' 'lan'

168
samba3/files/samba.init Executable file
View File

@@ -0,0 +1,168 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2012 OpenWrt.org
START=60
STOP=40
USE_PROCD=1
useradd()
{
local user
local password
config_get user $1 user
config_get password $1 password
if ! $(grep -rq "^$user:" /etc/passwd) ; then
echo "adding user $user"
adduser $user -s /bin/false -D -H -h /mnt/$user -g "samba,pass=$password" && smbpasswd $user $password
else
tmp=$(grep -r "^$user:" /etc/passwd | cut -d":" -f5)
if $(echo $tmp | grep -rq "^samba") ; then
if [ "$tmp" != "samba,pass=$password" ] ; then
echo "change user $user"
deluser $user
adduser $user -s /bin/false -D -H -h /mnt/$user -g "samba,pass=$password" && smbpasswd $user $password
fi
else
echo "activating samba for system user $user"
smbpasswd $user $password
fi
fi
}
samba_user_exists()
{
local user
config_get user $1 user
[ "$user" == "$2" ] && echo "1" && break
}
purgepasswd()
{
for us in `grep -r "^.*:" /etc/samba/smbpasswd | cut -d":" -f1`; do
if [ -z "$(config_foreach samba_user_exists sambausers $us)" ] ; then
smbpasswd -del $us
grep -r "^$us:" /etc/passwd | cut -d":" -f5 | grep -rq "^samba" && deluser $us
fi
done
# delete left over samba users in case they were not in /etc/samba/smbpasswd
for us in `grep ":/mnt/" /etc/passwd | cut -d":" -f1`; do
deluser $us
done
}
smb_header() {
local interface
config_get interface $1 interface
# resolve interfaces
local interfaces=$(
. /lib/functions/network.sh
local net
for net in $interface; do
local device
network_get_device device "$net" && {
local subnet
network_get_subnet subnet "$net" && echo -n "$subnet "
network_get_subnet6 subnet "$net" && echo -n "$subnet "
}
echo -n "${device:-$net} "
done
)
local name workgroup description charset
local hostname="$(uci_get system.@system[0].hostname)"
config_get name $1 name "${hostname:-OpenWrt}"
config_get workgroup $1 workgroup "${hostname:-OpenWrt}"
config_get description $1 description "Samba on ${hostname:-OpenWrt}"
config_get charset $1 charset "UTF-8"
mkdir -p /var/etc
sed -e "s#|NAME|#$name#g" \
-e "s#|WORKGROUP|#$workgroup#g" \
-e "s#|DESCRIPTION|#$description#g" \
-e "s#|INTERFACES|#$interfaces#g" \
-e "s#|CHARSET|#$charset#g" \
/etc/samba/smb.conf.template > /var/etc/smb.conf
local homes
config_get_bool homes $1 homes 0
[ $homes -gt 0 ] && {
cat <<EOT >> /var/etc/smb.conf
[homes]
comment = Home Directories
browsable = no
read only = no
create mode = 0750
EOT
}
[ -L /etc/samba/smb.conf ] || $(rm -f /etc/samba/smb.conf; ln -nsf /var/etc/smb.conf /etc/samba/smb.conf)
}
smb_add_share() {
local name
local path
local users
local read_only
local guest_ok
local create_mask
local dir_mask
local browseable
local dirpath
config_get name $1 name
config_get path $1 path
config_get users $1 users
config_get read_only $1 read_only
config_get guest_ok $1 guest_ok
config_get create_mask $1 create_mask
config_get dir_mask $1 dir_mask
config_get browseable $1 browseable
config_get dirpath $1 dirpath
path="$path/$dirpath"
[ -z "$name" -o -z "$path" ] && return
echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf
[ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf
[ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf
[ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
[ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf
[ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf
[ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/smb.conf
}
start_service() {
config_load samba
purgepasswd
config_foreach useradd sambausers
config_foreach smb_header samba
config_foreach smb_add_share sambashare
procd_open_instance
procd_set_param command "/bin/smbd" -F
procd_close_instance
procd_open_instance
procd_set_param command "/bin/nmbd" -F
procd_close_instance
}
stop_service() {
service_stop /bin/smbd
service_stop /bin/nmbd
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger samba network
}

View File

@@ -0,0 +1,19 @@
[global]
netbios name = |NAME|
workgroup = |WORKGROUP|
server string = |DESCRIPTION|
syslog = 10
encrypt passwords = true
passdb backend = smbpasswd
obey pam restrictions = yes
socket options = TCP_NODELAY
unix charset = UTF-8
preferred master = yes
os level = 20
security = user
guest account = nobody
invalid users = root
smb passwd file = /etc/samba/smbpasswd
interfaces = |INTERFACES|
bind interfaces only = yes

1719
samba3/patches/100-avm.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
Index: samba-3.0.37/source/popt/popt.c
===================================================================
--- samba-3.0.37.orig/source/popt/popt.c 2011-04-11 23:35:04.000000000 +0200
+++ samba-3.0.37/source/popt/popt.c 2011-04-11 23:35:10.000000000 +0200
@@ -10,13 +10,14 @@
#include "system.h"
-#if HAVE_FLOAT_H
+//#if HAVE_FLOAT_H
#include <float.h>
-#endif
+//#endif
#include <math.h>
#include "findme.h"
#include "poptint.h"
+#include "../include/config.h"
#ifdef MYDEBUG
/*@unchecked@*/
@@ -388,7 +389,7 @@
sprintf(s, "%s/%s", con->execPath, item->argv[0]);
argv[argc] = s;
} else {
- argv[argc] = findProgramPath(item->argv[0]);
+ argv[argc] = ""/*findProgramPath(item->argv[0])*/;
}
if (argv[argc++] == NULL) return POPT_ERROR_NOARG;
@@ -1246,4 +1247,3 @@
return numargs;
}
-/*@=boundswrite@*/
Index: samba-3.0.37/source/modules/vfs_default.c
===================================================================
--- samba-3.0.37.orig/source/modules/vfs_default.c 2011-04-11 23:35:08.000000000 +0200
+++ samba-3.0.37/source/modules/vfs_default.c 2011-04-11 23:35:10.000000000 +0200
@@ -977,7 +977,7 @@
START_PROFILE(syscall_linux_setlease);
-#ifdef LINUX
+#if defined(LINUX) && defined(HAVE_KERNEL_OPLOCKS_LINUX)
/* first set the signal handler */
if(linux_set_lease_sighandler(fd) == -1)
return -1;

View File

@@ -0,0 +1,39 @@
Index: samba-3.0.37/source/Makefile.in
===================================================================
--- samba-3.0.37.orig/source/Makefile.in 2009-09-30 14:21:56.000000000 +0200
+++ samba-3.0.37/source/Makefile.in 2011-04-03 20:35:19.000000000 +0200
@@ -92,7 +92,7 @@
# or in smb.conf (see smb.conf(5))
LOGFILEBASE = @logfilebase@
CONFIGFILE = $(CONFIGDIR)/smb.conf
-LMHOSTSFILE = $(CONFIGDIR)/lmhosts
+LMHOSTSFILE = /etc/lmhosts
# This is where smbpasswd et al go
PRIVATEDIR = @privatedir@
Index: samba-3.0.37/source/configure
===================================================================
--- samba-3.0.37.orig/source/configure 2009-09-30 15:08:58.000000000 +0200
+++ samba-3.0.37/source/configure 2011-04-03 20:35:20.000000000 +0200
@@ -1536,8 +1536,8 @@
--with-fhs Use FHS-compliant paths (default=no)
--with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)
--with-rootsbindir=DIR Which directory to use for root sbin ($ac_default_prefix/sbin)
- --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)
- --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)
+ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/lock)
+ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/run)
--with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)
--with-configdir=DIR Where to put configuration files ($libdir)
--with-logfilebase=DIR Where to put log files ($VARDIR)
@@ -2295,8 +2295,8 @@
rootsbindir="\${SBINDIR}"
-lockdir="\${VARDIR}/locks"
-piddir="\${VARDIR}/locks"
+lockdir="\${VARDIR}/lock"
+piddir="\${VARDIR}/run"
test "${mandir}" || mandir="\${prefix}/man"
logfilebase="\${VARDIR}"
privatedir="\${prefix}/private"

View File

@@ -0,0 +1,216 @@
Index: samba-3.0.37/source/Makefile.in
===================================================================
--- samba-3.0.37.orig/source/Makefile.in 2011-08-08 23:40:18.004444730 +0200
+++ samba-3.0.37/source/Makefile.in 2011-08-08 23:40:19.054444730 +0200
@@ -538,10 +538,7 @@
PASSWD_UTIL_OBJ = utils/passwd_util.o
-SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) $(PASSCHANGE_OBJ) \
- $(PARAM_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \
- $(GROUPDB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
- $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ)
+SMBPASSWD_OBJ = utils/owrt_smbpasswd.o lib/md4.o
PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) \
$(LIBSAMBA_OBJ) $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) \
Index: samba-3.0.37/source/utils/owrt_smbpasswd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ samba-3.0.37/source/utils/owrt_smbpasswd.c 2011-08-08 23:40:19.064444730 +0200
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) John Crispin <blogic@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 675
+ * Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "includes.h"
+#include <endian.h>
+
+void E_md4hash(const char *passwd, uchar p16[16])
+{
+ int len;
+ smb_ucs2_t wpwd[129];
+ int i;
+
+ len = strlen(passwd);
+ for (i = 0; i < len; i++) {
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ wpwd[i] = (unsigned char)passwd[i];
+#else
+ wpwd[i] = (unsigned char)passwd[i] << 8;
+#endif
+ }
+ wpwd[i] = 0;
+
+ len = len * sizeof(int16);
+ mdfour(p16, (unsigned char *)wpwd, len);
+ ZERO_STRUCT(wpwd);
+}
+
+/* returns -1 if user is not present in /etc/passwd*/
+int find_uid_for_user(char *user)
+{
+ char t[256];
+ FILE *fp = fopen("/etc/passwd", "r");
+ int ret = -1;
+
+ if(!fp)
+ {
+ printf("failed to open /etc/passwd");
+ goto out;
+ }
+
+ while(!feof(fp))
+ {
+ if(fgets(t, 255, fp))
+ {
+ char *p1, *p2;
+ p1 = strchr(t, ':');
+ if(p1 && (p1 - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0)
+ {
+ p1 = strchr(t, ':');
+ if(!p1)
+ goto out;
+ p2 = strchr(++p1, ':');
+ if(!p2)
+ goto out;
+ p1 = strchr(++p2, ':');
+ if(!p1)
+ goto out;
+ *p1 = '\0';
+ ret = atoi(p2);
+ goto out;
+ }
+ }
+ }
+ printf("No valid user found in /etc/passwd\n");
+
+out:
+ if(fp)
+ fclose(fp);
+ return ret;
+}
+
+void insert_user_in_smbpasswd(char *user, char *line)
+{
+ char t[256];
+ FILE *fp = fopen("/etc/samba/smbpasswd", "r+");
+
+ if(!fp)
+ {
+ printf("failed to open /etc/samba/smbpasswd");
+ goto out;
+ }
+
+ while(!feof(fp))
+ {
+ if(fgets(t, 255, fp))
+ {
+ char *p;
+ p = strchr(t, ':');
+ if(p && (p - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0)
+ {
+ fseek(fp, -strlen(line), SEEK_CUR);
+ break;
+ }
+ }
+ }
+
+ fprintf(fp, line);
+
+out:
+ if(fp)
+ fclose(fp);
+}
+
+void delete_user_from_smbpasswd(char *user)
+{
+ char t[256];
+ FILE *fp = fopen("/etc/samba/smbpasswd", "r+");
+
+ if(!fp)
+ {
+ printf("failed to open /etc/samba/smbpasswd");
+ goto out;
+ }
+
+ while(!feof(fp))
+ {
+ if(fgets(t, 255, fp))
+ {
+ char *p;
+ p = strchr(t, ':');
+ if(p && (p - t == strlen(user)) && (strncmp(t, user, strlen(user))) == 0)
+ {
+ fpos_t r_pos, w_pos;
+ char t2[256];
+ fgetpos(fp, &r_pos);
+ w_pos = r_pos;
+ w_pos.__pos -= strlen(t);
+ while(fgets(t2, 256, fp))
+ {
+ fsetpos(fp, &w_pos);
+ fputs(t2, fp);
+ r_pos.__pos += strlen(t2);
+ w_pos.__pos += strlen(t2);
+ fsetpos(fp, &r_pos);
+ }
+ ftruncate(fileno(fp), w_pos.__pos);
+ break;
+ }
+ }
+ }
+
+out:
+ if(fp)
+ fclose(fp);
+}
+
+int main(int argc, char **argv)
+{
+ unsigned uid;
+ uchar new_nt_p16[NT_HASH_LEN];
+ int g;
+ int smbpasswd_present;
+ char smbpasswd_line[256];
+ char *s;
+
+ if(argc != 3)
+ {
+ printf("usage for openwrt_smbpasswd - \n\t%s USERNAME PASSWD\n\t%s -del USERNAME\n", argv[0], argv[0]);
+ exit(1);
+ }
+ if(strcmp(argv[1], "-del") == 0)
+ {
+ printf("deleting user %s\n", argv[2]);
+ delete_user_from_smbpasswd(argv[2]);
+ return 0;
+ }
+ uid = find_uid_for_user(argv[1]);
+ if(uid == -1)
+ exit(2);
+
+ E_md4hash(argv[2], new_nt_p16);
+ s = smbpasswd_line;
+ s += snprintf(s, 256 - (s - smbpasswd_line), "%s:%u:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:", argv[1], uid);
+ for(g = 0; g < 16; g++)
+ s += snprintf(s, 256 - (s - smbpasswd_line), "%02X", new_nt_p16[g]);
+ snprintf(s, 256 - (s - smbpasswd_line), ":[U ]:LCT-00000001:\n");
+
+ insert_user_in_smbpasswd(argv[1], smbpasswd_line);
+
+ return 0;
+}

View File

@@ -0,0 +1,15 @@
Index: samba-3.0.24/source/lib/ms_fnmatch.c
===================================================================
--- samba-3.0.24.orig/source/lib/ms_fnmatch.c 2008-08-11 11:08:03.000000000 +0200
+++ samba-3.0.24/source/lib/ms_fnmatch.c 2008-08-11 11:11:33.000000000 +0200
@@ -153,6 +153,10 @@
int ret, count, i;
struct max_n *max_n = NULL;
+ if (strcmp(pattern, "*") == 0) {
+ return 0;
+ }
+
if (strcmp(string, "..") == 0) {
string = ".";
}

View File

@@ -0,0 +1,13 @@
Index: samba-3.0.24/source/lib/popt_common.c
===================================================================
--- samba-3.0.24.orig/source/lib/popt_common.c 2008-08-11 11:25:26.000000000 +0200
+++ samba-3.0.24/source/lib/popt_common.c 2008-08-11 11:26:03.000000000 +0200
@@ -54,7 +54,7 @@
else
pname++;
- pstr_sprintf(logfile, "%s/log.%s", arg, pname);
+ pstr_sprintf(logfile, "%s/log/%s.log", arg, pname);
lp_set_logfile(logfile);
}

View File

@@ -0,0 +1,23 @@
Index: samba-3.0.37/source/configure
===================================================================
--- samba-3.0.37.orig/source/configure 2011-04-03 20:35:20.000000000 +0200
+++ samba-3.0.37/source/configure 2011-04-03 20:36:51.000000000 +0200
@@ -22548,6 +22548,17 @@
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
+# Force disable RPC
+$as_echo "test=$ac_header" >&6
+if test "$ac_header" = "rpc/rpc.h"; then
+ if test "$ac_header_compiler" = "yes" -o "$ac_header_preproc" = "yes"; then
+ $as_echo "RPC support force disabled by OpenWRT patch" >&5
+ $as_echo "RPC support force disabled by OpenWRT patch" >&6
+ fi
+fi
+ac_header_compiler=no
+ac_header_preproc=no
+
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )

View File

@@ -0,0 +1,28 @@
Index: samba-3.0.37/source/configure.in
===================================================================
--- samba-3.0.37.orig/source/configure.in
+++ samba-3.0.37/source/configure.in
@@ -1389,23 +1389,6 @@ AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl
case "$host_os" in
*linux*)
# glibc <= 2.3.2 has a broken getgrouplist
- AC_TRY_RUN([
-#include <unistd.h>
-#include <sys/utsname.h>
-main() {
- /* glibc up to 2.3 has a broken getgrouplist */
-#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
- int libc_major = __GLIBC__;
- int libc_minor = __GLIBC_MINOR__;
-
- if (libc_major < 2)
- exit(1);
- if ((libc_major == 2) && (libc_minor <= 3))
- exit(1);
-#endif
- exit(0);
-}
-], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])
if test x"$linux_getgrouplist_ok" = x"yes"; then
AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
fi

View File

@@ -0,0 +1,12 @@
Get rid of error due to cross compilation, as glibc version in OpenWRT is high enough
--- a/source/configure
+++ b/source/configure
@@ -37222,7 +37222,7 @@ rm -f core conftest.err conftest.$ac_obj
case "$host_os" in
*linux*)
# glibc <= 2.3.2 has a broken getgrouplist
- if test "$cross_compiling" = yes; then
+ if test "false" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling

View File

@@ -0,0 +1,76 @@
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -291,7 +291,7 @@ SECRETS_OBJ = passdb/secrets.o passdb/ma
LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
libsmb/namequery.o libsmb/conncache.o libads/dns.o
-LIBSAMBA_OBJ = libsmb/nterr.o libsmb/dcerpc_err.o libsmb/smbdes.o \
+LIBSAMBA_OBJ = libsmb/nterr.o $(if $(OWRT_SMALLER),,libsmb/dcerpc_err.o) libsmb/smbdes.o \
libsmb/smbencrypt.o libsmb/ntlm_check.o \
libsmb/ntlmssp.o libsmb/ntlmssp_parse.o libsmb/ntlmssp_sign.o
@@ -323,35 +323,35 @@ REGISTRY_OBJ = registry/reg_frontend.o r
registry/reg_db.o registry/reg_eventlog.o registry/reg_shares.o \
registry/reg_util.o registry/reg_dynamic.o registry/reg_perfcount.o
-RPC_LSA_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o
+RPC_LSA_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o)
-RPC_NETLOG_OBJ = rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o
+RPC_NETLOG_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o)
-RPC_SAMR_OBJ = rpc_server/srv_samr.o rpc_server/srv_samr_nt.o \
- rpc_server/srv_samr_util.o
+RPC_SAMR_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_samr.o rpc_server/srv_samr_nt.o \
+ rpc_server/srv_samr_util.o)
REGFIO_OBJ = registry/regfio.o
-RPC_REG_OBJ = rpc_server/srv_reg.o rpc_server/srv_reg_nt.o $(REGFIO_OBJ)
+RPC_REG_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_reg.o rpc_server/srv_reg_nt.o $(REGFIO_OBJ))
-RPC_LSA_DS_OBJ = rpc_server/srv_lsa_ds.o rpc_server/srv_lsa_ds_nt.o
+RPC_LSA_DS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_lsa_ds.o rpc_server/srv_lsa_ds_nt.o)
RPC_SVC_OBJ = rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o
RPC_WKS_OBJ = librpc/gen_ndr/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o
-RPC_SVCCTL_OBJ = rpc_server/srv_svcctl.o rpc_server/srv_svcctl_nt.o \
+RPC_SVCCTL_OBJ = $(if $(OWRT_SMALLER),, rpc_server/srv_svcctl.o) rpc_server/srv_svcctl_nt.o \
services/svc_spoolss.o services/svc_rcinit.o services/services_db.o \
services/svc_netlogon.o services/svc_winreg.o \
services/svc_wins.o
-RPC_NTSVCS_OBJ = rpc_server/srv_ntsvcs.o rpc_server/srv_ntsvcs_nt.o
+RPC_NTSVCS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_ntsvcs.o rpc_server/srv_ntsvcs_nt.o)
-RPC_DFS_OBJ = rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o
+RPC_DFS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o)
-RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o
+RPC_SPOOLSS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o)
-RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o rpc_server/srv_eventlog_lib.o
+RPC_EVENTLOG_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o rpc_server/srv_eventlog_lib.o)
RPC_PIPE_OBJ = rpc_server/srv_pipe_hnd.o \
rpc_server/srv_pipe.o rpc_server/srv_lsa_hnd.o
@@ -431,7 +431,7 @@ PLAINTEXT_AUTH_OBJ = auth/pampass.o auth
SLCACHE_OBJ = libsmb/samlogon_cache.o
-DCUTIL_OBJ = libsmb/namequery_dc.o libsmb/trustdom_cache.o libsmb/trusts_util.o
+DCUTIL_OBJ = libsmb/namequery_dc.o $(if $(OWRT_SMALLER),,libsmb/trustdom_cache.o libsmb/trusts_util.o)
AUTH_BUILTIN_OBJ = auth/auth_builtin.o
AUTH_DOMAIN_OBJ = auth/auth_domain.o
@@ -468,7 +468,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpass
smbd/change_trust_pw.o smbd/fake_file.o \
smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
$(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \
- smbd/dmapi.o $(MANGLE_OBJ) @VFS_STATIC@
+ $(if $(OWRT_SMALLER),,smbd/dmapi.o) $(MANGLE_OBJ) @VFS_STATIC@
SMBD_OBJ_BASE = $(PARAM_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
$(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) $(SECRETS_OBJ) \

View File

@@ -0,0 +1,47 @@
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -319,7 +319,7 @@ LIBMSRPC_GEN_OBJ = librpc/gen_ndr/cli_wk
REGOBJS_OBJ = registry/reg_objects.o
-REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o registry/reg_printing.o \
+REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o $(if $(OWRT_NO_PRINTING),,registry/reg_printing.o) \
registry/reg_db.o registry/reg_eventlog.o registry/reg_shares.o \
registry/reg_util.o registry/reg_dynamic.o registry/reg_perfcount.o
@@ -349,7 +349,7 @@ RPC_NTSVCS_OBJ = $(if $(OWRT_SMALLER),,r
RPC_DFS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o)
-RPC_SPOOLSS_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o)
+RPC_SPOOLSS_OBJ = $(if $(OWRT_NO_PRINTING),,rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o)
RPC_EVENTLOG_OBJ = $(if $(OWRT_SMALLER),,rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o rpc_server/srv_eventlog_lib.o)
@@ -463,7 +463,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpass
smbd/vfs.o smbd/statcache.o \
smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
smbd/process.o smbd/service.o smbd/error.o \
- printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
+ $(if $(OWRT_NO_PRINTING),,printing/printfsp.o) lib/sysquotas.o lib/sysquotas_linux.o \
lib/sysquotas_xfs.o lib/sysquotas_4A.o \
smbd/change_trust_pw.o smbd/fake_file.o \
smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
@@ -480,13 +480,13 @@ SMBD_OBJ_BASE = $(PARAM_OBJ) $(SMBD_OBJ_
$(REGISTRY_OBJ) $(POPT_LIB_OBJ) \
$(BUILDOPT_OBJ) $(SMBLDAP_OBJ)
-PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \
+PRINTING_OBJ = $(if $(OWRT_NO_PRINTING),,printing/pcap.o printing/print_svid.o printing/print_aix.o \
printing/print_cups.o printing/print_generic.o \
printing/lpq_parse.o printing/load.o \
- printing/print_iprint.o printing/print_test.o
+ printing/print_iprint.o printing/print_test.o)
-PRINTBASE_OBJ = printing/notify.o printing/printing_db.o
-PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ)
+PRINTBASE_OBJ = $(if $(OWRT_NO_PRINTING),,printing/notify.o printing/printing_db.o)
+PRINTBACKEND_OBJ = $(if $(OWRT_NO_PRINTING),,printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ))
SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN)
NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \

54
uci-diff/Makefile Normal file
View File

@@ -0,0 +1,54 @@
#
# Copyright (C) 2016 Inteno
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=uci-diff
PKG_VERSION:=1
PKG_SOURCE_VERSION:=aed64062ac44010b6d7335a248c7cdeb922bea13
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@private.inteno.se:uci-diff
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
define Package/uci-diff
CATEGORY:=Utilities
DEPENDS:=+libuci +libubox +ubus +libjson-c +libblobmsg-json
TITLE:=uci-diff
endef
define Package/uci-diff/description
uci-diff
endef
define Package/uci-diff/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uci-diff $(1)/sbin/
endef
#define Host/Compile
# $(MAKE) -C $(HOST_BUILD_DIR) CC="$(HOSTCC)" all
#endef
define Host/Install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(HOST_BUILD_DIR)/uci-diff $(STAGING_DIR_HOST)/bin/uci-diff
endef
$(eval $(call BuildPackage,uci-diff))
$(eval $(call HostBuild))

View File

@@ -0,0 +1,43 @@
{"wireless": {
"wifi-device": {
"type": "broadcom",
"country": "EU/13",
"band": "a",
"bandwidth": "80",
"hwmode": "11ac",
"channel": "auto",
"scantimer": "0",
"wmm": "1",
"wmm_noack": "0",
"wmm_apsd": "1",
"txpower": "100",
"rateset": "default",
"frag": "2346",
"rts": "2347",
"dtim_period": "1",
"beacon_int": "100",
"rxchainps": "0",
"rxchainps_qt": "10",
"rxchainps_pps": "10",
"rifs": "0",
"rifs_advert": "0",
"maxassoc": "32",
"doth": "1",
"dfsc": "1",
"disabled": "1"
},
"wifi-iface": {
"device": "wl0",
"network": "lan",
"mode": "ap",
"ssid": "Inteno-4BC8",
"encryption": "mixed-psk",
"cipher": "auto",
"key": "1234567890",
"gtk_rekey": "3600",
"macfilter": "0",
"wps_pbc": "1",
"wmf_bss_enable": "1",
"bss_max": "16"
}
}}

View File

@@ -0,0 +1,22 @@
{"wireless": {
"wl0": {
".name": "wl0",
".type": "wifi-device",
"channel": 100
},
"wl1": {
".name": "wl1",
".type": "wifi-device",
"wmm": 0
},
"wi0-0": {
".type": "wifi-iface",
"device": "wi0-0",
"ssid": "Fredrik"
},
"wi1-0": {
".type": "wifi-iface",
"device": "wi1-0",
"ssid": "blah"
}
}}

View File

@@ -1268,7 +1268,7 @@ get_call_filter()
fi
local call_filter enabled
config_get call_filter $provider call_filter
config_get call_filter $provider call_filter "call_filter0"
if ! [ -z "$call_filter" -o "$call_filter" == "-" ] ; then
macro="Macro($call_filter-$direction)"
fi

View File

@@ -20,7 +20,7 @@ uci -q batch <<-EOT
add voice_client ringing_status
rename voice_client.@ringing_status[-1]=RINGING_STATUS
set voice_client.RINGING_STATUS.status=0
set voice_client.RINGING_STATUS.enabled=1
set voice_client.RINGING_STATUS.enabled=0
set voice_client.RINGING_STATUS.shouldring=1
commit voice_client
EOT