1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-27 18:21:58 +03:00
Commit Graph

912 Commits

Author SHA1 Message Date
jow
41d413b29c [package] 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.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31935 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-28 03:15:02 +00:00
nbd
d642943131 base-files: kill ubusd and udhcpc on sysupgrade as well
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31852 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-23 21:54:12 +00:00
nbd
e2590c8421 base-files: allow sysupgrade to kill netifd, fixes pppd shutdown on upgrade
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31851 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-23 21:49:31 +00:00
juhosg
5dbbd23291 package/base-files: copy /lib/functions.sh to the ramfs on sysupgrade
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31842 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-23 21:05:20 +00:00
nbd
745d195d8e enable netifd by default and add its config variable to PKG_CONFIG_DEPENDS in a few relevant places
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31730 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-14 23:33:35 +00:00
jogo
b8a14b9359 base-files: wait for wifi modules to settle
On slower devices wifi drivers might take too long for detecting
devices, resulting in the wifi detect call not seeing them.

This was observed on a bcm6348 with bcm4318 wifi. Adding a one second
pause was enough for b43 to expose the device.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31639 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-06 21:25:42 +00:00
mirko
6c0bc69bf6 [package/*] remove special treatment when using glibc - support got dropped
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31504 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-28 22:24:16 +00:00
mirko
875ce0bf50 [toolchain/glibc*] purge support for glibc - use eglibc instead!
for reference: http://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg13425.html

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31503 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-28 22:24:12 +00:00
florian
236e80fbc2 [package] base-files: fix typo in 05_firstboot_skip script (#11359)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31492 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-27 16:49:16 +00:00
nbd
06c4117a5a base-files: rename internal variables in config_foreach to make namespace conflicts more unlikely
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31431 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-21 20:34:45 +00:00
jow
cff1bc811e enable ntpd server for busybox
hi

Another version, in this one the enable_server option is in the timeserver ntp part of the "system" config file
You can patch trunk and bacfire (tested both)
You can put busybox ntpd in client mode (if you put server), in client & server (by putting enable_server to 1, ntpd listen to udp 123), and also in server mode only (if you didn't put any servers in the config and still put enable_server 1,  ntpd will answer with the time of the router)

I've replaced "config_foreach getpeers timeserver" with "config_get peers ntp server" because we want ntp timeserver, not random ones (to pre-answer if someone want to say that it's intrusive ...)

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

Le 27/03/2012 20:41, Etienne Champetier a écrit :
> I've now tested my trunk patch and it works fine
> But I still can't find were $PROG is defined (is this a mistake, or some sort of built in variable???)
> (I've made some grep and nothing)
>
> Le 23/03/2012 02:19, Philip Prindeville a écrit :
>> Maybe:
>>
>> [ -n "$PROG" -a -x "$PROG" ] || return 1
>>
>> instead?
>>
>>
>> On 3/22/12 4:34 PM, Etienne Champetier wrote:
>>> Hi
>>>
>>> The 2 attached patchs (trunk & bacfire) add busybox ntpd enable_server option, as busybox ntpd server is compiled by default.
>>> We only need 1 client/server daemon (olipro patch was launching 2 daemons)
>>> I've fully tested the bacfire patch, and as i don't have a running openwrt trunk i'm not sure for the trunk patch (i'm sure about my modifications, but i'm not sure about "[ -x $PROG ] || return 1", as "$PROG" isn't defined ?!)
>>>
>>> Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
>>>
>>>
>>> Le 16/01/2012 01:57, Philip Prindeville a écrit :
>>>> On 1/14/12 11:37 AM, Olipro wrote:
>>>>> On Saturday 14 Jan 2012 02:45:59 Philip Prindeville wrote:
>>>>>> Don't we already have a 'disabled' option?  Now we're adding an
>>>>>> 'enable_server' option?
>>>>>>
>>>>>> That seems confusing for no useful reason.
>>>>>>
>>>>> have you bothered to read what I originally wrote? your response would make
>>>>> me inclined to believe that you didn't.
>>>>>
>>>>> currently the ntpd initscript only runs it as a CLIENT - this patch enables
>>>>> you to have one instance running as a client and another as a SERVER that
>>>>> other hosts can synchronise with.
>>>>>
>>>>> Or perhaps I'm misunderstanding, what would you propose for allowing the
>>>>> built-in busybox ntpd to be utilised as a server? a separate init script
>>>>> entirely perhaps?
>>>> Or separate config sections... instead of 'config ntp' have 'config ntp-server' and 'config ntp-client'.
>>>>
>>>> -Philip
>>>>
>>>>
>>>> _______________________________________________
>>>> openwrt-devel mailing list
>>>> openwrt-devel@lists.openwrt.org
>>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31374 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-20 15:05:38 +00:00
jow
ba5f954171 [package] base-files: reformat banner to better work with varying version string lengths, do not set image options if menu is disabled (#11280)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31289 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-15 15:21:55 +00:00
jow
c67b119f1a [package] base-file: cleanup white space in Kconfig source
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31267 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-12 23:01:39 +00:00
jow
8faa8431db [buildroot] include, base-files, opkg: introduce version configuration to override the embedded version info of generated images
- Introduce new Kconfig symbols VERSION_DIST, VERSION_NICK, VERSION_NUMBER and VERSION_REPO to specify distribution, release name, version and repository for a given build
 - Introduce include/version.mk to provide common helpers for packages dealing with versions
 - Make opkg use version.mk to populate the opkg.conf template
 - Make base-files use version.mk to populate /etc/openwrt_version, /etc/openwrt_release and /etc/banner

The available placeholders are:
 %D .. Replace with $(CONFIG_VERSION_DIST), default to "OpenWrt"
 %d .. Like %D, but all characters made lowercase and spaces substituted with "_" (e.g. "openwrt")
 %N .. Replace with $(CONFIG_VERSION_NICK), default to the build tree release (e.g. "Attitude Adjustment")
 %n .. Like %N, but all characters made lowercase and spaces substituted with "_" (e.g. "attitude_adjustment")
 %V .. Replace with $(CONFIG_VERSION_NUMBER), default to the build tree release (e.g. "r31262")
 %v .. Like %V, but all characters made lowercase and spaces substituted with "_"
 %C .. Replace with $(CONFIG_VERSION_NUMBER), default to "Bleeding Edge"
 %c .. Like %C, but all characters made lowercase and spaces substituted with "_" (e.g. "bleeding_edge")
 %U .. Replace with $(CONFIG_VERSION_REPO), default to "http://downloads.openwrt.org/snapshots/trunk/%T/packages"
 %R .. Replace with the current build tree revision (e.g. "r31262" or "75488c4a05b8033cf69e91874a61852db7ba9c6c")
 %T .. Replace with the current target (e.g. "ar71xx")
 %S .. Replace with the current target/subtarget combo (e.g. "adm5120/router_le")


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31262 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-12 17:31:16 +00:00
jow
f0ad7e2bc1 [package] base-files: remove network preconfig, it collides with ar71xx network firstboot uci-defaults
To supply custom network settings, it is better to embed a complete network config file using the
files/ overlay, the old image lan preconfig options are also very limited in scope and actually collide
with sysupgrade and firstboot hardware detection on at least ar71xx and possibly other targets, therfore
drop this facility.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31258 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-12 09:43:44 +00:00
nbd
ecce585694 base-files: split service related functions off to /lib/functions/service.sh
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31042 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-20 14:29:50 +00:00
jow
11e663d845 Add munin to /etc/services
The muninlite postinst fails to add munin to /etc/services.

This patch removes this broken postinst and add an entry for munin in
/etc/services. This should have been done when the rest of the
/etc/services postinsts were being removed (changesets 26142-26149).

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30982 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-18 19:41:57 +00:00
nbd
4a8df0b661 base-files: remove old coldplugging hacks that are no longer necessary since the new main hotplug2 instance calls udevtrigger as well
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30916 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-13 09:18:30 +00:00
jow
e7c1abd9d4 [package] base-files: enable conntrack accounting in sysctl. It used to be a compile time option which got deprecated
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30805 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-04 14:53:17 +00:00
juhosg
93c039a0f3 base-files: remove trailing whitespaces from lib/functions/boot.sh
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30776 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-02 11:17:30 +00:00
juhosg
a01dc23d17 base-files: remove trailing whitespaces from lib/functions.sh
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30775 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-03-02 11:17:29 +00:00
jow
de0e01d031 [package] base-files: add a uci-defaults script which will migrate the root password to /etc/shadow if needed
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29865 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-22 22:25:42 +00:00
nbd
cbe4e8a6e6 base-files: the initial hotplug2 instance sometimes misses a few relevant events, e.g. during module load. rerun udevtrigger for the final hotplug2 instance to fix this
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29862 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-22 21:14:22 +00:00
jow
d6527e188b [package] base-files: do not pass --set-worker /lib/hotplug2/worker_fork.so to hotplug2 anymore, its statically linked - patch by Viktar Palstsiuk <viktar.palstsiuk@promwad.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29806 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-19 15:37:47 +00:00
jow
39fdaaf30e [package] base-files: implement a --force option for sysupgrade to override image checks, useful to upgrade old ar71xx installations to current trunk ones
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29688 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-08 15:30:37 +00:00
juhosg
ca385d45a3 package/base-files: add support for the switch LED trigger
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29629 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-12-31 15:02:35 +00:00
juhosg
4c27fd2675 package/base-files: use case statement in led init script
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29628 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-12-31 15:02:32 +00:00
jow
702e9dc046 [package] base-files: add -b (--create-backup) option to sysupgrade, which generates a backup .tar.gz according to the user settings. This will also be reused by LuCI.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29587 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-12-20 17:25:15 +00:00
juhosg
7b8ee72a99 base-files: add lib/functions/uci-defaults.sh
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29384 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-12-01 22:48:46 +00:00
jow
ff70f4cf19 [package] base-files: kill remaining processes after running user hooks (#10461)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29256 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-19 16:50:25 +00:00
jow
b668d3deb8 [package] base-files: another empty password check fix (#10440)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29208 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-17 09:40:06 +00:00
jow
e9531fc3c0 [package] base-files: now that we have date -k, adjust the kernel timezone after setting up TZ and localtime
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29204 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-17 01:18:22 +00:00
jow
c76c2b27fd [package] base-files: rewrite killing of nonessential services to not rely on top, use the proc filesystem only
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29187 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-16 15:01:18 +00:00
jow
639cf75264 [package] base-files: prime root password with "x" to notify programs that there is a shadow record, fix /bin/login.sh password detection accordingly.
Solves broken key based dropbear login with empty password after r28935.


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29130 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-14 19:02:01 +00:00
nico
83e18cc961 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

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28991 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-12 13:53:15 +00:00
jow
0eced37b72 [package] base-files: now that the initial password is completely empty (and not primed with "!") adjust login.sh for it to make telnetd available again
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28943 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-11 13:25:31 +00:00
kaloz
d84d665eb3 [base-files]: nuke another 2.4 skeleton
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28937 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-10 13:39:06 +00:00
kaloz
85639cdac5 enable and use shadow passwords by default
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28936 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-10 12:55:01 +00:00
kaloz
6eae697cb7 [base-files]: the empty root password should be empty ;)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28935 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-10 12:47:50 +00:00
jow
329ee765ee base-files, target: assign name to system timeserver section, makes it easier to set servers on the cli
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28933 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-10 12:16:41 +00:00
nico
6338cb5b06 package/base-files: /lib/functions.sh: add {group,user}_{add,exists} functions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28871 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-09 00:23:58 +00:00
nico
dbfb368804 package/base-files: /lib/functions.sh: let service_stop exit early if no matching process to stop where found
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28870 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-08 23:35:13 +00:00
nico
a12802298d 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

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28865 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-08 22:47:49 +00:00
nico
1454b29603 package/base-files: move service* functions from /etc/rc.common to /lib/functions.sh
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28864 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-08 22:47:41 +00:00
jow
59a4de5391 [package] base-files: do not kill udhcpc on sysupgrade, it will tear down the interface if terminated
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28863 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-08 19:14:55 +00:00
jow
0c1b81f869 [package] base-files: do not assume that "top" is busybox' top, but try to call the applet explicitely
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28862 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-08 18:48:38 +00:00
jow
43e043890d [package] base-files: properly handle wifi ifaces with no network attached, useful for unmanaged interfaces like used for batman or monitoring
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28860 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-08 14:42:58 +00:00
nico
a94c88d3c5 package/base-files: move /etc/functions.sh to /lib/functions.sh
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28857 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-08 14:14:29 +00:00
nico
f3e5707f9a package/base-files: use new service wrapper
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28835 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-07 22:58:34 +00:00
nico
c51520101b package/base-files: /etc/rc.common: add service wrapper around start-stop-daemon
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28834 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-07 22:58:27 +00:00
nico
e4b8affab5 package/base-files: /etc/passwd: fix uid number for user 'daemon' (conflicting with user 'nobody')
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28799 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-07 11:02:55 +00:00
nbd
9938a761e9 base-files: process platform hotplug calls in the early launch of hotplug2 to avoid having crda calls get stuck at boot time (fixes #10350, #10354)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28768 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-05 17:16:01 +00:00
nbd
d802b2e8f3 netifd: ensure that a bridge gets created before hostapd needs it, hostapd must not attempt to create the bridge by itself
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28745 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-04 01:05:12 +00:00
nbd
a296f5fbac base-files: load modules early, run wifi detect afterwards and only then process uci defaults
this allows uci-defaults scripts to override wifi settings

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28733 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-03 20:02:25 +00:00
jow
b42df216bf [package] base-files: add some more protected services to sysupgrade kill blacklist
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28732 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-03 19:25:25 +00:00
jow
d3b6c9da0d [package] base-files: fix typo
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28681 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-10-30 15:48:14 +00:00
jow
32e96fff78 [package] base-files: sysupgrade: kill all but essential processes before starting the update
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28626 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-10-27 16:52:31 +00:00
juhosg
708b461947 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>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28616 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-10-27 07:54:49 +00:00
jow
f8b2067e09 [package] base-files: remove rdate integration, add busybox ntpd init script and server list in /etc/config/system
The rdate applet proved to be too unreliable to obtain the current time on boot:
	- public time servers are rare and often unreachable or overloaded
	- rdate does not daemonize, it needs a network connection the moment it is started, leading to race conditions
	- the /etc/config/timeserver configuration is overly complex and there is no reliable way to disable rdate invocations
	- the time protocol as specified in RFC 868 is considered obsolete
This commit adds an init script /etc/init.d/sysntpd which starts and stops the busybox ntpd accordingly.
The builtin ntpd can be disabled by either disabling the init script, removing the symlink to busybox or
by clearing the timeserver list in /etc/config/system.


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28612 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-10-27 00:21:53 +00:00
nbd
f85eb6d428 add an initial (experimental) version of netifd, disabled by default
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28499 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-10-21 01:47:49 +00:00
nbd
032074b799 base-files: move network related scripts to a separate package to make the transition to netifd easier
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28495 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-10-20 15:01:06 +00:00
jow
51c6793063 [package] base-files: introduce "igmp_snooping" option to toggle IGMP snooping on bridge interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28412 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-10-11 13:43:08 +00:00
jow
f5b7b031f5 [package] base-files: use "zonename" system option to symlink /etc/localtime via /tmp/localtime to /usr/share/zoneinfo for glibc and eglibc
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28306 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-26 02:28:04 +00:00
nbd
b920313ef3 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
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28297 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-24 20:34:17 +00:00
jow
38fd142fbb [package] 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
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28291 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-23 08:35:50 +00:00
acinonyx
c85dbca33f [package] base-files: Fix IPv6 address and route adding on aliases with no IPv4 address configured
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28241 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-14 13:37:44 +00:00
acinonyx
e83e95ad53 Revert "[package] base-files: Add support for assigning multiple IPv6 addresses on an interface"
Multiple IPv6 addresses should be handled with alias sections

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28240 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-14 13:37:40 +00:00
acinonyx
e926403b86 [package] base-files: Add support for assigning multiple IPv6 addresses on an interface
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28222 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-09-12 21:07:00 +00:00
nbd
0b45693152 base-files: remove an old network tunable tweak which is messing up network stack performance on modern systems
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28126 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-08-29 23:34:11 +00:00
jow
408dcd4945 [package] base-files: fix arp() procedure to properly detect /usr/bin/arp
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27965 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-08-12 14:34:39 +00:00
nbd
2ed51448ae base-files: warn when calling /etc/init.d/<script> enable and neither START nor STOP is defined
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27797 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-27 09:02:10 +00:00
jow
6f259421e5 [package] base-files: use "reboot -f" after sysupgrade to prevent executing deleted init scripts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27776 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-25 22:19:55 +00:00
jow
4e88a660b0 [package] base-files: attempt bring up related wifi devices when calling ifup
If a user invoked /sbin/ifup to bring up an interface, the setup used to fail
in case of wireless networks tied to a non-bridged interface definition.
Likewise, the bringup of "lan" in the default configuration will reinitialize
the bridge but do not re-join the wireless network to it, requiring an extra
call to /sbin/wifi (which might not be possible anymore due to a severed link
if connected wirelessly).

The changeset modifies the "ifup" command to search for related wireless
devices and call "wifi up" on them if applicable. This way the commands for
wireless and non-wireless interfaces are unified from a cli point of view.

The "ifup -a" case has not been changed to keep the logic of the 
/etc/init.d/network boot sequence. This might be changed later.

Solves #9763.


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27720 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-22 00:21:20 +00:00
jow
906ce37696 [package] 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.


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27653 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-17 17:10:30 +00:00
jow
e8ba921548 [package] base-files: add -h and --help options to sysupgrade (#9728)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27630 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-17 09:27:14 +00:00
jow
108528b2ce [package] base-files: use uci_toggle_state() to prevent unwanted aggregation of state vars (#9711)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27616 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-15 14:57:44 +00:00
cshore
4e5d6449f6 [package] 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
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27501 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-07 02:52:02 +00:00
jow
56801fec4e [package] base-files: pass conloglevel to syslogd (#9463, #9647)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27400 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-03 15:11:58 +00:00
nbd
83366afdc5 base-files: do not use the relinked libgcc, fixes c++ exception handling issues (#9185)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27347 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-02 06:50:15 +00:00
jow
63ef78f3da [toolchain] add gfortran compiler support (#9600, patch from Xiangfu Liu via Qi hardware)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27262 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-06-23 11:46:24 +00:00
jow
ada8f6b917 [package] base-files: assume a default ipv6 prefix size of /64, thats what the majority of users mean when they just specify an ip address
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27147 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-06-09 12:36:30 +00:00
jow
00938663e2 [package] 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
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27145 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-06-09 12:25:48 +00:00
jow
83f0561da1 [package] base-files: fix error reporting for unsupported protocols on virtual interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27132 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-06-07 23:25:43 +00:00
nbd
7c8a20940f base-files: do not write to /etc/config/wireless at boot time unless a new interface was found
eliminates unnecessary flash write cycles at every boot

patch by Peter Wagner (tripolar)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27127 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-06-07 17:00:43 +00:00
nbd
5ba8c47f86 base-files: make the MAC address of bridge interfaces sticky to avoid ARP issues on wifi re-configuration
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26990 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-05-24 09:31:37 +00:00
jow
f11fc7ea74 [package] base-files: mark /etc/crontabs/ as config directory
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26986 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-05-24 09:27:23 +00:00
jow
5d2766e7eb [PATCH] ipcalc.sh CIDR notation
Hi,

the attached patch makes ipcalc.sh accept IP/Netmask combinations in
CIDR notation. Before you could only do:

# sh ipcalc.sh 192.168.0.0 255.255.255.0 1 10
IP=192.168.0.0
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
NETWORK=192.168.0.0
PREFIX=24
START=192.168.0.1
END=192.168.0.11

with this patch you can also execute it with:

sh ipcalc.sh 192.168.0.0/24 1 10
IP=192.168.0.0
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
NETWORK=192.168.0.0
PREFIX=24
START=192.168.0.1
END=192.168.0.11

The patch is based on #1260 [1], i just changed one line to calculate
the START end END ips right. I wonder why that never got included. If
there is no reason not to do i would like to ask you to commit that
patch, because its a functionality i (and probably others) miss quite often.

Btw, i also fixed 4 useless tabs, that might look a bit strange in the
patch.

Regards, Manuel


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26930 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-05-18 09:50:06 +00:00
jow
6f14855dac [package] base-files: retrigger usb coldplug after module loading, solves usb_modeswitch on boot and possibly others (#9352)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26848 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-05-08 10:25:58 +00:00
juhosg
fa0e25197e base-files: fix a typo in etc/banner
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26841 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-05-07 09:23:33 +00:00
jow
8ade1960dd [package] base-files: cleanup permissions of device files in common hotplug rules (#9211)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26808 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-05-03 19:37:59 +00:00
jow
5f715e00db [package] base-files: fix stale space in eglibc library install section (#9270)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26720 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-19 13:18:39 +00:00
jow
cd427d04f0 base-files: return success on lib-copying with external toolchain
when using an external toolchain the base-files package copies libc, libgcc and
others from the library directory.

The file list is given as following in the .config:
CONFIG_LIBC_FILE_SPEC="./lib/ld{-*.so,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}"

Because the filenames are composed with different endings, not all files exist
and will be skipped. Currently, this works only if the last composed file
(util.so.*) really exists. At the moment this works - but only if you don't add
a new file like 'uClibc'.

Adding it at the end '...resolv,util,uClibc}{-*.so,.so.*}' will lead to this
message, because the combination 'libuClibc.so.*' doesn't exist and Make will
evaluate the last copy statement of the for loop.

--- Message Snippet ---
cp: cannot stat `/home/user/Desktop/code/meetwise/toolchain/staging_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/./lib/libnss_files.so.*': No such file or directory
cp: cannot stat `/home/user/Desktop/code/meetwise/toolchain/staging_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/./lib/libresolv-*.so': No such file or directory
cp: cannot stat `/home/user/Desktop/code/meetwise/toolchain/staging_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/./lib/libresolv.so.*': No such file or directory
cp: cannot stat `/home/user/Desktop/code/meetwise/toolchain/staging_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/./lib/libuClibc.so.*': No such file or directory
make[2]: *** [/home/user/Desktop/code/meetwise/openwrt/bin/at91/packages/libc_-68_at91.ipk] Error 1
make[2]: Leaving directory `/home/user/Desktop/code/meetwise/openwrt/package/base-files'
make[1]: *** [package/base-files/compile] Error 2
make[1]: Leaving directory `/home/user/Desktop/code/meetwise/openwrt'
make: *** [package/base-files/compile] Error 2
--- /Message Snippet/ ---

To fix this unwanted behaviour I added an extra 'exit 0' to each for-loop and
make ignores non-existing files as before.

Signed-off-by: Sven Bachmann <dev@mcbachmann.de>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26623 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-12 20:37:43 +00:00
acinonyx
f6d755eda4 [package] base-files: Use -h instead of deprecated -L for symlink check
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26485 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-05 15:09:43 +00:00
acinonyx
fdf5c18152 [package] base-files: fix minor problem in init.d/boot
The script tests for the existance of /dev/root with test -e which fails if
/dev/root is a dangling symlink making the call to ln fail.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26483 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-05 15:09:32 +00:00
cshore
198ea09e92 [package] block-mount base-files: Added additional check to pi_include to ensure that a directory used with pi_include actually contains files matching the souring pattern because if not the shell dies due to an empty string in for statement. Added /lib/functions/fsck as an empty dir to block-mount. This combination fixes a warning which generates a lot of bug reports, without panicking the kernel like the last attempt.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26479 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-05 12:12:57 +00:00
nbd
8d65fda8a8 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>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26426 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-03 01:23:45 +00:00
jow
46dd8a523b [package] base-files: properly handle vlans on top of wireless interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26230 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-03-18 18:24:51 +00:00
nbd
db0a51c50a 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
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26208 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-03-17 19:09:43 +00:00
nbd
ac2c331815 base-files: add initial support for mounting overlayfs
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26207 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-03-17 19:09:39 +00:00
jow
9f59a573f4 [package] base-files: update sysctl.conf for modern kernels
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26204 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-03-17 15:35:41 +00:00