aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/upgrade
Commit message (Collapse)AuthorAgeFilesLines
* base-files: supress errors from lddJonas Gorski2014-11-191-1/+1
| | | | | | | | | | | | ldd might be called for shell scrips during sysupgrade, causing it to complain that they are not a dynamic executables. This is a harmless error, so supress it to avoid confusing about them being serious ones. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43315 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: properly fix copying ld*.so with eglibcJonas Gorski2014-11-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r36107 ("base-files: sysupgrade fail with eglibc") tried to fix sysupgrade by changing the ld-soname to what is expected, but only fixed MIPS while breaking ARM. The underlying issue is that the ld.so name varies widely across different architectures for eglibc: eglibc-2.19-r25243$ grep -r "ld-soname :=" . | awk '{ print $3 }' | sort -u ld64.so.1 ld64.so.2 ld-linux-aarch64_be.so.1 ld-linux-aarch64.so.1 ld-linux-armhf.so.3 ld-linux-mipsn8.so.1 ld-linux.so.2 ld-linux.so.3 ld-linux-x32.so.2 ld-linux-x86-64.so.2 ld.so.1 Instead of adding each different soname to check for and copy it, replace the awk script with a sed script to extract it properly and drop the hardcoded so-name. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43295 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add /etc/shadow to list of essential files to keep in sysupgrade ↵Felix Fietkau2014-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | (bug 18206) Based on bug #18206 sysupgrade can lead to loss of password information in certain situations. Most likely all users who will upgrade from versions r43017-43040, will lose their current passwords. :-( https://dev.openwrt.org/ticket/18206 Currently /etc/shadow is defined as a conffile in base-files: https://dev.openwrt.org/browser/trunk/package/base-files/Makefile#L37 But it is not defined in the default list of essential files to keep in sysupgrade: https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/upgrade/keep.d/base-files-essential If exporting conffiles info fails, /etc/shadow can get lost. Shadow passwords are now the default, so saying that preserving /etc/passwd is essential while /etc/shadow is not, makes no sense. The attached patch adds /etc/shadow to the list of essential files. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43061 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: fix ldd definition if /usr/bin/ldd existsFelix Fietkau2014-10-191-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42976 3c298f89-4303-0410-b956-a3cf2f4a3e73
* sysupgrade: Enable killing of all processes under upgradedJohn Crispin2014-07-101-12/+27
| | | | | | | | | | If the sysupgrade scripts is called under upgraded, it will not kill all other processes as it should to avoid interference by locked filesystem. This patch checks the parent and if it is upgraded, it kills all. Signed-off-by: André Valentin <avalentin@marcant.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41563 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: fix ramfs / nand upgradeJohn Crispin2014-07-011-1/+1
| | | | | | | | /lib/{imx6,lantiq,...}.sh are needed in the ramfs for sysupgrade to work. Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41440 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: regenerate the /lib64 symlink when switching to a ramdiskJohn Crispin2014-06-201-0/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41284 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add upgraded to the list of daemons not killedJohn Crispin2014-06-191-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41268 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: properly remove stderr from zcat/bzcatJohn Crispin2014-06-111-2/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41135 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: include more ubi* tools in sysupgrade ramdiskJohn Crispin2014-06-111-1/+4
| | | | | | | | | Also add some more busybox symlinks which are useful for sysupgrade on UBI-enabled devices. Signed-off-by: Daniel Golle <daniel@makrotopia.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41125 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: Allow installation of symlinks using RAMFS_COPY_BIN env var.John Crispin2014-06-021-1/+1
| | | | | | | | http://patchwork.openwrt.org/patch/5086/ Signed-off-by: karl.vogel@gmail.com git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40943 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: the ubi tol should be installed when jumping to ram_fsJohn Crispin2014-04-071-0/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40420 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: make use of new fstoolsJohn Crispin2014-04-071-1/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40416 3c298f89-4303-0410-b956-a3cf2f4a3e73
* /lib/functions.sh: move rarely used mtd and macaddr related functions to ↵Felix Fietkau2014-04-071-1/+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
* ubi-utils: mini version of mtd-utils that only includes ubi toolsJohn Crispin2014-04-031-2/+9
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40367 3c298f89-4303-0410-b956-a3cf2f4a3e73
* fstools: add the new fstools packageJohn Crispin2014-03-121-0/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39895 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: fix mount-utils incompatibilityJohn Crispin2013-12-271-12/+12
| | | | | | Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39169 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix whitespacesLuka Perkov2013-12-091-6/+6
| | | | | | 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-1/+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: don't kill nas for sysupgradeHauke Mehrtens2013-11-111-1/+1
| | | | | | | Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38766 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel/base-files: clean up old code related to refreshing mtd partitions, ↵Felix Fietkau2013-07-141-18/+5
| | | | | | | | it is no longer used anywhere Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37282 3c298f89-4303-0410-b956-a3cf2f4a3e73
* sysupgrade: fixes broken pipe error during sysupgadeJohn Crispin2013-05-051-2/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36548 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: sysupgrade fail with eglibcFlorian Fainelli2013-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | With eglibc, "ldd busybox" give us libcrypt.so.1 => /lib/libcrypt.so.1 (0x774be000) libm.so.6 => /lib/libm.so.6 (0x773e4000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x773c0000) libc.so.6 => /lib/libc.so.6 (0x77276000) /lib/ld.so.1 (0x774fe000) Thus /lib/ld.so.1 is not printed by the libs fonction and isn't copied to the 'new' root before pivot root libs() { ldd $* | awk '{print $3}'; } https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/upgrade/common.sh With uclibc the last line of "ldd busybox" is ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x77ada000) Don't know for musl! This patch replace https://dev.openwrt.org/changeset/19167, as glibc is gone The other way around is to rework libs() Please apply the fix (mine or another) on trunk and AA Might fix https://dev.openwrt.org/ticket/12273 Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr> Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36107 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [base-files] sysupgrade was broken as procd was getting killedJohn Crispin2013-03-141-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36031 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [base-files] make basefiles aware of procdJohn Crispin2013-03-131-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36003 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package/base-files] hot-fix nameclash in sysupgrade: rename pivot() to ↵Mirko Vogt2012-12-211-2/+2
| | | | | | | | | | | | | | supivot() in sysupgrade Sysupgrade defines its very own pivot() function. Prior merging boot.sh and functions.sh sysupgrade just included boot.sh, now it includes functions.sh which defines pivot() as well, however slightly different which causes sysupgrade to fail. This is a hot-fix to unbreak sysupgrade, however those two pivot() functions should actually get merged. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34815 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Do not overload mount-call - trying to reduce confusionMirko Vogt2012-12-191-6/+6
| | | | | | | | | | | 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'. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34792 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: ensure that /sys is available during sysupgrade, some ↵Jo-Philipp Wich2012-07-031-1/+5
| | | | | | essential services like om-watchdog need it git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32587 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] /etc/functions.sh => /lib/functions.shJo-Philipp Wich2012-06-051-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32062 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: kill ubusd and udhcpc on sysupgrade as wellFelix Fietkau2012-05-231-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31852 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: allow sysupgrade to kill netifd, fixes pppd shutdown on upgradeFelix Fietkau2012-05-231-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31851 3c298f89-4303-0410-b956-a3cf2f4a3e73
* package/base-files: copy /lib/functions.sh to the ramfs on sysupgradeGabor Juhos2012-05-231-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31842 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: rewrite killing of nonessential services to not rely ↵Jo-Philipp Wich2011-11-161-9/+17
| | | | | | on top, use the proc filesystem only git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29187 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: do not kill udhcpc on sysupgrade, it will tear down ↵Jo-Philipp Wich2011-11-081-1/+1
| | | | | | the interface if terminated git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28863 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: do not assume that "top" is busybox' top, but try to ↵Jo-Philipp Wich2011-11-081-1/+1
| | | | | | call the applet explicitely git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28862 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: add some more protected services to sysupgrade kill ↵Jo-Philipp Wich2011-11-031-1/+1
| | | | | | blacklist git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28732 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix typoJo-Philipp Wich2011-10-301-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28681 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: sysupgrade: kill all but essential processes before ↵Jo-Philipp Wich2011-10-271-0/+24
| | | | | | starting the update git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28626 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files/sysupgrade: add more busybox applet symlinks to ramdiskGabor Juhos2011-10-271-1/+6
| | | | | | | | | Adds symlinks for printf and wc to make life happier in the sysupgrade ramdisk. Also make code more readable by escaping that overly long line. Signed-off-by: Daniel Golle <dgolle@allnet.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28616 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: use "reboot -f" after sysupgrade to prevent executing ↵Jo-Philipp Wich2011-07-251-1/+1
| | | | | | deleted init scripts git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27776 3c298f89-4303-0410-b956-a3cf2f4a3e73
* package/base-files: add get_magic_long() to common upgrade scriptGabor Juhos2011-01-261-0/+4
| | | | | | Patch-by: Mark Mentovai <mark@moxienet.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25117 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package]Âbase-files: don't mark /etc/banner as conffileJo-Philipp Wich2010-12-201-1/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24742 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files:Jo-Philipp Wich2010-10-051-0/+10
| | | | | | | | | | | | - 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
* change from /jffs to /overlay, patch from Daniel DickinsonFlorian Fainelli2010-03-211-5/+5
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20356 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files:Jo-Philipp Wich2010-01-161-0/+3
| | | | | | | | | sysupgade library coomon.sh has "bug" in glibc enviorement. For some reason ld-linux.so.3 is not installed at ramfs and sysupgrade always fails. Signed-off-by: Zintis Petersons <zintis.petersons@e-mail.lv> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19167 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix sysupgrade get_magic_word() function to return ↵Jo-Philipp Wich2009-08-191-1/+1
| | | | | | proper values if the first two bytes are identical git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17319 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: Fix sysupgrade .tar.gz configuration restoringVasilis Tsiligiannis2009-06-291-12/+12
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16626 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] sysupgrade: sync *before* mtd write, only fallback to ↵Jo-Philipp Wich2009-06-171-3/+4
| | | | | | sysrq-trigger if standard reboot fails git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16488 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: Add support for bzipped images in sysupgradeVasilis Tsiligiannis2009-06-101-1/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16408 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: Detect and decompressed gzipped images automatically ↵Vasilis Tsiligiannis2009-06-101-7/+14
| | | | | | when flashing with sysupgrade git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16407 3c298f89-4303-0410-b956-a3cf2f4a3e73