This commit is contained in:
teldra 2022-02-07 16:56:04 +01:00
parent 05268aeadd
commit 012d6f8760
2 changed files with 24 additions and 17 deletions

View File

@ -37,8 +37,10 @@ enable_service() {
}
reset() {
if [ "$1" == "packages" ]; then
function packages() { :; }
if [ "$1" == "config" ]; then
function config() { :; }
elif [ "$1" == "packages" ]; then
function packages() { :; }
fi
}

35
main.sh
View File

@ -1,10 +1,13 @@
#!/bin/bash
pass="oem"
timezone="Europe/Berlin"
main="/tmp/vinstall"
target="${main}/target"
tmp_target="${main}/tmp_target"
pass="oem"
timezone="Europe/Berlin"
vars="${target}/tmp/vinstaller/vars"
if [ $DEBUG ]; then
umount -R ${target}/boot/efi ${target}/boot ${target}/tmp/vinstaller/ ${target}
@ -350,19 +353,19 @@ do_chroot() {
cp -rf $tmp_target ${target}/tmp/vinstaller/run
echo "USERNAME=$USERNAME" > ${target}/tmp/vinstaller/vars
echo "pass=$pass" >> ${target}/tmp/vinstaller/vars
echo "HOSTNAME=$HOSTNAME" >> ${target}/tmp/vinstaller/vars
echo "EFI=$EFI" >> ${target}/tmp/vinstaller/vars
echo "LANGUAGE=$LANGUAGE" >> ${target}/tmp/vinstaller/vars
echo "L1=$L1" >> ${target}/tmp/vinstaller/vars
echo "TARGET_PHY_ID=$TARGET_PHY_ID" >> ${target}/tmp/vinstaller/vars
echo "TARGET_PART=$TARGET_PART" >> ${target}/tmp/vinstaller/vars
echo "TARGETNAME_UNDERSCORE=$TARGETNAME_UNDERSCORE" >> ${target}/tmp/vinstaller/vars
echo "ENCRYPTION_STYLE=$ENCRYPTION_STYLE" >> ${target}/tmp/vinstaller/vars
echo "timezone=$timezone" >> ${target}/tmp/vinstaller/vars
echo "ENC=$ENC" >> ${target}/tmp/vinstaller/vars
echo "HIBERNATE=$HIBERNATE" >> ${target}/tmp/vinstaller/vars
echo "USERNAME=$USERNAME" > ${vars}
echo "pass=$pass" >> ${vars}
echo "HOSTNAME=$HOSTNAME" >> ${vars}
echo "EFI=$EFI" >> ${vars}
echo "LANGUAGE=$LANGUAGE" >> ${vars}
echo "L1=$L1" >> ${vars}
echo "TARGET_PHY_ID=$TARGET_PHY_ID" >> ${vars}
echo "TARGET_PART=$TARGET_PART" >> ${vars}
echo "TARGETNAME_UNDERSCORE=$TARGETNAME_UNDERSCORE" >> ${vars}
echo "ENCRYPTION_STYLE=$ENCRYPTION_STYLE" >> ${vars}
echo "timezone=$timezone" >> ${vars}
echo "ENC=$ENC" >> ${vars}
echo "HIBERNATE=$HIBERNATE" >> ${vars}
cat <<EOF > ${target}/tmp/vinstaller/main_chroot
#!/bin/bash
@ -373,6 +376,7 @@ cat <<EOF > ${target}/tmp/vinstaller/main_chroot
for file in \$(find /tmp/vinstaller/run -type f); do
. \$file
config
reset config
done
EOF
@ -398,6 +402,7 @@ use_efi
encryption_style
hibernation
user
lang
hostname
base
bootloader