aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/functions
Commit message (Collapse)AuthorAgeFilesLines
...
* base-files: add back missing function for find_mtd_part to /lib/functions.sh ↵Felix Fietkau2014-04-081-7/+0
| | | | | | | | (fixes #15496) Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40426 3c298f89-4303-0410-b956-a3cf2f4a3e73
* /lib/functions.sh: move rarely used mtd and macaddr related functions to ↵Felix Fietkau2014-04-071-0/+118
| | | | | | | | /lib/functions/system.sh Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40411 3c298f89-4303-0410-b956-a3cf2f4a3e73
* /lib/functions.sh: move preinit related functions to /lib/functions/preinit.shFelix Fietkau2014-04-071-0/+87
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40404 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add ucidef_add_switch_port functionLuka Perkov2014-01-231-0/+10
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39372 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add network_get_protocol() to /lib/functions/network.shJo-Philipp Wich2013-12-161-2/+7
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39099 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix whitespacesLuka Perkov2013-12-092-30/+27
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39006 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: reject invalid uci keys in network_get_device() and related ↵Jo-Philipp Wich2013-07-151-0/+4
| | | | | | procedures (#13886) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37345 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: network.sh: extend network_get_ipaddr6() / network_get_subnet6() ↵Jo-Philipp Wich2013-06-171-43/+107
| | | | | | to take ipv6-prefix-assignment into account, add further helper functions to fetch all ips of a given interface git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36942 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: change network_find_wan() procedure to ignore default gateways ↵Jo-Philipp Wich2013-05-061-10/+14
| | | | | | in different routing tables git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36553 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Change default IPv6 config to enable DHCPv6-PDSteven Barth2013-04-221-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36384 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Adapt default network configuration for IPv6Steven Barth2013-04-091-0/+6
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36278 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: introduce commonly used helper functions for setting ledsGabor Juhos2013-02-181-0/+68
| | | | | | | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35648 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: fix network_get_prefix6Steven Barth2013-01-221-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35300 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: network.sh: fix typo in previous commitJo-Philipp Wich2013-01-211-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35287 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: network.sh: simplify network_get_prefix6()Jo-Philipp Wich2013-01-211-7/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35286 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add support for ipv6-prefixes in connection with netifdSteven Barth2013-01-151-0/+30
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35168 3c298f89-4303-0410-b956-a3cf2f4a3e73
* merge /lib/functions/boot.sh and /lib/functions.shMirko Vogt2012-12-191-146/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34794 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Do not overload mount-call - trying to reduce confusionMirko Vogt2012-12-191-15/+11
| | | | | | | | | | | 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'. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34792 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: use json_is_a() in network.shJo-Philipp Wich2012-12-171-7/+7
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34733 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: rework cache handling in network.sh to keep the entire parsed ↵Jo-Philipp Wich2012-12-161-129/+159
| | | | | | ifstatus, use jshn namespaces to support using it concurrently with other jshn users git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34725 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: various enhancements to network.shJo-Philipp Wich2012-12-161-30/+153
| | | | | | | | | | | - 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34722 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: remove route enabled check in lib/functions/network.sh ↵Jo-Philipp Wich2012-09-131-4/+2
| | | | | | after netifd bump git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33391 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults for rssiledsGabor Juhos2012-08-131-0/+44
| | | | | | | | Adds capability to add uci-defaults defining RSSI LEDs Signed-off-by: Daniel Golle <dgolle@allnet.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33164 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: implement network_get_dnsserver() and ↵Jo-Philipp Wich2012-06-291-0/+31
| | | | | | network_get_dnssearch() in /lib/functions/network.sh git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32531 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: only consider enabled default routes when finding the ↵Jo-Philipp Wich2012-06-291-2/+4
| | | | | | wan iface (#11774) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32525 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: implement network_get_gateway(), ↵Jo-Philipp Wich2012-06-171-0/+59
| | | | | | network_get_gateway6(), network_find_wan() and network_find_wan6() in /lib/functions/network.sh git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32397 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: implement network_defer_device() and ↵Jo-Philipp Wich2012-06-071-0/+16
| | | | | | network_ready_device() wrappers for upcoming netifd iface deferring support git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32106 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add LED specific functions to /lib/functions/uci-defaultsGabor Juhos2012-05-291-0/+98
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31991 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add network_is_up()Jo-Philipp Wich2012-05-291-0/+6
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31978 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: let network_get_device() return the l3 interface, ↵Jo-Philipp Wich2012-05-291-4/+6
| | | | | | introduce network_get_physdev() to obtain the underlying iface (if applicable) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31960 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add network_get_device() to network.shJo-Philipp Wich2012-05-281-0/+15
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31937 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: introduce /lib/functions/network.shJo-Philipp Wich2012-05-281-0/+41
| | | | | | | | | 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. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31935 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: split service related functions off to /lib/functions/service.shFelix Fietkau2012-03-201-0/+129
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31042 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: remove trailing whitespaces from lib/functions/boot.shGabor Juhos2012-03-021-4/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30776 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add lib/functions/uci-defaults.shGabor Juhos2011-12-011-0/+88
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29384 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add initial support for mounting overlayfsFelix Fietkau2011-03-171-1/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26207 3c298f89-4303-0410-b956-a3cf2f4a3e73
* boot.sh: Tabs are used for indent. Also use tabs in jffs2_ready()Michael Büsch2011-02-201-4/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25635 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: Add "-o noatime" to mount wrapperMichael Büsch2011-02-201-1/+1
| | | | | | | | noatime is cheaper than default relatime. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25634 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [PATCH] Fix permissions for /etc and other dirs after clean flash (#6039)Jo-Philipp Wich2010-11-071-1/+1
| | | | | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23906 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base/block-extroot, base/block-mount: Modified preinit and ↵Daniel Dickinson2010-09-231-21/+56
| | | | | | | | | | | | | | | | | | 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! git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23110 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: Add function pi_include the /lib/functions/boot.sh ↵Daniel Dickinson2010-09-191-0/+13
| | | | | | 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. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23099 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix a preinit hang in jffs2_ready() when no ↵Jo-Philipp Wich2010-05-201-0/+1
| | | | | | rootfs_data partition is found (#7362) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21511 3c298f89-4303-0410-b956-a3cf2f4a3e73
* change from /jffs to /overlay, patch from Daniel DickinsonFlorian Fainelli2010-03-211-2/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20356 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: force preinit to use busybox mount (#6797)Jo-Philipp Wich2010-03-131-0/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20176 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add block-extroot, a package for using an external filesystem as rootfs ↵Felix Fietkau2010-02-261-0/+1
| | | | | | (patch by cshore) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19880 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add preinit modularization work by Daniel Dickinson (cshore)Felix Fietkau2010-01-251-0/+95
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19331 3c298f89-4303-0410-b956-a3cf2f4a3e73