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:
36
base-fedora.sh
Executable file
36
base-fedora.sh
Executable 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
|
Reference in New Issue
Block a user