summaryrefslogtreecommitdiffstats
path: root/package/base-files/files/bin
Commit message (Collapse)AuthorAgeFilesLines
* base-files: board_detect: allow specifying the generated fileJonas Gorski2016-08-131-2/+6
| | | | | | | Allow passing a filename to change the location of the generated board.json. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* base-files: let config_generate call board_detectJonas Gorski2016-08-132-3/+1
| | | | | | | Instead of board_detect generating the config as a side effect, let config_generate call board_detect as needed. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* base-files: seed /dev/urandomEtienne CHAMPETIER2016-06-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit: 1) seed /dev/urandom with the saved seeds as early as possible (see /lib/preinit/81_urandom_seed) 2) save a seed at /etc/urandom.seed if it doesn't exists 3) save a new seed each boot at "system.@system[0].urandom_seed" (see /etc/init.d/urandom_seed) We use getrandom() so we are sure /dev/urandom pool is initialized Seed size is 512 bytes (ie /proc/sys/kernel/random/poolsize / 8) it's the same size as in ubuntu 14.04 and all systemd systems Seeding /dev/urandom doesn't change entropy estimation, so we still have "random: ubus urandom read with 4 bits of entropy available" messages in the logs, but we can now ignore them if after "urandom-seed: Seeding with ..." message Saving a new seed on each boot is disabled by default to avoid too much writes without user consent v2: log preinit messages to /dev/kmsg v3: use non generic function name for logging, as /lib/preinit/ files are all sourced together in /etc/preinit v4: after a lot of discussion on the ML, use a uci config param v5: config param is now the path of the seed Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com> Acked-by: Jo-Philipp Wich <jo@mein.io>
* base-files: use LEDE NTP vendor poolJo-Philipp Wich2016-06-281-4/+4
| | | | | | The vendor NTP pool for the LEDE project got approved, so switch to it now. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: increase default system log size to 64 kBHannu Nyman2016-06-071-0/+1
| | | | | | | | Increase the default system log buffer size from 16 kB (built-in default in ubox logd) to 64 kB by setting the option in /etc/config/system. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* base-files: fix /bin/config_generate breakageFelix Fietkau2016-06-081-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: rework config generation logicJo-Philipp Wich2016-06-082-18/+20
| | | | | | | | | | | | Now that config_generate is able to generate the entire /etc/config/system from scratch we can apply the same logic as used for /etc/config/network; when the configuration file exists already then do not do anything, else generate it from the values provided by /etc/board.json . In order to facilitate that move the file existance checking inside /bin/config_generate and call it unconditionally from /bin/board_detect. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: support port_state LED types in board.dJo-Philipp Wich2016-06-081-0/+8
| | | | | | Add support for handling port_state LEDs as used by ADM5120. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: support hostname and ntp servers through board.dJo-Philipp Wich2016-06-081-0/+47
| | | | | | Add support for specifying hostname and NTP servers via /etc/board.d/ scripts. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: Fix config_generate when there are no switch VLANs or ports ↵Vittorio Gambaletta (VittGam)2016-05-111-38/+42
| | | | | | | | | | configured in board.json. The json_select call fails when there are no roles or ports objects in board.json. "json_select .." must not be executed after failing. This fixes for example LEDs not being set up in /etc/config/system. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
* base-files: remove ununsed login.shJohn Crispin2016-04-191-18/+0
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* base-files: allow to set arbitrary ip address and netmaskHauke Mehrtens2016-04-171-7/+9
| | | | | | | Signed-off-by: Roman Yeryomin <roman@advem.lv> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 49179
* base-files: change type of adsl and vdsl to dsl onlyFelix Fietkau2016-03-071-1/+1
| | | | | | | | | | Instead of having two different types adsl and vdsl just create one dsl type. This way we can use the same luci code for adsl and vdsl and the config parameters are not so different. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 48944
* base-files: support passing mode to ucidef_set_led_netdev()Jo-Philipp Wich2016-02-261-3/+3
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48806
* base-files: add support for speed mask to switch config init scriptsFelix Fietkau2016-02-251-2/+3
| | | | | | | | | | | This patch adds extra parameter to switch LED trigger initialization functions. New functionality maintains backward compatibility, so calling functions without setting new speed_mask parameter works as expected. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> SVN-Revision: 48776
* leds: support oneshot as well as timer triggersJohn Crispin2016-02-251-2/+2
| | | | | | | | | oneshot and timer have the same configuration options, just a different trigger name. Signed-off-by: Karl Palsson <karlp@etactica.com> SVN-Revision: 48770
* base-files: set mac address in default network config via device sectionsFelix Fietkau2016-02-071-1/+7
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48646
* board.d: add support for gpio_switch sectionsJo-Philipp Wich2015-12-041-0/+21
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47762
* base-files: board.d: support dsl modems, atm bridges and pppoe protocolJo-Philipp Wich2015-12-041-0/+50
| | | | | | | | | | | This adds support for specifying the dsl modem, atm bridge configs and setting the pppoe protocol for wan. These additions are required to port the Lantiq target to board.d. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47750
* base-files: board.d: support specifiying the protocol of lan and wanJo-Philipp Wich2015-12-031-11/+21
| | | | | | | | | Some boards, e.g. the Sheeva Plug, require the lan interface to be set to DHCP instead of a static address, therfore support that. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47732
* base-files: board.d: support timer ledsJo-Philipp Wich2015-12-031-0/+10
| | | | | | | | Add ucidef_set_led_timer() and handling for it to config_generate. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47731
* base-files: uci-defaults-new, config_generate: refactor code and drop old vlansJo-Philipp Wich2015-12-031-178/+49
| | | | | | | | | | | | | | | Remove support for now unused ucidef_add_switch_vlan(), move port->vlan and vlan->interfaces conversion to uci-defaults-new.sh and massively simplify config_generate. This change prepares the following upcoming steps: * Eliminate use of ucidef_set_interface_lan_wan() for switch only devices * Merge ucidef_add_switch() with ucidef_add_switch_ports() Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47719
* base-files: config_generate: add missing chunks of force tag supportJo-Philipp Wich2015-12-031-7/+9
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47718
* base-files: uci-defaults-new, config_generate: allow force tagged cpu portsJo-Philipp Wich2015-11-301-3/+5
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47679
* base-files: uci-defaults-new: only emit force_link for additional ifacesJo-Philipp Wich2015-11-301-1/+7
| | | | | | | | | Only se4t the force_link property for non-lan, non-wan ifaces as it is unnecessary in the default cases. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47675
* base-files: uci-defaults-new, config_generate: support for gpio ledsJo-Philipp Wich2015-11-261-0/+10
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47660
* base-files: config_generate: regroup led generator codeJo-Philipp Wich2015-11-261-4/+16
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47659
* base-files: uci-defaults-new: remove ucidef_set_led_interface()Jo-Philipp Wich2015-11-261-1/+1
| | | | | | | | | The only user was the hg255d board and config_generate did not even emit proper uci for it. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47658
* base-files: config_generate: support rssi ledsJo-Philipp Wich2015-11-261-2/+39
| | | | | | | | Add support for emitting rssi monitor and led configuration sections. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47656
* base-files: config_generate: reformat for better readability and quote variablesJo-Philipp Wich2015-11-261-112/+124
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47654
* base-files: config_generate: handle switch port attributes and better group ↵Jo-Philipp Wich2015-11-251-7/+23
| | | | | | | | json_select Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47648
* base-files: config_generate: do not remove previously generated interfacesJo-Philipp Wich2015-11-251-2/+0
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47647
* base-files: config_generate: properly handle multiple switchesJo-Philipp Wich2015-11-251-0/+10
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47646
* base-files: config_generate: support autogenerating vlansJo-Philipp Wich2015-11-241-3/+117
| | | | | | | | | Add support for generating vlans solely from the port layout description given through ucidef_add_switch_ports(). Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47639
* base-files: config_generate: honour port_mask property (#20963)Jo-Philipp Wich2015-11-241-1/+1
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47609
* Disable telnet in favor of passwordless SSHSteven Barth2015-09-071-2/+1
| | | | | | | | | | This enables passworldless login for root via SSH whenever no root password is set (e.g. after reset, flashing without keeping config or in failsafe) and removes telnet support alltogether. Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46809
* base-files: config_generate did not handle setups with more than 1 switch ↵John Crispin2014-10-271-5/+4
| | | | | | | | properly Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 43088
* base-files: fix telnet login on muslFelix Fietkau2014-10-201-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43006
* network: Unbind DHCPv6 from underlying interfacesSteven Barth2014-10-081-1/+1
| | | | | | | | | This allows IPv6 to set up without IPv4 being up thus IPv6-only or IPv6+DS-Lite working with the default config. Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 42848
* base-files: properly generate the ulaJohn Crispin2014-08-221-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42261
* base-files: fix inverse logic in board_detect scriptJohn Crispin2014-08-191-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42220
* base-files: wan6 should reference wan intead of referencing itself.John Crispin2014-08-181-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42199
* base-files: add a hardware detection layerJohn Crispin2014-08-182-0/+187
| | | | | | | | | | this allows targets to use the new uci-default helper which will generate a file called /etc/board.json. a tool called /bin/config_generate can then be used to generate the default uci settings. Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42185
* base-files: ipcalc.sh: support bit length as netmask parameterJo-Philipp Wich2013-12-161-1/+5
| | | | SVN-Revision: 39100
* base-files: fix whitespacesLuka Perkov2013-12-091-1/+1
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 39006
* base-files: ipcalc.sh: fix broken calculations on 64bit systemsJo-Philipp Wich2012-12-231-5/+10
| | | | | | | | Calculate complements by using awk's xor() function with a mask of 0xffffffff instead of relying on the compl() function which appears to produce broken results on certain 64bit architectures. SVN-Revision: 34875
* base-files: another empty password check fix (#10440)Jo-Philipp Wich2011-11-171-1/+1
| | | | SVN-Revision: 29208
* base-files: prime root password with "x" to notify programs that there is a ↵Jo-Philipp Wich2011-11-141-1/+4
| | | | | | shadow record, fix /bin/login.sh password detection accordingly. Solves broken key based dropbear login with empty password after r28935. SVN-Revision: 29130
* base-files: now that the initial password is completely empty (and not ↵Jo-Philipp Wich2011-11-111-2/+2
| | | | | | primed with "!") adjust login.sh for it to make telnetd available again SVN-Revision: 28943
* ipcalc.sh CIDR notation Hi,Jo-Philipp Wich2011-05-181-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the attached patch makes ipcalc.sh accept IP/Netmask combinations in CIDR notation. Before you could only do: # sh ipcalc.sh 192.168.0.0 255.255.255.0 1 10 IP=192.168.0.0 NETMASK=255.255.255.0 BROADCAST=192.168.0.255 NETWORK=192.168.0.0 PREFIX=24 START=192.168.0.1 END=192.168.0.11 with this patch you can also execute it with: sh ipcalc.sh 192.168.0.0/24 1 10 IP=192.168.0.0 NETMASK=255.255.255.0 BROADCAST=192.168.0.255 NETWORK=192.168.0.0 PREFIX=24 START=192.168.0.1 END=192.168.0.11 The patch is based on #1260 [1], i just changed one line to calculate the START end END ips right. I wonder why that never got included. If there is no reason not to do i would like to ask you to commit that patch, because its a functionality i (and probably others) miss quite often. Btw, i also fixed 4 useless tabs, that might look a bit strange in the patch. Regards, Manuel SVN-Revision: 26930