Commit Graph

56 Commits (34bbbbf9c3b39e7b2d81df590aad5cdbd00280d6)

Author SHA1 Message Date
Zoltan HERPAI 34bbbbf9c3 merge: base: update base-files and basic config
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years ago
Rafał Miłecki 1e13c6f77f base-files: drop unused preinit_echo function
It isn't used for years since the old 99_10_run_init has been dropped.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Rafał Miłecki f41dd32722 base-files: don't setup network in preinit if failsafe is disabled
With failsafe disabled there is no point in early network setup. We
don't send announcement over UDP and there is no way to ssh to the
device.

A side effect of this is avoiding a possibly incorrect network config
(only with failsafe disabled). This problem is related to possible
changes made by user in /etc/config/network.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years ago
Mathias Kresin ac3e05c5d7 treewide: populate boardname and model earlier
For targets using the generic board detection and board specific
settings in diag.sh, the board name is still unset at the time the
set_state() provided by diag.sh is called by 10_indicate_preinit.

Change the execution order to ensure the boardname is populated before
required the first time. Do the target specific board detection as
early as possible, directly followed by the generic one to allow a
seamless switch to the generic function for populating /tmp/sysinfo/.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Jonas Gorski fd952c7a83 base-files: board.json's switch reset means existence, not argument
Don't pass the value unconditionally to swconfig as a parameter but
instead only call reset if it is 1.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years ago
Matthias Schiffer a5428244d9
base-files: add support for staged sysupgrades from failsafe mode
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Mathias Kresin 60fce1258c base-files: don't overwrite model name set by target
The condition is always true due to the literal string followed the
-n test parameter. A model name set by target scripts always gets
overwritten this way.

Change the condition to check for an already existing destination file
as it was before 5e85ae9 ("base-files: fix error message during boot").

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Jonas Gorski 30352e72ff base-files: set pi_ifname in board.d case to fix deconfig
Due to an empty pi_ifname in the generic failsafe setup, the deconfig
never removed the failsafe networking interface, causing broken
networking later on.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski 6c9588ddf5 base-files: configure switch in failsafe
Also configure the switch based on the failsafe config, and create the
failsafe interface as tagged if necessary.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski 072cf26729 base-files: allow failsafe to configure vlans
In preparation of properly setting up vlans and switches, add
support for configuring failsafe on a vlan tagged interface.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski c18edcec45 base-files: add preinit ifname detection based on board.json
Make use of the existing board.d to autodetect lan ifname in a generic way.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski 0f1ae840c9 base-files: split out preinit interface config
Move preinit interface and ip config to its own function to allow
calling it from more than one place.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Etienne CHAMPETIER 3946a55291 base-files: seed /dev/urandom
This commit:
1) seed /dev/urandom with the saved seeds as early as possible
   (see /lib/preinit/81_urandom_seed)
2) save a seed at /etc/urandom.seed if it doesn't exists
3) save a new seed each boot at "system.@system[0].urandom_seed"
   (see /etc/init.d/urandom_seed)

We use getrandom() so we are sure /dev/urandom pool is initialized

Seed size is 512 bytes (ie /proc/sys/kernel/random/poolsize / 8)
it's the same size as in ubuntu 14.04 and all systemd systems

Seeding /dev/urandom doesn't change entropy estimation, so we still have
"random: ubus urandom read with 4 bits of entropy available"
messages in the logs, but we can now ignore them if
after "urandom-seed: Seeding with ..." message

Saving a new seed on each boot is disabled by default to avoid too much
writes without user consent

v2: log preinit messages to /dev/kmsg
v3: use non generic function name for logging, as /lib/preinit/ files
    are all sourced together in /etc/preinit
v4: after a lot of discussion on the ML, use a uci config param
v5: config param is now the path of the seed

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
John Crispin a39ac242cc base-files: fix some failsafe issues
* if the shell was closed booting continued

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin b4e33a1c08 base-files: Allow to disable failsafe mode
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
8 years ago
John Crispin 5e85ae9e4c base-files: fix error message during boot
preinit spews out this message

