aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/init.d/boot
Commit message (Collapse)AuthorAgeFilesLines
* base-files, mac80211, broadcom-wl: wifi detection and configurationChristian Lamparter2016-11-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the wifi detection script is executed as part of the (early) boot process. Pluggable wifi USB devices, which are inserted at a later time are not automatically detected and therefore they don't show up in LuCI. A user has to deal with wifi detection manually, or restart the router. However, the current "sleep 1" window - which the boot process waits for wifi devices to "settle down" - is too short to detect wifi devices for some routers anyway. For example, this can happen with USB WLAN devices on the WNDR4700. This is because the usb controller needs to load its firmware from UBI and initialize, before it can operate. The issue can be seen on a BT HomeHub 5A as well as soon as the caldata are on an ubi volume. This is because the ath9k card has to be initialized by owl-loader first. Which has to wait for the firmware extraction script to retrieve the pci initialization values inside the caldata. This patch moves the wifi configuration to hotplug scripts. For mac80211, the wifi configuration will now automatically run any time a "ieee80211" device is added. Likewise broadcom-wl's script checks for new "net" devices which have the "wl$NUMBER" moniker. Issues with spawning multiple interface configuration - in case the detection script is run concurrently - have been resolved by using a named section for the initial configuration. Concurrent configuration scripts will now simply overwrite the same existing configuration. A workaround which preserves the "sleep 1" window for just the first boot has been added. This allows the existing brcm47xx boot and mvebu uci-default scripts to correctly setup the initial mac addresses and regulatory domain. And finally, the patch renames the "wifi detect" into "wifi config". As the script no longer produces any output that has to be redirected or appended to the configuration file. Thanks to Martin Blumenstingl for helping with the implementation and testing of the patch. Acked-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files, mac80211, broadcom-wl: use uci to populate wireless configChristian Lamparter2016-11-031-5/+1
| | | | | | | | | | | | | | | | | | | | Previously, wifi detect simply dumped its generated wireless configuration to STDOUT. A second step was needed to append the configuration to /etc/config/wireless (or create it, if it didn't exist). With this patch, The wifi detection script will now use uci to update the wireless configuration directly. This patch also makes the initially created wifi-iface a named section ('default_radio$X' for mac80211 and 'default_wl$X' for broadcom). With this change, uci will not print the cfgHASH to STDOUT (which would now corrupt the wireless configuration). It will also prevent adding duplicated wifi interface configurations, if the wifi configuration is run concurrently. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* base-files: let config_generate call board_detectJonas Gorski2016-08-131-1/+1
| | | | | | | Instead of board_detect generating the config as a side effect, let config_generate call board_detect as needed. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* base-files: remove dead codeDaniel Golle2016-08-041-6/+0
| | | | | | | | | /etc/init.d/boot tried to create /dev/root based on the kernel's cmdline which won't work on any recent targets. Remove that code now that fstools can detect the mounted rootfs based on /proc/self/mountinfo and /dev/root was long gone anyway. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* base-file: remove /tmp/.jail (now useless)John Crispin2015-12-111-1/+0
| | | | | | Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com> SVN-Revision: 47855
* base-files: create /var/tmp on bootJohn Crispin2015-10-191-0/+1
| | | | | | | | | | | FHS mandates presence of /var/tmp on compliant systems. The lack of /var/tmp was discovered when using MIT Kerberos libraries which default to that location for storing credentials cache. Signed-off-by: Paul Fertser <fercerpav@gmail.com> SVN-Revision: 47219
* base-files: fix /tmp/.jail permissionsJohn Crispin2015-07-241-1/+0
| | | | | | | | | | | We need a+x rights on the path to the root of the jails so we can use users other than root (like nobody) This partly fixes jailed dnsmasq Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com> SVN-Revision: 46466
* base-files: create jail folder on bootJohn Crispin2015-03-261-0/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 45008
* base-files: add a hardware detection layerJohn Crispin2014-08-181-0/+1
| | | | | | | | | | 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
* base-files: Remove stale calls to start() in initscripts.John Crispin2014-07-261-2/+0
| | | | | | | | based on http://patchwork.openwrt.org/patch/5969/ Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41840
* /lib/functions.sh: move rarely used mtd and macaddr related functions to ↵Felix Fietkau2014-04-071-0/+2
| | | | | | | | /lib/functions/system.sh Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40411
* base-files: move uci_apply_defaults() to /etc/init.d/bootFelix Fietkau2014-04-071-1/+12
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40408
* base-files: split /etc/init.d/boot into 2 filesJohn Crispin2014-02-181-32/+1
| | | | | | | | this allows us to bind a procd trigger to system.@system[-1] Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 39615
* base-files: fix mount-utils incompatibilityJohn Crispin2013-12-271-1/+1
| | | | | | Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> SVN-Revision: 39169
* base-files: Make /etc/init.d/boot restartableJohn Crispin2013-11-071-3/+7
| | | | | | | | | 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
* procd: add a small script that handles config reloads until configd is readyJohn Crispin2013-07-111-0/+4
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37248
* base-files: add 2 missing variable definesJohn Crispin2013-07-081-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37204
* base-files: module loading is now handled by ubox/kmodloaderJohn Crispin2013-06-211-5/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37003
* base-files: remove unnecessary early sysctl-hackSteven Barth2013-06-111-7/+0
| | | | SVN-Revision: 36920
* boot: make use of kmodloader if it is availableJohn Crispin2013-04-251-1/+5
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36428
* make basefiles aware of procdJohn Crispin2013-03-131-32/+0
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36003
* base-files: Fix IPv6 early sysctls again * Kernel IPv6 /proc interface ↵Steven Barth2013-02-011-2/+6
| | | | | | inconsistency caused races SVN-Revision: 35417
* base-files: Fix race-conditions with IPv6 sysctlsSteven Barth2013-01-291-0/+3
| | | | SVN-Revision: 35368
* Do not overload mount-call - trying to reduce confusionMirko Vogt2012-12-191-1/+1
| | | | | | | | | | | 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
* /etc/functions.sh => /lib/functions.shJo-Philipp Wich2012-06-051-1/+1
| | | | SVN-Revision: 32062
* base-files: wait for wifi modules to settleJonas Gorski2012-05-061-0/+3
| | | | | | | | | | 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
* base-files: remove old coldplugging hacks that are no longer necessary since ↵Felix Fietkau2012-03-131-10/+0
| | | | | | the new main hotplug2 instance calls udevtrigger as well SVN-Revision: 30916
* base-files: the initial hotplug2 instance sometimes misses a few relevant ↵Felix Fietkau2012-01-221-0/+1
| | | | | | events, e.g. during module load. rerun udevtrigger for the final hotplug2 instance to fix this SVN-Revision: 29862
* base-files: do not pass --set-worker /lib/hotplug2/worker_fork.so to ↵Jo-Philipp Wich2012-01-191-1/+0
| | | | | | hotplug2 anymore, its statically linked - patch by Viktar Palstsiuk <viktar.palstsiuk@promwad.com> SVN-Revision: 29806
* base-files: now that we have date -k, adjust the kernel timezone after ↵Jo-Philipp Wich2011-11-171-1/+4
| | | | | | setting up TZ and localtime SVN-Revision: 29204
* package/base-files: use new service wrapperNicolas Thill2011-11-071-12/+13
| | | | SVN-Revision: 28835
* base-files: load modules early, run wifi detect afterwards and only then ↵Felix Fietkau2011-11-031-6/+12
| | | | | | | | process uci defaults this allows uci-defaults scripts to override wifi settings SVN-Revision: 28733
* base-files: use "zonename" system option to symlink /etc/localtime via ↵Jo-Philipp Wich2011-09-261-0/+3
| | | | | | /tmp/localtime to /usr/share/zoneinfo for glibc and eglibc SVN-Revision: 28306
* base-files: pass conloglevel to syslogd (#9463, #9647)Jo-Philipp Wich2011-07-031-2/+6
| | | | SVN-Revision: 27400
* base-files: retrigger usb coldplug after module loading, solves ↵Jo-Philipp Wich2011-05-081-0/+5
| | | | | | usb_modeswitch on boot and possibly others (#9352) SVN-Revision: 26848
* base-files: Use -h instead of deprecated -L for symlink checkVasilis Tsiligiannis2011-04-051-1/+1
| | | | SVN-Revision: 26485
* base-files: fix minor problem in init.d/bootVasilis Tsiligiannis2011-04-051-1/+1
| | | | | | | | | 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> SVN-Revision: 26483
* stop syslogd before rebooting, otherwise umount might not work properly when ↵Felix Fietkau2010-01-301-0/+6
| | | | | | logging to a file (thx, puchu) SVN-Revision: 19428
* do not start multiple subshells for applying /etc/uci-defaults. use sh -x ↵Felix Fietkau2009-12-091-4/+3
| | | | | | for hush compatibility SVN-Revision: 18717
* mount debugfs by defaultFelix Fietkau2009-11-231-0/+1
| | | | SVN-Revision: 18502
* extend logging functionsTravis Kemen2009-09-041-7/+17
| | | | SVN-Revision: 17514
* base-files: port init.d/boot to new config_getFelix Fietkau2009-08-071-9/+10
| | | | | | | | ... and localize some variables. Signed-off-by: Malte S. Stretz <mss@apache.org> SVN-Revision: 17157
* base-files: set rules file for hotplug2 in the boot script (closes #5235)Gabor Juhos2009-05-301-0/+1
| | | | SVN-Revision: 16215
* base-files: update command line for the new hotplug2Gabor Juhos2009-05-281-1/+2
| | | | SVN-Revision: 16154
* rcS: wait for init scripts to complete before initiating the shutdown (patch ↵Felix Fietkau2009-04-301-1/+1
| | | | | | from #5032) SVN-Revision: 15530
* Support configurations without syslogd/klogd.Michael Büsch2009-03-181-2/+2
| | | | SVN-Revision: 14937
* allow specifying port where to log (#2019)Florian Fainelli2009-02-031-1/+2
| | | | SVN-Revision: 14396
* package/base-files: fix chmod of /tmp/.uci, bump package revisionJo-Philipp Wich2009-01-061-1/+1
| | | | SVN-Revision: 13903
* fix a race condition which would leave dnsmasq in infinite resolving ↵Felix Fietkau2008-08-281-0/+1
| | | | | | recursion nirvana SVN-Revision: 12424
* move the hotplug2 kill command from preinit to /etc/init.d/boot, so that it ↵Felix Fietkau2008-08-011-0/+1
| | | | | | works for initramfs as well SVN-Revision: 12058