37 lines
629 B
Bash
Executable File
37 lines
629 B
Bash
Executable File
#!/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
|