ref: 8981ccbf5b2636c7d2e06b08ffdf87be80fe19c8
parent: e3c208fb91f7242046900626da1400e6c6499f30
author: Natanael Copa <ncopa@alpinelinux.org>
date: Mon Apr 30 03:01:55 CDT 2012
init: only use /etc/apk/world when it exists We should not read /var/lib/apk/world if /etc/apk/world exists.
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -484,7 +484,12 @@
[ -d "$sysroot/root" ] && chmod 700 "$sysroot/root"
pkgs="$pkgs $(sed 's/\#.*//' $sysroot/etc/lbu/packages.list 2>/dev/null)"
rm -f "$sysroot"/etc/lbu/packages.list
- pkgs="$pkgs $(cat $sysroot/var/lib/apk/world $sysroot/etc/apk/world 2>/dev/null)"
+ for world in etc/apk/world var/lib/apk/world; do
+ if [ -e "$sysroot/$world" ]; then
+ pkgs="$pkgs $(cat $sysroot/$world)"
+ break;
+ fi
+ done
else
# add some boot services by default
rc_add devfs sysinit