Skip to content

Commit

Permalink
[boot0]:remove no need files before extract image (#460)
Browse files Browse the repository at this point in the history
* [Aboot]:remove no need files before extract image

Signed-off-by: Sihui Han <sihan@microsoft.com>

* use  and remove boot0 in the check

Signed-off-by: Sihui Han <sihan@microsoft.com>

* change the comments accordingly

Signed-off-by: Sihui Han <sihan@microsoft.com>
  • Loading branch information
sihuihan88 authored and lguohan committed Apr 1, 2017
1 parent 9841f83 commit 5c8bcef
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions files/Aboot/boot0.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ parse_environment_config() {
}

extract_image() {
## Clean old directory for read-write layer
rm -rf "$target_path/rw"

## Clean docker directory
rm -rf "$target_path/{{ DOCKERFS_DIR }}"
## Remove all the other unnecssary files except swi file, boot-config
for f in $(ls -A $target_path); do
if [ $f != "${swipath##*/}" ] && [ $f != "boot-config" ]; then
rm -rf "$target_path/$f"
fi
done


## Unzip the image
unzip -oq "$swipath" -x boot0 -d "$target_path"
Expand Down

0 comments on commit 5c8bcef

Please sign in to comment.