Commit Graph

154 Commits (bc1fc688afcc974ac4deb417a51061975fd0aef5)

Author SHA1 Message Date
Felix Fietkau bc1fc688af base-files: keep sysupgrade.tgz until /etc/init.d/done has been called
This makes interrupted boots after sysupgrade more reliable

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44941
9 years ago
John Crispin b54f3ad6e7 base-files: fix led script to skip missing triggers
this is based on http://patchwork.ozlabs.org/patch/424451/

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

SVN-Revision: 44087
9 years ago
John Crispin 2ae05c57f8 package/*: remove useless explicit set of function returncode
somebody started to set a function returncode in the validation
stuff and everybody copies it, e.g.

myfunction()
{
	fire_command

	return $?
}

a function automatically returns with the last returncode,
so we can safely remove the command 'return $?'. reference:

http://tldp.org/LDP/abs/html/exit-status.html
"The last command executed in the function or script determines the exit status."

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42278
10 years ago
John Crispin 562d9f9582 base-files: add a hardware detection layer
this allows targets to use the new uci-default helper which will generate
a file called /etc/board.json. a tool called /bin/config_generate can then
be used to generate the default uci settings.

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

SVN-Revision: 42185
10 years ago
John Crispin 3c9cfbeebd base-files: Remove stale calls to start() in initscripts.
based on http://patchwork.openwrt.org/patch/5969/

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

SVN-Revision: 41840
10 years ago
Luka Perkov 3fea61afe8 base-files: update copyright headers
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41334
10 years ago
Felix Fietkau 281f415885 base-files: fix argument order to date in sysfixtime so that it also works with musl
Seems like the reverse order relies on GNU specific getopt hackery which
musl does not replicate

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41045
10 years ago
John Crispin dcf42b40fc base-files: removes logging
Since logd haven't started at this point, logging does not work.

Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>

SVN-Revision: 40904
10 years ago
John Crispin 1d5ac95850 base-files: make use of new fstools
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40416
10 years ago
Felix Fietkau 4a9ea80ef0 /lib/functions.sh: move rarely used mtd and macaddr related functions to /lib/functions/system.sh
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40411
10 years ago
Felix Fietkau 3d275a8deb base-files: move uci_apply_defaults() to /etc/init.d/boot
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40408
10 years ago
John Crispin 0dc9d8d6ff fstools: add the new fstools package
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39895
10 years ago
John Crispin 7917a87d12 base-files: split /etc/init.d/boot into 2 files
this allows us to bind a procd trigger to system.@system[-1]

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

SVN-Revision: 39615
10 years ago
Jo-Philipp Wich 73344b9c56 Add sysfixtime init script, replacement of luci_fixtime
Simply scan for the most recent file in /etc and set
system time to this file modification time if it's in the future
It allow some time dependent program to work immediatly
without waiting for ntpd to sync

v1: v2: bad approach
v3: simply scan /etc, thanks to Bastian Bittorf for the idea
v4: use sort -n, thanks to Catalin Patulea
v5: use [] instead of [[]], thanks to Andreas Mohr
v6: use openwrt style, thanks to Bastian Bittorf

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

SVN-Revision: 39422
10 years ago
John Crispin 834204bda6 base-files: fix mount-utils incompatibility
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>

SVN-Revision: 39169
11 years ago
Luka Perkov 3ceb6b3274 base-files: fix whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 39006
11 years ago
John Crispin 76506e7fa4 base-files: Make /etc/init.d/boot restartable
Only reload hostname and timezone config on /etc/init.d/boot restart.
Module loading and basic boot setup is only done during boot.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

SVN-Revision: 38670
11 years ago
Luka Perkov 67f1d364b8 base-files/busybox: move ntpd init script from base-files to busybox
SVN-Revision: 37383
11 years ago
John Crispin 8eb56a88a4 procd: add a small script that handles config reloads until configd is ready
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37248
11 years ago
John Crispin 8069d87d3c base-files: convert sysntpd init script to procd
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37244
11 years ago
John Crispin 523114e741 base-file: usbfs is no longer mounted under /proc/bus/usb
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37240
11 years ago
John Crispin 9e36e10cf7 base-files: add 2 missing variable defines
Signed-off-by: John Crispin <blogic@openwrt.org>

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

SVN-Revision: 37003
11 years ago
John Crispin d0db343fc4 base-files: /etc/init.d/rcS is no longer needed, procd handles this for us now
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37002
11 years ago
Steven Barth 33c620773d base-files: remove unnecessary early sysctl-hack
SVN-Revision: 36920
11 years ago
John Crispin 811d90ff40 mount_root: prepare base-files
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36429
11 years ago
John Crispin 39469dea7f boot: make use of kmodloader if it is available
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36428
11 years ago
Jo-Philipp Wich 6bddf226d3 base-files: move sysctl init after boot
SVN-Revision: 36131
11 years ago
Jo-Philipp Wich 7aace3ee3e base-files: fix bad start index in previous commit
SVN-Revision: 36130
11 years ago
Jo-Philipp Wich acca7eadc4 package/base-files: change sysctl handling Move /etc/init.d/sysctl to index 00 and add hotplug script that applies interface specific sysctls for interfaces that only appear later - this allows to reliably configure per-interface parameters in sysctl.conf, e.g. to disable ipv6 autoconfig on a specific iface.
SVN-Revision: 36129
11 years ago
John Crispin f43b7934d2 make basefiles aware of procd
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36003
11 years ago
Steven Barth 92ad26d1b6 base-files: Fix IPv6 early sysctls again * Kernel IPv6 /proc interface inconsistency caused races
SVN-Revision: 35417
11 years ago
Steven Barth ea7c9c85a8 base-files: Fix race-conditions with IPv6 sysctls
SVN-Revision: 35368
11 years ago
Mirko Vogt 439a869090 Do not overload mount-call - trying to reduce confusion
The behaviour of calling 'mount' differed depending on whether it called
the busybox-mount, the mount of util-linux, the mount defined in
/lib/functions.sh and /lib/functions/boot.sh

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

SVN-Revision: 34792
12 years ago
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
12 years ago
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
12 years ago
Florian Fainelli 78f4cf3d70 base-files: release an attached loop device on umounting
Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 33477
12 years ago
Jo-Philipp Wich 9ae901445b /etc/functions.sh => /lib/functions.sh
SVN-Revision: 32062
12 years ago
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
12 years ago
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
12 years ago
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
12 years ago
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
13 years ago
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
13 years ago
Gabor Juhos ff89832fdb package/base-files: add support for the switch LED trigger
SVN-Revision: 29629
13 years ago
Gabor Juhos 3f85c52a3a package/base-files: use case statement in led init script
SVN-Revision: 29628
13 years ago
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
13 years ago
Nicolas Thill 93886bc776 package/base-files: use new service wrapper
SVN-Revision: 28835
13 years ago
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
13 years ago
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
13 years ago
Felix Fietkau c2b5767572 base-files: move network related scripts to a separate package to make the transition to netifd easier
SVN-Revision: 28495
13 years ago