summaryrefslogtreecommitdiff
path: root/package/base-files/files/lib/preinit
Commit message (Collapse)AuthorAgeFilesLines
* base-files: drop unused preinit_echo functionRafał Miłecki2017-12-131-5/+0
| | | | | | | 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> (cherry picked from commit 1e13c6f77fc02df2bd8ed237ab9208ecdefb2dab)
* base-files: board.json's switch reset means existence, not argumentJonas Gorski2017-12-131-1/+4
| | | | | | | | 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> (cherry picked from commit fd952c7a83e5357f5dcab28c0bcaca756e27eaa0)
* base-files: don't setup network in preinit if failsafe is disabledRafał Miłecki2017-08-091-1/+4
| | | | | | | | | | | | 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>
* base-files: don't overwrite model name set by targetMathias Kresin2017-02-011-1/+1
| | | | | | | | | | | 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>
* base-files: set pi_ifname in board.d case to fix deconfigJonas Gorski2016-08-141-1/+3
| | | | | | | | 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>
* base-files: configure switch in failsafeJonas Gorski2016-08-131-2/+46
| | | | | | | 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>
* base-files: allow failsafe to configure vlansJonas Gorski2016-08-131-3/+29
| | | | | | | 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>
* base-files: add preinit ifname detection based on board.jsonJonas Gorski2016-08-131-0/+29
| | | | | | Make use of the existing board.d to autodetect lan ifname in a generic way. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* base-files: split out preinit interface configJonas Gorski2016-08-131-4/+10
| | | | | | | 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>
* base-files: seed /dev/urandomEtienne CHAMPETIER2016-06-301-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* base-files: fix some failsafe issuesJohn Crispin2016-05-231-0/+1
| | | | | | * if the shell was closed booting continued Signed-off-by: John Crispin <john@phrozen.org>
* base-files: Allow to disable failsafe modeJohn Crispin2016-04-193-1/+7
| | | | Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
* base-files: fix error message during bootJohn Crispin2016-04-111-1/+1
| | | | | | | | 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>
* branding: add LEDE brandingJohn Crispin2016-03-241-1/+1
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* base-files: add /etc/iproute2/rt_tables, replace ifconfig-usageSteven Barth2015-09-081-2/+4
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46830
* Disable telnet in favor of passwordless SSHSteven Barth2015-09-071-2/+3
| | | | | | | | | | 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
* base-files: make the generic sysinfo script run earlier to allow the ↵Felix Fietkau2015-04-181-0/+0
| | | | | | | | mount_root script to pick up the board name Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45496
* base-files: add generic preinit script to extract board/model info from ↵Felix Fietkau2015-04-161-0/+10
| | | | | | | | device-tree Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45462
* base-files: keep sysupgrade.tgz until /etc/init.d/done has been calledFelix Fietkau2015-03-221-4/+1
| | | | | | | | This makes interrupted boots after sysupgrade more reliable Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44941
* add "preinit_regular" diag.sh set_state argumentJohn Crispin2014-12-152-6/+2
| | | | | | | | | | | | 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
* packages: fix typo in OpenWrt nameJohn Crispin2014-12-071-1/+1
| | | | | | Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> SVN-Revision: 43542
* base-files: make use of new fstoolsJohn Crispin2014-04-071-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 40416
* fstools: add the new fstools packageJohn Crispin2014-03-121-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 39895
* base-files: fix whitespacesLuka Perkov2013-12-098-127/+118
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 39006
* base-files: allow users to delect debug level during bootJohn Crispin2013-11-251-8/+17
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 38909
* base-files: be verbose when entering failsafe due to a button being pressedJohn Crispin2013-07-251-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37535
* procd: make the preinit rules wildcard all buttons for failsafeJohn Crispin2013-06-101-2/+3
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36896
* base-files: fix failsafe via button pressJohn Crispin2013-06-101-1/+1
| | | | | | | | 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
* preinit: move cmdline failsafe= handling ot the generic codeJohn Crispin2013-04-251-4/+7
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36430
* mount_root: prepare base-filesJohn Crispin2013-04-2510-158/+10
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36429
* make basefiles aware of procdJohn Crispin2013-03-1313-191/+3
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36003
* base-files: Don't pass '--set-worker /lib/hotplug2/worker_fork.so' to ↵Vasilis Tsiligiannis2013-01-111-3/+3
| | | | | | hotplug2 (#12781) SVN-Revision: 35095
* Do not overload mount-call - trying to reduce confusionMirko Vogt2012-12-196-11/+11
| | | | | | | | | | | 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
* base-files: use a natural mount syntaxFlorian Fainelli2012-11-235-8/+7
| | | | | | | | | | 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
* base-files: preinit: Fixed sourcing of diag.sh in /etc/preinit. This caused ↵Daniel Dickinson2011-07-071-0/+7
| | | | | | 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
* Fix whitespaceMichael Büsch2011-02-201-1/+1
| | | | SVN-Revision: 25632
* base-files: change /dev permissions to 0755 when hotplug2 is used (#6039)Jo-Philipp Wich2010-11-071-1/+1
| | | | SVN-Revision: 23908
* base-files: prevent possible sourcing of JFFS2 meta files when merging ↵Jo-Philipp Wich2010-09-231-1/+1
| | | | | | overlay hooks SVN-Revision: 23114
* Fixed duplicated content in file in commit 23111Daniel Dickinson2010-09-231-24/+0
| | | | SVN-Revision: 23112
* Missed file committing previous change 23110Daniel Dickinson2010-09-231-0/+48
| | | | SVN-Revision: 23111
* base-files: localize variable in do_move_devtmpfs(), remove extra temporary ↵Jo-Philipp Wich2010-07-241-6/+3
| | | | | | variable and shorten conditional SVN-Revision: 22380
* package/base-files: add support for devtmpfs (thank you rauchwolke at gmx.net)Alexandros C. Couloumbis2010-07-241-1/+13
| | | | SVN-Revision: 22379
* base-files: unconditionally unlock the rootfs_data partition (#7437)Jo-Philipp Wich2010-07-241-0/+1
| | | | SVN-Revision: 22377
* base-files: make press key message more explicit in preinitJo-Philipp Wich2010-03-231-1/+1
| | | | SVN-Revision: 20392
* change from /jffs to /overlay, patch from Daniel DickinsonFlorian Fainelli2010-03-212-2/+4
| | | | SVN-Revision: 20356
* package/base-files: call preinit_ip_deconfig before processing init on ↵Gabor Juhos2010-03-121-0/+1
| | | | | | initramfs images SVN-Revision: 20159
* base-files: fix preinit code typosNicolas Thill2010-03-101-1/+1
| | | | | | | Signed-off-by: Ithamar R. Adema <ithamar.adema@team-embedded.nl> Acked-by: Daniel Dickinson <cshore@csolve.net> SVN-Revision: 20124
* base-files: fix enter failsafe messageFelix Fietkau2010-03-011-1/+0
| | | | SVN-Revision: 19937
* base-files: preinit: get rid of /dev/null redirections and use grep -q where ↵Jo-Philipp Wich2010-02-014-6/+6
| | | | | | applicable SVN-Revision: 19478
* quieten the check for devs, thanks nbdFlorian Fainelli2010-01-311-1/+1
| | | | SVN-Revision: 19473