Commit Graph

856 Commits

Author SHA1 Message Date
Steven Barth
5f735b291f base-files: remove IPv6-forwarding setting for all interfaces
SVN-Revision: 35344
2013-01-28 13:53:38 +00:00
Steven Barth
231f8c2969 base-files: fix network_get_prefix6
SVN-Revision: 35300
2013-01-22 16:47:16 +00:00
Steven Barth
e0a338c969 base-files: Set default value for IPv6 forwarding
SVN-Revision: 35299
2013-01-22 16:47:09 +00:00
Jo-Philipp Wich
1941fb309d base-files: network.sh: fix typo in previous commit
SVN-Revision: 35287
2013-01-21 19:02:38 +00:00
Jo-Philipp Wich
3b2db1838a base-files: network.sh: simplify network_get_prefix6()
SVN-Revision: 35286
2013-01-21 18:54:58 +00:00
Jo-Philipp Wich
648bd409e3 base-files: use numerically prefixed uci-defaults names
SVN-Revision: 35218
2013-01-18 12:46:43 +00:00
Steven Barth
411d818008 base-files: rename ULA generation script
SVN-Revision: 35204
2013-01-17 16:16:02 +00:00
Steven Barth
847cd984b9 base-files: add support for ipv6-prefixes in connection with netifd
SVN-Revision: 35168
2013-01-15 13:07:51 +00:00
Vasilis Tsiligiannis
674439299f base-files: Don't pass '--set-worker /lib/hotplug2/worker_fork.so' to hotplug2 (#12781)
SVN-Revision: 35095
2013-01-11 13:20:51 +00:00
Jo-Philipp Wich
70b0ef6322 sysupgrade: clarify online help
Fixes #12346.

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

SVN-Revision: 34975
2013-01-02 16:21:30 +00:00
Jo-Philipp Wich
58070b0083 sysupgrade: do not require an extra argument after --restore-backup
Neither --create-backup nor --restore-backup need an image name (following
the backup filename). Treat them in uniform way.

Mostly fixes #12346.

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

SVN-Revision: 34974
2013-01-02 16:21:26 +00:00
Steven Barth
f657787b52 base-files: Fix a typo in config_list_foreach
SVN-Revision: 34893
2012-12-27 14:10:01 +00:00
Jo-Philipp Wich
ab6e2e6928 base-files: ipcalc.sh: fix broken calculations on 64bit systems
Calculate complements by using awk's xor() function with a mask of 0xffffffff
instead of relying on the compl() function which appears to produce broken
results on certain 64bit architectures.

SVN-Revision: 34875
2012-12-23 22:18:43 +00:00
Felix Fietkau
bbc6694d98 base-files: add basic procd integration, let procd start (and restart) ubus instead of having an ubus init script
SVN-Revision: 34866
2012-12-22 18:56:09 +00:00
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
2012-12-21 12:10:21 +00:00
Luka Perkov
65efd09b78 base-files: we don't need /etc/functions.sh symlink anymore
SVN-Revision: 34802
2012-12-20 15:15:30 +00:00
Mirko Vogt
4d4b2d3ced merge /lib/functions/boot.sh and /lib/functions.sh
SVN-Revision: 34794
2012-12-19 16:07:53 +00:00
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
2012-12-19 16:07:46 +00:00
Jo-Philipp Wich
3339316fbe base-files: use json_is_a() in network.sh
SVN-Revision: 34733
2012-12-17 13:07:42 +00:00
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
2012-12-16 20:17:18 +00:00
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
2012-12-16 18:22:02 +00:00
Gabor Juhos
1552af3131 base-files: add mtd_find_chardev helper
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34648
2012-12-12 16:49:50 +00:00
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
Steven Barth
3b0e77ee6b Remove default sysctl-entry for IPv6 here (races)
SVN-Revision: 34417
2012-11-29 20:14:04 +00:00
Gabor Juhos
38fced86ee base-files: add support for the morse LED trigger
Write "delay" and "message" options to their respective files,
allowing Morse code message configuration through UCI.
The delay (dit length) defaults to 150ms (about 8 words per minute,
suitable for beginners).

Signed-off-by: Petr Viktorin <encukou@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34380
2012-11-25 17:20:49 +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
Florian Fainelli
d3f22617a2 base-files: skip LEDs handled by rssileds in led init-script
Without this, /etc/init.d/led will try to set the non-existing 'rssi' trigger.
This doesn't harm as the kernel will refuse this setting, but it outputs some
ugly log-lines:
Jun 24 10:15:19 OpenWrt user.info sysinit: setting up led RSSILOW
Jun 24 10:15:19 OpenWrt user.info sysinit: sh: write error: Invalid argument
...

