aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
Commit message (Collapse)AuthorAgeFilesLines
* base-files: enable BPF JIT kallsyms by defaultTony Ambardar2023-06-091-0/+1
| | | | | | | | | | | Set net.core.bpf_jit_kallsyms=1 in /etc/sysctl.d/10-default.conf. For privileged users, this exports addresses of JIT-compiled programs to appear in /proc/kallsyms when present, allowing their use for debugging and in traces. Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit b3aaede2a7b14f2be850db8ae0c826e2782a60e8)
* base-files: sysfixtime: Fix time on the fake RTCYuan Tao2023-02-191-6/+16
| | | | | | | | | | | | | | | On some devices the chip has RTC but no battery save time. This leads back to getting the wrong time and skipping the check of the last file modification date. This commit ensures that the file time is checked even if the RTC exists. which would ordinarily return an approbiate system time used for e.g. certificate generation. Tested-on: NanoPi R2S Signed-off-by: Yuan Tao <ty@wevs.org>
* base-files: LED/trigger/heartbeat: Add support for inversionOlliver Schinagl2022-08-061-0/+4
| | | | | | | | | The heartbeat trigger has the option to be inverted, however openwrt/uci/luci have no way to set this. This patch adds this support. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* base-files: LED/gpio: Ensure inverted is read as a booleanOlliver Schinagl2022-08-061-1/+1
| | | | | | | The sysfs interface for the GPIO takes a boolean value. Ensure we get one from uci. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
* base-files: add wrapper for procd service list commandFlorian Eckert2022-03-191-0/+8
| | | | | | | | | | | | | | | | A service managed by procd does have a json object with usefull information. This information could by dumped with the following command. ubus call service list "{ 'verbose':true, 'name': '<service-name>)'". }" This line is long and complicated to enter. This commit adds a wrapper call to the procd service section tool to simplify the input and get the output faster. We could now enter the command /etc/initd/<service> info to get the info faster. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* procd: move service command to procdFlorian Eckert2022-03-191-21/+0
| | | | | | | | The service command belongs to the procd and does not belong in the shinit. In the course of the move, the script was also checked with shellcheck and cleaned up. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* base-files: call "sync" after initial setupRafał Miłecki2022-03-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenWrt uses a lot of (b)ash scripts for initial setup. This isn't the best solution as they almost never consider syncing files / data. Still this is what we have and we need to try living with it. Without proper syncing OpenWrt can easily get into an inconsistent state on power cut. It's because: 1. Actual (flash) inode and data writes are not synchronized 2. Data writeback can take up to 30 seconds (dirty_expire_centisecs) 3. ubifs adds extra 5 seconds (dirty_writeback_centisecs) "delay" Some possible cases (examples) for new files: 1. Power cut during 5 seconds after write() can result in all data loss 2. Power cut happening between 5 and 35 seconds after write() can result in empty file (inode flushed after 5 seconds, data flush queued) Above affects e.g. uci-defaults. After executing some migration script it may get deleted (whited out) without generated data getting actually written. Power cut will result in missing data and deleted file. There are three ways of dealing with that: 1. Rewriting all user-space init to proper C with syncs 2. Trying bash hacks (like creating tmp files & moving them) 3. Adding sync and hoping for no power cut during critical section This change introduces the last solution that is the simplest. It reduces time during which things may go wrong from ~35 seconds to probably less than a second. Of course it applies only to IO operations performed before /etc/init.d/boot . It's probably the stage when the most new files get created. All later changes are usually done using smarter C apps (e.g. busybox or uci) that creates tmp files and uses rename() that is expected to be atomic. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* base-file: remove password aging feature form /etc/shadowRucke Teg2022-02-241-1/+1
| | | | | | | | | | | | | | In the default shadow file, as visible in the failsafe mode, the user root has value of `0` set in the 3rd field, the date of last password change. This setting means that the password needs to be changed the next time the user will log in the system. `dropbear` server is ignoring this setting but `openssh-server` tries to enforce it and fails in the failsafe mode because the rootfs is R/O. Disable the password aging feature for user root by setting the 3rd filed empty. Signed-off-by: Rucke Teg <rucketeg@protonmail.com>
* base-files: replace fgrep with grep -FRosen Penev2022-02-061-1/+1
| | | | | | | fgrep is deprecated and replaced by grep -F. The latter is used throughout the tree whereas this is the only usage of the former. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* base-files: fix service_running checkFlorian Eckert2021-12-041-3/+3
| | | | | | | | | | | | | | | | | | The following command checks if a instance of a service is running. /etc/init.d/<service> running <instance> In the variable `$@`, which is passed to the function `service_running`, the first argument is always the `instance` which should be checked. Because all other variables where removed from `$@` with `shift`. Before this change the first argument of `$@` was set to the `$service` Variable. So the function does not work as expected. The `$service` variable was always the instance which should be checked. This is not what we want. Signed-off-by: Florian Eckert <fe@dev.tdt.de> Reviewed-by: Sungbo Eo <mans0n@gorani.run>
* base-files: chmod 1777 /var/lockDeomid Ryabkov2021-10-231-2/+3
| | | | | | | | | | | | | Per FHS 3.0, /var/lock is the location for lock files [1]. However its current permissions (755) are too restrictive for use by unprivileged processes. Debian and Ubuntu set them to 1777, and now so do we. [1] <https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlockLockFiles> Signed-off-by: Deomid Ryabkov <rojer@rojer.me> [fixed typo in commit message, had to remove "rojer" due to git hooks] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* base-files: fix /tmp/TZ when zoneinfo not installedPaul Spooren2021-06-241-7/+4
| | | | | | | | | | | | The zoneinfo packages are not installed per default so neither /tmp/localtime nor /tmp/TZ is generated. This patch mostly reverts the previous fix and instead incooperates a solution suggested by Jo. Fixes "base-files: fix zoneinfo support " 8af62ed Signed-off-by: Paul Spooren <mail@aparcar.org>
* base-files: fix zoneinfo supportRosen Penev2021-06-231-7/+9
| | | | | | | | | | | | | | | | The system init script currently sets /tmp/localinfo when zoneinfo is populated. However, zoneinfo has spaces in it whereas the actual files have _ instead of spaces. This made the if condition never return true. Example failure when removing the if condition: /tmp/localtime -> /usr/share/zoneinfo/America/Los Angeles This file does not exist. America/Los_Angeles does. Ran through shfmt -w -ci -bn -sr -s Signed-off-by: Rosen Penev <rosenp@gmail.com>
* base-files: fix enabled for services with only STOPKarel Kočí2021-06-221-1/+6
| | | | | | | | | | | | | | | There are services that have only STOP value set. They are executed only on shutdown and it is common to use them for system cleanup. There is one such service shipped directly with base-files, it is 'umount'. Those work the same way as those with START but enabled does not report them as enabled although it should have as they can be enabled and disabled as any other service. This also changes check from check for executable to check for symbolic link. The implementation depends on those being links to service file and it is much cleaner and direct to check for them being links. Signed-off-by: Karel Kočí <karel.koci@nic.cz>
* Revert "base-files: migrate old UCI network bridge ports syntax"Rafał Miłecki2021-05-201-23/+0
| | | | | | | | | This reverts commit f716c30241d5fd9d821560f58d0af0c3ffe78600. Migrating everyone to the new syntax could break downgrades. We may reintroduce it way later if needed. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* base-files: migrate old UCI network bridge ports syntaxRafał Miłecki2021-05-181-0/+23
| | | | | | | | netifd has been recently patched to use more accurate "ports" option instead of "ifname". This is a simple translation between two UCI options. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* base-files: shinit: properly handle dashes in service namesJo-Philipp Wich2021-05-121-1/+1
| | | | | Fixes: FS#3801 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* base-files: fix status display commandAlexander Egorenkov2021-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | If service() is called w/o parameter then the status display for services with multiple instances is incorrect. E.g. samba4 or wpad have 2 instances. root@OpenWrt:~# /etc/init.d/samba4 status running root@OpenWrt:~# /etc/init.d/wpad status running Before change: /etc/init.d/samba4 enabled stopped /etc/init.d/wpad enabled stopped After change: /etc/init.d/samba4 enabled running /etc/init.d/wpad enabled running Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
* treewide: remove execute bit and shebang from board.d filesAdrian Schmutzler2021-03-061-1/+0
| | | | | | | | | | | | | | | | So far, board.d files were having execute bit set and contained a shebang. However, they are just sourced in board_detect, with an apparantly unnecessary check for execute permission beforehand. Replace this check by one for existance and make the board.d files "normal" files, as would be expected in /etc anyway. Note: This removes an apparantly unused '#!/bin/sh /etc/rc.common' in target/linux/bcm47xx/base-files/etc/board.d/01_network Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* base-files: add new application led trigger backendFlorian Eckert2021-03-051-4/+5
| | | | | | | | | | | | | | | | | For now we have only kernel LED trigger support. With this change it is now possible to use application triggers. If we configure a LED with a non kernel trigger, then we check on every restart and boot of the LED service if we have this trigger as an application in "/usr/libexec/led-trigger". If this file with the name is found, then we execute this to init the LED. Possible use cases are: - Start/Stop/Restart an application led trigger service for this led - Init a LED that is configured by a hotplug script (VPN tunnel established) Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* base-files: use hwclock --systzRosen Penev2021-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The date -k patch is non standard and will be removed in the next commit. Tested behavior to be identical with a simple C program: #define _GNU_SOURCE #include <unistd.h> #include <stdio.h> #include <sys/time.h> #include <sys/syscall.h> int main() { struct timezone tt; struct timezone tz; int a = syscall(SYS_gettimeofday, NULL, &tt); int b = gettimeofday(NULL, &tz); printf("%d - %d, %d\n", a, tt.tz_minuteswest, tt.tz_dsttime); printf("%d - %d, %d\n", b, tz.tz_minuteswest, tz.tz_dsttime); } Signed-off-by: Rosen Penev <rosenp@gmail.com>
* base-files: mount pstore if presentBrian Norris2021-01-291-0/+1
| | | | | | | | Pstore (persistent store) can be used to stash debug information (kernel console, panics, ftrace) across reboots or crashes. If the filesystem is present, mount it. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* base-files: informative service command in /etc/shinit. service command ↵Stan Grishin2020-12-031-5/+17
| | | | | | | | | | | | | | shows services enabled/disabled and running status, when the service command is invoked with no/invalid arguments, like this: Usage: service <service> [command] The following services are available: /etc/init.d/acme enabled stopped /etc/init.d/boot enabled stopped /etc/init.d/cron enabled running /etc/init.d/dnsmasq enabled running ... Signed-off-by: Stan Grishin <stangri@melmac.net>
* base-files: fix alias more to properly detect /usr/bin/moreHuangbin Zhan2020-11-281-1/+1
| | | | | | Package more is installed to /usr/bin rather than /bin. Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
* base-files: fix backwards compatiblity of rc.common EXTRA_COMMANDSMatthias Schiffer2020-11-171-6/+7
| | | | | | | | | | | | | | Avoid needlessly breaking old initscripts that set EXTRA_COMMANDS. This will aid in debugging (as it simplifies reverting to an older version of a package) and unbreaks third-party feeds (and packages that maintain their OpenWrt initscripts as part of the software's repo instead of the OpenWrt feed like fastd). Without this, initscripts that set EXTRA_COMMANDS become completely unusable, as all default commands like start/stop cease working. Fixes: 1a69f50dc627 ("base-files: fix rc.common help alignment") Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: fix rc.common help alignmentFlorian Eckert2020-11-021-14/+24
| | | | | | | | | | | | | | This commit introduces a new function `extra_command` to better format the help text without having to calculate the indentation in every startup script that wants to add a new command. So far it looks weird and is not formatted correctly on some startup scripts. After using the new `extra_command` wrapper the alignement looks correctly. And if the indentation is not sufficient in the future, this can be changed in the function extra_command at a central location. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* base-files: drop default setup for vconfigAdrian Schmutzler2020-09-161-1/+0
| | | | | | | | | | | | | | | | | vconfig has been disabled by default since 2015 [1] and there are no remaining uses in entire OpenWrt trunk. However, we still set up a specific name_type for it during boot. While this setup is properly implemented to be only triggered when vconfig is present, it still seems anachronistic and unnecessary to set up a standard for a tool that is not used anymore. Therefore, this removes the set_name_type initialization and leaves it for those people actually using the tool to configure it as needed. [1] 899a23227e55 ("busybox: improve applets & deprecate ifconfig, route") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* base-files: disable LEDs if default state is undefinedDavid Bauer2020-09-111-1/+1
| | | | | | | | | | | | | | | Set the default state for LEDs to off. When a trigger is set, the trigger will turn the LED automatically on. Currently LEDs might stay on, e.g. when the LED trigger is set to a netdev trigger and the interface is never activated or the 'none' trigger is selected without setting the 'default' option to 0 and it's set for the LED indicating the system running state. Using off as a default value is also consistent with the documentation in the OpenWrt wiki. Signed-off-by: David Bauer <mail@david-bauer.net>
* base-files: mount bpffs at bootTony Ambardar2020-07-311-0/+1
| | | | | | | | | | Explicitly mount the BPF filesystem if available. This is used for pinning eBPF programs and maps, making them accessible to other eBPF programs or from userspace with the help of libbpf or bpftool. Signed-off-by: Tony Ambardar <itugrok@yahoo.com> [daniel@makrotopia.org: bumped PKG_RELEASE] Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* base-files: replace backticks by $(...)Adrian Schmutzler2020-07-111-1/+1
| | | | | | | | | This replaces deprecated backticks by more versatile $(...) syntax. This does not touch lib/upgrade/nand.sh, as there replacement is not trivial. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* base-files: gpio switch: add named GPIO supportKuan-Yi Li2020-06-181-12/+30
| | | | | | | | | | | | | | | | Previously, gpio_switch only accepts GPIO pin number as input. Once a GPIO pin is exported and named by device tree, its pin state cannot be configured and saved across reboots by UCI. This patch adds support for named GPIO pins. Thus GPIO pin can be exported by device tree with active high/low correctly configured, having human-readable name in /sys/class/gpio/ is also now possible. More importantly, GPIO pins which are referenced by name will be immune from pin mapping breakage while unintentional pin number changes are introduced by kernel or driver updates. Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
* base-files: prevent issues w/ overlay on powerloss after sysupgradeSergey Ryazanov2020-06-031-1/+1
| | | | | | | | | | | | | | | | Due to filesystem write caching the old configuration data could stay out of flash for a long time during a first boot after the sysupgrade. Power loss during this period could damage the overlay data and even make device inaccessable via the network. Fix this by syncing data to a flash as soon as the previous configuration will be unpacked after the sysupgrade. Also sync the FS state after the sysupgrade.tgz archive removing to prevent duplicative extraction of a previous configuration. Tested with AMD Geode based board. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* base-files: add enabled commands to service rc.commonFlorian Eckert2020-04-081-0/+1
| | | | | | Add missing enbaled command help output. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* base-files: Add /etc/shinit for non-login shell initJeffery To2020-03-012-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because /etc/profile (and ~/.profile) are read by login shells only, aliases and functions defined there are not available to non-login shells, e.g. when using screen or tmux. If the ENV environment variable exists (exported by /etc/profile or ~/.profile) and references an existing file, then all interactive shells (login or non-login) will read that file as well. This sets the ENV environment variable in /etc/profile, pointing to /etc/shinit. This also adds /etc/shinit, which: * Contains alias and function definitions originally in /etc/profile * Sources /etc/mkshrc if the user is using mksh (also originally in /etc/profile), as /etc/mkshrc is meant for all interactive shells * Sources ~/.mkshrc if the user is using mksh, to compensate for the fact that mksh will not read ~/.mkshrc if ENV is set * Sources ~/.shinit if the user is not using mksh This also removes the shebang from /etc/profile, as the file is sourced, not executed. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* base-files: diag: restore default trigger for 'boot' LEDPiotr Dymacz2020-02-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For devices without a dedicated 'diag' LED, we use sometimes one of other LEDs for indicating at least 'boot', 'failsafe' and 'upgrade' stages. In some cases, at the same time these LEDs have defined default triggers in DTS using 'linux,default-trigger' property. Current 'diag' setup removes the trigger and turns off 'boot' LED after bootup. One of the examples of such device is TP-Link TL-WR841N v14 (ramips) which uses 'wlan' LED with defined 'linux,default-trigger' for 'diag': aliases { led-boot = &led_wlan; led-failsafe = &led_wlan; led-upgrade = &led_wlan; }; [...] led_wlan: wlan { label = "tl-wr841n-v14:green:wlan"; gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; This patch extends 'diag.sh' and 'leds.sh' scripts to make sure default trigger defined in DTS is restored for 'diag' LED which isn't used for indicating 'running' stage. Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* brcm47xx: rename target to bcm47xxAdrian Schmutzler2020-02-141-1/+1
| | | | | | | | | | This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* base-files: move /tmp/resolv.conf.auto to /tmp/resolv.conf.d/Daniel Golle2020-01-071-2/+3
| | | | | | Having it in a directory it more friendly for mount-bind. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* base-files: rc.common: fix missing EXTRA_HELP textsPeter Stadler2019-11-141-1/+1
| | | | | | | | | | | | | | | Commit ed5b9129d7a4 ("base-files: implement generic service_running") has added EXTRA_HELP variable, thus overriding already available EXTRA_HELP text available in other init scripts, resulting in the missing help text from services like dropbear for example. So fix this regression by appending EXTRA_HELP text provided by the other init scripts into the one provided by the script itself. Fixes: ed5b9129d7a4 ("base-files: implement generic service_running") Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at> [commit title/description facelift, fixes tag, fixed From:, pkg bump] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* base-files: remove shebang from uci-defaults filesAdrian Schmutzler2019-11-133-6/+0
| | | | | | | | | uci-defaults are sourced and non-executable, so they do not require a shebang. While at it, apply consistent naming scheme. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* base-files: coreutil-date breaks setting kernel timezoneVal Kulkov2019-10-121-1/+1
| | | | | | | | | | | | | | | | "coreutil-date" package from the packages feed replaces the Busybox date applet by symlinking /usr/bin/gnu-date to /bin/date. This prevents the system init script from setting kernel timezone because the GNU date utility does not provide such functionality: root@OpenWrt:~# date -k date: invalid option -- 'k' Try 'date --help' for more information. A specific reference to the Busybox date applet prevents alternative date utilities from breaking the system init script. Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
* base-files,procd: add generic service statusLuiz Angelo Daros de Luca2019-09-151-1/+10
| | | | | | | | | | | | | | Adds a default status action for init.d scripts. procd "service status" will return: 0) for loaded services (even if disabled by conf or dead) 3) for inactive services 4) when filtering a non-existing instance Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> [rebased, cleaned up] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* base-files: implement generic service_runningPetr Štetiar2019-09-151-1/+6
| | | | | | | DRY is good, otherwise we're going to suffer with a copy&paste disease in the init scripts. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* base-files: supress service restart of umountKarel Kočí2019-07-031-0/+5
| | | | | | | | | Restart is in default implemented so it calls stop and start. This is pretty unsafe to call on umount service. This service should not do anything on restart the same way as on start. Only use of this service is on stop. Signed-off-by: Karel Kočí <cynerd@email.cz>
* base-files: change boot & umount STOP indexesJoseph Tingiris2019-06-242-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch is in a series to allow additional STOP indexes after umount, so that other block devices may stop cleanly. boot is now STOP=90 umount is now STOP=90 After this patch series, the resulting STOP indexes in the 80s & 90s will be: STOP=85 odhcpd.init STOP=89 conntrackd.init STOP=89 log.init STOP=89 rssileds.init STOP=90 boot STOP=90 kdump.init STOP=90 network STOP=90 sysfixtime STOP=90 umount STOP=98 mdadm.init (note: will be addressed in a separate patch) Signed-off-by: Joseph Tingiris <joseph.tingiris@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [PKG_RELEASE is now 200]
* base-files: move urandom seed bits into separate packagePetr Štetiar2019-06-111-12/+0
| | | | | | | So it's possible to install or remove it as needed. Tested-by: Lucian Cristian <lucian.cristian@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* base-files: add reboot only button handlerAlan Swanson2019-05-301-0/+12
| | | | | | | | | | | | For devices such as BTHOMEHUBV5A with both reset and restart buttons, its easily accessible restart button has been assigned to KEY_POWER power script to poweroff preventing accidental (or malicious) factory resets by KEY_RESTART reset script. However an easily accessible button immediately powering off the device is also undesirable. Fixes: FS#1965 Signed-off-by: Alan Swanson <reiver@improbability.net> Signed-off-by: Petr Štetiar <ynezz@true.cz> [long line wrap]
* base-files: add service_stopped as a post stop hookArthur Skowronek2019-05-051-0/+3
| | | | | | | | | | | | | | | | | | | | Purpose of these changes is to introduce a hook for post service shutdown in a similar fashion to the existing hook service_started. I found it to be useful to specify a hook that is called once the service has been stopped and not before the service is stopped like the stop_service hook does. The concrete use case I have for this is that I'm running a binary that takes over the hardware watchdog timer. Said binary unfortunately can not use ubus directly to tell procd to hand over the watchdog timer so this has to be done in the service file for the binary in question. In order to support a clean handover of the watchdog timer back to procd, the service init script has to dispatch the ubus invocation once the binary in question has been stopped. Signed-off-by: Arthur Skowronek <ags@digineo.de> Signed-off-by: Petr Štetiar <ynezz@true.cz> [added commit message, use the same form as other hooks]
* base-files/hotplug: fix dedicated group for tty devicesMichael Heimpold2019-04-041-1/+1
| | | | | | | | | | | | | | | | | Commit 124ab1dc0a and 5523ee3459 introduced the assignment of the group "tty" to /dev/tty* devices in order to support unprivileged user access to serial devices. However, due to an improperly rebased commit this feature broke. This patch restores the lost hunk in hotplug.json file to re-introduce this feature and also renames the existing "tty" group to "dialout" as this is the more typical name for such a group on desktop systems. Fixes: 5209cfa534 ("procd: fix hotplug.json syntax") Signed-off-by: Michael Heimpold <mhei@heimpold.de> Acked-by: Jo-Philipp Wich <jo@mein.io>
* base-files: enable BPF JIT sysctl by defaultTony Ambardar2019-02-111-0/+2
| | | | | | Set net.core.bpf_jit_enable=1 in /etc/sysctl.d/10-default.conf. Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
* procd: Add wrapper for uci_validate_section()Jeffery To2019-01-221-7/+3
| | | | | | | | | | | | | | | | | This adds a wrapper (uci_load_validate) for uci_validate_section() that allows callers (through a callback function) to access the values set by uci_validate_section(), without having to manually declare a (potentially long) list of local variables. The callback function receives two arguments when called, the config section name and the return value of uci_validate_section(). If no callback function is given, then the wrapper exits with the value returned by uci_validate_section(). This also updates several init scripts to use the new wrapper function. Signed-off-by: Jeffery To <jeffery.to@gmail.com>