aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "LEDE v18.06.0-rc1: revert to branch defaults"Jo-Philipp Wich2018-06-221-1/+1
| | | | | | | This reverts commit 55df39e684f8fde90c52212350062440dc6c9754. The tree is in an inconsistent state and we need to complete some rebranding. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* LEDE v18.06.0-rc1: revert to branch defaultsJo-Philipp Wich2018-06-221-1/+1
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* LEDE v18.06.0-rc1: adjust config defaultsJo-Philipp Wich2018-06-221-1/+1
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* Revert "base-files: fix UCI config parsing and callback handling"Hans Dedecker2018-06-212-6/+9
| | | | | | | This reverts commit 023944853241920c20842c0f4649d1dd4e7e273b as users report Qos scripts are broken (FS#1602) Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* base-files: sysupgrade: fix handling get_image unpack commandsMatthias Schiffer2018-06-111-6/+6
| | | | | | | | On bcm53xx and brcm47xx, commands are passed to default_do_upgrade that expect the image to be passed on stdin, rather than as an argument. Fixes: 30f61a34b4cf ("base-files: always use staged sysupgrade") Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: fix UCI config parsing and callback handlingTony Ambardar2018-06-062-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several long-standing issues present in the UCI shell API as documented in https://wiki.openwrt.org/doc/devel/config-scripting. They relate both to high-level, user-defined callback functions used to process UCI config files, and also to low-level functions used within scripts generally. The related problems have been encountered now and in the past, e.g. https://forum.openwrt.org/viewtopic.php?id=54295, and include: a) UCI parsing option() function and user-defined option_cb() callbacks being erroneously called during processing of "list" config file entries; b) normal usage of the low-level config_set() unexpectedy calling any defined option_cb() if present; and c) handling of the list_cb() not respecting the NO_CALLBACK variable. Root causes include a function stack "inversion", where the low-level config_set() function incorrectly calls the high-level option() function, intended only for processing the "option" keyword of UCI config files. This change addresses the inversion and other issues, making the option handling code more consistent and smaller, and simplifying developers' usage of UCI callbacks. Signed-off-by: Tony Ambardar <itugrok@yahoo.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
* base-files: depend on openwrt-keyringJo-Philipp Wich2018-05-201-1/+1
| | | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 01329877bcb696dcbbda993a51992d468e1e3c74)
* OpenWrt v18.06: set branch defaultsJohn Crispin2018-05-151-1/+1
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* sysctl: Protect hard/symlinks by default.Rosen Penev2018-05-011-0/+3
| | | | | | | There is no usecase for not protecting symlinks that I know of in OpenWrt. Not even on desktop systems where you have multiple users with a shell. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* kernel: disable accept_ra by defaultMatthias Schiffer2018-04-172-1/+9
| | | | | | | | | | | Our commands setting accept_ra to 0 on all interfaces got lost in the transition to procd. This remained unnoticed for a long time, as we also enable forwarding on all interfaces, which prevents RA handling by default. Restore the commands, while also fixing a possible race condition in the old version. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: /lib/functions.sh: remove unused insert_modulesMatthias Schiffer2018-04-172-11/+1
| | | | | | insert_modules has been unused since r5279. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: remove /etc/sysctl.d/ from conffilesMatthias Schiffer2018-04-131-3/+1
| | | | | | | | Let's use /etc/sysctl.d for package-provided snippets and leave /etc/sysctl.conf to the admin. Don't backup /etc/sysctl.d on upgrades, so old defaults get replaced properly. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: move netfilter sysctl defaults to specific kmod packagesMatthias Schiffer2018-04-132-13/+1
| | | | | | | Avoid warnings when applying settings for uninstalled kmods. See also FS#1073. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: move sysctl defaults to /etc/sysctl.d/10-default.confMatthias Schiffer2018-04-133-32/+35
| | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: evaluate /etc/sysctl.d/* before /etc/sysctl.confMatthias Schiffer2018-04-132-2/+2
| | | | | | | We can use /etc/sysctl.d/* for package-supplied sysctl snippets, giving admins the option to use /etc/sysctl.conf to override settings. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: remove /etc/uci-defaults/11_migrate-sysctlMatthias Schiffer2018-04-131-16/+0
| | | | | | | 11_migrate-sysctl has not been updated with new file hashes since 2012. Let's get rid of it. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: change /var link from /tmp to tmpAlexander Couzens2018-04-051-1/+1
| | | | | | | | Some packages are already using $(1)/var on package install. On multiuser systems this breaks the build when multiple users build OpenWrt. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* base-files: get_dt_led: don't warn about missing ledMathias Kresin2018-04-041-2/+1
| | | | | | | | | It's intentional that some boards within a target don't have all LEDs which are tried to be setup in a common script. Don't show a warning in such cases. Fixes: 4f4fc993db4c ("base-files: add more name source to get_dt_led helper function") Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: add more name source to get_dt_led helper functionMathias Kresin2018-03-141-1/+4
| | | | | | | | Not all LED driver are using the label devicetree property for the led name. Add support for the TI/National Semiconductor LP55xx Led Drivers, which are using the chan-name property for the led name, as fallback. Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: add function to get binary mac from fileMathias Kresin2018-03-141-6/+13
| | | | | | | Add a fucntion to get the a binary mac address from file. Use the new function for mtd_get_mac_binary() to limit duplicate code. Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: tune fragment queue thresholds for available system memoryMatthias Schiffer2018-03-072-10/+21
| | | | | | | | | The default fragment low/high thresholds are 3 and 4 MB. On devices with only 32MB RAM, these settings may lead to OOM when many fragments that cannot be reassembled are received. Decrease fragment low/high thresholds to 384 and 512 kB on devices with less than 64 MB RAM. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: sysupgrade: do not rely on opkg to list changed conffilesMatthias Schiffer2018-03-072-2/+21
| | | | | | | Many packages use the opkg conffiles field to list configuration files that are to be retained on upgrades. Make this work on systems without opkg. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: fix off-by-one in counting seconds for factory resetRafał Miłecki2018-03-011-1/+1
| | | | | | | | | There was a mismatch between indicating factory reset and code actually starting it. After 5 seconds status LED started blinking rapidly letting user know it's ready to release reset button. In practice button had to stay pressed for another second in order to relly start the process. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* base-files: don't evaluate block-device ueventDaniel Golle2018-02-131-4/+8
| | | | | | | | | | | | | Current code and also before commit da52dd0c83 was vulnerable to shell injection using volume lables in the GPT partition table of block devices. Given that partition names can be freely defined in GPT tables we really shouldn't evaluate a string which is potentially crafted with evil intentions. Hence rather use `export -n` to absorb the uevent's variables into the environment. Fixes commit da52dd0c83 (base-files: quote values when evaluating uevent) Signed-off-by: Daniel Golle <daniel@makrotopia.org> [mschiffer@universe-factory.net: suggested export -n usage]
* base-files: quote values when evaluating ueventDaniel Golle2018-02-111-3/+2
| | | | | | | | When sourcing /sys/class/block/*/uevent values have to be quoted as they may contain spaces (e.g. in PARTNAME). Fix this by pre-processing with sed before sourcing. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* treewide: combine VERSION_SED and VERSION_SED_SCRIPTPhilip Prindeville2018-02-021-2/+2
| | | | | | | | | We don't need two versions of this. The escaping quotes is so that the sed commands aren't misinterpreted by shell; it has nothing to do with the contents of the file, thus one version is adequate. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* base-files: gpio switch: check if direction can be setMathias Kresin2018-01-182-3/+10
| | | | | | | | | | | | Obviously not all GPIO controller allow to change the direction. The issue is around since the beginning of the script but only due to the recent changes error messages are more visible. Add a check if a change of the direction is supported by the GPIO controller and fallback to setting only the value if not. Fixes: FS#1271 Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: gpio switch: fix inverted logicMathias Kresin2018-01-181-1/+1
| | | | | | | | | GPIOs are exported as active high to the sysfs, hence the logic need to be inverted. Fixes: e66c47fb14f5 ("base-files: gpio switch: set output value with direction") Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: sysupgrade: correct command help textKevin Darbyshire-Bryant2018-01-122-2/+1
| | | | | | | | | | Commit 30f61a34b4cfd2c676fea4a919e089d6a77254e9 claimed to drop -d & -p options. In reality only -d was dropped. Update command help text to reflect that -d is no longer a supported option. Fixes FS#1187 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* linux-atm: add br2684ctl option to specify the netdev nameMartin Schiller2018-01-102-2/+5
| | | | | | | | | | | Add the uci option nameprefix to specifc a target netdev name. Patch the br2684ctl code to accept and set a netdev name via commandline parameters. It allows to use the same netdev name for ATM and PTM lines on lantiq xdsl hardware. Signed-off-by: Martin Schiller <ms@dev.tdt.de> Signed-off-by: Mathis Kresin <dev@kresin.me>
* base-files: gpio switch: set output value with directionMathias Kresin2018-01-092-4/+3
| | | | | | | | | | | | Use the "low" and "high" values to configure the GPIO as an output with that initial value. It ensures that the gpio doesn't have a unwanted value during the time the direction is set to ouput and the actual value is applied. We don't need to take care of the GPIO polarity for now, since our exported GPIOs are always active low. Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: gpio_switch: start before boot state done is setMathias Kresin2018-01-091-1/+1
| | | | | | | Start gpio_switch before the boot state is set to up/initialised/done. This way the exported GPIOs are available at the time rc.local is started. Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: protect stop and reload actions with procd_lockRoman Yeryomin2018-01-021-0/+2
| | | | | Signed-off-by: Roman Yeryomin <roman@advem.lv> Signed-off-by: Andrejs Hanins <ahanins@gmail.com>
* base-files: rc.common: fix enable() return code and logicRoman Yeryomin2018-01-021-7/+8
| | | | | | | | | | | | | | | In current state, if there is START but no STOP, enbale() will return 1 (failure), which is wrong. Moreover there is no need to check for START/STOP twice. Instead, add err variable to save success state and and return it's value. Also eliminate the need to disable() by using 'ln -sf', which will first delete the old symlink if one exists. Changes from v1: - fixed description Signed-off-by: Roman Yeryomin <roman@advem.lv>
* base-files: fix logic when to show failsafe bannerMatthias Schiffer2017-12-292-2/+2
| | | | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Fixes: 8170f280c4 ("base-files: set FAILSAFE in /etc/profile when /tmp/.failsafe exists")
* base-files: set FAILSAFE in /etc/profile when /tmp/.failsafe existsMatthias Schiffer2017-12-292-2/+5
| | | | | | | Since dropbear clears the environment, FAILSAFE was not set as intended in failsafe mode. This also broke sysupgrade from failsafe mode over SSH. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: fix sysupgrade -b/-l when -c is usedLuiz Angelo Daros de Luca2017-12-141-10/+11
| | | | | | | | | | | | | Since /overlay/upper appeared, -b ignored -c silently (cause it was still checking for /overlay/etc). Now, if /overlay/upper is absent, sysupgrade -c will fail and exit verbosely. Fix -l to consider -c (it never did). Clean up to always use /overlay/upper/xxx instead of still checking for /overlay/xxx. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
* base-files: unify get_dt_led helper functionChristian Lamparter2017-12-141-0/+12
| | | | | | | | | | | | | | Lantiq and IPQ806X (which includes IPQ40XX) both define the same custom function {ipq806x|lantiq}_get_dt_led. This patch moves the function into the base-file package at lib/functions/leds.sh to make it more accessible for other targets as well. Cc: Mathias Kresin <dev@kresin.me> Cc: John Crispin <john@phrozen.org> Cc: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* base-files: make including distfeeds.conf optionalJonas Gorski2017-12-131-3/+5
| | | | | | | | | | | To not clutter the system when building an opkg free image, generate the distfeeds.conf only if CLEAN_IPKG is unset. Since opkg is now a shared package, we can't rely on PACKAGE_opkg, but since opkg is not reasonably usable without the status information, we can tie the distfeeds.conf to it. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* base-files: create /etc/opkg before generating distfeeds.confJonas Gorski2017-12-131-0/+1
| | | | | | | | Ensure /etc/opkg exists before trying to write there. This fixes a build failure if SIGNED_PACKAGES is disabled. Reported-by: Matthias Schiffer <mschiffer@universe-factory.net> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* package: move distfeeds.conf from opkg to base-filesJonas Gorski2017-12-131-2/+10
| | | | | | | | | | | All the relevant options used for distfeeds.conf are part of base-files, so it makes more sense to move the file there as well. This has the added benefit that the we can share the opkg package again, reducing the amount of target specific packages. Acked-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* base-files: remove remaining uses of %N, and drop VERSION_NICK config symbolMatthias Schiffer2017-12-092-10/+3
| | | | | | Fixes d23e1e1e1a "merge: properly remove %n / %N references" Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* merge: properly remove %n / %N referencesJo-Philipp Wich2017-12-092-4/+1
| | | | | | | | | | - use %d instead of %n for opkg feed identifiers - remove %n / %N references from version files Fixes bf5cef47b3 merge: release/banner: drop release name and update banner. Fixes FS#1213. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* procd: nand: remove nand_board_name platform overrideMathias Kresin2017-12-081-9/+0
| | | | | | It isn't uses anymore by any target. Signed-off-by: Mathias Kresin <dev@kresin.me>
* procd: nand: dont rely on boardname in nand_upgrade_tarMathias Kresin2017-12-081-7/+9
| | | | | | | | | | | | | | | | Kernel and rootfs in a subdirectory matching the userspace boardname, was intended to use a single sysupgrade-tar archive for multiple boards with different kernel/rootfs images. This feature was never used. Use the first found directory in the tar archive instead of relying on a directory named according to the userspace boardname. It allows to change the boardname without adding another compatibility layer - using the nand_board_name() function - for (sub)targets using the metadata based image validation in favour to nand_do_platform_check(). Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: upgrade: make get_partitions() endian agnosticChristian Lamparter2017-12-081-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes two issues with the current get_partitions() function. First: "Invalid partition table on $disk" will pop up on legitimate images on big endian system. This is because the little-endian representation of "55 AA" is assumed in the context of little-endian architectures. On these comparing it to the 16-bit word 0xAA55 does work as intented. Whereas on big-endian systems, this would have to be 0x55AA. This patch fixes the issue by replacing the integer conversion and value match check with just a string comparision. Second: The extraction of the type, start LBA and LBA num from the partition table has the same endianness issue. This has been fixed by using the new hex_le32_to_cpu() function. This function will translate the stored little-endian data to the correct byte-order if necessary. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* merge: release/banner: drop release name and update bannerZoltan HERPAI2017-12-081-10/+8
| | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* merge: base: update base-files and basic configZoltan HERPAI2017-12-085-12/+12
| | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* sysupgrade: don't kill our own parentMat Trudel2017-11-151-2/+3
| | | | | | | | Add the parent of the sysupgrade script to the list of pids not getting killed Signed-off-by: Mat Trudel <mat@geeky.net> Signed-off-by: John Crispin <john@phrozen.org>
* procd: service_data: Support data within the service itselfPierre Lebleu2017-11-101-0/+4
| | | | | | Use the same approach than the service_triggers for the service_data. Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>