In order to avoid this, skip LEDs with trigger = "rssi" in /etc/init.d/led

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

SVN-Revision: 33717
2012-10-11 06:45:02 +00:00
Imre Kaloz
c5e5e70ab0 it's time to break the barriers
SVN-Revision: 33666
2012-10-08 13:12:37 +00:00
Felix Fietkau
c7c649126f base-files: remove obsolete entries from sysctl.conf (#12236)
SVN-Revision: 33532
2012-09-24 15:24:01 +00:00
Florian Fainelli
78f4cf3d70 base-files: release an attached loop device on umounting
Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 33477
2012-09-19 15:13:44 +00:00
Jo-Philipp Wich
2165240c32 base-files: make file compare silent in migrate-sysctl
SVN-Revision: 33449
2012-09-17 18:36:51 +00:00
Jo-Philipp Wich
0fd1fb6252 base-files: add uci-defaults script to migrate sysctl.conf (#12196)
SVN-Revision: 33448
2012-09-17 17:15:56 +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
70aaa116eb base-files: provide a sysupgrade -r (--restore-backup) option as convenience wrapper for tar -C / -x(v)zf
SVN-Revision: 33147
2012-08-12 13:20:27 +00:00
Florian Fainelli
fb9023bb8a move LIB_SUFFIX from base-files to rules.mk
Some packages are going to need fixups based on LIB_SUFFIX

SVN-Revision: 33080
2012-08-10 14:15:06 +00:00
Jo-Philipp Wich
17dc1d5c44 base-files: fix option parsing of -F/--force parameter
SVN-Revision: 33075
2012-08-09 18:30:47 +00:00
Florian Fainelli
31e46b4293 base-files: check for ldd presence and executability (#11991)
SVN-Revision: 33057
2012-08-08 15:37:34 +00:00
Florian Fainelli
6afd1725f1 base-files: fix detection of standalone ldd
When standalone ldd is selected in config the binary is installed in /usr/bin/ldd.

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

SVN-Revision: 32891
2012-07-27 15:35:00 +00:00
Vasilis Tsiligiannis
9ab1df3f48 base-files: Modernize hotplug2 rules (#11368)
SVN-Revision: 32711
2012-07-14 19:59:44 +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
Felix Fietkau
6c2a295245 base-files: enable TCP timestamps, enable sack/dsack. (patch by Dave Täht)
A year of testing in the cerowrt project shows not using timestamps
to be a very bad idea in nearly any TCP at speeds above a few Mbit.

Lastly sack/dsack help on recovery from larger amounts of packet
loss.

SVN-Revision: 32513
2012-06-27 22:32:44 +00:00
Jo-Philipp Wich
f2dde4f5ba base-files: allow wireless ifaces to be part of multiple networks
SVN-Revision: 32503
2012-06-26 15:25:33 +00:00
Felix Fietkau
3143f03568 toolchain: move eglibc-files from base-files to toolchain, it is packaged as part of the libc package
SVN-Revision: 32467
2012-06-20 13:45:01 +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
bfe966574f base-files: enable shell tracing in initscripts when INIT_TRACE is set
SVN-Revision: 32340
2012-06-13 17:10:41 +00:00
Felix Fietkau
9a1d6f0678 base-files: override Build/Compile/Default instead of Build/Compile (fixes #11667)
SVN-Revision: 32339
2012-06-13 16:25:29 +00:00
Felix Fietkau
07826e391d base-files: move all toolchain packages to a separate package directory 'toolchain'
SVN-Revision: 32169
2012-06-10 20:27:30 +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
6cdf25289c base-files: add permission exceptions, do not clobber shadow permissions - based on patch by Mark Mentovai <mark@moxienet.com>
SVN-Revision: 32073
2012-06-05 18:02:00 +00:00
Jo-Philipp Wich
5e84df6bac base-files: ship a static initial shadow db instead of creating it from passwd with sed, this fixes registering of users at compile time
SVN-Revision: 32064
2012-06-05 17:48:41 +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
Felix Fietkau
8a9e94b077 base-files: remove base-files-network, netifd is the only supported option now
SVN-Revision: 31980
2012-05-29 12:59:03 +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
Felix Fietkau
5eed1d8f6b enable netifd by default and add its config variable to PKG_CONFIG_DEPENDS in a few relevant places
SVN-Revision: 31730
2012-05-14 23:33:35 +00:00
Jonas Gorski
80650c9475 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.

SVN-Revision: 31639
2012-05-06 21:25:42 +00:00
Mirko Vogt
232b7aa65b remove special treatment when using glibc - support got dropped
SVN-Revision: 31504
2012-04-28 22:24:16 +00:00
Mirko Vogt
334fd4199b purge support for glibc - use eglibc instead!
for reference: http://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg13425.html

SVN-Revision: 31503
2012-04-28 22:24:12 +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
Jo-Philipp Wich
3c4165a305 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

SVN-Revision: 31374
2012-04-20 15:05:38 +00:00
Jo-Philipp Wich
b4312a8ba1 base-files: reformat banner to better work with varying version string lengths, do not set image options if menu is disabled (#11280)
SVN-Revision: 31289
2012-04-15 15:21:55 +00:00
Jo-Philipp Wich
d8540259ca base-file: cleanup white space in Kconfig source
SVN-Revision: 31267
2012-04-12 23:01:39 +00:00
Jo-Philipp Wich
a43ae30e1b 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")

SVN-Revision: 31262
2012-04-12 17:31:16 +00:00
Jo-Philipp Wich
3c3941f109 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.
SVN-Revision: 31258
2012-04-12 09:43:44 +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
Jo-Philipp Wich
5fdd1f4bd7 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>

SVN-Revision: 30982
2012-03-18 19:41:57 +00:00
Felix Fietkau
5744d736f2 base-files: remove old coldplugging hacks that are no longer necessary since the new main hotplug2 instance calls udevtrigger as well
SVN-Revision: 30916
2012-03-13 09:18:30 +00:00
Jo-Philipp Wich
086cae30ce base-files: enable conntrack accounting in sysctl. It used to be a compile time option which got deprecated
SVN-Revision: 30805
2012-03-04 14:53:17 +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
Jo-Philipp Wich
6b9bf71881 base-files: add a uci-defaults script which will migrate the root password to /etc/shadow if needed
SVN-Revision: 29865
2012-01-22 22:25:42 +00:00
Felix Fietkau
a963a80a38 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
SVN-Revision: 29862
2012-01-22 21:14:22 +00:00
Jo-Philipp Wich
9fd3886365 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>
SVN-Revision: 29806
2012-01-19 15:37:47 +00:00
Jo-Philipp Wich
4e88bcfb00 base-files: implement a --force option for sysupgrade to override image checks, useful to upgrade old ar71xx installations to current trunk ones
SVN-Revision: 29688
2012-01-08 15:30:37 +00:00
Gabor Juhos
ff89832fdb package/base-files: add support for the switch LED trigger
SVN-Revision: 29629
2011-12-31 15:02:35 +00:00
Gabor Juhos
3f85c52a3a package/base-files: use case statement in led init script
SVN-Revision: 29628
2011-12-31 15:02:32 +00:00
Jo-Philipp Wich
1c6821b42e 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.
SVN-Revision: 29587
2011-12-20 17:25:15 +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
d46e17548b base-files: kill remaining processes after running user hooks (#10461)
SVN-Revision: 29256
2011-11-19 16:50:25 +00:00
Jo-Philipp Wich
010e58d209 base-files: another empty password check fix (#10440)
SVN-Revision: 29208
2011-11-17 09:40:06 +00:00
Jo-Philipp Wich
33443d2a8c base-files: now that we have date -k, adjust the kernel timezone after setting up TZ and localtime
SVN-Revision: 29204
2011-11-17 01:18:22 +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
Jo-Philipp Wich
8b20bfafdf 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.
SVN-Revision: 29130
2011-11-14 19:02:01 +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
Jo-Philipp Wich
20ff304ed9 base-files: now that the initial password is completely empty (and not primed with "!") adjust login.sh for it to make telnetd available again
SVN-Revision: 28943
2011-11-11 13:25:31 +00:00
Imre Kaloz
28039aea90 nuke another 2.4 skeleton
SVN-Revision: 28937
2011-11-10 13:39:06 +00:00
Imre Kaloz
7944b6fa32 enable and use shadow passwords by default
SVN-Revision: 28936
2011-11-10 12:55:01 +00:00
Imre Kaloz
55ac529951 the empty root password should be empty ;)
SVN-Revision: 28935
2011-11-10 12:47:50 +00:00
Jo-Philipp Wich
be49daffc8 base-files, target: assign name to system timeserver section, makes it easier to set servers on the cli
SVN-Revision: 28933
2011-11-10 12:16:41 +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
Jo-Philipp Wich
a73fffe857 base-files: properly handle wifi ifaces with no network attached, useful for unmanaged interfaces like used for batman or monitoring
SVN-Revision: 28860
2011-11-08 14:42:58 +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
Nicolas Thill
93886bc776 package/base-files: use new service wrapper
SVN-Revision: 28835
2011-11-07 22:58:34 +00:00
Nicolas Thill
10a03275bf package/base-files: /etc/rc.common: add service wrapper around start-stop-daemon
SVN-Revision: 28834
2011-11-07 22:58:27 +00:00
Nicolas Thill
8413e90418 package/base-files: /etc/passwd: fix uid number for user 'daemon' (conflicting with user 'nobody')
SVN-Revision: 28799
2011-11-07 11:02:55 +00:00
Felix Fietkau
248ab4ac2f 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)
SVN-Revision: 28768
2011-11-05 17:16:01 +00:00
Felix Fietkau
dab5ebaa76 netifd: ensure that a bridge gets created before hostapd needs it, hostapd must not attempt to create the bridge by itself
SVN-Revision: 28745
2011-11-04 01:05:12 +00:00
Felix Fietkau
44ba13b578 base-files: load modules early, run wifi detect afterwards and only then process uci defaults
this allows uci-defaults scripts to override wifi settings

SVN-Revision: 28733
2011-11-03 20:02:25 +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
Jo-Philipp Wich
272d95f0f1 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.
SVN-Revision: 28612
2011-10-27 00:21:53 +00:00
Felix Fietkau
55aeabae10 add an initial (experimental) version of netifd, disabled by default
SVN-Revision: 28499
2011-10-21 01:47: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
Jo-Philipp Wich
bfbbe5893f base-files: use "zonename" system option to symlink /etc/localtime via /tmp/localtime to /usr/share/zoneinfo for glibc and eglibc
SVN-Revision: 28306
2011-09-26 02:28:04 +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
Felix Fietkau
dea36724a4 base-files: remove an old network tunable tweak which is messing up network stack performance on modern systems
SVN-Revision: 28126
2011-08-29 23:34:11 +00:00
Jo-Philipp Wich
aab33e2e9a base-files: fix arp() procedure to properly detect /usr/bin/arp
SVN-Revision: 27965
2011-08-12 14:34:39 +00:00
Felix Fietkau
8ff7756e82 base-files: warn when calling /etc/init.d/<script> enable and neither START nor STOP is defined
SVN-Revision: 27797
2011-07-27 09:02:10 +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
365f76551a 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.

SVN-Revision: 27720
2011-07-22 00:21:20 +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
1e34c02e3e base-files: add -h and --help options to sysupgrade (#9728)
SVN-Revision: 27630
2011-07-17 09:27:14 +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
32731a72c2 base-files: pass conloglevel to syslogd (#9463, #9647)
SVN-Revision: 27400
2011-07-03 15:11:58 +00:00
Felix Fietkau
0a7a73261a base-files: do not use the relinked libgcc, fixes c++ exception handling issues (#9185)
SVN-Revision: 27347
2011-07-02 06:50:15 +00:00
Jo-Philipp Wich
28fbd7470d add gfortran compiler support (#9600, patch from Xiangfu Liu via Qi hardware)
SVN-Revision: 27262
2011-06-23 11:46:24 +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
9a227d88dd 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)

SVN-Revision: 27127
2011-06-07 17:00: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
Jo-Philipp Wich
9b8a5e604a base-files: mark /etc/crontabs/ as config directory
SVN-Revision: 26986
2011-05-24 09:27:23 +00:00
Jo-Philipp Wich
ed8f726dab 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

SVN-Revision: 26930
2011-05-18 09:50:06 +00:00
Jo-Philipp Wich
ba1c1e9016 base-files: retrigger usb coldplug after module loading, solves usb_modeswitch on boot and possibly others (#9352)
SVN-Revision: 26848
2011-05-08 10:25:58 +00:00
Gabor Juhos
3b1b49a49b base-files: fix a typo in etc/banner
SVN-Revision: 26841
2011-05-07 09:23:33 +00:00