Commit graph

47 commits

Author SHA1 Message Date
Felix Fietkau
bb240b50b6 base-files: enable force_link for lan by default
This allows services to bind to it at boot time instead of waiting for a
cable to be plugged in

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40773
2014-05-16 19:36:22 +00:00
Felix Fietkau
dd58e15b84 base-files: add back missing function for find_mtd_part to /lib/functions.sh (fixes #15496)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40426
2014-04-08 21:17:49 +00:00
Felix Fietkau
4a9ea80ef0 /lib/functions.sh: move rarely used mtd and macaddr related functions to /lib/functions/system.sh
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40411
2014-04-07 10:29:47 +00:00
Felix Fietkau
c27c5b9cbc /lib/functions.sh: move preinit related functions to /lib/functions/preinit.sh
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40404
2014-04-07 09:50:19 +00:00
Luka Perkov
d66d2ad104 base-files: add ucidef_add_switch_port function
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 39372
2014-01-23 11:33:41 +00:00
Jo-Philipp Wich
fe230cac18 base-files: add network_get_protocol() to /lib/functions/network.sh
SVN-Revision: 39099
2013-12-16 16:28:45 +00:00
Luka Perkov
3ceb6b3274 base-files: fix whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 39006
2013-12-09 11:30:14 +00:00
Jo-Philipp Wich
55178554c2 base-files: reject invalid uci keys in network_get_device() and related procedures (#13886)
SVN-Revision: 37345
2013-07-15 13:42:58 +00:00
Jo-Philipp Wich
265a2deba3 base-files: network.sh: extend network_get_ipaddr6() / network_get_subnet6() to take ipv6-prefix-assignment into account, add further helper functions to fetch all ips of a given interface
SVN-Revision: 36942
2013-06-17 11:33:36 +00:00
Jo-Philipp Wich
026271d03c base-files: change network_find_wan() procedure to ignore default gateways in different routing tables
SVN-Revision: 36553
2013-05-06 09:33:56 +00:00
Steven Barth
4e8f7f37ed Change default IPv6 config to enable DHCPv6-PD
SVN-Revision: 36384
2013-04-22 19:40:16 +00:00
Steven Barth
ea94d66b0f Adapt default network configuration for IPv6
SVN-Revision: 36278
2013-04-09 08:03:08 +00:00
Gabor Juhos
6c627a266b base-files: introduce commonly used helper functions for setting leds
Currently, most platforms define such helpers in their own diag.sh
implementation with almost identical code. By factoring out the
common ground it's possible to simplify maintainability and
homogenize the haptics over multiple platforms (so far as is
reasonably practicable, in a next step).

[juhosg:
 - fix led_set_attr parameters in led_timer
 - add led_morse and status_led_set_morse helpers
 - add status_led_blink_{preinit,failsafe} helpers]

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35648
2013-02-18 09:56:23 +00:00
Steven Barth
231f8c2969 base-files: fix network_get_prefix6
SVN-Revision: 35300
2013-01-22 16:47:16 +00:00
Jo-Philipp Wich
1941fb309d base-files: network.sh: fix typo in previous commit
SVN-Revision: 35287
2013-01-21 19:02:38 +00:00
Jo-Philipp Wich
3b2db1838a base-files: network.sh: simplify network_get_prefix6()
SVN-Revision: 35286
2013-01-21 18:54:58 +00:00
Steven Barth
847cd984b9 base-files: add support for ipv6-prefixes in connection with netifd
SVN-Revision: 35168
2013-01-15 13:07:51 +00:00
Mirko Vogt
4d4b2d3ced merge /lib/functions/boot.sh and /lib/functions.sh
SVN-Revision: 34794
2012-12-19 16:07:53 +00:00
Mirko Vogt
439a869090 Do not overload mount-call - trying to reduce confusion
The behaviour of calling 'mount' differed depending on whether it called
the busybox-mount, the mount of util-linux, the mount defined in
/lib/functions.sh and /lib/functions/boot.sh

/etc/preinit even included /lib/functions.sh and /lib/functions/boot.sh,
both re-defining 'mount'.

SVN-Revision: 34792
2012-12-19 16:07:46 +00:00
Jo-Philipp Wich
3339316fbe base-files: use json_is_a() in network.sh
SVN-Revision: 34733
2012-12-17 13:07:42 +00:00
Jo-Philipp Wich
17acf9bf27 base-files: rework cache handling in network.sh to keep the entire parsed ifstatus, use jshn namespaces to support using it concurrently with other jshn users
SVN-Revision: 34725
2012-12-16 20:17:18 +00:00
Jo-Philipp Wich
1600ba99e4 base-files: various enhancements to network.sh
- support reading inactive gateways and DNS information in
	  network_get_gateway(), network_get_dnsserver() and network_get_dnssearch()
	  by passing "true" as optional last argument
	- internally cache fetched values to speed up subsequent accesses to the same
	  data, introduce network_flush_cache() to clear them
	- add some inline function documentation

SVN-Revision: 34722
2012-12-16 18:22:02 +00:00
Jo-Philipp Wich
dac5ed38b6 base-files: remove route enabled check in lib/functions/network.sh after netifd bump
SVN-Revision: 33391
2012-09-13 08:47:10 +00:00
Gabor Juhos
ca857b7a50 base-files: uci-defaults for rssileds
Adds capability to add uci-defaults defining RSSI LEDs

Signed-off-by: Daniel Golle <dgolle@allnet.de>

SVN-Revision: 33164
2012-08-13 14:01:37 +00:00
Jo-Philipp Wich
b2e5c5f82e base-files: implement network_get_dnsserver() and network_get_dnssearch() in /lib/functions/network.sh
SVN-Revision: 32531
2012-06-29 19:04:11 +00:00
Jo-Philipp Wich
e654014352 base-files: only consider enabled default routes when finding the wan iface (#11774)
SVN-Revision: 32525
2012-06-29 11:58:35 +00:00
Jo-Philipp Wich
57a7257569 base-files: implement network_get_gateway(), network_get_gateway6(), network_find_wan() and network_find_wan6() in /lib/functions/network.sh
SVN-Revision: 32397
2012-06-17 11:50:50 +00:00
Jo-Philipp Wich
9869b4da3c base-files: implement network_defer_device() and network_ready_device() wrappers for upcoming netifd iface deferring support
SVN-Revision: 32106
2012-06-07 14:55:26 +00:00
Gabor Juhos
eca7502dfd base-files: add LED specific functions to /lib/functions/uci-defaults
SVN-Revision: 31991
2012-05-29 16:39:16 +00:00
Jo-Philipp Wich
c11151bc70 base-files: add network_is_up()
SVN-Revision: 31978
2012-05-29 02:03:25 +00:00
Jo-Philipp Wich
bf52cbf108 base-files: let network_get_device() return the l3 interface, introduce network_get_physdev() to obtain the underlying iface (if applicable)
SVN-Revision: 31960
2012-05-29 00:20:16 +00:00
Jo-Philipp Wich
8ef9450b37 base-files: add network_get_device() to network.sh
SVN-Revision: 31937
2012-05-28 03:24:56 +00:00
Jo-Philipp Wich
f1d04190c5 base-files: introduce /lib/functions/network.sh This file will contain common procedures to deal with network interfaces. Initially provides network_get_ipaddr(), network_get_ipaddr6(), network_get_subnet() and network_get_subnet6() to determine the primary IP addresses or subnets of a given logical interface.
SVN-Revision: 31935
2012-05-28 03:15:02 +00:00
Felix Fietkau
6f46704743 base-files: split service related functions off to /lib/functions/service.sh
SVN-Revision: 31042
2012-03-20 14:29:50 +00:00
Gabor Juhos
6c61d7cbf1 base-files: remove trailing whitespaces from lib/functions/boot.sh
SVN-Revision: 30776
2012-03-02 11:17:30 +00:00
Gabor Juhos
561f4d2840 base-files: add lib/functions/uci-defaults.sh
SVN-Revision: 29384
2011-12-01 22:48:46 +00:00
Felix Fietkau
66bcd1d049 base-files: add initial support for mounting overlayfs
SVN-Revision: 26207
2011-03-17 19:09:39 +00:00
Michael Büsch
e6100a161b boot.sh: Tabs are used for indent. Also use tabs in jffs2_ready()
SVN-Revision: 25635
2011-02-20 22:40:47 +00:00
Michael Büsch
16a300ea66 base-files: Add "-o noatime" to mount wrapper
noatime is cheaper than default relatime.

SVN-Revision: 25634
2011-02-20 22:39:08 +00:00
Jo-Philipp Wich
a8efa34da3 Fix permissions for /etc and other dirs after clean flash (#6039)
During the first OpenWrt boot after a clean flash (when the jffs2
partition is not yet initialized) tmpfs is used instead of the usual
jffs2 overlay filesystem.  If this tmpfs is mounted with default
options, all directories created there (/etc, /etc/config, other
subdirectories in /etc) get permissions 1777 by default, and these
permissions then persist in the created jffs2 at least until
subsequent sysupgrade.  Mounting tmpfs with mode=0755 fixes the
permission problem.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

SVN-Revision: 23906
2010-11-07 00:26:00 +00:00
Daniel Dickinson
18b473ca9b base/block-extroot, base/block-mount: Modified preinit and block-extroot and block-mount so that use of block-mount and block-extroot do not require that block-extroot, block-mount, nor the kernel modules they depend, on are required to included in the image. That is block-extroot and dependencies may now be installed as modules onto the jffs2 part of a squashfs system and it will work. In addition packages which are installed into the jffs2 of a squashfs system may now affect preinit, so long as they do not require execution of commands that occur before the merging of the jffs2 and built-in (squashfs) preinit scripts is done.
Thanks jow for the preinit merge stuff!

SVN-Revision: 23110
2010-09-23 13:58:05 +00:00
Daniel Dickinson
1385904dfa base-files: Add function pi_include the /lib/functions/boot.sh used by preinit, which safely sources files as well as working correctly whether the script using it is a package added to the jffs2 part of a squashfs or built into an image or on some other root filesystem.
SVN-Revision: 23099
2010-09-19 23:29:40 +00:00
Jo-Philipp Wich
d6a142375b base-files: fix a preinit hang in jffs2_ready() when no rootfs_data partition is found (#7362)
SVN-Revision: 21511
2010-05-20 05:57:54 +00:00
Florian Fainelli
7af8ee0481 change from /jffs to /overlay, patch from Daniel Dickinson
SVN-Revision: 20356
2010-03-21 17:16:50 +00:00
Jo-Philipp Wich
1968fb8da3 base-files: force preinit to use busybox mount (#6797)
SVN-Revision: 20176
2010-03-13 02:59:05 +00:00
Felix Fietkau
9be4598569 add block-extroot, a package for using an external filesystem as rootfs (patch by cshore)
SVN-Revision: 19880
2010-02-26 22:46:10 +00:00
Felix Fietkau
56bc02a305 add preinit modularization work by Daniel Dickinson (cshore)
SVN-Revision: 19331
2010-01-25 17:11:17 +00:00