Check existence of directory 'lost+found'

The command `sudo rmdir $TARGET_ROOT/lost+found` will fail
if `$TARGET_ROOT/lost+found` directory doesn't exist,
e.g. when you use non-default image.

Fixes bug #1245856

Change-Id: I48c8f2f201b29912a726249023ca7d20893cc958
This commit is contained in:
iberezovskiy 2013-10-29 15:36:07 +04:00
parent d91ececa06
commit f23babe971
3 changed files with 9 additions and 3 deletions

View File

@ -73,4 +73,6 @@ fi
# Extract the base image (use --numeric-owner to avoid UID/GID mismatch between
# image tarball and host OS e.g. when building Fedora image on an openSUSE host)
sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DIB_IMAGE_CACHE/$BASE_IMAGE_TAR
sudo rmdir $TARGET_ROOT/lost+found
if [ -e "$TARGET_ROOT/lost+found" ]; then
sudo rmdir $TARGET_ROOT/lost+found
fi

View File

@ -54,4 +54,6 @@ fi
# Extract the base image (use --numeric-owner to avoid UID/GID mismatch between
# image tarball and host OS e.g. when building RHEL image on an openSUSE host)
sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DIB_IMAGE_CACHE/$BASE_IMAGE_TAR
sudo rmdir $TARGET_ROOT/lost+found
if [ -e "$TARGET_ROOT/lost+found" ]; then
sudo rmdir $TARGET_ROOT/lost+found
fi

View File

@ -27,4 +27,6 @@ fi
# Extract the base image (use --numeric-owner to avoid UID/GID mismatch between
# image tarball and host OS e.g. when building Ubuntu image on an openSUSE host)
sudo tar -C $TARGET_ROOT --numeric-owner -xzf $DIB_IMAGE_CACHE/$BASE_IMAGE_FILE
sudo rmdir $TARGET_ROOT/lost+found
if [ -e "$TARGET_ROOT/lost+found" ]; then
sudo rmdir $TARGET_ROOT/lost+found
fi