diff --git a/src/09_generate_rootfs.sh b/src/09_generate_rootfs.sh index 425e65487..c9d4cd5f7 100755 --- a/src/09_generate_rootfs.sh +++ b/src/09_generate_rootfs.sh @@ -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." diff --git a/src/11_generate_overlay.sh b/src/11_generate_overlay.sh index d2efdbe9e..bf856f344 100755 --- a/src/11_generate_overlay.sh +++ b/src/11_generate_overlay.sh @@ -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. diff --git a/src/15_generate_image.sh b/src/15_generate_image.sh index e51d27298..2649af0ca 100755 --- a/src/15_generate_image.sh +++ b/src/15_generate_image.sh @@ -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."