Commit Graph

258 Commits (37eb27e47dbeb3e94d0415fb6d83e0097721a582)

Author SHA1 Message Date
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
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 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
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 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 fe230cac18 base-files: add network_get_protocol() to /lib/functions/network.sh
SVN-Revision: 39099
11 years ago
Luka Perkov 3ceb6b3274 base-files: fix whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 39006
11 years ago
John Crispin 93e9a71538 base-files: allow users to delect debug level during boot
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38909
11 years ago
Felix Fietkau ff17114ba1 ar71xx: Unifi AP Pro sysupgrade patch
The current implementation of mtd will not append the backup
file created by sysupgrade to the correct partition, as mtd will append
the data to first jffs2 partition it finds. As the kernel is also
stored on a jffs2 partition (which resides before the overlay
partition), the data will be appended to this partition.

To fix this problem, a new option

-s <number>             skip the first n bytes when appending data to the jffs2 partiton, defaults to "0"

is added to mtd.

Signed-off-by: Peter Wagner <tripolar@gmx.at>

SVN-Revision: 38807
11 years ago
Gabor Juhos b7914344ad base-files: add macaddr_canonicalize helper function
In commit r38690, the MAC address canonicalization
has been converted to use 'tr' instead of 'printf'.
This only works if with MAC addresses which uses
the 'xx:xx:xx:xx:xx:xx' format.

However on some boards, the MAC addresses are stored
in different format in the mtd partition. Some vendors
are using hyphens or dots as separators instead of
colons. Also the leading zeroes may be missing from the
individual octets or those are replaced with spaces.

Add a new function which can be used to convert these
into the 'xx:xx:xx:xx:xx:xx' format. Also update the
'mtd_get_mac_ascii' function to use the new helper.

The helper function is based on this code:
  http://isquared.nl/blog/2010/08/11/Bash-function-to-canonicalize-MAC-addresses/

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38803
11 years ago
Hauke Mehrtens 0d82bbb1fb base-files: don't kill nas for sysupgrade
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38766
11 years ago
Gabor Juhos 23cf426324 base-files: mtd_get_mac_ascii bugfix
The mtd_get_mac_ascii utility function was broken. This fixes it.

  - Remove the superfluous include of /lib/functions.sh. The
    function is already in that file so it is pointless,
  - only use a variable if the whole key word matches,
  - don't try to process the MAC address if it is empty,
  - use 'tr' to canonicalize the MAC address,

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[juhosg: add more fixes, update commit message]
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38690
11 years ago
John Crispin 3e54dbbf60 base-files: be verbose when entering failsafe due to a button being pressed
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37535
11 years ago
Gabor Juhos 8d55ea10ad base-files: add mtd_get_part_size helper
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 37475
11 years ago
Jo-Philipp Wich 55178554c2 base-files: reject invalid uci keys in network_get_device() and related procedures (#13886)
SVN-Revision: 37345
11 years ago
Felix Fietkau b95bdc8ab5 kernel/base-files: clean up old code related to refreshing mtd partitions, it is no longer used anywhere
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37282
11 years ago
John Crispin 43a3d87b83 package: fix insmod on install
the procd changes broke the postinst insmod.

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

SVN-Revision: 37015
11 years ago
John Crispin 4c43cacce0 base-files: module loading is now handled by ubox/kmodloader
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37003
11 years ago
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
11 years ago
John Crispin e078f649b5 procd: make the preinit rules wildcard all buttons for failsafe
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36896
11 years ago
John Crispin 5e45a68a4a base-files: fix failsafe via button press
entering failsafe by pressing a button during boot was broken for procd as init

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

SVN-Revision: 36891
11 years ago
Jo-Philipp Wich 026271d03c base-files: change network_find_wan() procedure to ignore default gateways in different routing tables
SVN-Revision: 36553
11 years ago
John Crispin c7c243669c sysupgrade: fixes broken pipe error during sysupgade
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36548
11 years ago
John Crispin 831c7ea04f preinit: move cmdline failsafe= handling ot the generic code
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36430
11 years ago
John Crispin 811d90ff40 mount_root: prepare base-files
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36429
11 years ago
Steven Barth 4e8f7f37ed Change default IPv6 config to enable DHCPv6-PD
SVN-Revision: 36384
11 years ago
Steven Barth ea94d66b0f Adapt default network configuration for IPv6
SVN-Revision: 36278
11 years ago
Florian Fainelli 3810cc0f46 base-files: sysupgrade fail with eglibc
With eglibc, "ldd busybox" give us
    libcrypt.so.1 => /lib/libcrypt.so.1 (0x774be000)
    libm.so.6 => /lib/libm.so.6 (0x773e4000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x773c0000)
    libc.so.6 => /lib/libc.so.6 (0x77276000)
    /lib/ld.so.1 (0x774fe000)

Thus /lib/ld.so.1 is not printed by the libs fonction and isn't copied to the 'new' root before pivot root
libs() { ldd $* | awk '{print $3}'; }
https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/upgrade/common.sh

With uclibc the last line of "ldd busybox" is
    ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x77ada000)

Don't know for musl!

This patch replace https://dev.openwrt.org/changeset/19167, as glibc is gone
The other way around is to rework libs()

Please apply the fix (mine or another) on trunk and AA
Might fix https://dev.openwrt.org/ticket/12273

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 36107
11 years ago
John Crispin ada74b8732 sysupgrade was broken as procd was getting killed
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36031
11 years ago
John Crispin f43b7934d2 make basefiles aware of procd
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36003
11 years ago
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
11 years ago
Gabor Juhos c4f14fab9b base-files: minor cosmetic corrections for functions.sh
- update copyright header
  - remove superfluous shebang left-over from changeset 34794
  - unify function declaration

[juhosg: keep Vertical Communications' copyright notice]

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

SVN-Revision: 35646
11 years ago
Gabor Juhos 5a8c63b47e base-files: add macaddr_{add,2bin,setbit_la} helpers
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35614
11 years ago
Gabor Juhos 70d40b2ddd base-files: add mtd_get_mac_{ascii,binary} helpers
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35612
11 years ago
Steven Barth 231f8c2969 base-files: fix network_get_prefix6
SVN-Revision: 35300
11 years ago