Proper fix for the issue when no overlay bundles are defined in the main configuration file.
This commit is contained in:
parent
52bf803742
commit
0fad4724da
@ -56,9 +56,9 @@ set -e
|
|||||||
# Read the 'OVERLAY_LOCATION' property from '.config'
|
# Read the 'OVERLAY_LOCATION' property from '.config'
|
||||||
OVERLAY_LOCATION=`read_property OVERLAY_LOCATION`
|
OVERLAY_LOCATION=`read_property OVERLAY_LOCATION`
|
||||||
|
|
||||||
if [ "$OVERLAY_LOCATION" = "rootfs" \
|
if [ "$OVERLAY_LOCATION" = "rootfs" ] && \
|
||||||
-a -d $OVERLAY_ROOTFS \
|
[ -d $OVERLAY_ROOTFS ] && \
|
||||||
-a ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
[ ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
||||||
|
|
||||||
echo "Merging overlay software in rootfs."
|
echo "Merging overlay software in rootfs."
|
||||||
|
|
||||||
|
@ -21,11 +21,11 @@ OVERLAY_TYPE=`read_property OVERLAY_TYPE`
|
|||||||
# Read the 'OVERLAY_LOCATION' property from '.config'
|
# Read the 'OVERLAY_LOCATION' property from '.config'
|
||||||
OVERLAY_LOCATION=`read_property OVERLAY_LOCATION`
|
OVERLAY_LOCATION=`read_property OVERLAY_LOCATION`
|
||||||
|
|
||||||
if [ "$OVERLAY_LOCATION" = "iso" \
|
if [ "$OVERLAY_LOCATION" = "iso" ] && \
|
||||||
-a "$OVERLAY_TYPE" = "sparse" \
|
[ "$OVERLAY_TYPE" = "sparse" ] && \
|
||||||
-a -d $OVERLAY_ROOTFS \
|
[ -d $OVERLAY_ROOTFS ] && \
|
||||||
-a ! "`ls -A $OVERLAY_ROOTFS`" = "" \
|
[ ! "`ls -A $OVERLAY_ROOTFS`" = "" ] && \
|
||||||
-a "$(id -u)" = "0" ] ; then
|
[ "$(id -u)" = "0" ] ; then
|
||||||
|
|
||||||
# Use sparse file as storage place. The above check guarantees that the whole
|
# Use sparse file as storage place. The above check guarantees that the whole
|
||||||
# script is executed with root permissions or otherwise this block is skipped.
|
# script is executed with root permissions or otherwise this block is skipped.
|
||||||
@ -73,10 +73,10 @@ if [ "$OVERLAY_LOCATION" = "iso" \
|
|||||||
|
|
||||||
# Detach the loop device since we no longer need it.
|
# Detach the loop device since we no longer need it.
|
||||||
$BUSYBOX losetup -d $LOOP_DEVICE
|
$BUSYBOX losetup -d $LOOP_DEVICE
|
||||||
elif [ "$OVERLAY_LOCATION" = "iso" \
|
elif [ "$OVERLAY_LOCATION" = "iso" ] && \
|
||||||
-a "$OVERLAY_TYPE" = "folder" \
|
[ "$OVERLAY_TYPE" = "folder" ] && \
|
||||||
-a -d $OVERLAY_ROOTFS \
|
[ -d $OVERLAY_ROOTFS ] && \
|
||||||
-a ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
[ ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
||||||
|
|
||||||
# Use normal folder structure for overlay. All files and folders located in
|
# Use normal folder structure for overlay. All files and folders located in
|
||||||
# the folder 'minimal_overlay' will be merged with the root folder on boot.
|
# the folder 'minimal_overlay' will be merged with the root folder on boot.
|
||||||
|
@ -21,8 +21,8 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d $OVERLAY_ROOTFS \
|
if [ -d $OVERLAY_ROOTFS ] && \
|
||||||
-a ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
[ ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
||||||
|
|
||||||
echo "Merging overlay software in image."
|
echo "Merging overlay software in image."
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user