"cat: can't open '/proc/device-tree/model': No such file or directory"

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin fa69553900 branding: add LEDE branding
Signed-off-by: John Crispin <blogic@openwrt.org>
8 years ago
Steven Barth 00045fe9d0 base-files: add /etc/iproute2/rt_tables, replace ifconfig-usage
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46830
9 years ago
Steven Barth d196b1fc2e Disable telnet in favor of passwordless SSH
This enables passworldless login for root via SSH whenever no root
password is set (e.g. after reset, flashing without keeping config
or in failsafe) and removes telnet support alltogether.

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46809
9 years ago
Felix Fietkau 2d4fa6c055 base-files: make the generic sysinfo script run earlier to allow the mount_root script to pick up the board name
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45496
9 years ago
Felix Fietkau b3d699bdd3 base-files: add generic preinit script to extract board/model info from device-tree
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45462
9 years ago
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 019ea725aa add "preinit_regular" diag.sh set_state argument
This new argument is used right after starting regular preinit (which
happens if failsafe wasn't triggered). The main purpose of "preinit"
argument is to indicate that failsafe can be triggered, however we were
missing a way to inform user that we don't wait for a trigger anymore.
With this change it's clear when failsafe mode can be triggered.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43715
9 years ago
John Crispin f76755da3f packages: fix typo in OpenWrt name
Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>

SVN-Revision: 43542
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
John Crispin 0dc9d8d6ff fstools: add the new fstools package
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39895
10 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 93e9a71538 base-files: allow users to delect debug level during boot
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38909
11 years ago
John Crispin 3e54dbbf60 base-files: be verbose when entering failsafe due to a button being pressed
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37535
11 years ago
John Crispin e078f649b5 procd: make the preinit rules wildcard all buttons for failsafe
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36896
11 years ago
John Crispin 5e45a68a4a base-files: fix failsafe via button press
entering failsafe by pressing a button during boot was broken for procd as init

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

SVN-Revision: 36891
11 years ago
John Crispin 831c7ea04f preinit: move cmdline failsafe= handling ot the generic code
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36430
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 f43b7934d2 make basefiles aware of procd
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36003
11 years ago
Vasilis Tsiligiannis 674439299f base-files: Don't pass '--set-worker /lib/hotplug2/worker_fork.so' to hotplug2 (#12781)
SVN-Revision: 35095
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
11 years ago
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
12 years ago
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
13 years ago
Michael Büsch 3a12229c1d Fix whitespace
SVN-Revision: 25632
13 years ago
Jo-Philipp Wich c5711cadd3 base-files: change /dev permissions to 0755 when hotplug2 is used (#6039)
SVN-Revision: 23908
14 years ago
Jo-Philipp Wich 6bcdab79b6 base-files: prevent possible sourcing of JFFS2 meta files when merging overlay hooks
SVN-Revision: 23114
14 years ago
Daniel Dickinson b125e3f68e Fixed duplicated content in file in commit 23111
SVN-Revision: 23112
14 years ago
Daniel Dickinson 7fe34123d6 Missed file committing previous change 23110
SVN-Revision: 23111
14 years ago
Jo-Philipp Wich 9bf9ea9802 base-files: localize variable in do_move_devtmpfs(), remove extra temporary variable and shorten conditional
SVN-Revision: 22380
14 years ago
Alexandros C. Couloumbis 6a85a3b53b package/base-files: add support for devtmpfs (thank you rauchwolke at gmx.net)
SVN-Revision: 22379
14 years ago
Jo-Philipp Wich e1a654dd9f base-files: unconditionally unlock the rootfs_data partition (#7437)
SVN-Revision: 22377
14 years ago
Jo-Philipp Wich 163b15f5bb base-files: make press key message more explicit in preinit
SVN-Revision: 20392
14 years ago
Florian Fainelli 7af8ee0481 change from /jffs to /overlay, patch from Daniel Dickinson
SVN-Revision: 20356
14 years ago
Gabor Juhos 32be7f7605 package/base-files: call preinit_ip_deconfig before processing init on initramfs images
SVN-Revision: 20159
14 years ago
Nicolas Thill d08b2b02cf base-files: fix preinit code typos
Signed-off-by: Ithamar R. Adema <ithamar.adema@team-embedded.nl>
Acked-by: Daniel Dickinson <cshore@csolve.net>

SVN-Revision: 20124
14 years ago