summaryrefslogtreecommitdiff
path: root/adelie-build-cd
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-08-21 22:45:03 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-08-21 22:45:03 -0500
commitd4955e17eda9cbad2f686152c2e1d26db07f764b (patch)
tree56462dc3bf058a1863415e772a40a9a57a3e5b58 /adelie-build-cd
parent2647f371bde65444679ee4d25774d1dec6e282dc (diff)
downloadimage-d4955e17eda9cbad2f686152c2e1d26db07f764b.tar.gz
image-d4955e17eda9cbad2f686152c2e1d26db07f764b.tar.bz2
image-d4955e17eda9cbad2f686152c2e1d26db07f764b.tar.xz
image-d4955e17eda9cbad2f686152c2e1d26db07f764b.zip
adelie-build-cd: Alpine's OpenRC is ~special~
Diffstat (limited to 'adelie-build-cd')
-rwxr-xr-xadelie-build-cd25
1 files changed, 17 insertions, 8 deletions
diff --git a/adelie-build-cd b/adelie-build-cd
index 396ea64..2c94449 100755
--- a/adelie-build-cd
+++ b/adelie-build-cd
@@ -135,22 +135,31 @@ install_pkgs() {
mkdir -p squashroot-$ARCH/etc/apk/keys
cp 'packages@adelielinux.org.pub' squashroot-$ARCH/etc/apk/keys/
- apk --arch $ARCH -X "https://distfiles.adelielinux.org/adelie/$VERSION/system/$EXTRA_MIRROR" -U --root squashroot-$ARCH --initdb add $PACKAGES $ARCH_PKGS
+ apk --arch $ARCH \
+ -X "https://distfiles.adelielinux.org/adelie/$VERSION/system/$EXTRA_MIRROR" \
+ -X "https://distfiles.adelielinux.org/adelie/$VERSION/user/$EXTRA_MIRROR" \
+ -U --root squashroot-$ARCH --initdb add $PACKAGES $ARCH_PKGS
}
make_structure() {
mkdir -p squashroot-$ARCH/home/live
mkdir squashroot-$ARCH/target
mkdir -p squashroot-$ARCH/media/live
- ln -s /bin/bash squashroot-$ARCH/bin/sh
- echo 'hostname="adelie"' > squashroot-$ARCH/etc/conf.d/hostname
+ echo 'adelie-live' > squashroot-$ARCH/etc/hostname
echo 'mtab_is_file=no' > squashroot-$ARCH/etc/conf.d/mtab
- cp -RPp squashroot-$ARCH/usr/share/openrc/runlevels squashroot-$ARCH/etc/runlevels
- ln -s /etc/init.d/udev squashroot-$ARCH/etc/runlevels/sysinit/udev
- ln -s /etc/init.d/udev-trigger squashroot-$ARCH/etc/runlevels/sysinit/udev-trigger
- ln -s /etc/init.d/lvmetad squashroot-$ARCH/etc/runlevels/sysinit/lvmetad
+ for siservice in udev udev-trigger lvmetad; do
+ ln -s /etc/init.d/$siservice \
+ squashroot-$ARCH/etc/runlevels/sysinit/$siservice
+ done
+
+ for bootservice in root binfmt bootmisc fsck hostname hwclock keymaps \
+ localmount loopback modules mtab procfs sysctl sysfsconf termencoding \
+ tmpfiles.setup urandom; do
+ ln -s /etc/init.d/$bootservice \
+ squashroot-$ARCH/etc/runlevels/boot/$bootservice
+ done
cat >squashroot-$ARCH/etc/fstab <<- FSTAB
# Welcome to Adélie Linux.
@@ -238,7 +247,7 @@ make_initrd() {
# base
mkdir initrd-$ARCH/lib
- cp squashroot-$ARCH/usr/lib/libc.so initrd-$ARCH/lib/ld-musl-$LDARCH.so.1
+ cp squashroot-$ARCH/lib/ld-musl-$LDARCH.so.1 initrd-$ARCH/lib/
cp squashroot-$ARCH/lib/libblkid.so.1 initrd-$ARCH/lib/
cp squashroot-$ARCH/lib/libuuid.so.1 initrd-$ARCH/lib/