Expose "term_timeout" parameter in procd.sh to allow init scripts to
request a longer termination timeout.
This is required to fix FS#859 in a later commit.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Adjust default permissions and ownership of /dev/tty* nodes from
0600/root:root to 0660/root:tty in order to support granting
unprivileged user access when needed.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
453116e system: introduce new attribute board_name
e5b963a preinit: define _GNU_SOURCE
e5ff8ca upgraded: cmake: Find and include uloop.h
f367ec6 hotplug: fix a memory leak in handle_button_complete()
796ba3b service/service_stopped(): fix a use-after-free
79bbe6d system: return legacy board name
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
We can reuse the kill_remaining and run_ramfs facilities of the stage2 run
by upgraded.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
We always want to support staged upgrades now, so it's better to include
upgraded into the main package. /lib/upgrade/nand.sh is moved to
base-files.
The procd-nand-firstboot package is removed for now, it may return later
as a separate package.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
992b796 rcS: add missing fcntl.h include
63789e5 init: add support for sysupgrades triggered from preinit
5b1fb35 Remove code that has become unnecessary after sysupgrade changes
5918b6d upgraded: add support for passing a "command" argument to stage2
056d8dd upgraded: link dynamically, chroot during exec
7c6cf55 system: always support staged sysupgrade
d42b21e procd/rcS: Use /dev/null as stdin
e0098d4 service/instance: add an auto start option
1247db1 procd: Log initscript output prefixed with script name
8d720b2 procd: Don't use syslog before its initialization
2555474 procd: Add missing \n in debug message
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Use install_bin to copy upgraded with all dependencies. The old name
/tmp/upgraded is temporarily retained as a symlink to avoid breaking
things.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
88d48d5 libfstools: silence mkfs.{ext4,f2fs}
a19f2b3 build: disable the format-truncation warning error to fix gcc 7 build errors
633a8d0 libfstools: fix multiple volume_identify usages with the same volume
c43ae11 fstools: use -Wno-format-truncation instead of -Wno-error=format-truncation
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Changes since last version
546bc72 pkg: alternatives support
7a96972 libbb: xreadlink: fix memory leak on failure case
3f13edd pkg_run_script: use pkg->dest in half installed case
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Update to latest Git in order to import the following fixes:
1d0263b check_data_file_clashes_change: remove duplicated offline root in paths
a00a6a9 buildReplaces: do not add duplicated replacees
9fbedd8 opkg: compare-versions doesn't need any state
45b54f6 opkg_cmd: fix segmentation fault in opkg_compare_versions_cmd()
93de62b opkg_cmd: fix return of opkg compare-versions
51275a8 pkg_src_list_push: remove unused function
947d3d4 pkg_src_list_pop: remove unused function
980cfb2 str_list_push: remove unused function
52c31c1 str_list_prev: remove unused function
7d24212 str_list_last: remove unused function
48142a3 conffile_list_pop: remove unused function
46c5de5 pkg_dest_list_push: remove unused functions
368bb62 nv_pair_list_prev: remove unused function
2985c00 nv_pair_list_last: remove unused function
f5082ac conffile_list_pop: remove unused function
89bf8b9 conffile_list_push: remove unused function
23d31fb active_list_sort: remove unused function
7fe45f2 active_list_add_depend: remove unused function
86b584d pkg_dependence_satisfied: remove unused function
816d330 Fix typo in pkg_hash_fetch_best_installation_candidate.
07f3b02 set_flags_from_control: remove function
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
20c16fc cmake: Make blockd link against libjson-c
92b4c2c libfstools: add basic documentation of mount functions
Signed-off-by: John Crispin <john@phrozen.org>
With this patch, the nand.sh script no longer overwrites
CI_KERNELPART and CI_UBIPART if they have been set before.
This allows platforms specify alternative values for these
variables.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
continue work started here: http://patchwork.ozlabs.org/patch/520859
Extend /etc/config/system with parameters to set the default respawn treshold and respawn timeout
for procd launched services that have respawn enabled.
This results in cleaner init scripts, while making sure services have respawn parameters set.
Signed-off-by: Claudiu Brasovean <cbrasho@gmail.com>
8f218f5 procd: service gets deleted when its last instance is freed
35209a0 procd: update modprobe path
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Update to latest Git in order to import the following fixes:
19070b6 unarchive: fix possible segmentation fault in deb_extract()
758527e pkg: forward "provided_by_hand" flag in pkg_merge()
1fdc2ca pkg: mark bit fields in pkg_t unsigned
15fc1ee opkg_cmd: avoid null pointer dereference in opkg_what_depends_conflicts_cmd()
439c89e opkg_cmd: fix endless loop in whatprovides/whatreplaces
0fb3e9f pkg_depends: propagate virtual provided detail flag to providers
793155f pkg_depends: fix unsatisfied dependency installation order
b1dc770 libopkg: fix some overly aggressive line wrapping in pkg_depends.c
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
c09e4f0 ubusd: fix incomplete copy of shared buf during queue-ing
453b87f cli: add support for subscribing to objects
6eb3c96 cli: do not use default timeout for listen
dfe3383 libubus: reset ctx->sock.error when doing ubus reconnect
34c6e81 cli: fix listen_timeout compile issue
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Update to latest Git head to get rid of a stray printf() causing unwanted
output in the "opkg list-upgradable" command.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
A missing list pointer initialization caused opkg to ignore conffile entries
from status files, breaking the conffile tracking on the target.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
c553354 cmake: fix typo
8973576 kmodloader: fix not being able to find some modules
fce9382 cmake: Check for getrandom system call
Signed-off-by: Felix Fietkau <nbd@nbd.name>
The switch to cmake caused the -DHAVE_USIGN flag to get lost, disabling
compilation of the correspondinf support code.
Update to latest Git head which enables usign support by default.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Switch to our own fork of opkg to significantly reduce the required amount
of memory when updating lists or installing packages.
Preliminary tests showed a usage drop of about 90% during these operations,
from ~3.7MB with unmodified opkg to ~360KB with our custom fork.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5f91241 procd: add cancel_timeout on rc scripts when a runtime_timeout is specified
961dc69 procd: stop service using SIGKILL if SIGTERM failed to do so
Signed-off-by: John Crispin <john@phrozen.org>
Default trigger action timeout was added to procd.sh in commit f88e3a4c0
(procd: add default timeout for reload trigger actions)
However, the timeout value was not placed under the correct JSON-script
array nesting level and thus did not apply.
To fix this and make the timeout actually apply to the reload triggers,
we place it in the correct scope, that is the per-trigger array.
Fixes: f88e3a4c0a
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
Adds the following fixes:
91acde6 libubus: do not modify uloop_cancelled
763b9b2 libubus: reset ctx->sock.eof to fix reconnect issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Update ubox to latest Git HEAD in order to import the following fixes:
ac2d43e kmodloader: support '-q' quiet option
f8d3d16 ubox: Add an option for more accurate timestamps in log
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Fixes build issues with some toolchains that don't add lcrypt in the default
search paths:
CMakeFiles/rpcd.dir/session.c.o: In function `rpc_login_test_password':
build_dir/target-mipsel-linux-gnu/rpcd-2016-12-03-0577cfc1/session.c:823: undefined reference to `crypt'
collect2: error: ld returned 1 exit status
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Update ubox to latest Git head in order to import the following fixes:
14839f0 kmodloader: make insert_module() idempotent
6e3c6dc kmodloader: add module alias awareness
9371411 kmodloader: fix out-of-bound access when parsing .modinfo
a62c946 kmodloader: modprobe: skip possible command line arguments
46a4b5f kmodloader: log to kmsg when loading directories of modules
eacc426 kmodloader: remove redundant glob wildcard char
8488bb5 ubox: Initialize conditionally uninitialized variable
db070f1 ubox: Fix some memory leaks
acc48b5 kmodloader: Fix typo in error message
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This is how other Linux distributions are doing and kernel
modprobe_path[] of request_module() also has a default value of
/sbin/modprobe
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
A given signal-name is now converted to the corresonding number. In general
it's good style to use names (readability) and it's more portable: signal
numbers can be architecture-dependent, so we are more safe giving names.
A real world example is signal 10, which is BUS on ramips and USR1 on PPC.
All users of 'procd_send_signal' must change their code to reflect this.
Signed-off-by: Bastian Bittorf <bb@npl.de>