Commit Graph

1170 Commits (34bbbbf9c3b39e7b2d81df590aad5cdbd00280d6)

Author SHA1 Message Date
John Crispin e2fd1adaf5 base-files: For sysfixtime use hwclock if RTC available
On systems that have an RTC prefer it to the file-based time fixup (i.e.
use hwclock when there is a permanent clock instead of the faked up time
logic that is needed when there is not RTC).

We can't rely on hctosys kernel feature either as we're usually using
RTC as kernel modules which are usually being loaded after hctosys was
run, leading in the following error:

  hctosys: unable to open rtc device (rtc0)

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>

SVN-Revision: 48661
8 years ago
Felix Fietkau f70c8ba198 base-files: set mac address in default network config via device sections
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48646
8 years ago
Felix Fietkau 57776e68ce base-files: remove default /etc/config/network, generate it via board.d instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48493
8 years ago
Felix Fietkau b7ab6c66cc base-files: fix sysupgrade 'wget' handling for uclient-fetch
change 48451 tried to add support for uclient-fetch by moving
/usr/bin/wget to /bin/wget, but this change kept the symbolic
link to /bin/busybox as install_bin creates links to param 1

the desired fix is to link to uclient-fetch to wget:
  install_bin /bin/uclient-fetch /bin/wget

Signed-off-by: John Clark <inindev@gmail.com>

SVN-Revision: 48483
8 years ago
Felix Fietkau f57419d26e base-files: fix sysupgrade 'wget' handling
with r48379 and r48386 the path of wget changed.
respect that and adjust the dirname.

this fixes #21680

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 48451
8 years ago
Jo-Philipp Wich 740a2ee163 base-files: Fix sysupgrade overlay saving
A previous change to sysupgrade moved the overlay files into upper/
The -c switch generates a list of files to backup, but the sed
calls did not take this into consideration.

Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net>

SVN-Revision: 48281
8 years ago
John Crispin 3f78186f76 base-files: allow timezone to be overriden by zonename (proper zoneinfo support)
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 47980
8 years ago
Felix Fietkau 0936f5b0e0 base-files: cleanup mtd_get_mac_binary hexdump
Remove usage of dd, as per request from Yousong Zhou.
<https://lists.openwrt.org/pipermail/openwrt-devel/2015-December/037743.html>

Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>

SVN-Revision: 47949
9 years ago
Felix Fietkau c74a690661 ar71xx: scan nand ubi partition for ath9k eeprom files
The MR18 stores the ath9k eeprom values on the NAND.
This patch makes it possible to retrieve the images
from there.

Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>

SVN-Revision: 47948
9 years ago
Felix Fietkau ce98f1d264 base-files: drop the now unnecessary dependency on opkg/host
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47886
9 years ago
Jo-Philipp Wich 67e1c87012 all: drop old uci-defaults.sh
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47867
9 years ago
John Crispin 2f42d9e27d base-file: remove /tmp/.jail (now useless)
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>

SVN-Revision: 47855
9 years ago
John Crispin ec6b85ca0e base-files: use max_brightness to set LED
LEDs which are controlled by a PWM need to use the supplied
max_brightness instead. Otherwise they might appear to be
very dim / broken.

Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>

SVN-Revision: 47854
9 years ago
Jo-Philipp Wich 08078df83d board.d: add support for gpio_switch sections
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47762
9 years ago
Jo-Philipp Wich 61a99da4f9 base-files: board.d: auto-set model id and name if /tmp/sysinfo is available
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47752
9 years ago
Jo-Philipp Wich 6c8daa6ba3 base-files: board.d: support dsl modems, atm bridges and pppoe protocol
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
9 years ago
Jo-Philipp Wich 527ec2af59 all: remove dummy ucidef_set_interface_loopback() from board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47744
9 years ago
Jo-Philipp Wich f611358870 base-files: board.d: support specifiying the protocol of lan and wan
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
9 years ago
Jo-Philipp Wich ac9bed4bc0 base-files: board.d: support timer leds
Add ucidef_set_led_timer() and handling for it to config_generate.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47731
9 years ago
Jo-Philipp Wich b3f8340a5e base-files: board.d: support ide leds
Add ucidef_set_led_ide() to define "ide-disk" triggered leds.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47729
9 years ago
Jo-Philipp Wich 734ae1bd17 base-files: uci-defaults-new.sh: fix for handling multiple ifnames
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47728
9 years ago
Jo-Philipp Wich 9b02e73188 board.d: merge ucidef_add_switch() and ucidef_add_switch_ports()
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>

