Commit Graph

119 Commits (4a6795409d1520fd3da3e909a8bcf9d7fd0927bb)

Author SHA1 Message Date
John Crispin f99c61a94a procd: add 'platform_nand_pre_upgrade'
Add 'platform_nand_pre_upgrade' callback to allow platform specific
preparation right before flashinng, when already in ramdisk.

Example uses might be setting correct values for CI_{KERNPART,UBIPART}.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47879
9 years ago
John Crispin 32b37600b9 procd: update procd.sh to support new ujail options
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>

SVN-Revision: 47862
9 years ago
Rafał Miłecki 0d5915d2fe procd: drop nand_upgrade_stage1 from sysupgrade_pre_upgrade hooks
Now we have all targets using platform_pre_upgrade (and calling
nand_do_upgrade directly) we don't need nand_upgrade_stage1 to be in
sysupgrade_pre_upgrade hooks anymore.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47489
9 years ago
Rafał Miłecki a24f7305cc procd: make nand_do_platform_check check image only
Recently all targets have been updated to call nand_do_upgrade directly.
It's not needed anymore to leave a magic /tmp/sysupgrade-nand-path mark
during image check.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47079
9 years ago
Rafał Miłecki 26845a4715 procd: switch buttons to the new "button" hotplug handler
This allows requesting "timeout" ACTION in script by returning a
positive value.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46580
9 years ago
Felix Fietkau 16fa80a8f1 procd: correct the order of respawn params in the comments.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 45955
9 years ago
John Crispin 5fe5aeaa72 procd: work around a event race
there is a conceptual design flaw in our interface events. workaround this by
disabling duplicate message supression in procd. we need to fix this properly
for the next release

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45883
9 years ago
John Crispin 2b9ac1e0af procd: add a 10 second delay to the interface triggers
this is an ugly hack that will be removed when the netifd maintainers
have time to look at the problem.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45876
9 years ago
John Crispin a43bcc980e Removed reference to imaginary procd_add_interface_reload in procd.sh
The last line of procd.sh has a reference to procd_add_interface_reload. procd_add_interface_reload
doesn't seem to exist. I've removed the reference of it to minimize confusion.

Signed-off-by: Eric Schultz <eschultz@prplfoundation.org>

SVN-Revision: 45487
9 years ago
John Crispin 093c341473 procd: add helper for starting NAND sysupgrade
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45339
9 years ago
John Crispin e85b93d9b8 procd: add jail support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45010
9 years ago
Jo-Philipp Wich fd670d2756 procd: add support for relaying daemon stdio to syslog
Procd enabled init scripts can now specify:

  procd_set_param stdout 1
  procd_set_param stderr 1

... to relay their respective standard IO streams to the system log.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44547
9 years ago
John Crispin 19a6f3dd11 procd: more nand takeover fixes
if the initramfs kernel and payload were flashed in one block, the payload might not be at the start of the ubi partition due to bad blocks inside the kernel partition.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43513
10 years ago
John Crispin 68909fb081 procd: firstboot nand/ubi takeover support
it is now possible to flash a initramfs kernel and a sysupgrade tar file inside the ubi partition. on first boot, the takeover script will find the tar file, extract and finally sysupgrade it. this allows us to flash owrt/ubi images in a 2 phase setup using ODM webuis that are not ubi aware. this is needed by some mediatek and brokencom devices.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43505
10 years ago
Rafał Miłecki 15355dd212 procd: fix typo in nand.sh s/TRX/TAR/
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43423
10 years ago
John Crispin db69761f94 procd: fix/clean some conditions in nand.sh
1) nand_upgrade_tar: use a simpler condition that matches if () { }
   logic and fix check of $kernel_length variable
2) nand_do_upgrade_stage2: use case, otherwise one could believe we
   always call nand_upgrade_tar

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43373
10 years ago
John Crispin 19c18eba93 procd: document nand.sh a bit
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43372
10 years ago
John Crispin 20940138ac scripts: fix wrong usage of '==' operator
[base-files] shell-scripting: fix wrong usage of '==' operator

normally the '==' is used for invoking a regex parser and is a bashism.
all of the fixes just want to compare a string. the used busybox-ash
will silently "ignore" this mistake, but make it portable/clean at least.

this patch does not change the behavior/logic of the scripts.

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42911
10 years ago
Felix Fietkau 4c490c79b2 procd: fix initial nand sysupgrade
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42884
10 years ago
Felix Fietkau 41363b1ecb procd: fix parsing of the has_env parameter
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42883
10 years ago
John Crispin e28c5f86f3 procd: handle hotplug events for the usbmisc subsystem
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42831
10 years ago
John Crispin f81614594f procd: update to latest git
add support for starting services as !root

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42471
10 years ago
Felix Fietkau 2dabf3a775 procd: allow adding empty strings to arrays
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42456
10 years ago
John Crispin c23e0ed691 procd: run the mdns register outside the sub shell container
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42327
10 years ago
John Crispin b0d9dcf84d procd: update to latest git HEAD
this adds a interafce.update trigger and mdns service registration helpers

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42324
10 years ago
Felix Fietkau caeb675a46 procd: check output of "uci show" instead of raw config files in order to track uncommitted changes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41865
10 years ago
Imre Kaloz ecb68ba6b4 allow overriding the kernel partition's name
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41646
10 years ago
Imre Kaloz 2ddcf5dd8a we already have a get_magic_long() in common.sh for sysupgrade, don't break it
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41628
10 years ago
John Crispin 72efa88b64 procd: correctly identify ubifs in tar file
A missing path prevents the rootfs type contained in a SysupgradeNAND
tar file from being determined correctly.

