summaryrefslogtreecommitdiffstats
path: root/initramfs-init
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-02-11 16:02:19 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-02-11 16:02:19 +0000
commit73fe3d0a6e701560d50e4d75071c4569d84df69d (patch)
treeb401093ca3e4ed9a9329d19d491414a0791d2566 /initramfs-init
parent4ed11bd492f63eee11861affbf6e7905a57477a1 (diff)
downloadabuild-73fe3d0a6e701560d50e4d75071c4569d84df69d.tar.bz2
abuild-73fe3d0a6e701560d50e4d75071c4569d84df69d.tar.xz
alpine.mk: build repositories before building iso
Use the built repositories as source for the iso components rather than just pick whats in a given dir.
Diffstat (limited to 'initramfs-init')
-rwxr-xr-xinitramfs-init12
1 files changed, 9 insertions, 3 deletions
diff --git a/initramfs-init b/initramfs-init
index e3fd2ca..b14477d 100755
--- a/initramfs-init
+++ b/initramfs-init
@@ -8,6 +8,9 @@ SINGLEMODE=no
# basic environment
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
+# needed devs
+mknod /dev/null c 1 3
+
# basic mounts
mount -t proc -o noexec,nosuid,nodev proc /proc
mount -t sysfs -o noexec,nosuid,nodev sysfs /sys
@@ -153,8 +156,11 @@ fi
# install new root
ebegin "Installing packages to root filesystem"
-apk add --root /newroot --repository /media/$ALPINE_DEV/apks \
- --initdb --quiet --progress $pkgs
+mkdir -p /etc/apk
+for i in /media/$ALPINE_DEV/packages/*; do
+ echo $i >> /etc/apk/repositories
+done
+apk add --root /newroot --initdb --quiet --progress $pkgs
eend $?
# copy alpine release info
@@ -163,7 +169,7 @@ ln -sf /.alpine-release $NEWROOT/etc/alpine-release
# if there is no repositories file, then use the default
if ! [ -f $NEWROOT/etc/apk/repositories ]; then
- echo /media/$ALPINE_DEV/apks > $NEWROOT/etc/apk/repositories
+ cp /etc/apk/repositories $NEWROOT/etc/apk/repositories
fi
# switch over to new root