initram: kill .apk-new files after installing newroot

and add a boot option keep_apk_new to keep them. Might be useful during
upgrades.
This commit is contained in:
Natanael Copa 2009-02-23 12:06:05 +00:00
parent 14bcd8ddb0
commit 3abc172e08

View File

@ -182,6 +182,11 @@ done
apk add --root /newroot --initdb --quiet --progress $pkgs
eend $?
# kill .apk-new files
if [ -z "$KOPT_keep_apk_new" ]; then
find /newroot/etc -name '*.apk-new' | xargs rm
fi
# copy alpine release info
cp $ALPINE_MNT/.alpine-release $NEWROOT/
ln -sf /.alpine-release $NEWROOT/etc/alpine-release