This fixes it, and also corrects a minor spelling mistake.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>

SVN-Revision: 41564
10 years ago
Felix Fietkau 5aef137f9e procd: add a shell helper function to emit a config.change event
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41482
10 years ago
Felix Fietkau 2baf4d4fb0 procd: add shell functions to add instance data
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41481
10 years ago
John Crispin 9912d02fa1 procd: fix uci_validation
Regardles of the return code from validate_data _error variable will be 0 due
to 'local' command in the previous line. With this patch we are able to catch
the return code from validate_data tool.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 41414
10 years ago
John Crispin 9b714b6e7b procd: fix nand.sh kernel_length typo
sysupgrade otherwise skips kernel part on devices which got
kernel in ubi due to kern_length being undefined, kernel_length
is being used instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 41327
10 years ago
John Crispin 54faeadb07 procd: various improvements to nand.sh
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41278
10 years ago
John Crispin 1a3ebd51ad procd: some cleanup for SysupgradeNAND
Removed unused ubi file file from template as ubinized images are
passed directly and not inside the tarball.
Also removed left-over white-space.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 41237
10 years ago
John Crispin 3dca5a158d procd: various cleanups to /lib/upgrade/nand.sh
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41222
10 years ago
John Crispin 91d82d7b36 procd: rename procd_add_network_trigger
i got complaints about the bad naming of the api. lets rename it while there are no users yet.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41220
10 years ago
Felix Fietkau 79bbc4fbfb procd: allow passing multiple config files to procd_add_reload_trigger
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41146
10 years ago
John Crispin 1e876b4191 procd: update to latest git HEAD
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41129
10 years ago
Felix Fietkau 71cda6a1e0 procd: Fix USB cellular modems hotplug events
Without this patch, /etc/hotplug.d/tty/30-3g won't be called when you insert or remove a USB-serial cellular modem.

(see Ticket #14117)

Signed-off-by: Matthew Reeve <mreeve@tenxnetworks.com>

SVN-Revision: 41039
10 years ago
John Crispin bd179b2610 procd: service instances can now report an error of why they failed to start.
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41031
10 years ago
John Crispin e1e5f21b2f procd: add wrapper calls for interface triggers
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41008
10 years ago
John Crispin 59c8b70839 procd: rename local variable in uci_validate_section
Allow to use "package", "type", "name", "error" and "result"
as config option names:

package some_service
config section 'foo'
    option name 'bar'
    option type 'unknown'

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>

SVN-Revision: 41006
10 years ago
Felix Fietkau 84c3487e5a procd: add a PROCD_DEBUG variable that will dump the ubus calls from init scripts to stderr
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39983
10 years ago
John Crispin b71eb4b5df procd: the helper script did not export all functions properly
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 39612
10 years ago
John Crispin 31a2912cd9 netifd: enable coredumps again
got broken due procd startup. Requires procd resource limit patch.

Signed-off-by: Ulrich Weber <uw@xyne.com>

SVN-Revision: 39020
11 years ago
Jo-Philipp Wich 387761e2fc procd: fix processing of datatype specification with spaces
SVN-Revision: 38935
11 years ago
John Crispin 91de2648e9 procd: update procd.sh to make use of the new validate_data tool
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38908
11 years ago
Felix Fietkau c84a43cf40 procd: emit tty events for ttyUSB* even when they come from the usb-serial subsystem
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38862
11 years ago
John Crispin 5fbfffe7f4 procd: ubox: update to latest git head
move log service from procd to ubox
some debloating on procd
the preinit part of procd is now also a seperate binary

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38822
11 years ago
John Crispin 50db95e2f0 procd: options with default values are not parsed properly in the ubus register code
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38788
11 years ago
John Crispin 130d7de07f procd: update to latest git head
this includes the first wip version of the uci validation backend

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38786
11 years ago
Felix Fietkau f099defc00 procd: reduce the number of unnecessary calls to /sbin/hotplug-call for tty devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38705
11 years ago
John Crispin e37b364ea3 procd: update to latest git head
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38529
11 years ago
Felix Fietkau d1794a7536 procd: fix command handling in procd_add_instance()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38350
11 years ago
Luka Perkov ef5f836207 fix various init scripts
Changes include:

* removing unused variables
* replacing spaces with tabs where appropriate
* more consistency with variable declarations

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 38142
11 years ago
John Crispin f874094402 procd: convert various packages to procd style init.d scripts
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38023
11 years ago
John Crispin 4f62127dea procd: update to latest git head
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38022
11 years ago
Jo-Philipp Wich 60c64808dc procd: ensure the log_proto has udp default value in log.init
SVN-Revision: 37508
11 years ago
Jo-Philipp Wich ec6954e64e procd: default to udp log protocol to keep backwards compat with busybox
SVN-Revision: 37496
11 years ago
John Crispin ae7a156434 procd: make old button hotplug rules work until all packages are migrated
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37336
11 years ago
John Crispin 3c306f9d07 procd: make the log port default to 514 if none is specified
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37257
11 years ago
John Crispin 6f1112a5e8 procd: add proto and trigger support to the /etc/init.d/log
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37249
11 years ago
John Crispin 8eb56a88a4 procd: add a small script that handles config reloads until configd is ready
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37248
11 years ago
John Crispin 67eb275f69 procd: the delete ubus call was passed the wrong field name for services
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37247
11 years ago
John Crispin 9004e560fe procd: update to latest git revision
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37206
11 years ago
John Crispin 09f23981f4 procd: remove obseleted procd.init file
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37205
11 years ago
John Crispin 6884a8b59d procd: extend shell binding with trigger support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37157
11 years ago
John Crispin 4ebf19b48f packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37007
11 years ago