Bug fixes

This commit is contained in:
Clayton Voges 2021-08-30 06:21:30 +00:00
parent 75891d0d4e
commit 32ad286c2d
2 changed files with 7 additions and 7 deletions

View file

@ -7,7 +7,8 @@ mv repositories /etc/apk/repositories
# setting the mirror
apk add curl
curl -LO http://nl.alpinelinux.org/alpine/MIRRORS.txt
mirror=`grep $(head -n 1 /etc/apk/repositories) | sed -e "s/.*\/\///" | sed -e "s/\//\ /" | awk '{print $1}') MIRRORS.txt`
repo_domain=`head -n 1 /etc/apk/repositories | sed -e "s/.*\/\///" | sed -e "s/\//\ /" | awk '{print $1}'`
mirror=`grep $repo_domain MIRRORS.txt`
rm MIRRORS.txt
# setting the chroot dir
@ -19,9 +20,10 @@ arch=$(uname -m)
# set up apk
version="edge"
version="2.12.7-r0"
curl -LO ${mirror}/latest-stable/main/${arch}/apk-tools-static-${version}.apk
tar -xzf apk-tools-static-*.apk
rm apk-tools-static-*.apk
# install the alpine base installation onto the chroot
./sbin/apk.static -X ${mirror}/latest-stable/main -U --allow-untrusted -p ${chroot_dir} --initdb add alpine-base
@ -35,8 +37,9 @@ mount -o bind /sys ${chroot_dir}/sys
cp -L /etc/resolv.conf ${chroot_dir}/etc/
# prepare the APK repositories
branch=$version # change if you want a specific version
branch="edge" # change if you want a specific version
mkdir -p ${chroot_dir}/etc/apk
echo "${mirror}/${branch}/main" > ${chroot_dir}/etc/apk/repositories
chroot ${chroot_dir} chroot_init.sh
cp chroot_init.sh ${chroot_dir}/chroot_init.sh
chroot ${chroot_dir} sh

View file

@ -13,6 +13,3 @@ rc-update add syslog boot
rc-update add mount-ro shutdown
rc-update add killprocs shutdown
rc-update add savecache shutdown
# login shell
sh -l