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'
|
||||
OVERLAY_LOCATION=`read_property OVERLAY_LOCATION`
|
||||
|
||||
if [ "$OVERLAY_LOCATION" = "rootfs" \
|
||||
-a -d $OVERLAY_ROOTFS \
|
||||
-a ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
||||
if [ "$OVERLAY_LOCATION" = "rootfs" ] && \
|
||||
[ -d $OVERLAY_ROOTFS ] && \
|
||||
[ ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
||||
|
||||
echo "Merging overlay software in rootfs."
|
||||
|
||||
|
@ -21,11 +21,11 @@ OVERLAY_TYPE=`read_property OVERLAY_TYPE`
|
||||
# Read the 'OVERLAY_LOCATION' property from '.config'
|
||||
OVERLAY_LOCATION=`read_property OVERLAY_LOCATION`
|
||||
|
||||
if [ "$OVERLAY_LOCATION" = "iso" \
|
||||
-a "$OVERLAY_TYPE" = "sparse" \
|
||||
-a -d $OVERLAY_ROOTFS \
|
||||
-a ! "`ls -A $OVERLAY_ROOTFS`" = "" \
|
||||
-a "$(id -u)" = "0" ] ; then
|
||||
if [ "$OVERLAY_LOCATION" = "iso" ] && \
|
||||
[ "$OVERLAY_TYPE" = "sparse" ] && \
|
||||
[ -d $OVERLAY_ROOTFS ] && \
|
||||
[ ! "`ls -A $OVERLAY_ROOTFS`" = "" ] && \
|
||||
[ "$(id -u)" = "0" ] ; then
|
||||
|
||||
# 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.
|
||||
@ -73,10 +73,10 @@ if [ "$OVERLAY_LOCATION" = "iso" \
|
||||
|
||||
# Detach the loop device since we no longer need it.
|
||||
$BUSYBOX losetup -d $LOOP_DEVICE
|
||||
elif [ "$OVERLAY_LOCATION" = "iso" \
|
||||
-a "$OVERLAY_TYPE" = "folder" \
|
||||
-a -d $OVERLAY_ROOTFS \
|
||||
-a ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
||||
elif [ "$OVERLAY_LOCATION" = "iso" ] && \
|
||||
[ "$OVERLAY_TYPE" = "folder" ] && \
|
||||
[ -d $OVERLAY_ROOTFS ] && \
|
||||
[ ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
||||
|
||||
# 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.
|
||||
|
@ -21,8 +21,8 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d $OVERLAY_ROOTFS \
|
||||
-a ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
||||
if [ -d $OVERLAY_ROOTFS ] && \
|
||||
[ ! "`ls -A $OVERLAY_ROOTFS`" = "" ] ; then
|
||||
|
||||
echo "Merging overlay software in image."
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user