bdisk/extra/pre-build.d/etc/initcpio/install/livecd

39 lines
888 B
Bash

#!/bin/bash
build()
{
add_module 'squashfs'
add_module 'loop'
add_module 'overlay'
add_file "/etc/passwd"
add_file "/etc/shadow"
add_file "/etc/group"
add_file "/etc/gshadow"
add_binary "/usr/bin/sed"
add_binary "/usr/bin/pkill"
add_binary "/usr/bin/curl"
add_binary "/usr/bin/pv"
add_full_dir /etc/ssl
add_full_dir /etc/ca-certificates
add_runscript
# Normally, archiso does this for us. But we don't want to use the build.sh they provide, so we perform it in a more minimal version here.
if [ -f /root/pubkey.gpg ];
then
add_binary "/usr/bin/gpg"
mkdir -p "${BUILDROOT}${dest}"/gpg
gpg --homedir "${BUILDROOT}${dest}"/gpg --import /root/pubkey.gpg
fi
}
help()
{
cat <<HELPEOF
Mount a squashed flat-file directory with OverlayFS on /, add SSL support, and add GPG support (if needed) for BDisk.
HELPEOF
}