aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin
Commit message (Collapse)AuthorAgeFilesLines
* base-files: sysupgrade: do not rely on opkg to list changed conffilesMatthias Schiffer2018-03-071-1/+20
| | | | | | | 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: sysupgrade: correct command help textKevin Darbyshire-Bryant2018-01-121-1/+0
| | | | | | | | | | 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>
* 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: automatically handle paths and symlinks for RAMFS_COPY_BINMatthias Schiffer2017-07-111-2/+0
| | | | | | | | | | | | Depending on busybox applet selection, paths of basic utiilties may differ, and may not work as symlinks to busybox. Simply using whatever binary is found in PATH and detecting symlinks automatically is more robust and easier to maintain. The list of binaries is also slightly cleaned up and duplicates are removed. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: add support for staged sysupgrades from failsafe modeMatthias Schiffer2017-05-291-5/+13
| | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: sysupgrade cleanupMatthias Schiffer2017-05-291-2/+0
| | | | | | | | | | | | Some functions only used by stage2 are moved there from common.sh. One piece that could still use more cleanup is platform_pre_upgrade: many targets reference files from there are aren't available in the ramfs, so we need to evaluate it before the switch; conversely, flash writes happen in that function on some targets. Targets that do the latter should be fixed eventually to use platform_do_upgrade for that purpose. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: always use staged sysupgradeMatthias Schiffer2017-05-291-31/+46
| | | | | | | | | | | Support for the -d and -p options is dropped; it may be added again at some point by adding these flags to the ubus sysupgrade call. A downside of this is that we get a lot less information about the progress of the upgrade: as soon as the actual upgrade starts, all shell sessions are killed to allow unmounting the root filesystem. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* Revert "sysupgrade: run only one instance at a time."Jo-Philipp Wich2017-05-261-14/+0
| | | | | | | | | | | | | This reverts commit e96a9a9af82c00dcce606a84a7bb87a00411385d. The change breaks sysupgrade through LuCI and two-stage sysupgrade on NAND targets. There is also a mismatch of file paths in lock and unlock operations. This commit was apparently neither properly tested, nor reviewed, so drop it for now. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* sysupgrade: run only one instance at a time.Kenneth Johansson2017-05-251-0/+14
| | | | | | | Things do not work well if running multiple instances of upgrade at the same time. Signed-off-by: Kenneth Johansson <kenneth.johansson@inteno.se>
* base-files: Added a deprecation notice on wifi detectDavid Pinilla Caparrós2017-02-131-1/+7
| | | | | | | | When running wifi detect, the user will be told on error output that wifi detect is deprecated, that wifi config must be used instead. Also the commit that changes it is referenced for further info. Signed-off-by: David Pinilla Caparrós <dpinitux@gmail.com>
* base-files: Add wifi config to wifi command usageDavid Pinilla Caparrós2017-02-131-2/+2
| | | | | | | | | | Since commit 5f8f8a366136a07df661e31decce2458357c167a wifi detect does not longer work and wifi config it's used to configure not yet configured wireless devices. This commit changes command usage to reflect that change. Signed-off-by: David Pinilla Caparrós <dpinitux@gmail.com>
* base-files: validate metadata of sysupgrade imagesFelix Fietkau2016-11-191-1/+2
| | | | | | | | | | | Use fwtool to extract it, only require metadata to be present if the platform sysupgrade script sets REQUIRE_IMAGE_METADATA=1 Image metadata is in JSON format and contains a list of supported devices, along with version information that could be displayed by a UI later before the actual upgrade happens. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files, mac80211, broadcom-wl: wifi detection and configurationChristian Lamparter2016-11-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the wifi detection script is executed as part of the (early) boot process. Pluggable wifi USB devices, which are inserted at a later time are not automatically detected and therefore they don't show up in LuCI. A user has to deal with wifi detection manually, or restart the router. However, the current "sleep 1" window - which the boot process waits for wifi devices to "settle down" - is too short to detect wifi devices for some routers anyway. For example, this can happen with USB WLAN devices on the WNDR4700. This is because the usb controller needs to load its firmware from UBI and initialize, before it can operate. The issue can be seen on a BT HomeHub 5A as well as soon as the caldata are on an ubi volume. This is because the ath9k card has to be initialized by owl-loader first. Which has to wait for the firmware extraction script to retrieve the pci initialization values inside the caldata. This patch moves the wifi configuration to hotplug scripts. For mac80211, the wifi configuration will now automatically run any time a "ieee80211" device is added. Likewise broadcom-wl's script checks for new "net" devices which have the "wl$NUMBER" moniker. Issues with spawning multiple interface configuration - in case the detection script is run concurrently - have been resolved by using a named section for the initial configuration. Concurrent configuration scripts will now simply overwrite the same existing configuration. A workaround which preserves the "sleep 1" window for just the first boot has been added. This allows the existing brcm47xx boot and mvebu uci-default scripts to correctly setup the initial mac addresses and regulatory domain. And finally, the patch renames the "wifi detect" into "wifi config". As the script no longer produces any output that has to be redirected or appended to the configuration file. Thanks to Martin Blumenstingl for helping with the implementation and testing of the patch. Acked-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* base-files: generate /etc/config/wireless, if it doesn't existMathias Kresin2016-11-031-0/+2
| | | | | | | | | | | | This patch adds a check in "wifi detect" to test if the wireless configuration file does exist. If it doesn't exist, an empty /etc/config/wireless file will be created. This is necessary because uci doesn't create new files, instead the tool just exits with "uci: Entry not found". Signed-off-by: Mathias Kresin <dev@kresin.me> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* base-files: remove non-working filter option for wifi detectChristian Lamparter2016-10-041-2/+2
| | | | | | | | | | | This patch removes the non-working wifi driver filter for the wifi detection script. I figured that rather than replacing ${2:-$DRIVERS} with ${1:-$DRIVERS}, it would be better to remove it. Nobody needed it in the previous years. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* base-files: use procd init for urandom_seedEtienne CHAMPETIER2016-07-271-0/+20
| | | | | | | | | | Previous implementation was blocking the init and breaking halt/reboot/sysupgrade (reported by Daniel Golle) v2: use procd logging, use set -e + trap for error handling Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com> Tested-by: Daniel Golle <daniel@makrotopia.org>
* x86: preserve partition table on sysupgradeJo-Philipp Wich2016-02-091-0/+3
| | | | | | | | | | | | | | 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-081-2/+2
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48678
* 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: sanitize and unify $PATHSteven Barth2015-10-021-1/+1
| | | | | | | | Previously init and hotplug paths were different from console. Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 47080
* base-files: add support for platform_pre_upgrade functionJohn Crispin2015-04-091-0/+8
| | | | | | | | | | | | | | | | Current NAND sysupgrade process is a bit hard to follow due to the way of triggering stage1. Currently this is done by leaving a /mark/ in the form of /tmp/sysupgrade-nand-path during nand_do_platform_check. Existence of this mark stops standard sysupgrade process (as the result of sysupgrade_pre_upgrade exit). This may be a bit misleading. Proposed solution adds a new function that will allow platform.sh trigger NAND sysupgrade consciously. This will also allow cleaning nand_do_platform_check limiting it to just checking the image. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45338
* base-files: firstboot: pass down arguments such as -y to jffs2resetLuka Perkov2015-03-101-1/+1
| | | | | | | | This brings back old behavior. Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 44651
* fix sysupgrade on overlayfs v23+Imre Kaloz2014-11-241-1/+6
| | | | | | Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 43365
* scripts: fix wrong usage of '==' operatorJohn Crispin2014-10-142-4/+4
| | | | | | | | | | | | | | [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
* sysupgrade: preserve symlinks in backupsJohn Crispin2014-10-061-2/+2
| | | | | | Signed-off-by: Catalin Patulea <catalinp@google.com> SVN-Revision: 42783
* procd: various cleanups to /lib/upgrade/nand.shJohn Crispin2014-06-161-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41222
* base-files: add an ugly hack for nand to sysupgradeJohn Crispin2014-06-111-0/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41126
* /lib/functions.sh: move rarely used mtd and macaddr related functions to ↵Felix Fietkau2014-04-071-0/+1
| | | | | | | | /lib/functions/system.sh Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40411
* sysupgrade: do not kill any processes in failsafeJohn Crispin2014-01-171-3/+5
| | | | | | | | sysugrade killed the lock causing failsafe to stop Signed-off-by: Alexander Couzens <lynxis@fe80.eu> SVN-Revision: 39318
* /sbin/wifi: reload network/wireless on wifi restartFelix Fietkau2013-12-111-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39036
* base-files: fix whitespacesLuka Perkov2013-12-092-4/+4
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 39006
* wifi: restart netifd wifi interfaces on the "up" command like the old variantFelix Fietkau2013-12-021-0/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 38990
* wifi: rename the "reload" (restarting non-netifd wifi) command to ↵Felix Fietkau2013-12-021-1/+7
| | | | | | | | | | "reload_legacy" Add a new "reload" command that reloads the netifd config as well Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 38989
* netifd: add wireless configuration support and port mac80211 to the new ↵Felix Fietkau2013-12-021-7/+32
| | | | | | | | framework Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 38988
* base-files: add the DEVICENAME variable for hotplug scriptsFelix Fietkau2013-11-191-0/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 38861
* ar71xx: Unifi AP Pro sysupgrade patchFelix Fietkau2013-11-141-0/+1
| | | | | | | | | | | | | | | | | | The current implementation of mtd will not append the backup file created by sysupgrade to the correct partition, as mtd will append the data to first jffs2 partition it finds. As the kernel is also stored on a jffs2 partition (which resides before the overlay partition), the data will be appended to this partition. To fix this problem, a new option -s <number> skip the first n bytes when appending data to the jffs2 partiton, defaults to "0" is added to mtd. Signed-off-by: Peter Wagner <tripolar@gmx.at> SVN-Revision: 38807
* base-files: implement -l (--list-backup) sysupgrade parameter to list the ↵Jo-Philipp Wich2013-07-311-0/+14
| | | | | | files that would be backed up SVN-Revision: 37627
* base-files: abort sysupgrade if file specified with --restore-config is not ↵Jo-Philipp Wich2013-07-311-1/+6
| | | | | | found SVN-Revision: 37624
* base-files: implement -T (--test) sysupgrade parameter to verify image ↵Jo-Philipp Wich2013-07-301-1/+9
| | | | | | without actually flashing it SVN-Revision: 37620
* sysupgrade: create state file so procd knows when a sysupgrade is in progressJohn Crispin2013-06-101-0/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36893
* mount_root: prepare base-filesJohn Crispin2013-04-253-68/+3
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36429
* base-files: firstboot: only ask for confirmation on TTYJonas Gorski2013-03-271-4/+6
| | | | | | Also allow '-y' to force the reset. SVN-Revision: 36133
* base-files: make firstboot ask for confirmationJonas Gorski2013-02-211-8/+16
| | | | | | | | To prevent accidential resets ask for confirmation (and default to n). Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 35712
* sysupgrade: clarify online helpJo-Philipp Wich2013-01-021-12/+15
| | | | | | | | Fixes #12346. Signed-off-by: Paul Fertser <fercerpav@gmail.com> SVN-Revision: 34975
* sysupgrade: do not require an extra argument after --restore-backupJo-Philipp Wich2013-01-021-6/+7
| | | | | | | | | | | Neither --create-backup nor --restore-backup need an image name (following the backup filename). Treat them in uniform way. Mostly fixes #12346. Signed-off-by: Paul Fertser <fercerpav@gmail.com> SVN-Revision: 34974
* merge /lib/functions/boot.sh and /lib/functions.shMirko Vogt2012-12-192-2/+2
| | | | SVN-Revision: 34794
* Do not overload mount-call - trying to reduce confusionMirko Vogt2012-12-191-1/+1
| | | | | | | | | | | The behaviour of calling 'mount' differed depending on whether it called the busybox-mount, the mount of util-linux, the mount defined in /lib/functions.sh and /lib/functions/boot.sh /etc/preinit even included /lib/functions.sh and /lib/functions/boot.sh, both re-defining 'mount'. SVN-Revision: 34792
* base-files: provide a sysupgrade -r (--restore-backup) option as convenience ↵Jo-Philipp Wich2012-08-121-0/+12
| | | | | | wrapper for tar -C / -x(v)zf SVN-Revision: 33147
* base-files: fix option parsing of -F/--force parameterJo-Philipp Wich2012-08-091-1/+1
| | | | SVN-Revision: 33075
* base-files: allow wireless ifaces to be part of multiple networksJo-Philipp Wich2012-06-261-4/+9
| | | | SVN-Revision: 32503