aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib
Commit message (Collapse)AuthorAgeFilesLines
* board.d: add support for gpio_switch sectionsJo-Philipp Wich2015-12-041-0/+15
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47762 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: board.d: auto-set model id and name if /tmp/sysinfo is availableJo-Philipp Wich2015-12-041-0/+10
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47752 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: board.d: support dsl modems, atm bridges and pppoe protocolJo-Philipp Wich2015-12-041-1/+47
| | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47750 3c298f89-4303-0410-b956-a3cf2f4a3e73
* all: remove dummy ucidef_set_interface_loopback() from board.dJo-Philipp Wich2015-12-031-6/+0
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47744 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: board.d: support specifiying the protocol of lan and wanJo-Philipp Wich2015-12-031-10/+26
| | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47732 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: board.d: support timer ledsJo-Philipp Wich2015-12-031-0/+20
| | | | | | | | Add ucidef_set_led_timer() and handling for it to config_generate. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47731 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: board.d: support ide ledsJo-Philipp Wich2015-12-031-0/+16
| | | | | | | | Add ucidef_set_led_ide() to define "ide-disk" triggered leds. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47729 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new.sh: fix for handling multiple ifnamesJo-Philipp Wich2015-12-031-4/+4
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47728 3c298f89-4303-0410-b956-a3cf2f4a3e73
* board.d: merge ucidef_add_switch() and ucidef_add_switch_ports()Jo-Philipp Wich2015-12-031-60/+50
| | | | | | | | | | | | This changes uci-defaults-new.sh, config_generate and all relevant board.d files in order combine ucidef_add_switch() and ucidef_add_switch_ports() into a single function. Also removes now superfluous enable and reset arguments. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47721 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new: remove reset/enable args of ucidef_add_switch()Jo-Philipp Wich2015-12-031-14/+12
| | | | | | | | | | | | | | | Out of 69 switch definitions, only 3 pass something different than "1" as values for reset and enable, with one of those three being invalid. This change ... * removes the reset and enable arguments from ucidef_add_switch() * unconditionally writes reset:1 and enable:1 to JSON * converts the three users of nonstandard values to ucidef_add_switch_attr() Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47720 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new, config_generate: refactor code and drop old vlansJo-Philipp Wich2015-12-031-50/+108
| | | | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47719 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new, config_generate: allow force tagged cpu portsJo-Philipp Wich2015-11-301-2/+8
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47679 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new: fix unquoted variablesJo-Philipp Wich2015-11-301-5/+5
| | | | | | | | | | Properly quote variables in ucidef_set_interface_lan() and ucidef_set_interface_lan(), otherwise interfaces with multiple devices are not properly written into the configuration. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47673 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new: add board id and name helpersJo-Philipp Wich2015-11-301-0/+12
| | | | | | | | | Add ucidef_set_board_id() and ucidef_set_model_name() procedures to store model information in the board.json file. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47671 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new, config_generate: support for gpio ledsJo-Philipp Wich2015-11-261-0/+21
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47660 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new: remove ucidef_set_led_interface()Jo-Philipp Wich2015-11-261-16/+0
| | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47658 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new: fix storing rssi leds and triggers in board.jsonJo-Philipp Wich2015-11-261-7/+6
| | | | | | | | | Remove extra nesting of rssi leds in the led object and move rssi monitor declaration to its own object. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47655 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new: properly quote variablesJo-Philipp Wich2015-11-261-95/+95
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47652 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new: add ucidef_add_switch_port_attr() helperJo-Philipp Wich2015-11-251-0/+36
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47645 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new: whitespace cleanupJo-Philipp Wich2015-11-251-11/+11
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47644 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: uci-defaults-new: don't store switch attr numbers as stringsJo-Philipp Wich2015-11-251-3/+6
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47643 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add ucidef_set_interface_wan() and ucidef_add_switch_ports()Jo-Philipp Wich2015-11-241-0/+50
| | | | | | | | | Add further helper functions to uci-defaults-new.sh for easier declarations of complex switch layouts. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47638 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: fix ramoverlay function with kernels 3.18+Felix Fietkau2015-09-211-4/+5
| | | | | | | | | | | Even though there are not many users left within the OpenWrt tree it seems this function broke during the kernel 3.18 transition. Fix it by providing a workdir as required by overlayfs. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47015 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: refactor default_postinst()Jo-Philipp Wich2015-09-161-51/+50
| | | | | | | | | | | | - Simplify user spec parsing code - Alias IPKG_INSTROOT to shorten code - Quote variables where appropriate - Remove a useless-use-of-cat instance - Suppress errors in case control or list files are missing Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46975 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: sysupgrade: quote source image nameJohn Crispin2015-09-141-2/+2
| | | | | | | | | | | | | | | | | | | get_image() eval a filename without quoting it, resulting in errors with filenames containing characters that need to be escaped. $ sysupgrade -T -f ./cfg\(12\).tar.gz img.bin; echo $? Image check 'platform_check_image' failed. Invalid config file. Please use only .tar.gz files 1 $ mv cfg\(12\).tar.gz cfg_12.tar.gz $ mv img\(1\).bin img.bin sysupgrade -T -f ./cfg_12.tar.gz img.bin; echo $? 0 Enclose the content of $from in double quotes. Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46919 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add /etc/iproute2/rt_tables, replace ifconfig-usageSteven Barth2015-09-081-2/+4
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46830 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Disable telnet in favor of passwordless SSHSteven Barth2015-09-071-2/+3
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46809 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: allow setting ide-disk led triggerJonas Gorski2015-09-041-0/+16
| | | | | | Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46794 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: default_postinst: propagate the real postinst return codeJohn Crispin2015-08-171-3/+7
| | | | | | | | | | | Using the postinst script for sanity checks and expecting opkg to fail if the postinst didn't return 0 was possible in Barrier Breaker, propagate the real postinst return code through default_postinst to restore this behaviour. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46653 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: added option to configure the gpio led trigger in uci-defaultsJohn Crispin2015-07-141-0/+20
| | | | | | Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46341 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: implemented basic GPIO controlJohn Crispin2015-07-081-0/+24
| | | | | | | | | | Internal GPIO pins are used for PoE passthrough setups in multi-port routers. This patch implemnets control over this hardware feature for Ubiquiti Nanostations and TP-Link CPE510. Signed-off-by: Lars Kruse <lists@sumpfralle.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46271 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: default_do_upgrade: accept & forward image extraction commandJohn Crispin2015-06-051-2/+6
| | | | | | | | | | | get_image allows passing 2nd argument that is used in a pipe for extracting firmware from a non-native format. By accepting such command in default_do_upgrade we allow platforms to use this helper for vendor specific images. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45900 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: remove ubi toolLuka Perkov2015-05-291-1/+0
| | | | | | | | ubi tool was removed from fstools in r41128. Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45813 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: fix default pre-/postrm for packages with a dotJonas Gorski2015-05-191-2/+2
| | | | | | | | | | | | | Instead of stripping everything after the first dot, strip everything after the last dot. This fixes pre-/postrm actions for packages with a dot in their name, like libusb-1.0. Fixes #19668. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45702 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: make the generic sysinfo script run earlier to allow the ↵Felix Fietkau2015-04-181-0/+0
| | | | | | | | mount_root script to pick up the board name Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45496 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add generic preinit script to extract board/model info from ↵Felix Fietkau2015-04-161-0/+10
| | | | | | | | device-tree Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45462 3c298f89-4303-0410-b956-a3cf2f4a3e73
* modules: fix postinst generation for kernel modulesJohn Crispin2015-04-101-4/+7
| | | | | | | | | Fixes ticket #19352. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45367 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: keep sysupgrade.tgz until /etc/init.d/done has been calledFelix Fietkau2015-03-221-4/+1
| | | | | | | | This makes interrupted boots after sysupgrade more reliable Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44941 3c298f89-4303-0410-b956-a3cf2f4a3e73
* uci-defaults: add ucidef_set_led_mmcJohn Crispin2015-02-141-0/+17
| | | | | | Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44446 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: default_postinst() fix variable colisionJohn Crispin2015-02-041-15/+15
| | | | | | | | | | | | | The name variable contains at first the package name, and after the last group name. This patch fixes /etc/rc.d symlink creation (at least). Change name in pkgname, change the other name in ugname (user group name), and id in ugid (user group id) Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44253 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: Use 200ms LED timing as before for the new phase preinit_regular.John Crispin2015-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores normal pre-r43715 200ms blink-period for the System LED we're all accustomed to see while our OpenWrt routers are booting. Failsafe possibility will now be signalled with a new 100ms blinking, which is easily recognizable from the normal 200ms booting. So no existing user will be scared by a new 500ms LED pattern, since such a slow pattern could easily be mistaken for something wrong... I was like "ok why my router is collapsing now, is this a bad flash, a kernel panic, or what else" when I've seen it for the first time ;) Sorry for not having explained myself better in v1 of this patch. Original: Preinit, failsafe is possible: 200ms Preinit, failsafe not possible anymore, booting normally: 200ms Failsafe entered: 50ms Now (after preinit_regular has been introduced): Preinit, failsafe is possible: 200ms Preinit, failsafe not possible anymore, booting normally: 500ms *here is the "offending" change* Failsafe entered: 50ms With my proposed patch: Preinit, failsafe is possible: 100ms *indicate this condition with a new timing, that prompts the user to press the key if they want to start failsafe* Preinit, failsafe not possible anymore, booting normally: 200ms *keep this as before* Failsafe entered: 50ms Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44056 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: Add ucidef_set_led_timer to uci-defaults.shJohn Crispin2015-01-171-0/+20
| | | | | | Signed-off-by: Gerald Kerma <dreagle@doukki.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44000 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: Fix switch settings for uci-defaults-new.sh.John Crispin2015-01-081-2/+2
| | | | | | | | The enable and reset settings need to be added even when they're false. This is true at least for 'enable', that seems to default to true otherwise. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43887 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add "preinit_regular" diag.sh set_state argumentJohn Crispin2014-12-153-6/+6
| | | | | | | | | | | | This new argument is used right after starting regular preinit (which happens if failsafe wasn't triggered). The main purpose of "preinit" argument is to indicate that failsafe can be triggered, however we were missing a way to inform user that we don't wait for a trigger anymore. With this change it's clear when failsafe mode can be triggered. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43715 3c298f89-4303-0410-b956-a3cf2f4a3e73
* packages: fix typo in OpenWrt nameJohn Crispin2014-12-071-1/+1
| | | | | | Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43542 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: default_postinst() - create user:group first (resend)John Crispin2014-12-011-2/+4
| | | | | | | | | create user:group before running postinst-pkg. the postinst hook might require the user:group to already exist. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43472 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: supress errors from lddJonas Gorski2014-11-191-1/+1
| | | | | | | | | | | | ldd might be called for shell scrips during sysupgrade, causing it to complain that they are not a dynamic executables. This is a harmless error, so supress it to avoid confusing about them being serious ones. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43315 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: properly fix copying ld*.so with eglibcJonas Gorski2014-11-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r36107 ("base-files: sysupgrade fail with eglibc") tried to fix sysupgrade by changing the ld-soname to what is expected, but only fixed MIPS while breaking ARM. The underlying issue is that the ld.so name varies widely across different architectures for eglibc: eglibc-2.19-r25243$ grep -r "ld-soname :=" . | awk '{ print $3 }' | sort -u ld64.so.1 ld64.so.2 ld-linux-aarch64_be.so.1 ld-linux-aarch64.so.1 ld-linux-armhf.so.3 ld-linux-mipsn8.so.1 ld-linux.so.2 ld-linux.so.3 ld-linux-x32.so.2 ld-linux-x86-64.so.2 ld.so.1 Instead of adding each different soname to check for and copy it, replace the awk script with a sed script to extract it properly and drop the hardcoded so-name. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43295 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add /etc/shadow to list of essential files to keep in sysupgrade ↵Felix Fietkau2014-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | (bug 18206) Based on bug #18206 sysupgrade can lead to loss of password information in certain situations. Most likely all users who will upgrade from versions r43017-43040, will lose their current passwords. :-( https://dev.openwrt.org/ticket/18206 Currently /etc/shadow is defined as a conffile in base-files: https://dev.openwrt.org/browser/trunk/package/base-files/Makefile#L37 But it is not defined in the default list of essential files to keep in sysupgrade: https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/upgrade/keep.d/base-files-essential If exporting conffiles info fails, /etc/shadow can get lost. Shadow passwords are now the default, so saying that preserving /etc/passwd is essential while /etc/shadow is not, makes no sense. The attached patch adds /etc/shadow to the list of essential files. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43061 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: fix ldd definition if /usr/bin/ldd existsFelix Fietkau2014-10-191-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42976 3c298f89-4303-0410-b956-a3cf2f4a3e73