diff --git a/lib/img-functions b/lib/img-functions index fba3bf48..ddbbf7bd 100644 --- a/lib/img-functions +++ b/lib/img-functions @@ -62,8 +62,7 @@ function mount_tmp_image () { function create_base () { # Copy data in to the root. TARGET_ROOT=$TMP_MOUNT_PATH run_d root - - if [ -z "$(ls /tmp/foo)" ] ; then + if [ -z "$(ls $TMP_MOUNT_PATH | grep -v lost+found)" ] ; then # Nothing copied in, use Ubuntu. echo "Adding ubuntu element as / had no contents" IMAGE_ELEMENT=$($SCRIPT_HOME/element-info --expand-dependencies $IMAGE_ELEMENT ubuntu)