SVN-Revision: 47721
9 years ago
Jo-Philipp Wich d17a64c7c0 base-files: uci-defaults-new: remove reset/enable args of ucidef_add_switch()
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>

SVN-Revision: 47720
9 years ago
Jo-Philipp Wich 80f767d093 base-files: uci-defaults-new, config_generate: refactor code and drop old vlans
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
9 years ago
Jo-Philipp Wich 1871619e72 base-files: config_generate: add missing chunks of force tag support
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47718
9 years ago
Jo-Philipp Wich 73a4e0334c base-files: uci-defaults-new, config_generate: allow force tagged cpu ports
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47679
9 years ago
Jo-Philipp Wich a826098e2b base-files: uci-defaults-new: only emit force_link for additional ifaces
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
9 years ago
Jo-Philipp Wich b64f953cd8 base-files: uci-defaults-new: fix unquoted variables
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>

SVN-Revision: 47673
9 years ago
Jo-Philipp Wich cfac7289c7 base-files: uci-defaults-new: add board id and name helpers
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>

SVN-Revision: 47671
9 years ago
Jo-Philipp Wich 0e0119b6f0 base-files: uci-defaults-new, config_generate: support for gpio leds
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47660
9 years ago
Jo-Philipp Wich aa4c5fd2b0 base-files: config_generate: regroup led generator code
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47659
9 years ago
Jo-Philipp Wich 8b9e839955 base-files: uci-defaults-new: remove ucidef_set_led_interface()
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
9 years ago
Jo-Philipp Wich 972d3de148 base-files: config_generate: support rssi leds
Add support for emitting rssi monitor and led configuration sections.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47656
9 years ago
Jo-Philipp Wich bd4c757685 base-files: uci-defaults-new: fix storing rssi leds and triggers in board.json
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>

SVN-Revision: 47655
9 years ago
Jo-Philipp Wich 92d414eb07 base-files: config_generate: reformat for better readability and quote variables
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47654
9 years ago
Jo-Philipp Wich 1e591ee6d1 base-files: uci-defaults-new: properly quote variables
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47652
9 years ago
Jo-Philipp Wich a466bfe8f4 base-files: config_generate: handle switch port attributes and better group json_select
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47648
9 years ago
Jo-Philipp Wich 97baeb2fa4 base-files: config_generate: do not remove previously generated interfaces
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47647
9 years ago
Jo-Philipp Wich 63c2111e86 base-files: config_generate: properly handle multiple switches
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47646
9 years ago
Jo-Philipp Wich 04b8b97fff base-files: uci-defaults-new: add ucidef_add_switch_port_attr() helper
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47645
9 years ago
Jo-Philipp Wich 2f69fefc37 base-files: uci-defaults-new: whitespace cleanup
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47644
9 years ago
Jo-Philipp Wich 212feb9ccf base-files: uci-defaults-new: don't store switch attr numbers as strings
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47643
9 years ago
Jo-Philipp Wich 2d5dbf9b47 base-files: config_generate: support autogenerating vlans
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
9 years ago
Jo-Philipp Wich d6b5ce48dd base-files: add ucidef_set_interface_wan() and ucidef_add_switch_ports()
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>

SVN-Revision: 47638
9 years ago
John Crispin 18691109df base-files: show hint when JFFS2-partition is full and overlayfs mounted read-only
since r45833 and r45848 the overlayfs is automatically mounted read-only
(and blocks remounts as r/w) when JFFS2 is full. see ticket #19564

because of this normal file deletion is not possible anymore.
if a user logins interactively (e.g. SSH) show a hint for this,
that files must be removed in /overlay/upper/...

