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
2012-12-12 13:41:56 +00:00
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
2012-12-12 12:38:31 +00:00
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
2012-11-23 20:02:02 +00:00
Jo-Philipp Wich
dac5ed38b6
base-files: remove route enabled check in lib/functions/network.sh after netifd bump
...
SVN-Revision: 33391
2012-09-13 08:47:10 +00:00
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
2012-08-13 14:01:37 +00:00
Jo-Philipp Wich
ff3161a6c4
base-files: ensure that /sys is available during sysupgrade, some essential services like om-watchdog need it
...
SVN-Revision: 32587
2012-07-03 15:43:43 +00:00
Jo-Philipp Wich
b2e5c5f82e
base-files: implement network_get_dnsserver() and network_get_dnssearch() in /lib/functions/network.sh
...
SVN-Revision: 32531
2012-06-29 19:04:11 +00:00
Jo-Philipp Wich
e654014352
base-files: only consider enabled default routes when finding the wan iface ( #11774 )
...
SVN-Revision: 32525
2012-06-29 11:58:35 +00:00
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
2012-06-17 11:50:50 +00:00
Jo-Philipp Wich
9869b4da3c
base-files: implement network_defer_device() and network_ready_device() wrappers for upcoming netifd iface deferring support
...
SVN-Revision: 32106
2012-06-07 14:55:26 +00:00
Jo-Philipp Wich
a044a43d06
base-files: make user_add() populate the shadow db as well
...
SVN-Revision: 32063
2012-06-05 17:40:32 +00:00
Jo-Philipp Wich
9ae901445b
/etc/functions.sh => /lib/functions.sh
...
SVN-Revision: 32062
2012-06-05 16:04:23 +00:00
Gabor Juhos
eca7502dfd
base-files: add LED specific functions to /lib/functions/uci-defaults
...
SVN-Revision: 31991
2012-05-29 16:39:16 +00:00
Jo-Philipp Wich
c11151bc70
base-files: add network_is_up()
...
SVN-Revision: 31978
2012-05-29 02:03:25 +00:00
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
2012-05-29 00:20:16 +00:00
Jo-Philipp Wich
8ef9450b37
base-files: add network_get_device() to network.sh
...
SVN-Revision: 31937
2012-05-28 03:24:56 +00:00
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
2012-05-28 03:15:02 +00:00
Felix Fietkau
166db84309
base-files: kill ubusd and udhcpc on sysupgrade as well
...
SVN-Revision: 31852
2012-05-23 21:54:12 +00:00
Felix Fietkau
5d6628a88c
base-files: allow sysupgrade to kill netifd, fixes pppd shutdown on upgrade
...
SVN-Revision: 31851
2012-05-23 21:49:31 +00:00
Gabor Juhos
6aec1d72c2
package/base-files: copy /lib/functions.sh to the ramfs on sysupgrade
...
SVN-Revision: 31842
2012-05-23 21:05:20 +00:00
Florian Fainelli
129afe12b7
base-files: fix typo in 05_firstboot_skip script ( #11359 )
...
SVN-Revision: 31492
2012-04-27 16:49:16 +00:00
Felix Fietkau
3678ba60ca
base-files: rename internal variables in config_foreach to make namespace conflicts more unlikely
...
SVN-Revision: 31431
2012-04-21 20:34:45 +00:00
Felix Fietkau
6f46704743
base-files: split service related functions off to /lib/functions/service.sh
...
SVN-Revision: 31042
2012-03-20 14:29:50 +00:00
Gabor Juhos
6c61d7cbf1
base-files: remove trailing whitespaces from lib/functions/boot.sh
...
SVN-Revision: 30776
2012-03-02 11:17:30 +00:00
Gabor Juhos
8ae051799a
base-files: remove trailing whitespaces from lib/functions.sh
...
SVN-Revision: 30775
2012-03-02 11:17:29 +00:00
Gabor Juhos
561f4d2840
base-files: add lib/functions/uci-defaults.sh
...
SVN-Revision: 29384
2011-12-01 22:48:46 +00:00
Jo-Philipp Wich
6d80ce78f1
base-files: rewrite killing of nonessential services to not rely on top, use the proc filesystem only
...
SVN-Revision: 29187
2011-11-16 15:01:18 +00:00
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
2011-11-12 13:53:15 +00:00
Nicolas Thill
f371d516bf
package/base-files: /lib/functions.sh: add {group,user}_{add,exists} functions
...
SVN-Revision: 28871
2011-11-09 00:23:58 +00:00
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
2011-11-08 23:35:13 +00:00
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
2011-11-08 22:47:49 +00:00
Nicolas Thill
d0659ce37e
package/base-files: move service* functions from /etc/rc.common to /lib/functions.sh
...
SVN-Revision: 28864
2011-11-08 22:47:41 +00:00
Jo-Philipp Wich
7e3b6aa1f1
base-files: do not kill udhcpc on sysupgrade, it will tear down the interface if terminated
...
SVN-Revision: 28863
2011-11-08 19:14:55 +00:00
Jo-Philipp Wich
daca6a6a97
base-files: do not assume that "top" is busybox' top, but try to call the applet explicitely
...
SVN-Revision: 28862
2011-11-08 18:48:38 +00:00
Nicolas Thill
b6aef59ea8
package/base-files: move /etc/functions.sh to /lib/functions.sh
...
SVN-Revision: 28857
2011-11-08 14:14:29 +00:00
Jo-Philipp Wich
e3daeabda3
base-files: add some more protected services to sysupgrade kill blacklist
...
SVN-Revision: 28732
2011-11-03 19:25:25 +00:00
Jo-Philipp Wich
ef6d7a7e33
base-files: fix typo
...
SVN-Revision: 28681
2011-10-30 15:48:14 +00:00
Jo-Philipp Wich
52e93e54bc
base-files: sysupgrade: kill all but essential processes before starting the update
...
SVN-Revision: 28626
2011-10-27 16:52:31 +00:00
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
2011-10-27 07:54:49 +00:00
Felix Fietkau
c2b5767572
base-files: move network related scripts to a separate package to make the transition to netifd easier
...
SVN-Revision: 28495
2011-10-20 15:01:06 +00:00
Jo-Philipp Wich
59c13202e0
base-files: introduce "igmp_snooping" option to toggle IGMP snooping on bridge interfaces
...
SVN-Revision: 28412
2011-10-11 13:43:08 +00:00
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
2011-09-24 20:34:17 +00:00
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
2011-09-23 08:35:50 +00:00
Vasilis Tsiligiannis
98372a8eb5
base-files: Fix IPv6 address and route adding on aliases with no IPv4 address configured
...
SVN-Revision: 28241
2011-09-14 13:37:44 +00:00
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
2011-09-14 13:37:40 +00:00
Vasilis Tsiligiannis
718c8ab940
base-files: Add support for assigning multiple IPv6 addresses on an interface
...
SVN-Revision: 28222
2011-09-12 21:07:00 +00:00
Jo-Philipp Wich
94c728dc39
base-files: use "reboot -f" after sysupgrade to prevent executing deleted init scripts
...
SVN-Revision: 27776
2011-07-25 22:19:55 +00:00
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
2011-07-17 17:10:30 +00:00
Jo-Philipp Wich
e0e6d1029e
base-files: use uci_toggle_state() to prevent unwanted aggregation of state vars ( #9711 )
...
SVN-Revision: 27616
2011-07-15 14:57:44 +00:00
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
2011-07-07 02:52:02 +00:00
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
2011-06-09 12:36:30 +00:00
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
2011-06-09 12:25:48 +00:00
Jo-Philipp Wich
97ee10d691
base-files: fix error reporting for unsupported protocols on virtual interfaces
...
SVN-Revision: 27132
2011-06-07 23:25:43 +00:00
Felix Fietkau
60f66ded72
base-files: make the MAC address of bridge interfaces sticky to avoid ARP issues on wifi re-configuration
...
SVN-Revision: 26990
2011-05-24 09:31:37 +00:00
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
2011-04-03 01:23:45 +00:00
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
2011-03-17 19:09:43 +00:00
Felix Fietkau
66bcd1d049
base-files: add initial support for mounting overlayfs
...
SVN-Revision: 26207
2011-03-17 19:09:39 +00:00
Michael Büsch
e6100a161b
boot.sh: Tabs are used for indent. Also use tabs in jffs2_ready()
...
SVN-Revision: 25635
2011-02-20 22:40:47 +00:00
Michael Büsch
16a300ea66
base-files: Add "-o noatime" to mount wrapper
...
noatime is cheaper than default relatime.
SVN-Revision: 25634
2011-02-20 22:39:08 +00:00
Michael Büsch
3a12229c1d
Fix whitespace
...
SVN-Revision: 25632
2011-02-20 21:25:45 +00:00
Jo-Philipp Wich
ee3a4c2ee9
base-file: cleanup ipv6 enabling in unbridge
...
SVN-Revision: 25473
2011-02-12 16:14:15 +00:00
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
2011-02-11 00:39:11 +00:00
Jo-Philipp Wich
a0b2eba08c
base-files: fix a typo in processing of additional dhcp request opts
...
SVN-Revision: 25239
2011-01-29 17:06:07 +00:00
Jo-Philipp Wich
a8edd9d50e
base-files: fix handling of dhcp "reqopts" option
...
SVN-Revision: 25237
2011-01-29 13:45:16 +00:00
Gabor Juhos
25feec0c9c
package/base-files: add get_magic_long() to common upgrade script
...
Patch-by: Mark Mentovai <mark@moxienet.com>
SVN-Revision: 25117
2011-01-26 20:35:37 +00:00
Jo-Philipp Wich
3b6851aa82
base-files: implement "reqopts" parameter for dhcp interfaces to specify additional dhcp options to request
...
SVN-Revision: 24780
2010-12-22 07:20:24 +00:00
Jo-Philipp Wich
deb9661785
Âbase-files: don't mark /etc/banner as conffile
...
SVN-Revision: 24742
2010-12-20 19:51:05 +00:00
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
2010-11-30 00:46:21 +00:00
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
2010-11-17 19:11:50 +00:00
Jo-Philipp Wich
c5711cadd3
base-files: change /dev permissions to 0755 when hotplug2 is used ( #6039 )
...
SVN-Revision: 23908
2010-11-07 00:28:15 +00:00
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
2010-11-07 00:26:00 +00:00
Jo-Philipp Wich
d856ed78ad
base-files: add udhcpc vendorid option ( #7744 )
...
SVN-Revision: 23279
2010-10-06 21:21:28 +00:00
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
2010-10-05 19:24:12 +00:00
Jo-Philipp Wich
6bcdab79b6
base-files: prevent possible sourcing of JFFS2 meta files when merging overlay hooks
...
SVN-Revision: 23114
2010-09-23 17:32:58 +00:00
Daniel Dickinson
b125e3f68e
Fixed duplicated content in file in commit 23111
...
SVN-Revision: 23112
2010-09-23 14:06:47 +00:00
Daniel Dickinson
7fe34123d6
Missed file committing previous change 23110
...
SVN-Revision: 23111
2010-09-23 14:03:22 +00:00
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
2010-09-23 13:58:05 +00:00
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
2010-09-19 23:29:40 +00:00
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
2010-09-19 15:13:06 +00:00
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
2010-08-02 20:45:52 +00:00
Florian Fainelli
56aa129fed
add txqueuelen option, patch from Roberto Riggio
...
SVN-Revision: 22444
2010-07-31 22:32:28 +00:00
Jo-Philipp Wich
9bf9ea9802
base-files: localize variable in do_move_devtmpfs(), remove extra temporary variable and shorten conditional
...
SVN-Revision: 22380
2010-07-24 19:33:11 +00:00
Alexandros C. Couloumbis
6a85a3b53b
package/base-files: add support for devtmpfs (thank you rauchwolke at gmx.net)
...
SVN-Revision: 22379
2010-07-24 19:21:27 +00:00
Jo-Philipp Wich
e1a654dd9f
base-files: unconditionally unlock the rootfs_data partition ( #7437 )
...
SVN-Revision: 22377
2010-07-24 15:47:15 +00:00
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
2010-06-02 20:21:41 +00:00
Jo-Philipp Wich
fa244a1265
base-files: remove IPv6 LL addr from interfaces before adding them to a bridge
...
SVN-Revision: 21659
2010-06-02 17:18:38 +00:00
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
2010-06-02 00:22:13 +00:00
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
2010-06-01 21:43:52 +00:00
Jo-Philipp Wich
261d41a906
base-files: - use add_dns() and remove_dns() for when changing resolv.conf.auto for static or dhcp interfaces - force 0644 permissions when creating resolv.conf.auto, fixes dnsmasq permissions denied problem with pppd interfaces - revert dns servers in /sbin/ifdown - bump package revision
...
SVN-Revision: 21638
2010-05-30 18:23:43 +00:00
Jo-Philipp Wich
09df0523fd
base-files: revert r21595
...
SVN-Revision: 21597
2010-05-28 10:52:02 +00:00
Jo-Philipp Wich
482b8385d2
base-files: bring bridge port iface down before changing the mac ( #7111 )
...
SVN-Revision: 21595
2010-05-28 00:59:19 +00:00
Felix Fietkau
6df2ad3e70
when changing the mac address of a bridge interface, keep member interface addresses in sync (patch from #7111 )
...
SVN-Revision: 21577
2010-05-27 14:04:28 +00:00
Jo-Philipp Wich
d6a142375b
base-files: fix a preinit hang in jffs2_ready() when no rootfs_data partition is found ( #7362 )
...
SVN-Revision: 21511
2010-05-20 05:57:54 +00:00
Jo-Philipp Wich
be41fdd01a
base-files: add add_dns() and remove_dns() helpers to network config, useful to merge dns entries from multiple interfaces
...
SVN-Revision: 21391
2010-05-07 01:17:47 +00:00
Jo-Philipp Wich
dd38b15b75
base-files, ppp: fix interface shutdown
...
SVN-Revision: 21386
2010-05-06 01:14:24 +00:00
Jo-Philipp Wich
66ab73d01f
base-files, ppp: remove protocol specific cleanup code from /sbin/ifdown and move it to protocol stop callbacks
...
SVN-Revision: 21383
2010-05-05 23:24:11 +00:00
Jo-Philipp Wich
163b15f5bb
base-files: make press key message more explicit in preinit
...
SVN-Revision: 20392
2010-03-23 22:56:12 +00:00
Florian Fainelli
7af8ee0481
change from /jffs to /overlay, patch from Daniel Dickinson
...
SVN-Revision: 20356
2010-03-21 17:16:50 +00:00
Felix Fietkau
73f61a64eb
fix error output of brctl if bridging is not supported.
...
The following error is displayed during network configuration on any device that has DEVICE_TYPE set to something else then router, or has brctl functionality disabled through some other method:
"brctl: SIOCGIFBR: Package not installed"
This is due to the unbridge function being called, which uses "brctl show" to determine if the interface is bridged.
Signed-off-by: Ithamar R. Adema <ithamar.adema@team-embedded.nl>
SVN-Revision: 20218
2010-03-14 21:10:07 +00:00
Jo-Philipp Wich
1968fb8da3
base-files: force preinit to use busybox mount ( #6797 )
...
SVN-Revision: 20176
2010-03-13 02:59:05 +00:00