Commit Graph

358 Commits (0f1ae840c9c4a556e24709d5573ca7bdb8fc75ec)

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
11 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
12 years ago
Jo-Philipp Wich 1941fb309d base-files: network.sh: fix typo in previous commit
SVN-Revision: 35287
12 years ago
Jo-Philipp Wich 3b2db1838a base-files: network.sh: simplify network_get_prefix6()
SVN-Revision: 35286
12 years ago
Steven Barth 847cd984b9 base-files: add support for ipv6-prefixes in connection with netifd
SVN-Revision: 35168
12 years ago
Vasilis Tsiligiannis 674439299f base-files: Don't pass '--set-worker /lib/hotplug2/worker_fork.so' to hotplug2 (#12781)
SVN-Revision: 35095
12 years ago
Steven Barth f657787b52 base-files: Fix a typo in config_list_foreach
SVN-Revision: 34893
12 years ago
Mirko Vogt 4cca5cd4fd hot-fix nameclash in sysupgrade: rename pivot() to supivot() in sysupgrade
Sysupgrade defines its very own pivot() function.
Prior merging boot.sh and functions.sh sysupgrade just included boot.sh,
now it includes functions.sh which defines pivot() as well, however
slightly different which causes sysupgrade to fail.

This is a hot-fix to unbreak sysupgrade, however those two pivot()
functions should actually get merged.

SVN-Revision: 34815
12 years ago
Mirko Vogt 4d4b2d3ced merge /lib/functions/boot.sh and /lib/functions.sh
SVN-Revision: 34794
12 years ago
Mirko Vogt 439a869090 Do not overload mount-call - trying to reduce confusion
The behaviour of calling 'mount' differed depending on whether it called
the busybox-mount, the mount of util-linux, the mount defined in
/lib/functions.sh and /lib/functions/boot.sh

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

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

SVN-Revision: 34722
12 years ago
Gabor Juhos 1552af3131 base-files: add mtd_find_chardev helper
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34648
12 years ago
Mirko Vogt ee17703371 Revert "remove function find_mtd_part() from /lib/functions.sh"
Reverting commit 34641.
Function find_mtd_part() is needed by some scripts deployed
for certain targets but not including boot.sh after all.
Still, all this certainly needs some love.

SVN-Revision: 34642
12 years ago
Mirko Vogt 1521cdda0f remove function find_mtd_part() from /lib/functions.sh
Since all scripts using this function include /lib/functions/boot.sh -
where this function is defined as well - it can be dropped
from /lib/functions.sh. Also avoids further confusion about this
function being declared and defined in two different places.

SVN-Revision: 34641
12 years ago
Florian Fainelli 5ae2524d3a base-files: use a natural mount syntax
Busybox built against musl-libc will choke on these otherwise, besides that
it is more natural to use the filesystem type, then options, then name, then
mountpoint.

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

SVN-Revision: 34308
12 years ago
Jo-Philipp Wich dac5ed38b6 base-files: remove route enabled check in lib/functions/network.sh after netifd bump
SVN-Revision: 33391
12 years ago
Gabor Juhos ca857b7a50 base-files: uci-defaults for rssileds
Adds capability to add uci-defaults defining RSSI LEDs

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

