1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-16 04:35:13 +03:00
aports/testing/klibc/libklibc.post-install
Olliver Schinagl 5574a8ded5 testing/klibc: new aport
To be able to offer super minimalistic systems, or really just early
boot, klibc offers a limited subsect of utilities. Just enough to bring
up a rootfs. It is like a tiny busybox.

This could also help in the future where people want to have super
minimalistic containers (FROM scratch) but still want to offer some
basics (sh and maybe slightly more) to help with CI runners.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2020-09-11 05:43:40 +00:00

18 lines
328 B
Bash
Executable file

#!/bin/sh
set -eu
if [ -n "${CARCH:-}" ] || \
CARCH="$(${APK:-apk} --print-arch 2> "/dev/null")"; then
for _klibcso in "/lib/klibc-"*".so"; do
if [ -L "${_klibcso}" ] && \
! readlink -f "${_klibcso}"; then
unlink "${_klibcso}"
fi
done
ln -f -s "/usr/lib/klibc-${CARCH}/lib/klibc-"*".so" "/lib/"
fi
exit 0