init: Fix updating from img.gz when kernel resides on block device

This fixes updating LE from img.gz when installed on WeTek internal memory.
This commit is contained in:
kszaq 2016-07-04 16:25:03 +02:00
parent d11c464649
commit 9e9ca25cb3
2 changed files with 6 additions and 1 deletions

View File

@ -253,6 +253,7 @@ makeinstall_init() {
cp $PKG_DIR/scripts/functions $INSTALL
cp $PKG_DIR/scripts/init $INSTALL
sed -e "s/@DISTRONAME@/$DISTRONAME/g" \
-e "s/@KERNEL_NAME@/$KERNEL_NAME/g" \
-i $INSTALL/init
chmod 755 $INSTALL/init
}

View File

@ -727,7 +727,11 @@
# don't make temporary files but instead copy
# directly from mountpoint to /flash
UPDATE_DIR=$UPDATE_ROOT/.tmp/mnt
if [ ! -b $IMAGE_KERNEL -o -z "@KERNEL_NAME@" ]; then
UPDATE_KERNEL=$(basename $IMAGE_KERNEL)
else
UPDATE_KERNEL="@KERNEL_NAME@"
fi
fi
sync