aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
Commit message (Collapse)AuthorAgeFilesLines
* 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-281-4/+4
| | | | | | 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-242-0/+18
| | | | | | | | | | | /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>
* base-files: remove fstab symlinkJohn Crispin2016-06-171-0/+1
| | | | | | the symlink no longer gets used since we switched to the block-mount tool. Signed-off-by: John Crispin <john@phrozen.org>
* base-files: increase default system log size to 64 kBHannu Nyman2016-06-071-0/+1
| | | | | | | | Increase the default system log buffer size from 16 kB (built-in default in ubox logd) to 64 kB by setting the option in /etc/config/system. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* base-files: maintain LED config stateJo-Philipp Wich2016-06-081-5/+17
| | | | | | | | Record the state of any hardware LED configured through UCI and use that information to revert the state when applying updated settings while maintaining default behaviour of system LEDs. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: fix /bin/config_generate breakageFelix Fietkau2016-06-081-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: drop /etc/config/systemJo-Philipp Wich2016-06-081-12/+0
| | | | | | | The board_detect framework is now able to create the entire system config from scratch so we can finally drop the copy shipped by base-files. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: rework config generation logicJo-Philipp Wich2016-06-082-18/+20
| | | | | | | | | | | | Now that config_generate is able to generate the entire /etc/config/system from scratch we can apply the same logic as used for /etc/config/network; when the configuration file exists already then do not do anything, else generate it from the values provided by /etc/board.json . In order to facilitate that move the file existance checking inside /bin/config_generate and call it unconditionally from /bin/board_detect. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: support port_state LED types in board.dJo-Philipp Wich2016-06-082-0/+27
| | | | | | Add support for handling port_state LEDs as used by ADM5120. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: support hostname and ntp servers through board.dJo-Philipp Wich2016-06-081-0/+47
| | | | | | Add support for specifying hostname and NTP servers via /etc/board.d/ scripts. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: reset LED stateJo-Philipp Wich2016-06-071-0/+6
| | | | | | | | Attempt to reset all LED states before applying the UCI configuration to avoid leaving disabled LEDs behind in lingering glowing state, e.g. when changing the sysfs entry in the config from one hardware LED to another. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: rework postinstall uci-defaults handlingJo-Philipp Wich2016-05-271-5/+4
| | | | | | | | | | | | | | | Some package postinstall operations, e.g. those emitted by the LuCI build system, source and delete the uci-defaults themselves upon package insteall, causing the generic defaults apply code to trigger shell errors like: .../luci-app-ddns.postinst: .: line 130: can't open './40_luci-ddns' Rework the generic apply code to check the existence of the uci-defaults script before trying to source it, use sed to prefilter the list of entries from the control file and perform the directory change in a subshell, avoiding the need for cd $OLDPWD. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* x86: generalize partition discovery for sysupgradeJo-Philipp Wich2016-05-241-1/+1
| | | | | | | | | | | | | | | Generalize the partition discovery in sysupgrade in order to fix sysupgrade and config backup/recovery on MMC block devices which use a different naming scheme compared to mtdblock or sd* devices. The change also adds the find applet to the ramdisk utilities so that upgrade code can rely on it. The commit is based on the initial submission by Russell Senior at http://patchwork.ozlabs.org/patch/625440/ . Signed-off-by: Russell Senior <russell@personaltelco.net> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* Centralize setting of all version info to include/version.mkHannu Nyman2016-05-241-1/+1
| | | | | | | | | Centralize setting all version information in include/version.mk * Set RELEASE env variable in include/version.mk instead of toplevel.mk. Stop exporting the variable. * Remove hardcoded release name from /etc/banner Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* 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: sysfixtime typo in exclude dnsmasq.timeKevin Darbyshire-Bryant2016-05-191-1/+1
| | | | | | | Typo, missing space before ] in previous commit caused shell syntax failure and incorrect restoration of time. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* base-files: sysfixtime exclude dnsmasq.timeKevin Darbyshire-Bryant2016-05-191-1/+10
| | | | | | | | | | | | | | | | | | | | | dnsmasq maintains dnsmasq.time across reboots and uses it as a means of determining if current time is good enough to validate dnssec time stamps. By including /etc/dnsmasq.time as a time source for sysfixtime, the mechanism was effectively defeated because time was set to the last time that dnsmasq considered current even though that time is in the past. Since that time is out of date, dns(sec) resolution would fail thus defeating any ntp based mechanisms for setting the clock correctly. In theory the process is defeated by any files in /etc that are newer than /etc/dnsmasq.time however dnsmasq now updates the file's timestamp on process TERM so hopefully /etc/dnsmasq.time is the latest file timestamp in /etc as part of LEDE shutdown/reboot. Either way, including /etc/dnsmasq.time as a time source for sysfixtime is not helpful. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* Revert "base-files: sysfixtime exclude dnsmasq.time"Jo-Philipp Wich2016-05-191-10/+1
| | | | | | | | This reverts commit 382779e009af7c1c688fbd98adf71fb19ce66254. Reverting this commit due to a missing Signed-off-by. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: sysfixtime exclude dnsmasq.timeKevin Darbyshire-Bryant2016-05-181-1/+10
| | | | | | | | | | | | | | | | | | | dnsmasq maintains dnsmasq.time across reboots and uses it as a means of determining if current time is good enough to validate dnssec time stamps. By including /etc/dnsmasq.time as a time source for sysfixtime, the mechanism was effectively defeated because time was set to the last time that dnsmasq considered current even though that time is in the past. Since that time is out of date, dns(sec) resolution would fail thus defeating any ntp based mechanisms for setting the clock correctly. In theory the process is defeated by any files in /etc that are newer than /etc/dnsmasq.time however dnsmasq now updates the file's timestamp on process TERM so hopefully /etc/dnsmasq.time is the latest file timestamp in /etc as part of LEDE shutdown/reboot. Either way, including /etc/dnsmasq.time as a time source for sysfixtime is not helpful.
* base-files: Enhancements to /etc/profileVittorio G (VittGam)2016-05-141-0/+4
| | | | | | - Update the terminal window title with the current directory and hostname, if using an xterm-compatible terminal emulator. - Add ll, an useful alias to ls. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
* base-files: Fix config_generate when there are no switch VLANs or ports ↵Vittorio Gambaletta (VittGam)2016-05-111-38/+42
| | | | | | | | | | configured in board.json. The json_select call fails when there are no roles or ports objects in board.json. "json_select .." must not be executed after failing. This fixes for example LEDs not being set up in /etc/config/system. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
* base-files: evaluate uci-defaults on run-time installationsDaniel Golle2016-05-041-0/+11
| | | | | | | | | | | | Packages may install scripts into /etc/uci-defaults to be executed once after installation, usually at the first boot of the target. This works fine if the package was installed to the rootfs during build or using the ImageBuilder. If the package is installed using opkg during run-time uci-defaults were applied only after a reboot of the device. Avoid the need to reboot by evaluting the package's uci-defaults in default-postinst. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* signing: remove unatteded build key and use current keyring insteadJo-Philipp Wich2016-04-301-2/+0
| | | | | | | | Remove the public unatteded buildkey from the opkg package to avoid having hardcoded keys in tree. Use the external keyring package instead which can be easily updated by users. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: fix group/user settings after sysupgradeJohn Crispin2016-04-291-0/+11
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* base-files: split user/group addition code into a functionJohn Crispin2016-04-291-4/+10
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* base-files: add new public key used by unattended buildsJohn Crispin2016-04-292-2/+2
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* base-files: remove ununsed login.shJohn Crispin2016-04-191-18/+0
| | | | 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>
* image / basefiles: make console password configurableJohn Crispin2016-04-183-1/+7
| | | | | Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com> Signed-off-by: John Crispin <john@phrozen.org>
* 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-244-16/+13
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* base-files: allow to set arbitrary ip address and netmaskHauke Mehrtens2016-04-171-7/+9
| | | | | | | Signed-off-by: Roman Yeryomin <roman@advem.lv> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 49179
* base-files: add function ucidef_set_interface_raw to enable default ↵John Crispin2016-03-101-0/+6
| | | | | | | | configuration on interfaces other than lan and wan. Signed-off-by: Micke Prag <micke.prag@telldus.se> SVN-Revision: 48976
* base-files: change type of adsl and vdsl to dsl onlyFelix Fietkau2016-03-071-1/+1
| | | | | | | | | | Instead of having two different types adsl and vdsl just create one dsl type. This way we can use the same luci code for adsl and vdsl and the config parameters are not so different. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 48944
* lantiq: do not set default firmware fileFelix Fietkau2016-03-071-4/+2
| | | | | | | | | We are now shipping a DSL firmware, do not set it by default to some file name. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 48941
* base-files: support passing mode to ucidef_set_led_netdev()Jo-Philipp Wich2016-02-262-3/+5
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48806
* base-files: add support for speed mask to switch config init scriptsFelix Fietkau2016-02-253-3/+9
| | | | | | | | | | | This patch adds extra parameter to switch LED trigger initialization functions. New functionality maintains backward compatibility, so calling functions without setting new speed_mask parameter works as expected. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> SVN-Revision: 48776
* leds: support oneshot as well as timer triggersJohn Crispin2016-02-252-6/+15
| | | | | | | | | oneshot and timer have the same configuration options, just a different trigger name. Signed-off-by: Karl Palsson <karlp@etactica.com> SVN-Revision: 48770
* base-files: add netifd's default prelocal table to /etc/iproute2/rt_tablesJo-Philipp Wich2016-02-091-0/+1
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48685
* x86: preserve partition table on sysupgradeJo-Philipp Wich2016-02-092-0/+4
| | | | | | | | | | | | | | With this patch sysupgrade will write directly to the partitions instead of to the main disk. The UUID is copied from the image to the MBR as well. This prevents the mbr from being completely overwritten and losing the partition table. The -p option has been added to maintain the original behavior and overwite the entire disk with the new image. Tests have been added to ensure that the image partitions match up with the active partitions. Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net> SVN-Revision: 48682
* base-files: honor CONFIG_TARGET_INIT_PATHJo-Philipp Wich2016-02-083-6/+6
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48678
* base-files: For sysfixtime use hwclock if RTC availableJohn Crispin2016-02-081-0/+14
| | | | | | | | | | | | | | | | | On systems that have an RTC prefer it to the file-based time fixup (i.e. use hwclock when there is a permanent clock instead of the faked up time logic that is needed when there is not RTC). We can't rely on hctosys kernel feature either as we're usually using RTC as kernel modules which are usually being loaded after hctosys was run, leading in the following error: hctosys: unable to open rtc device (rtc0) Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> SVN-Revision: 48661
* base-files: set mac address in default network config via device sectionsFelix Fietkau2016-02-071-1/+7
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48646
* base-files: remove default /etc/config/network, generate it via board.d insteadFelix Fietkau2016-01-252-18/+17
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48493
* base-files: fix sysupgrade 'wget' handling for uclient-fetchFelix Fietkau2016-01-251-3/+4
| | | | | | | | | | | | | change 48451 tried to add support for uclient-fetch by moving /usr/bin/wget to /bin/wget, but this change kept the symbolic link to /bin/busybox as install_bin creates links to param 1 the desired fix is to link to uclient-fetch to wget: install_bin /bin/uclient-fetch /bin/wget Signed-off-by: John Clark <inindev@gmail.com> SVN-Revision: 48483
* base-files: fix sysupgrade 'wget' handlingFelix Fietkau2016-01-221-1/+1
| | | | | | | | | | | with r48379 and r48386 the path of wget changed. respect that and adjust the dirname. this fixes #21680 Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com> SVN-Revision: 48451
* base-files: Fix sysupgrade overlay savingJo-Philipp Wich2016-01-171-0/+1
| | | | | | | | | | A previous change to sysupgrade moved the overlay files into upper/ The -c switch generates a list of files to backup, but the sed calls did not take this into consideration. Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net> SVN-Revision: 48281
* base-files: allow timezone to be overriden by zonename (proper zoneinfo support)John Crispin2015-12-231-1/+2
| | | | | | Signed-off-by: Roman Yeryomin <roman@advem.lv> SVN-Revision: 47980