Broke out differnt sections of the 'partition.sh' script into seperate scripts, called on by a new 'pre-inst.sh' script

This commit is contained in:
2025-07-21 13:11:35 -04:00
parent 7442994d18
commit 62861d8c7b
7 changed files with 691 additions and 597 deletions

36
base-fedora.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
set -euo pipefail
BASEDIR="$(dirname "${0}" | sed "s|^\.|${PWD}|")"
source \
/etc/os-release
source \
"${BASEDIR}/system.conf"
if [[ "${1}" == '-1' ]]; then
mkdir -p /run/install
if [[ "${VERSION_ID}" -lt '41' ]]; then
mount /dev/mapper/live-base /run/install
else
mount /dev/live-base /run/install
fi
rsync -pogAXtlHrDx \
--stats \
--exclude=/boot/efi/* \
--exclude=/etc/machine-id \
--info=progress2 \
/run/install/ /mnt
elif [[ "${1}" == '-2' ]]; then
mv /mnt/etc/resolv.conf \
/mnt/etc/resolv.conf.orig
cp -L \
/etc/resolv.conf \
/mnt/etc
elif [[ "${1}" == '-3' ]]; then
#
fi