aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
Commit message (Collapse)AuthorAgeFilesLines
* base-files: add support for overlaying rootfs contentRafał Miłecki2016-12-201-0/+5
| | | | | | | | | This adds support for install-overlay define. When used in package it allows installing files to a special directory that gets copied to the root when installing it. It allows overwriting files provided by other packages. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* base-files: fix CONFIG_VERSION_DIST defaultJo-Philipp Wich2016-12-141-1/+1
| | | | | | Fix the default value of CONFIG_VERSION_DIST to use uppercase "LEDE". Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: use SNAPSHOT instead of CURRENT to designate untagged branch buildsJo-Philipp Wich2016-12-141-4/+4
| | | | | | | Calling a build ##.##-CURRENT might mislead users into thinking that this build is the most current release of a branch. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: Changed UCI variable name for GPIO value from 'default' to 'value'Julian Labus2016-12-121-1/+1
| | | | | | | | | | | This changes the UCI variable for the GPIO value from system.$cfg.default back to system.$cfg.value as it was before the change from uci-defaults [1] to board.d. /etc/init.d/gpio_switch [2] still expects the value to be in system.$cfg.value. [1] https://github.com/lede-project/source/blob/d65916047b44d6d157d88d15e8e3d92555c5e6f8/package/base-files/files/lib/functions/uci-defaults.sh#L197 [2] https://github.com/lede-project/source/blob/master/package/base-files/files/etc/init.d/gpio_switch#L17 Signed-off-by: Julian Labus <julian@labus-online.de>
* build: support adding version code to file names (FS#323)Jo-Philipp Wich2016-12-091-0/+9
| | | | | | | | | | | | | | Now that the VERSION_NUMBER variable holds the human friendly name and not the commit ID anymore, we need to support adding the revision ID as well. Introduce a new config variable CONFIG_VERSION_CODE_FILENAMES which, if set, causes the resulting file names to contain a commit ID designation as printed by scripts/getver.sh. Also sanitize the input variables to ensure that the resulting strings are lowercased and no not contain spaces. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: add a hint in sysupgrade that shows what to do when the image ↵Felix Fietkau2016-12-041-0/+3
| | | | | | metadata check fails Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: adjust version number handlingJo-Philipp Wich2016-12-025-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the revision info to the VERSION_CODE variable and default VERSION_NUMBER to CURRENT for master branch builds. Also introduce a new menuconfig option CONFIG_VERSION_CODE which allows users to override the revision value put into VERSION_CODE and adjust the template files used by the base-files package to accomodate for the changed semantics. While we're at it, also adjust the various URLs to match the current web site. After this commit, the relevent files will look like the examples given below: # cat /etc/openwrt_version r2398+1 # cat /etc/openwrt_release DISTRIB_ID='LEDE' DISTRIB_RELEASE='CURRENT' DISTRIB_REVISION='r2398+1' DISTRIB_CODENAME='reboot' DISTRIB_TARGET='x86/64' DISTRIB_DESCRIPTION='LEDE Reboot CURRENT r2398+1' DISTRIB_TAINTS='no-all override' # cat /usr/lib/os-release NAME="LEDE" VERSION="CURRENT, Reboot" ID="lede" ID_LIKE="lede openwrt" PRETTY_NAME="LEDE Reboot CURRENT" VERSION_ID="current" HOME_URL="http://lede-project.org/" BUG_URL="http://bugs.lede-project.org/" SUPPORT_URL="http://forum.lede-project.org/" BUILD_ID="r2398+1" LEDE_BOARD="x86/64" LEDE_TAINTS="no-all override" LEDE_DEVICE_MANUFACTURER="LEDE" LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/" LEDE_DEVICE_PRODUCT="Generic" LEDE_DEVICE_REVISION="v0" LEDE_RELEASE="LEDE Reboot CURRENT r2398+1" On a release branch, those files would look like: # cat /etc/openwrt_version r2399 # cat /etc/openwrt_release DISTRIB_ID='LEDE' DISTRIB_RELEASE='16.12-CURRENT' DISTRIB_REVISION='r2399' DISTRIB_CODENAME='test_release' DISTRIB_TARGET='x86/64' DISTRIB_DESCRIPTION='LEDE Test Release 16.12-CURRENT r2399' DISTRIB_TAINTS='no-all override' # cat /usr/lib/os-release NAME="LEDE" VERSION="16.12-CURRENT, Test Release" ID="lede" ID_LIKE="lede openwrt" PRETTY_NAME="LEDE Test Release 16.12-CURRENT" VERSION_ID="16.12-current" HOME_URL="http://lede-project.org/" BUG_URL="http://bugs.lede-project.org/" SUPPORT_URL="http://forum.lede-project.org/" BUILD_ID="r2399" LEDE_BOARD="x86/64" LEDE_TAINTS="no-all override" LEDE_DEVICE_MANUFACTURER="LEDE" LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/" LEDE_DEVICE_PRODUCT="Generic" LEDE_DEVICE_REVISION="v0" LEDE_RELEASE="LEDE Test Release 16.12-CURRENT r2399" On a release tag, those files would look like: # cat /etc/openwrt_version r2500 # cat /etc/openwrt_release DISTRIB_ID='LEDE' DISTRIB_RELEASE='17.02.1' DISTRIB_REVISION='r2500' DISTRIB_CODENAME='mighty_unicorn' DISTRIB_TARGET='x86/64' DISTRIB_DESCRIPTION='LEDE Mighty Unicorn 17.02.1 r2500' DISTRIB_TAINTS='no-all override' # cat /usr/lib/os-release NAME="LEDE" VERSION="17.02.1, Mighty Unicorn" ID="lede" ID_LIKE="lede openwrt" PRETTY_NAME="LEDE Mighty Unicorn 17.02.1" VERSION_ID="17.02.1" HOME_URL="http://lede-project.org/" BUG_URL="http://bugs.lede-project.org/" SUPPORT_URL="http://forum.lede-project.org/" BUILD_ID="r2500" LEDE_BOARD="x86/64" LEDE_TAINTS="no-all override" LEDE_DEVICE_MANUFACTURER="LEDE" LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/" LEDE_DEVICE_PRODUCT="Generic" LEDE_DEVICE_REVISION="v0" LEDE_RELEASE="LEDE Mighty Unicorn 17.02.1 r2500" Signed-off-by: Jo-Philipp Wich <jo@mein.io> Acked-by: Felix Fietkau <nbd@nbd.name>
* base-files: add a wrapper for init scripts in profileAlberto Bursi2016-11-291-0/+9
| | | | | | | | | | | "service" is a simple wrapper that will allow to call init.d scripts current method: # /etc/init.d/network reload with the wrapper: # service network reload If the wrapper is called without arguments or with a wrong init script name, it will print an error and list the content of /etc/init.d/ folder Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
* base-files: ignore failure of stopping services on removalJonas Gorski2016-11-211-1/+1
| | | | | | | | | Packages that do a killall <cmd> with the same name as the init script will fail the prerm step when the service isn't running. Do make them removable without having to restart the service, ignore the return code. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Jo-Philipp Wich <jo@mein.io>
* base-files: don't modify enabled state of service on upgradeJonas Gorski2016-11-212-11/+13
| | | | | | | | Properly stop/start services on upgrade, but don't change the enabled state. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Jo-Philipp Wich <jo@mein.io>
* base-files: validate metadata of sysupgrade imagesFelix Fietkau2016-11-193-2/+43
| | | | | | | | | | | Use fwtool to extract it, only require metadata to be present if the platform sysupgrade script sets REQUIRE_IMAGE_METADATA=1 Image metadata is in JSON format and contains a list of supported devices, along with version information that could be displayed by a UI later before the actual upgrade happens. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: Prefer busybox arp over /proc/net/arp aliasMarek Lindner2016-11-101-1/+1
| | | | | | | | | A firmware compiled with BUSYBOX_CONFIG_ARP should also use by default the arp binary from busybox. Otherwise the extra functionality the user requested can only be used when running arp with the path to the binary. Signed-off-by: Marek Lindner <marek.lindner@open-mesh.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* base-files, mac80211, broadcom-wl: wifi detection and configurationChristian Lamparter2016-11-032-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: generate /etc/config/wireless, if it doesn't existMathias Kresin2016-11-031-0/+2
| | | | | | | | | | | | This patch adds a check in "wifi detect" to test if the wireless configuration file does exist. If it doesn't exist, an empty /etc/config/wireless file will be created. This is necessary because uci doesn't create new files, instead the tool just exits with "uci: Entry not found". Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* base-files: uci-defaults: support requesting untagged switch port configurationJo-Philipp Wich2016-11-021-8/+14
| | | | | | | | | | | | | Introduce support for a new [0-9]u@netdev syntax to ucidev_add_switch() to let board.d network files request default network switch configurations which do not use tagged CPU ports. This commit itself has no effect on generated configurations at the moment since we still emit untagged configurations by default but it allows boards to opt-out from default tagged configs in case we start emitting tagged settings by default. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: sysfixtime: Keep RTC time in UTC timezonePetr Štetiar2016-10-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to tell hwclock with -u commandline option, that we would like to keep our RTC clock in UTC timezone. Linux kernel expects RTC in UTC timezone anyway. In current state of things, we don't tell hwclock to load/store time from/to RTC in UTC timezone so it uses the timezone from the system time. If it's set to different timezone then UTC, sysfixtime is going to screw the time in RTC. I've following in the setup script: uci set system.@system[0].timezone='CET-1CEST,M3.5.0,M10.5.0/3' uci set system.@system[0].zonename='Europe/Prague' I've this RTC setup (rtc1 is RTC on i.MX6 SoC, rtc0 is battery backed RTC mcp7941x): rtc-ds1307 3-006f: rtc core: registered mcp7941x as rtc0 snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc1 Then we can experience following (current time is 10:15am): $ date Fri Oct 21 10:15:07 CEST 2016 $ hwclock -r -f /dev/rtc0 Fri Oct 21 08:14:46 2016 0.000000 seconds $ hwclock -u -r -f /dev/rtc0 Fri Oct 21 10:14:46 2016 0.000000 seconds And after current broken sysfixtime: $ /etc/init.d/sysfixtime stop $ date Fri Oct 21 10:15:25 CEST 2016 $ hwclock -r -f /dev/rtc0 Fri Oct 21 10:15:31 2016 0.000000 seconds Now we've time in our battery backed RTC in CEST timezone instead of UTC. Then once again, but with this patch applied to sysfixtime, where hwclock is using correctly the -u parameter: $ /etc/init.d/sysfixtime stop $ date Fri Oct 21 10:15:53 CEST 2016 $ hwclock -r -f /dev/rtc0 Fri Oct 21 08:15:55 2016 0.000000 seconds Signed-off-by: Petr Štetiar <ynezz@true.cz> Acked-by: Jo-Philipp Wich <jo@mein.io>
* base-files: Ensure reset only works if an overlay existsChris Blake2016-10-271-1/+5
| | | | | | | | | | | | | | Currently the reset script will try to run jffs2reset on boards that are running a rw rootfs, such as ext4. This will cause jffs2reset to fail and the board to never reboot while the LED blinks until a manual reboot. This commit does two different things: 1. Disables reset on boards that do not have an overlay mount 2. Disables the Blinking LED after 5 seconds if the board does not support reset Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
* package/basefiles: add mkfs.ext4 and losetup binaries to ramfs listAndré Valentin2016-10-261-0/+2
| | | | | | | mkfs.ext4 und losetup are needed for sysupgrade support on mmc devices with automatic rootfs split (loopback device usage). Signed-off-by: André Valentin <avalentin@marcant.net>
* base-files: add ucidef_set_led_usbport for full usbport supportRafał Miłecki2016-10-223-0/+34
| | | | | | | | | | | | | | | | | | | | This helper allows using usbport trigger directly. It requires usbport compatible syntax and supports specifying multiple USB ports, e.g.: ucidef_set_led_usbport "usb" "USB" "devicename:colour:function" "usb1-port1" "usb2-port1" This adds a proper object to the board.json, e.g. "usb": { "name": "USB", "type": "usbport", "sysfs": "devicename:colour:function", "ports": [ "usb1-port1", "usb2-port1" ] } and supports translating it into uci section. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* switch to the new usbport LED triggerRafał Miłecki2016-10-191-5/+16
| | | | | | | This makes init.d script handle existing UCI entries using the new trigger. It also switches all targets to use its package. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* procd: Allow initscripts to start one daemon instance at a timePierre Lebleu2016-10-181-1/+3
| | | | Signed-off-by: Pierre Lebleu <pierre.lebleu@technicolor.com>
* base-files: also generate configs when current is empty (FS#193)Koen Vandeputte2016-10-052-6/+6
| | | | | | | | | | | | | | | Before a configuration is generated, an empty file is created to store it in. (required by UCI) If something happens during config generation (power cut, interruption, ..) an empty file exists and it is never regenerated again, causing some daemons to fail starting (NTPD, logread, ..) Fix this by also generating new configs if a critical file is empty. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* base-files: remove non-working filter option for wifi detectChristian Lamparter2016-10-041-2/+2
| | | | | | | | | | | This patch removes the non-working wifi driver filter for the wifi detection script. I figured that rather than replacing ${2:-$DRIVERS} with ${1:-$DRIVERS}, it would be better to remove it. Nobody needed it in the previous years. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* base-files: make default_prerm work offlineMatthias Schiffer2016-09-261-4/+12
| | | | | | | IPKG_INSTROOT must be respected for offline removal (used for per-device rootfs). Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: fix check for empty password warningMatthias Schiffer2016-09-261-2/+1
| | | | | | | | | | | | | Now that we know that the password is in /etc/shadow and not in /etc/passwd, we can properly fix the logic for the empty password check. Only 'root::' is an empty password, 'root:x:' and 'root:!:' allow no password login at all. This fixes the empty password warning still showing after the root password has been locked using 'passwd -l root' (e.g. to allow public-key auth only). Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* treewide: remove bad local shell variable declarationsJo-Philipp Wich2016-09-242-3/+3
| | | | | | | Local variable declarations outside of functions are illegal since the Busybox update to v1.25.0, therfore remove them from the appropriate places. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: Allow subtargets to define base-files.mkFlorian Fainelli2016-09-191-0/+1
| | | | Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
* base-files: remind users to set root passwordJohn Crispin2016-09-191-0/+13
| | | | | | print a warning when a shell spawns, telling users to set a root password. Signed-off-by: John Crispin <john@phrozen.org>
* base-files: reduce vm.min_free_kbytes for devices with 32M RAMFelix Fietkau2016-09-161-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: support oneshot leds properly.Karl Palsson2016-09-051-1/+1
| | | | | | | | | | oneshot trigger configurations for LEDs are created, but the on/off timing configurations are ignored. generate_config is correctly creating oneshot configs, but the later led script doesn't recognise the trigger details. Fixes: c0c3f2d4c917 leds: support oneshot as well as timer triggers Signed-off-by: Karl Palsson <karlp@etactica.com>
* 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: board_detect: allow specifying the generated fileJonas Gorski2016-08-132-4/+6
| | | | | | | Allow passing a filename to change the location of the generated board.json. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* base-files: let config_generate call board_detectJonas Gorski2016-08-133-4/+2
| | | | | | | 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>
* preinit: use only the image config optionsMathias Kresin2016-08-102-19/+0
| | | | | | | | | | The pi_* variables and the fs_failsafe_wait_timeout variable are set by the CONFIG_TARGET_PREINIT_* config options. No need to maintain the same values twice. All other fs_ variables were never used. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: remove unused morse led trigger driverFelix Fietkau2016-08-042-16/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* sysupgrade: unmount filesystems before rebootMathias Kresin2016-08-041-0/+1
| | | | | | | | | | | | | | | sysupgrade immediately reboots after flashing an image and doesn't allow to unmount filesystems. At least in case the image used for sysupgrade is stored on a FAT formatted usb flash drive, the following warning is printed during the next mount of the flash drive: FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. Although a data corruption during read operations is unlikely, there is no need to scare the users. Signed-off-by: Mathias Kresin <dev@kresin.me>
* 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-files: increase vm.min_free_kbytesFelix Fietkau2016-08-011-0/+16
| | | | | | | | Network drivers typically allocate memory in atomic context. For that to be reliable, there needs to be enough free memory. Set the value heuristically based on the total amount of system RAM. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: sysupgrade: fix pseudobridge upgradesConn O'Griofa2016-07-241-1/+1
| | | | | | Treat 'relayd' as an essential service to avoid connection interruptions during sysupgrade on devices configured as a pseudobridge. Signed-off-by: Conn O'Griofa <connogriofa@gmail.com>
* base-files: use procd init for urandom_seedEtienne CHAMPETIER2016-07-272-25/+28
| | | | | | | | | | Previous implementation was blocking the init and breaking halt/reboot/sysupgrade (reported by Daniel Golle) v2: use procd logging, use set -e + trap for error handling Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com> Tested-by: Daniel Golle <daniel@makrotopia.org>
* base-files: remove support of profile-specific base-filesFelix Fietkau2016-07-261-15/+0
| | | | | | | It is incompatible with multi-profile builds and has not been used in-tree anyway. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: seed /dev/urandomEtienne CHAMPETIER2016-06-303-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: use LEDE NTP vendor poolJo-Philipp Wich2016-06-282-5/+5
| | | | | | The vendor NTP pool for the LEDE project got approved, so switch to it now. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: sysfixtime no longer exclude dnsmasq.timeKevin Darbyshire-Bryant2016-06-241-1/+1
| | | | | | | | dnsmasq's dnssec time checking method now uses a ntp hotplug mechanism, therefore dnsmasq.time is redudant and no longer needs to be explicitly excluded from sysfixtime. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* base-files: Add standard os-release fileDaniel Dickinson2016-06-244-6/+38
| | | | | | | | | | | /etc/os-release is the standard distribution release information file, therefore add it (and image configuration options for fields not previously present in LEDE). Once it is deemed reasonable the non-standard openwrt_release, openwrt_version, and device_info files could be removed (that is with this patch we consider them deprecated in favour of the standard file). Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>