export IMAGE="$1"
COMMAND="$2"
-export ARGV="$IMAGE"
-export ARGC=1
-
-export SAVE_CONFIG=1
-export SAVE_PARTITIONS=1
-
export INTERACTIVE=0
export VERBOSE=1
export CONFFILES=/tmp/sysupgrade.conffiles
RAMFS_COPY_BIN= # extra programs for temporary ramfs root
RAMFS_COPY_DATA= # extra data files
-
-[ -f "$CONF_TAR" ] || export SAVE_CONFIG=0
-[ -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap ] && export SAVE_PARTITIONS=0
-
include /lib/upgrade
local file="$(which "$binary" 2>/dev/null)"
[ -n "$file" ] && install_bin "$file"
done
- install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh /lib/upgrade/*.sh $RAMFS_COPY_DATA
+ install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh /lib/upgrade/*.sh /lib/upgrade/do_stage2 $RAMFS_COPY_DATA
[ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64
echo
}
+indicate_upgrade
killall -9 telnetd
killall -9 dropbear
if [ -n "$IMAGE" ] && type 'platform_pre_upgrade' >/dev/null 2>/dev/null; then
- IS_PRE_UPGRADE=1 platform_pre_upgrade "$IMAGE"
-
- # Needs to be unset again because of busybox weirdness ...
- IS_PRE_UPGRADE=
+ platform_pre_upgrade "$IMAGE"
fi
if [ -n "$(rootfs_type)" ]; then