v2: fix subject line

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 47623
9 years ago
Jo-Philipp Wich 6d3901bf76 base-files: config_generate: honour port_mask property (#20963)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47609
9 years ago
Felix Fietkau b61e77aedd base-files: use the correct path in case of modified preinit options
If the user sets any preinit options in .config, the wrong path may get
applied due to wrong default value in image-config.in and due to Makefile
writing also the unchanged options into 00_preinit.conf

Modify the default path in image-config.in to match the current default
path set by r47080. Also modify the fall-back default in Makefile.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>

SVN-Revision: 47590
9 years ago
Hauke Mehrtens f1894ad167 base-files: add DCCP to /etc/protocols
Fixes this conntrackd warning:
WARNING: getprotobyname() cannot find protocol `DCCP' in /etc/protocols

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

SVN-Revision: 47481
9 years ago
John Crispin 1c74d046ed base-files: create /var/tmp on boot
FHS mandates presence of /var/tmp on compliant systems.

The lack of /var/tmp was discovered when using MIT Kerberos libraries
which default to that location for storing credentials cache.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

SVN-Revision: 47219
9 years ago
Steven Barth 468c1fb320 base-files: revert to default ECN settings
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 47160
9 years ago
John Crispin ce9da6e6af base-files: add URL option for OEM manufacturer info
This URL can be embedded e.g. within UPnP announcements where a link
to the manufacturer's homepage is desired.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 47135
9 years ago
Steven Barth d7023fc0bc base-files: sanitize and unify $PATH
Previously init and hotplug paths were different from console.

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 47080
9 years ago
Felix Fietkau 5da85f7a01 base-files: add a dependency on fstools
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47066
9 years ago
Felix Fietkau b38194406f base-files: fix ramoverlay function with kernels 3.18+
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>

SVN-Revision: 47015
9 years ago
Jo-Philipp Wich 33b3594332 base-files: refactor default_postinst()
- 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>

SVN-Revision: 46975
9 years ago
John Crispin ef2f50829d base-files: add /etc/profile.d support
OpenWrt should support an optional /etc/profile.d directory like
most other Linux distributions. This allows packages to install
their own scripts into /etc/profile.d/ directory.

The file suffix should make clear, that these scripts
are (sourced) shell-snippets. If the user needs e.g. php or lua,
one must make sure that the interpreter is called.
The reverse failsafe test makes sure, that the effective returncode is 0.

A typcal usecase is the inclusion of private helpers,
special variables or aliases, which at the moment needs
patching the sourcecode and is not well maintainable.
Now the builder can simply add there files.

v1 initial work of Hendrik Lüth <hendrik@linux-nerds.de>
v2 changes regarding RFC (e.g. thomas.langer@lantiq.com)
v3 changes regarding RFC (e.g. mschiffer@universe-factory.net)
v4 keep it simple and mimic OpenWrt style

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 46965
9 years ago
John Crispin 4ef319fad2 base-files: sysupgrade: quote source image name
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>

SVN-Revision: 46919
9 years ago
Felix Fietkau 796a2d032b base-files: fix typo in core dump pattern sysctl entry (fixes #20489)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46890
9 years ago
Felix Fietkau ced2b641e2 base-files: set kernel.core_pattern in sysctl.conf
Move the pattern setting from netifd's service script to
/etc/sysctl.conf.  Put the timestamp component '%t' just after
executable name '%e' for more natural order from output of ls command.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 46867
9 years ago
Rafał Miłecki 56c926223e base-files: change banner to Designated Driver release
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46846
9 years ago
Steven Barth 00045fe9d0 base-files: add /etc/iproute2/rt_tables, replace ifconfig-usage
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46830
9 years ago
Steven Barth d196b1fc2e Disable telnet in favor of passwordless SSH
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
9 years ago
Jonas Gorski e1824f2543 base-files: allow setting ide-disk led trigger
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46794
9 years ago
Jo-Philipp Wich 3d1890053c base-files: add /etc/hosts entries for ::1, ff02::1 and ff02::2
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 46771
9 years ago
John Crispin e83643d31c base-files: default_postinst: propagate the real postinst return code
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>

SVN-Revision: 46653
9 years ago
John Crispin 9b0516c9fc base-files: rework reset button script to indicate factory reset
With this change we let user know 5 seconds have passed and reset button
can be released (to trigger factory reset)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46650
9 years ago
Rafał Miłecki 567d2ab3f8 base-files: buttons: make power script return 0
It was missed in the r46471.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46582
9 years ago
John Crispin e7b34b2b0d buttons: make all button handler scripts return 0
this is required by the new button timeout feature

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 46471
9 years ago
John Crispin cf4a0d430b base-files: fix /tmp/.jail permissions
We need a+x rights on the path to the root of the jails
so we can use users other than root (like nobody)

This partly fixes jailed dnsmasq

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>

SVN-Revision: 46466
9 years ago
John Crispin d0d3ca2a1b base-files: added option to configure the gpio led trigger in uci-defaults
Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>

SVN-Revision: 46341
9 years ago
John Crispin d65916047b base-files: implemented basic GPIO control
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>

SVN-Revision: 46271
9 years ago
John Crispin 3787c32183 sysctl: read settings from /etc/sysctl.d/*.conf
This changes makes it possible to store custom settings
in individual files inside the directory /etc/sysctl.d/.

Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt@wertarbyte.de>

SVN-Revision: 46239
9 years ago
Felix Fietkau 908e1b4c41 base-files: add openwrt snapshot key
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45905
9 years ago
John Crispin f57076956e base-files: default_do_upgrade: accept & forward image extraction command
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>

SVN-Revision: 45900
9 years ago
Luka Perkov 0a4bcd5be6 base-files: remove ubi tool
ubi tool was removed from fstools in r41128.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 45813
9 years ago
Jonas Gorski d0af85c9a5 base-files: fix default pre-/postrm for packages with a dot
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>

SVN-Revision: 45702
9 years ago
Felix Fietkau 2659762e62 base-files: fix logic error in led default handling (patch from #19593)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45600
9 years ago
Felix Fietkau 2d4fa6c055 base-files: make the generic sysinfo script run earlier to allow the mount_root script to pick up the board name
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45496
9 years ago
Felix Fietkau 93fb3cac1b base-files: reorder led trigger/brightness writes
Depending on configuration, disable the LED before writing the trigger
and enable it after writing it. Fixes LEDs where the value defaults to 1

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

SVN-Revision: 45463
9 years ago
Felix Fietkau b3d699bdd3 base-files: add generic preinit script to extract board/model info from device-tree
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45462
9 years ago
John Crispin bbad3f360e modules: fix postinst generation for kernel modules
Fixes ticket #19352.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45367
9 years ago
John Crispin 5d8f9e03f1 base-files: add support for platform_pre_upgrade function
Current NAND sysupgrade process is a bit hard to follow due to the way
of triggering stage1. Currently this is done by leaving a /mark/ in the
form of /tmp/sysupgrade-nand-path during nand_do_platform_check.
Existence of this mark stops standard sysupgrade process (as the result
of sysupgrade_pre_upgrade exit). This may be a bit misleading.

Proposed solution adds a new function that will allow platform.sh
trigger NAND sysupgrade consciously. This will also allow cleaning
nand_do_platform_check limiting it to just checking the image.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45338
9 years ago
Felix Fietkau beca028bd6 build: add integration for managing opkg package feed keys
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45286
9 years ago
Nicolas Thill fe46689f10 packages: use $(LN) macro, make symlinks relative
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 45250
9 years ago
Nicolas Thill 11d4a00c88 base-files: add more config files to conffiles section
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 45244
9 years ago
John Crispin 4cf7929869 base-files: add a init.d option that will start the syscall tracer
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45009
9 years ago
John Crispin 5b23cfab73 base-files: create jail folder on boot
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45008
9 years ago
Felix Fietkau 889e1e4bff fstools: update to the latest version, makes interrupted first boot more reliable
Use xattr to store the filesystem initialization state of the overlay.
As long as the filesystem is not marked as initialized yet (happens in
/etc/init.d/done), all overlay data (except for sysupgrade.tgz) will be
discarded before the system is allowed to boot

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

SVN-Revision: 44942
9 years ago
Felix Fietkau bc1fc688af base-files: keep sysupgrade.tgz until /etc/init.d/done has been called
This makes interrupted boots after sysupgrade more reliable

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

SVN-Revision: 44941
9 years ago
Felix Fietkau f30358d41a kernel: remove the netfilter optimization that skips the filter table, it has caused too many issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44873
9 years ago
Luka Perkov 17610e7430 base-files: firstboot: pass down arguments such as -y to jffs2reset
This brings back old behavior.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 44651
9 years ago
John Crispin eea462106f uci-defaults: add ucidef_set_led_mmc
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 44446
9 years ago
Jo-Philipp Wich e3744a7cc7 base-files: fix target/subtarget value in /etc/openwrt_release
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44409
9 years ago
John Crispin 5cd8a482f3 base-files: default_postinst() fix variable colision
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>

SVN-Revision: 44253
9 years ago
Jo-Philipp Wich 4ec8d515b2 include, base-files: align default repository url with changed buildbot structure
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44091
9 years ago
John Crispin b54f3ad6e7 base-files: fix led script to skip missing triggers
this is based on http://patchwork.ozlabs.org/patch/424451/

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44087
9 years ago
John Crispin 29207748b9 base-files: Use 200ms LED timing as before for the new phase preinit_regular.
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>

SVN-Revision: 44056
9 years ago
John Crispin 744298b8a0 base-files: Add ucidef_set_led_timer to uci-defaults.sh
Signed-off-by: Gerald Kerma <dreagle@doukki.net>

SVN-Revision: 44000
9 years ago
John Crispin 31eadd07f2 base-files: Fix switch settings for uci-defaults-new.sh.
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>

SVN-Revision: 43887
9 years ago
Jo-Philipp Wich 3f26960a5c base-files: update default url template and complete kconfig help
Change the kconfig default for the repository url template to use "%s"
instead of "%T" as well.

Also complete the kconfig help text do cover the recently introduced
manufacturer, product and hwrev options.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43872
9 years ago
Jo-Philipp Wich 15d8db1f8c build: add version number to filenames
This commit introduces a new option CONFIG_VERSION_FILENAMES which causes
OpenWrt to embed the version number in generated image files, SDK- and
ImageBuilder archives.

The option is enabled by default if CONFIG_VERSIONOPT is set.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43869
9 years ago
John Crispin 019ea725aa add "preinit_regular" diag.sh set_state argument
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>

SVN-Revision: 43715
10 years ago
John Crispin f76755da3f packages: fix typo in OpenWrt name
Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>

SVN-Revision: 43542
10 years ago
John Crispin b0d2a9e77a base-files: default_postinst() - create user:group first (resend)
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>

SVN-Revision: 43472
10 years ago
Imre Kaloz 2e3b84c3b5 fix sysupgrade on overlayfs v23+
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 43365
10 years ago
Jonas Gorski 02c6798a0d base-files: supress errors from ldd
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>

SVN-Revision: 43315
10 years ago
Jonas Gorski 2e95b1fda7 base-files: properly fix copying ld*.so with eglibc
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>

SVN-Revision: 43295
10 years ago
Nicolas Thill f4417f7ad8 package/*: replace occurences of 'ln -sf' to '$(LN)'
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 43205
10 years ago
John Crispin 74a3a77bcd license info - revert r43155
turns out that r43155 adds duplicate info.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43167
10 years ago
John Crispin c10d97484a Add more license tags with SPDX identifiers
Note, that licensing stuff is a nightmare: many packages does not clearly
state their licenses, and often multiple source files are simply copied
together - each with different licensing information in the file headers.

I tried hard to ensure, that the license information extracted into the OpenWRT's
makefiles fit the "spirit" of the packages, e.g. such small packages which
come without a dedicated source archive "inherites" the OpenWRT's own license
in my opinion.

However, I can not garantee that I always picked the correct information
and/or did not miss license information.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 43155
10 years ago
Steven Barth bec9d38fa4 Add a few SPDX tags
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 43151
10 years ago
John Crispin 5a6433cc6c base-files: config_generate did not handle setups with more than 1 switch properly
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43088
10 years ago
Felix Fietkau 7a5002ec9d base-files: add /etc/shadow to list of essential files to keep in sysupgrade (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>

SVN-Revision: 43061
10 years ago
Felix Fietkau 99a651fd50 base-files: fix telnet login on musl
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43006
10 years ago
John Crispin 829bf6b9a1 failsafe-mode: print short help on commandline
[base-files] failsafe-mode: print short help on commandline

Like mentioned in ticket https://dev.openwrt.org/ticket/11911
this should make the IRC much quieter. Failsafe is somehow
special and even experienced users are helpless, because they
are not used to this seldom situation. Also: likely you have
no internet access in this mode, so you cannot use the wiki.

a failsafe-session now looks like this:
first we see from 'package/base-files/files/bin/login.sh' the hint:

 === IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
 ------------------------------------------

after this the /etc/banner ("OpenWrt - wireless freedom")
and then the new text:

================= FAILSAFE MODE active ================
special commands:
* firstboot          reset settings to factory defaults
* mount_root     mount root-partition with config files

after mount_root:
* passwd                         change root's password
* /etc/config               directory with config files

for more help see:
http://wiki.openwrt.org/doc/howto/generic.failsafe
=======================================================

this supersedes the old patches:
http://patchwork.openwrt.org/patch/3337/
http://patchwork.openwrt.org/patch/3553/

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42985
10 years ago
Felix Fietkau 0ef474a118 base-files: fix ldd definition if /usr/bin/ldd exists
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42976
10 years ago
Jo-Philipp Wich 4f73613c26 build: improve feed handling for opkg.conf
- Consider not installed feeds as well
 - Add option to decide whether to comment disabled feeds

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42931
10 years ago
John Crispin 666659fb31 default_postinst() fix wrong call of group_add
[base-files] default_postinst() fix wrong call of group_add
after 12bae65d07d29854204715cebc1ef1eae237fd9b group_add is
always called. shell scripting can be tricky...

wrong call:
[ -n "$gid" ] && group_exists $name || group_add $name $gid

this leads to a call of 'group_add' when $gid is emtpy, proof:

root@box:~ functionA() { echo A; }
root@box:~ functionB() { echo B; }
root@box:~ VAR=
root@box:~ [ -n "$VAR" ] && functionA || functionB
B
root@box:~ # functionB was called, but VAR is not filled
root@box:~ VAR=filled
root@box:~ [ -n "$VAR" ] && functionA || functionB
A

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42926
10 years ago
John Crispin d099a34980 base-files: default_postinst() force clear luci-indexcache
Inside every LuCI package you need to clear luci-indexcache and
sometimes when installing non LuCI pacakges it's also needed to clear
it. Easier put it into default_postinst().

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>

SVN-Revision: 42923
10 years ago
John Crispin 5efe2e5e3c base-files: the USERID code path did not check for duplicate groups
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42919
10 years ago
John Crispin 20940138ac scripts: fix wrong usage of '==' operator
[base-files] shell-scripting: fix wrong usage of '==' operator

normally the '==' is used for invoking a regex parser and is a bashism.
all of the fixes just want to compare a string. the used busybox-ash
will silently "ignore" this mistake, but make it portable/clean at least.

this patch does not change the behavior/logic of the scripts.

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42911
10 years ago
Steven Barth 14e6559eee base-files: add network_get_ipaddrs_all()
Return all IPv4 and IPv6 addresses.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 42856
10 years ago
Steven Barth c118e5edf4 network: Unbind DHCPv6 from underlying interfaces
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
10 years ago
John Crispin a3bf98495a base-files: extend USERID:=syntax
it is now possible to inlie the uid and gid in the syntax

USERID:=username=uid:group=gid:group2=gid2:...

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42838
10 years ago
John Crispin f9cccd2c14 base-files: make postinst script run inside a subshell
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42800
10 years ago
John Crispin 7860c9707a sysupgrade: preserve symlinks in backups
Signed-off-by: Catalin Patulea <catalinp@google.com>

SVN-Revision: 42783
10 years ago
Steven Barth 8a971b2770 base-files: remove a 'not found' error message during system boot
During boot, a not found message is displayed for systems which do
not have uci 'network.globals.ula_prefix' defined in
/etc/config/network. The error message itself is not used and can
be ignored.

Signed-off-by: Michel Stam <m.stam@fugro.nl>

SVN-Revision: 42755
10 years ago
Florian Fainelli bc96c49c67 base-files: add a protocol argument to ucidef_set_interface_raw
Add a third argument to ucidef_set_interface_raw, which is specifying
the protocol.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 42665
10 years ago
John Crispin 44249f71a8 postinst trigger: the new postinst trigger broke IB
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42571
10 years ago
Luka Perkov a8b6ca8797 base-files: whitespace fixes
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 42542
10 years ago
John Crispin d6dbc22bbc ipkg: add a default postinst/prerm script
the postinst script enables/starts the init.d scripts upon package installation
and installs the users required by the package.

the prerm script stops and disables the init.d scripts.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42470
10 years ago
John Crispin 2ae05c57f8 package/*: remove useless explicit set of function returncode
somebody started to set a function returncode in the validation
stuff and everybody copies it, e.g.

myfunction()
{
	fire_command

	return $?
}

a function automatically returns with the last returncode,
so we can safely remove the command 'return $?'. reference:

http://tldp.org/LDP/abs/html/exit-status.html
"The last command executed in the function or script determines the exit status."

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42278
10 years ago
John Crispin 2d286dad6e base-files: properly generate the ula
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42261
10 years ago
Steven Barth 929e73c7b6 base-files: increase igmp_max_memberships to improve multicast-proxy handling
SVN-Revision: 42227
10 years ago
John Crispin 9ba6cd186a base-files: fix inverse logic in board_detect script
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42220
10 years ago
John Crispin db6a292d4c base-files: wan6 should reference wan intead of referencing itself.
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42199
10 years ago
John Crispin 562d9f9582 base-files: add a hardware detection layer
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
10 years ago
Jo-Philipp Wich f63509ac89 base-files: /lib/functions/network.sh: fix network_get_ipaddr6
When looking for the first ipaddr also consider the current prefix just
like network_get_ipaddrs6 does. If ipv6-address was empty the function
did not return the first ipaddr even if the list was non-empty.

fixes commit 83e9122f88a002871d5cdf421cf6aa6052b7e006

Signed-off-by: Henning Schild <henning@hennsch.de>

SVN-Revision: 42139
10 years ago
Jo-Philipp Wich 01fd962745 build: enable PER_FEED_REPO by default
Enable the separate feed repositories by default to align custom builds with the repositories
available on the snapshot download server.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42112
10 years ago
Felix Fietkau 517ad9ff0d base-files: enable option to skip the netfilter "filter" table for established connection packets by default
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42048
10 years ago
Jo-Philipp Wich 960b7643c9 build: add new option to add disabled feeds commented out to opkg.conf
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42004
10 years ago
Jo-Philipp Wich a720dd209f build: introduce per feed repository support
This changeset implements a new menuconfig option to generate separate
repositories for each enabled package feed instead of one monolithic one.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42002
10 years ago
Felix Fietkau d5653558ac base-files: properly escape strings for version info
Make sure they don't break the sed command, and also make device_info
and openwrt_release more robust for parsing by scripts

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

SVN-Revision: 41885
10 years ago
Felix Fietkau dbb77e39a0 base-files: add extra version configuration options for OEM manufacturer info
Creates /etc/device_info which will be used to fill in information for
WPS and other protocols that need manufacturer/device information

This helps with creating OpenWrt firmware for OEM or rebranded devices.

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

SVN-Revision: 41884
10 years ago
Imre Kaloz ad27df85b7 BB is branched, get ready for Chaos Calmer
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41870
10 years ago
John Crispin 3c9cfbeebd base-files: Remove stale calls to start() in initscripts.
based on http://patchwork.openwrt.org/patch/5969/

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41840
10 years ago
Gabor Juhos 69abf630cf base-files: strip quotes from the MAC address in macaddr_canonicalize()
Extracted from http://patchwork.openwrt.org/patch/5716/

Signed-off-by: Forest Crossman <cyrozap@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 41639
10 years ago
Felix Fietkau 59cfa05bf3 base-files: adjust the default netfilter tcp established connection timeout as per RFC 5382 (#17098)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41599
10 years ago
John Crispin be26421f45 sysupgrade: Enable killing of all processes under upgraded
If the sysupgrade scripts is called under upgraded, it will not kill all
other processes as it should to avoid interference by locked filesystem.
This patch checks the parent and if it is upgraded, it kills all.

Signed-off-by: André Valentin <avalentin@marcant.net>

SVN-Revision: 41563
10 years ago
Felix Fietkau d288a7903d rc.common: when reloading a service using procd, fall back to calling start instead of restart
This avoids unnecessary service restarts

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

SVN-Revision: 41490
10 years ago
John Crispin 66ae4803e2 base-files: fix ramfs / nand upgrade
/lib/{imx6,lantiq,...}.sh are needed in the ramfs for sysupgrade to work.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41440
10 years ago
Luka Perkov be2a057787 base-files: define yes/no as valid boolean options
ubox validate_data defines yes/no as valid boolean options, do the same in
config_get_bool too.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41405
10 years ago
John Crispin 818e38625f base-files: add enabled config option for ntp service
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41354
10 years ago
John Crispin 3a9bfa5938 base-files: add a post start hook to the procd init.d api
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41344
10 years ago
Luka Perkov 3fea61afe8 base-files: update copyright headers
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41334
10 years ago
John Crispin 09273f5c0a base-files: regenerate the /lib64 symlink when switching to a ramdisk
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41284
10 years ago
Jo-Philipp Wich 7eb721425e base-files: depend on jsonfilter and rewrite network.sh to use it
Switches /lib/functions/network.sh from jshn based json parsing to
jsonfilter expression while keeping the existing api.

Expensive methods like "network_find_wan" are up to 20x faster now.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 41281
10 years ago
John Crispin 4b1c48bc93 base-files: add upgraded to the list of daemons not killed
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41268
10 years ago
John Crispin 3dca5a158d procd: various cleanups to /lib/upgrade/nand.sh
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41222
10 years ago
John Crispin bedd6f44a5 base-files: properly remove stderr from zcat/bzcat
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41135
10 years ago
John Crispin c43d614f89 base-files: add an ugly hack for nand to sysupgrade
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41126
10 years ago
John Crispin e73538ba56 base-files: include more ubi* tools in sysupgrade ramdisk
Also add some more busybox symlinks which are useful for sysupgrade
on UBI-enabled devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 41125
10 years ago
Felix Fietkau 281f415885 base-files: fix argument order to date in sysfixtime so that it also works with musl
Seems like the reverse order relies on GNU specific getopt hackery which
musl does not replicate

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

SVN-Revision: 41045
10 years ago
John Crispin 47cf6f9cd1 base-files: /etc/rc.button/power should be executable
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40993
10 years ago
John Crispin 0de0310a9c base-files: Allow installation of symlinks using RAMFS_COPY_BIN env var.
http://patchwork.openwrt.org/patch/5086/

Signed-off-by: karl.vogel@gmail.com

SVN-Revision: 40943
10 years ago
John Crispin 37eb27e47d base-files: remove function service_kill
Function service_kill is deprecated and has no user, so remove it.

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>

SVN-Revision: 40912
10 years ago
John Crispin 36d0a5e3fb base-files: add simple shutdown script
Since svn rev [38557] we support power buttons, for example
the ACPI power button on x86 machines.
Add a simple shutdown script to /etc/rc.button, to gracefully shutdown
the machine after the power button is pressed.

Tested on x86 and x86_64 in a kvm virtual machine.

Signed-off-by: Stefan Hellermann <stefan@the2masters.de>

SVN-Revision: 40909
10 years ago
John Crispin 44e2de03a4 base-files: calling stop_service before procd_kill.
Before this patch, doing `/e/c/network restart' will emit the folloing
error by `ubus network.wireless down "{}"' because netifd already quit
by that time.

	Command failed: not found

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 40906
10 years ago
John Crispin dcf42b40fc base-files: removes logging
Since logd haven't started at this point, logging does not work.

Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>

SVN-Revision: 40904
10 years ago
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
10 years ago
Felix Fietkau c622a37101 base-files: remove duplicate stop_service() function.
It was introduced in commit 2f966e8, "base-files: add a post start hook
for procd managed services".

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 40576
10 years ago
Felix Fietkau a423055592 base-files: remove duplicate wps button handler (#15621)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40528
10 years ago
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
10 years ago
John Crispin 665d39f698 base-files: the ubi tol should be installed when jumping to ram_fs
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40420
10 years ago
John Crispin 1d5ac95850 base-files: make use of new fstools
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40416
10 years ago
Felix Fietkau 28f4f4a6d7 /lib/functions.sh: remove config_rename()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40412
10 years ago
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
10 years ago
Felix Fietkau e700dcaf04 /lib/functions.sh: remove jffs2_mark_erase()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40410
10 years ago
Felix Fietkau d368cc63fe base-files: remove config_clear() and list_remove()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40409
10 years ago
Felix Fietkau 3d275a8deb base-files: move uci_apply_defaults() to /etc/init.d/boot
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40408
10 years ago
Felix Fietkau 4a6ad541d8 /lib/functions.sh: remove hotplug_dev()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40406
10 years ago
Felix Fietkau ba2b6f661b /lib/functions.sh: remove strtok()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40405
10 years ago
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
10 years ago
Felix Fietkau e90b695157 /lib/functions.sh: remove pi_include()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40403
10 years ago
Felix Fietkau 1d763171bf /lib/functions.sh: remove jffs2_ready()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40402
10 years ago
Felix Fietkau 0f2524f473 /lib/functions.sh: remove support for non-overlayfs overlay fopivot types
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40401
10 years ago
John Crispin 08b4924401 ubi-utils: mini version of mtd-utils that only includes ubi tools
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40367
10 years ago
John Crispin 0dc9d8d6ff fstools: add the new fstools package
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39895
10 years ago
Imre Kaloz 6a4ecd05f0 the root password should be empty for real, like before
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 39650
10 years ago
John Crispin 7917a87d12 base-files: split /etc/init.d/boot into 2 files
this allows us to bind a procd trigger to system.@system[-1]

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39615
10 years ago
Jo-Philipp Wich 6ae1433ab9 base-files: expose taint flags in /etc/openwrt_release
SVN-Revision: 39437
10 years ago
Jo-Philipp Wich 73344b9c56 Add sysfixtime init script, replacement of luci_fixtime
Simply scan for the most recent file in /etc and set
system time to this file modification time if it's in the future
It allow some time dependent program to work immediatly
without waiting for ntpd to sync

v1: v2: bad approach
v3: simply scan /etc, thanks to Bastian Bittorf for the idea
v4: use sort -n, thanks to Catalin Patulea
v5: use [] instead of [[]], thanks to Andreas Mohr
v6: use openwrt style, thanks to Bastian Bittorf

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>

SVN-Revision: 39422
10 years ago
Luka Perkov d66d2ad104 base-files: add ucidef_add_switch_port function
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 39372
10 years ago
John Crispin f18112883f sysupgrade: do not kill any processes in failsafe
sysugrade killed the lock causing failsafe to stop

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 39318
10 years ago
John Crispin 834204bda6 base-files: fix mount-utils incompatibility
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>

SVN-Revision: 39169
11 years ago
Jo-Philipp Wich ef0ce72b39 base-files: ipcalc.sh: support bit length as netmask parameter
SVN-Revision: 39100
11 years ago
Jo-Philipp Wich fe230cac18 base-files: add network_get_protocol() to /lib/functions/network.sh
SVN-Revision: 39099
11 years ago
Felix Fietkau b656a56225 /sbin/wifi: reload network/wireless on wifi restart
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39036
11 years ago
Luka Perkov 3ceb6b3274 base-files: fix whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 39006
11 years ago
Felix Fietkau 6e0fafd816 wifi: restart netifd wifi interfaces on the "up" command like the old variant
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38990
11 years ago