SVN-Revision: 33164
12 years ago
Jo-Philipp Wich ff3161a6c4 base-files: ensure that /sys is available during sysupgrade, some essential services like om-watchdog need it
SVN-Revision: 32587
12 years ago
Jo-Philipp Wich b2e5c5f82e base-files: implement network_get_dnsserver() and network_get_dnssearch() in /lib/functions/network.sh
SVN-Revision: 32531
12 years ago
Jo-Philipp Wich e654014352 base-files: only consider enabled default routes when finding the wan iface (#11774)
SVN-Revision: 32525
12 years ago
Jo-Philipp Wich 57a7257569 base-files: implement network_get_gateway(), network_get_gateway6(), network_find_wan() and network_find_wan6() in /lib/functions/network.sh
SVN-Revision: 32397
12 years ago
Jo-Philipp Wich 9869b4da3c base-files: implement network_defer_device() and network_ready_device() wrappers for upcoming netifd iface deferring support
SVN-Revision: 32106
12 years ago
Jo-Philipp Wich a044a43d06 base-files: make user_add() populate the shadow db as well
SVN-Revision: 32063
12 years ago
Jo-Philipp Wich 9ae901445b /etc/functions.sh => /lib/functions.sh
SVN-Revision: 32062
12 years ago
Gabor Juhos eca7502dfd base-files: add LED specific functions to /lib/functions/uci-defaults
SVN-Revision: 31991
12 years ago
Jo-Philipp Wich c11151bc70 base-files: add network_is_up()
SVN-Revision: 31978
12 years ago
Jo-Philipp Wich bf52cbf108 base-files: let network_get_device() return the l3 interface, introduce network_get_physdev() to obtain the underlying iface (if applicable)
SVN-Revision: 31960
12 years ago
Jo-Philipp Wich 8ef9450b37 base-files: add network_get_device() to network.sh
SVN-Revision: 31937
12 years ago
Jo-Philipp Wich f1d04190c5 base-files: introduce /lib/functions/network.sh This file will contain common procedures to deal with network interfaces. Initially provides network_get_ipaddr(), network_get_ipaddr6(), network_get_subnet() and network_get_subnet6() to determine the primary IP addresses or subnets of a given logical interface.
SVN-Revision: 31935
12 years ago
Felix Fietkau 166db84309 base-files: kill ubusd and udhcpc on sysupgrade as well
SVN-Revision: 31852
12 years ago
Felix Fietkau 5d6628a88c base-files: allow sysupgrade to kill netifd, fixes pppd shutdown on upgrade
SVN-Revision: 31851
12 years ago
Gabor Juhos 6aec1d72c2 package/base-files: copy /lib/functions.sh to the ramfs on sysupgrade
SVN-Revision: 31842
12 years ago
Florian Fainelli 129afe12b7 base-files: fix typo in 05_firstboot_skip script (#11359)
SVN-Revision: 31492
12 years ago
Felix Fietkau 3678ba60ca base-files: rename internal variables in config_foreach to make namespace conflicts more unlikely
SVN-Revision: 31431
12 years ago
Felix Fietkau 6f46704743 base-files: split service related functions off to /lib/functions/service.sh
SVN-Revision: 31042
12 years ago
Gabor Juhos 6c61d7cbf1 base-files: remove trailing whitespaces from lib/functions/boot.sh
SVN-Revision: 30776
12 years ago
Gabor Juhos 8ae051799a base-files: remove trailing whitespaces from lib/functions.sh
SVN-Revision: 30775
12 years ago
Gabor Juhos 561f4d2840 base-files: add lib/functions/uci-defaults.sh
SVN-Revision: 29384
13 years ago
Jo-Philipp Wich 6d80ce78f1 base-files: rewrite killing of nonessential services to not rely on top, use the proc filesystem only
SVN-Revision: 29187
13 years ago
Nicolas Thill b49aed1520 package/base-files: enhance service functions
* allow matching process by name (useful for processes changing it)
 * check if first argument is executable
 * fix function name used in error messages

SVN-Revision: 28991
13 years ago
Nicolas Thill f371d516bf package/base-files: /lib/functions.sh: add {group,user}_{add,exists} functions
SVN-Revision: 28871
13 years ago
Nicolas Thill 62a2827ea7 package/base-files: /lib/functions.sh: let service_stop exit early if no matching process to stop where found
SVN-Revision: 28870
13 years ago
Nicolas Thill b7b56df707 package/base-files: enhance & cleanup service wrappers
* add service_check function for checking if a process is alive
 * add service_signal for sending arbitrary signals to a process
 * change service_stop to send a TERM signal first, wait for the process to die and send a KILL signal if it doen't
 * have service_kill print a warning on STDERR stating it has been deprecated

SVN-Revision: 28865
13 years ago
Nicolas Thill d0659ce37e package/base-files: move service* functions from /etc/rc.common to /lib/functions.sh
SVN-Revision: 28864
13 years ago
Jo-Philipp Wich 7e3b6aa1f1 base-files: do not kill udhcpc on sysupgrade, it will tear down the interface if terminated
SVN-Revision: 28863
13 years ago
Jo-Philipp Wich daca6a6a97 base-files: do not assume that "top" is busybox' top, but try to call the applet explicitely
SVN-Revision: 28862
13 years ago
Nicolas Thill b6aef59ea8 package/base-files: move /etc/functions.sh to /lib/functions.sh
SVN-Revision: 28857
13 years ago
Jo-Philipp Wich e3daeabda3 base-files: add some more protected services to sysupgrade kill blacklist
SVN-Revision: 28732
13 years ago
Jo-Philipp Wich ef6d7a7e33 base-files: fix typo
SVN-Revision: 28681
13 years ago
Jo-Philipp Wich 52e93e54bc base-files: sysupgrade: kill all but essential processes before starting the update
SVN-Revision: 28626
13 years ago
Gabor Juhos 4cc48089c7 base-files/sysupgrade: add more busybox applet symlinks to ramdisk
Adds symlinks for printf and wc to make life happier in the sysupgrade ramdisk.
Also make code more readable by escaping that overly long line.

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

SVN-Revision: 28616
13 years ago
Felix Fietkau c2b5767572 base-files: move network related scripts to a separate package to make the transition to netifd easier
SVN-Revision: 28495
13 years ago
Jo-Philipp Wich 59c13202e0 base-files: introduce "igmp_snooping" option to toggle IGMP snooping on bridge interfaces
SVN-Revision: 28412
13 years ago
Felix Fietkau 4246c6a6b5 base-files: apply network interface settings such as macaddr, mtu and txqueuelen in prepare_interface instead of setup_interface. setting the mtu after the interface is up is unreliable on some drivers such as gianfar
SVN-Revision: 28297
13 years ago
Jo-Philipp Wich 41838f4585 base-files: make ip matching in dns add/remove functions more explicit, avoids overmatching pairs like 1.2.3.35 and 1.2.3.3
SVN-Revision: 28291
13 years ago
Vasilis Tsiligiannis 98372a8eb5 base-files: Fix IPv6 address and route adding on aliases with no IPv4 address configured
SVN-Revision: 28241
13 years ago
Vasilis Tsiligiannis 200fd7bce1 Revert "[package] base-files: Add support for assigning multiple IPv6 addresses on an interface"
Multiple IPv6 addresses should be handled with alias sections

SVN-Revision: 28240
13 years ago
Vasilis Tsiligiannis 718c8ab940 base-files: Add support for assigning multiple IPv6 addresses on an interface
SVN-Revision: 28222
13 years ago
Jo-Philipp Wich 94c728dc39 base-files: use "reboot -f" after sysupgrade to prevent executing deleted init scripts
SVN-Revision: 27776
13 years ago
Jo-Philipp Wich 0de28706ca base-files: implement a generic mechanism to map per-interface sysctls to uci. - option ipv4_xyz is mapped to /proc/sys/net/ipv4/{conf,neigh}/xyz - option ipv6_xyz is mapped to /proc/sys/net/ipv6/{conf,neigh}/xyz This allows e.g. "option ipv6_proxy_ndp 1" to enable NDP proxying on wan. Fixes ticket #8699.
SVN-Revision: 27653
13 years ago
Jo-Philipp Wich e0e6d1029e base-files: use uci_toggle_state() to prevent unwanted aggregation of state vars (#9711)
SVN-Revision: 27616
13 years ago
Daniel Dickinson 1f69f4cf64 base-files: preinit: Fixed sourcing of diag.sh in /etc/preinit. This caused errors due to frequent use of /proc/cpuinfo to determine board name to pick led layout. Now diag.sh (which only defines set_state and any helper functions) is sourced by a proper preinit function during preinit_main, which is after /proc has been brought up, unlike in /etc/preinit
SVN-Revision: 27501
13 years ago
Jo-Philipp Wich 344445715a base-files: assume a default ipv6 prefix size of /64, thats what the majority of users mean when they just specify an ip address
SVN-Revision: 27147
13 years ago
Jo-Philipp Wich fd8ec24187 base-files: if an ip6addr without a prefix is given, assume /128 - otherwise the busybox utilities will interpret it as /0 and create an invalid default route
SVN-Revision: 27145
13 years ago
Jo-Philipp Wich 97ee10d691 base-files: fix error reporting for unsupported protocols on virtual interfaces
SVN-Revision: 27132
13 years ago
Felix Fietkau 60f66ded72 base-files: make the MAC address of bridge interfaces sticky to avoid ARP issues on wifi re-configuration
SVN-Revision: 26990
13 years ago
Felix Fietkau e4e63b9c1b base-files: bridge config, avoid having a random ipv6 ll address
So far, we are setting the bridge interface up before having added any
bridge interface ports. This results in the bridge assigning a random
mac address to its bridge interface and therefore IPv6 assigning a
matching link local address to the bridge interface as soon as the
bridge interface is up. After adding the first bridge port interface,
the bridge's mac address is reset correctly, however the IPv6 link
local address stays the same.

This commit ensures that we are at least having the IPv6 link local
address of the first interface added to the bridge instead of a random
one.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>

SVN-Revision: 26426
13 years ago
Felix Fietkau a3b9971d84 base-files: overlayfs whiteouts depend on a specific xattr entry, which does not get preserved by the tmpfs->overlay copy. work around this by cleaning all copied "(overlay-whiteout)" symlinks after the switch to jffs2
SVN-Revision: 26208
13 years ago
Felix Fietkau 66bcd1d049 base-files: add initial support for mounting overlayfs
SVN-Revision: 26207
13 years ago
Michael Büsch e6100a161b boot.sh: Tabs are used for indent. Also use tabs in jffs2_ready()
SVN-Revision: 25635
13 years ago
Michael Büsch 16a300ea66 base-files: Add "-o noatime" to mount wrapper
noatime is cheaper than default relatime.

SVN-Revision: 25634
13 years ago
Michael Büsch 3a12229c1d Fix whitespace
SVN-Revision: 25632
13 years ago
Jo-Philipp Wich ee3a4c2ee9 base-file: cleanup ipv6 enabling in unbridge
SVN-Revision: 25473
13 years ago
Jo-Philipp Wich 875ff44592 base-files: - properly disable IPv6 on bridge ports - introduce accept_ra option, defaults to true for dhcp interfaces, false for others - introduce send_rs option, defaults to true for static interfaces, false for others
SVN-Revision: 25454
14 years ago
Jo-Philipp Wich a0b2eba08c base-files: fix a typo in processing of additional dhcp request opts
SVN-Revision: 25239
14 years ago
Jo-Philipp Wich a8edd9d50e base-files: fix handling of dhcp "reqopts" option
SVN-Revision: 25237
14 years ago
Gabor Juhos 25feec0c9c package/base-files: add get_magic_long() to common upgrade script
Patch-by: Mark Mentovai <mark@moxienet.com>

SVN-Revision: 25117
14 years ago
Jo-Philipp Wich 3b6851aa82 base-files: implement "reqopts" parameter for dhcp interfaces to specify additional dhcp options to request
SVN-Revision: 24780
14 years ago
Jo-Philipp Wich deb9661785 Âbase-files: don't mark /etc/banner as conffile
SVN-Revision: 24742
14 years ago
Jo-Philipp Wich ca829e805b base-files: disable ipv6 on bridge ports, this prevents stray RA assigned and link local addresses on bridge member devices
SVN-Revision: 24194
14 years ago
Jo-Philipp Wich d0ab35c115 base-file: add metric option for static and dhcp protos, this simplifies the management of multiple default routes
SVN-Revision: 24020
14 years ago
Jo-Philipp Wich c5711cadd3 base-files: change /dev permissions to 0755 when hotplug2 is used (#6039)
SVN-Revision: 23908
14 years ago
Jo-Philipp Wich a8efa34da3 Fix permissions for /etc and other dirs after clean flash (#6039)
During the first OpenWrt boot after a clean flash (when the jffs2
partition is not yet initialized) tmpfs is used instead of the usual
jffs2 overlay filesystem.  If this tmpfs is mounted with default
options, all directories created there (/etc, /etc/config, other
subdirectories in /etc) get permissions 1777 by default, and these
permissions then persist in the created jffs2 at least until
subsequent sysupgrade.  Mounting tmpfs with mode=0755 fixes the
permission problem.

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

SVN-Revision: 23906
14 years ago
Jo-Philipp Wich d856ed78ad base-files: add udhcpc vendorid option (#7744)
SVN-Revision: 23279
14 years ago
Jo-Philipp Wich d80f82d7a4 base-files: - add sysupgrade support for keepfile hints * introduces /lib/upgrade/keep.d/ for per-package keepfile lists * introduces /etc/sysupgrade.conf for user defined keepfile hints - prime /lib/upgrade/keep.d/base-files-essential to keep sysupgrade usable for images without opkg - change sysupgrade to build the keepfile list from /lib/upgrade/keep.d/, /etc/sysupgrade.conf and opkg list-changed-conffiles
SVN-Revision: 23258
14 years ago
Jo-Philipp Wich 6bcdab79b6 base-files: prevent possible sourcing of JFFS2 meta files when merging overlay hooks
SVN-Revision: 23114
14 years ago
Daniel Dickinson b125e3f68e Fixed duplicated content in file in commit 23111
SVN-Revision: 23112
14 years ago
Daniel Dickinson 7fe34123d6 Missed file committing previous change 23110
SVN-Revision: 23111
14 years ago
Daniel Dickinson 18b473ca9b base/block-extroot, base/block-mount: Modified preinit and block-extroot and block-mount so that use of block-mount and block-extroot do not require that block-extroot, block-mount, nor the kernel modules they depend, on are required to included in the image. That is block-extroot and dependencies may now be installed as modules onto the jffs2 part of a squashfs system and it will work. In addition packages which are installed into the jffs2 of a squashfs system may now affect preinit, so long as they do not require execution of commands that occur before the merging of the jffs2 and built-in (squashfs) preinit scripts is done.
Thanks jow for the preinit merge stuff!

SVN-Revision: 23110
14 years ago
Daniel Dickinson 1385904dfa base-files: Add function pi_include the /lib/functions/boot.sh used by preinit, which safely sources files as well as working correctly whether the script using it is a package added to the jffs2 part of a squashfs or built into an image or on some other root filesystem.
SVN-Revision: 23099
14 years ago
Jo-Philipp Wich 52531f4eb6 base-files: kill possibly existing udhcpc instance when bringing up a dhcp iface, utilize service_kill() in dhcp shutdown. Based on patch by Stijn Tintel. Possibly related to #7314
SVN-Revision: 23092
14 years ago
Jo-Philipp Wich 8c4ac87e8f base-files: r22444 caused interfaces to remain down if the macaddr option is used, fix it. Also localize the txqueuelen option variable
SVN-Revision: 22467
14 years ago
Florian Fainelli 56aa129fed add txqueuelen option, patch from Roberto Riggio
SVN-Revision: 22444
14 years ago
Jo-Philipp Wich 9bf9ea9802 base-files: localize variable in do_move_devtmpfs(), remove extra temporary variable and shorten conditional
SVN-Revision: 22380
14 years ago
Alexandros C. Couloumbis 6a85a3b53b package/base-files: add support for devtmpfs (thank you rauchwolke at gmx.net)
SVN-Revision: 22379
14 years ago
Jo-Philipp Wich e1a654dd9f base-files: unconditionally unlock the rootfs_data partition (#7437)
SVN-Revision: 22377
14 years ago
Jo-Philipp Wich 93c2c81bcf base-files: introduce option "broadcast" for proto=dhcp interface to enable the broadcast flag in DHCP requests, required by certain providers
SVN-Revision: 21661
14 years ago
Jo-Philipp Wich fa244a1265 base-files: remove IPv6 LL addr from interfaces before adding them to a bridge
SVN-Revision: 21659
14 years ago
Jo-Philipp Wich 94db915196 base-files: - add aliases to device by default (not ifname) - introduce option "layer" to select the target ifname to attach the alias to: - 3 use tun device (tun over bridge over device) fallback to bridge or device - 2 use bridge (bridge over device) fallback to device - 1 use device
SVN-Revision: 21655
14 years ago
Jo-Philipp Wich 75941a19ac base-file: move alias setup to route hotplug, this fixes alias sections for non-static interfaces like ppp, dhcp, 6in4 etc.
SVN-Revision: 21652
14 years ago