mirror of
https://github.com/rwinkhart/artix-install-script.git
synced 2026-09-01 22:47:23 -04:00
Pass variables from install.sh to chrootInstall.sh via an array, rather than writing values to disk
This commit is contained in:
+11
-11
@@ -1,17 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Importing Variables
|
# Importing Variables
|
||||||
formfactor="$(< /tempfiles/formfactor)"
|
formfactor=$1[1]
|
||||||
threadsminusone="$(< /tempfiles/threadsminusone)"
|
threadsminusone=$1[2]
|
||||||
gpu="$(< /tempfiles/gpu)"
|
gpu=$1[3]
|
||||||
intel_vaapi_driver="$(< /tempfiles/intel_vaapi_driver)"
|
intel_vaapi_driver=$1[4]
|
||||||
boot="$(< /tempfiles/boot)"
|
boot=$1[5]
|
||||||
disk="$(< /tempfiles/disk)"
|
disk=$1[6]
|
||||||
username="$(< /tempfiles/username)"
|
username=$1[7]
|
||||||
userpassword="$(< /tempfiles/userpassword)"
|
userpassword=$1[8]
|
||||||
rootpassword="$(< /tempfiles/rootpassword)"
|
rootpassword=$1[9]
|
||||||
timezone="$(< /tempfiles/timezone)"
|
timezone=$1[10]
|
||||||
swap="$(< /tempfiles/swap)"
|
swap=$1[11]
|
||||||
|
|
||||||
# configuring locale and clock Settings
|
# configuring locale and clock Settings
|
||||||
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
|
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
|
||||||
|
|||||||
+3
-14
@@ -174,21 +174,10 @@ for int in "${interfaces[@]}"; do
|
|||||||
echo "net.ipv6.conf.${int:15}.use_tempaddr = 2" >> /mnt/etc/sysctl.d/40-ipv6.conf
|
echo "net.ipv6.conf.${int:15}.use_tempaddr = 2" >> /mnt/etc/sysctl.d/40-ipv6.conf
|
||||||
done
|
done
|
||||||
|
|
||||||
# exporting variables
|
# create array of variables to pass to part 2
|
||||||
mkdir /mnt/tempfiles
|
var_export=($formfactor $threadsminusone $gpu $intel_vaapi_driver $boot $disk0 $username $userpassword $rootpassword $timezone $swap)
|
||||||
echo "$formfactor" > /mnt/tempfiles/formfactor
|
|
||||||
echo "$threadsminusone" > /mnt/tempfiles/threadsminusone
|
|
||||||
echo "$gpu" > /mnt/tempfiles/gpu
|
|
||||||
echo "$intel_vaapi_driver" > /mnt/tempfiles/intel_vaapi_driver
|
|
||||||
echo "$boot" > /mnt/tempfiles/boot
|
|
||||||
echo "$disk0" > /mnt/tempfiles/disk
|
|
||||||
echo "$username" > /mnt/tempfiles/username
|
|
||||||
echo "$userpassword" > /mnt/tempfiles/userpassword
|
|
||||||
echo "$rootpassword" > /mnt/tempfiles/rootpassword
|
|
||||||
echo "$timezone" > /mnt/tempfiles/timezone
|
|
||||||
echo "$swap" > /mnt/tempfiles/swap
|
|
||||||
|
|
||||||
# download and initiate part 2
|
# download and initiate part 2
|
||||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/chrootInstall.sh -o /mnt/chrootInstall.sh
|
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/chrootInstall.sh -o /mnt/chrootInstall.sh
|
||||||
chmod +x /mnt/chrootInstall.sh
|
chmod +x /mnt/chrootInstall.sh
|
||||||
artix-chroot /mnt /chrootInstall.sh
|
artix-chroot /mnt /chrootInstall.sh $var_export
|
||||||
|
|||||||
Reference in New Issue
Block a user