aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin/sysupgrade
Commit message (Collapse)AuthorAgeFilesLines
* 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48682 3c298f89-4303-0410-b956-a3cf2f4a3e73
* 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48281 3c298f89-4303-0410-b956-a3cf2f4a3e73
* 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45338 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [base-files]: fix sysupgrade on overlayfs v23+Imre Kaloz2014-11-241-1/+6
| | | | | | | | Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43365 3c298f89-4303-0410-b956-a3cf2f4a3e73
* sysupgrade: preserve symlinks in backupsJohn Crispin2014-10-061-2/+2
| | | | | | Signed-off-by: Catalin Patulea <catalinp@google.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42783 3c298f89-4303-0410-b956-a3cf2f4a3e73
* procd: various cleanups to /lib/upgrade/nand.shJohn Crispin2014-06-161-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41222 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add an ugly hack for nand to sysupgradeJohn Crispin2014-06-111-0/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41126 3c298f89-4303-0410-b956-a3cf2f4a3e73
* /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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40411 3c298f89-4303-0410-b956-a3cf2f4a3e73
* 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39318 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix whitespacesLuka Perkov2013-12-091-1/+1
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39006 3c298f89-4303-0410-b956-a3cf2f4a3e73
* 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38807 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: implement -l (--list-backup) sysupgrade parameter to list the ↵Jo-Philipp Wich2013-07-311-0/+14
| | | | | | files that would be backed up git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37627 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: abort sysupgrade if file specified with --restore-config is not ↵Jo-Philipp Wich2013-07-311-1/+6
| | | | | | found git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37624 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: implement -T (--test) sysupgrade parameter to verify image ↵Jo-Philipp Wich2013-07-301-1/+9
| | | | | | without actually flashing it git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37620 3c298f89-4303-0410-b956-a3cf2f4a3e73
* 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36893 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mount_root: prepare base-filesJohn Crispin2013-04-251-0/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36429 3c298f89-4303-0410-b956-a3cf2f4a3e73
* sysupgrade: clarify online helpJo-Philipp Wich2013-01-021-12/+15
| | | | | | | | Fixes #12346. Signed-off-by: Paul Fertser <fercerpav@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34975 3c298f89-4303-0410-b956-a3cf2f4a3e73
* 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34974 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: provide a sysupgrade -r (--restore-backup) option as ↵Jo-Philipp Wich2012-08-121-0/+12
| | | | | | convenience wrapper for tar -C / -x(v)zf git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33147 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix option parsing of -F/--force parameterJo-Philipp Wich2012-08-091-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33075 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] /etc/functions.sh => /lib/functions.shJo-Philipp Wich2012-06-051-2/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32062 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: implement a --force option for sysupgrade to override ↵Jo-Philipp Wich2012-01-081-2/+11
| | | | | | image checks, useful to upgrade old ar71xx installations to current trunk ones git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29688 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add -b (--create-backup) option to sysupgrade, which ↵Jo-Philipp Wich2011-12-201-2/+26
| | | | | | generates a backup .tar.gz according to the user settings. This will also be reused by LuCI. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29587 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: kill remaining processes after running user hooks (#10461)Jo-Philipp Wich2011-11-191-2/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29256 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: sysupgrade: kill all but essential processes before ↵Jo-Philipp Wich2011-10-271-0/+5
| | | | | | starting the update git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28626 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add -h and --help options to sysupgrade (#9728)Jo-Philipp Wich2011-07-171-1/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27630 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files:Jo-Philipp Wich2010-10-051-2/+3
| | | | | | | | | | | | - add sysupgrade support for keepfile hints * introduces /lib/upgrade/keep.d/ for per-package keepfile lists * introduces /etc/sysupgrade.conf for user defined keepfile hints - prime /lib/upgrade/keep.d/base-files-essential to keep sysupgrade usable for images without opkg - change sysupgrade to build the keepfile list from /lib/upgrade/keep.d/, /etc/sysupgrade.conf and opkg list-changed-conffiles git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23258 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: sysupgrade: merge info from "opkg ↵Jo-Philipp Wich2010-10-051-2/+3
| | | | | | list-changed-conffiles" to backup file list git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23233 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add an experimental "-c" flag which tries to preserve ↵Jo-Philipp Wich2010-09-071-2/+19
| | | | | | *all* changed files in /overlay/etc minus some system files git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22977 3c298f89-4303-0410-b956-a3cf2f4a3e73
* revert r19964 for now, there are issues with opkg/ipkg.py generating the ↵Travis Kemen2010-03-041-3/+2
| | | | | | status db git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19970 3c298f89-4303-0410-b956-a3cf2f4a3e73
* grab all config files for installed packages, closes #3718Travis Kemen2010-03-031-2/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19964 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: sysupgrade: restrict find command to plain files to ↵Jo-Philipp Wich2009-11-201-1/+2
| | | | | | avoid duplicates when generating the conffiles tgz archive git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18455 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add /etc/rc.local to the default save file listJo-Philipp Wich2009-09-121-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17572 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: Fix sysupgrade .tar.gz configuration restoringVasilis Tsiligiannis2009-06-291-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16626 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: Detect and decompressed gzipped images automatically ↵Vasilis Tsiligiannis2009-06-101-4/+1
| | | | | | when flashing with sysupgrade git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16407 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: initialize GZIPED to 0 in sysupgrade since it's used ↵Nicolas Thill2009-05-171-2/+2
| | | | | | later in numeric comparisons git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15890 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [sysupgrade] Don't try to pivot to new ramfs if already running on oneJo-Philipp Wich2009-05-071-2/+6
| | | | | | | | | | | | | This patch allows the sysupgrade script to continue with the upgrade if openwrt is already running on a ramfs. This allows the use of the sysupgrade script as an _installer_ when running from an iso image. A user could boot the system from a bootable cd and invoke sysupgrade -n <URL> to write an image to the hard disk or CF. Signed-off-by: Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15683 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [PATCH] Add option in sysupgrade to flash gzipped imagesJo-Philipp Wich2009-05-071-1/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15672 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add option in sysupgrade to restore config from file or URL (patch from #4043)Felix Fietkau2008-09-281-1/+15
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12772 3c298f89-4303-0410-b956-a3cf2f4a3e73
* fix typo from last sysupgrade commitFelix Fietkau2008-09-261-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12715 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add switch to not save configuration over the reflash in noninteractive modeTravis Kemen2008-09-261-0/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12714 3c298f89-4303-0410-b956-a3cf2f4a3e73
* sysupgrade: add optional delay before rebootingFelix Fietkau2008-09-121-3/+6
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12572 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add /etc/firewall.user to be backed up becuase it is an example in ↵Travis Kemen2008-08-161-1/+1
| | | | | | /etc/config/firewall git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12326 3c298f89-4303-0410-b956-a3cf2f4a3e73
* remove /etc/firewall.* from being kept as they no longer are used in trunkTravis Kemen2008-08-161-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12320 3c298f89-4303-0410-b956-a3cf2f4a3e73
* keep /etc/group over reflash as wellTravis Kemen2008-07-241-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11919 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add dropbear keys, passwd and firewall configuration to be saved during reflashTravis Kemen2008-07-241-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11912 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add sysupgrade script for config preserving system upgrades. only ↵Felix Fietkau2007-08-211-0/+92
implemented for x86-2.6 at the moment, but can be ported to other platforms easily git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8456 3c298f89-4303-0410-b956-a3cf2f4a3e73