Compare commits
15 Commits
023c12cb8e
...
modularize
| Author | SHA1 | Date | |
|---|---|---|---|
|
2ebb72620b
|
|||
|
25afed7541
|
|||
|
b8b5918feb
|
|||
|
fd177fa071
|
|||
|
aaa209a056
|
|||
|
38dc3ab73a
|
|||
|
3c8719450d
|
|||
|
e8c745a307
|
|||
|
00324dfb5d
|
|||
|
e03ff714a7
|
|||
|
6e1670ac6a
|
|||
|
3e233de780
|
|||
|
b57734ddbb
|
|||
|
e78d63fee7
|
|||
|
ee2967c522
|
@@ -35,6 +35,7 @@ fi
|
||||
|
||||
if [[ "${1}" == '--mmdebstrap' ]]; then
|
||||
packages=(\
|
||||
ca-certificates \
|
||||
console-setup \
|
||||
cryptsetup \
|
||||
curl \
|
||||
@@ -53,6 +54,7 @@ openssh-{client,server} \
|
||||
popularity-contest \
|
||||
printer-driver-all \
|
||||
rsync \
|
||||
sudo \
|
||||
systemd-timesyncd \
|
||||
tasksel \
|
||||
zfs-initramfs \
|
||||
|
||||
2
menu.sh
2
menu.sh
@@ -26,7 +26,7 @@ while [[ ! "${option}" == 'Exit' ]]; do
|
||||
#################
|
||||
|
||||
EOF
|
||||
select option in 'List' 'Configure' 'Pre Install' 'Install' 'WiFi Setup' 'Post Install' 'Finalize' 'Exit'
|
||||
select option in 'List' 'Configure' 'Install' 'Finalize' 'WiFi Setup' 'Exit'
|
||||
do
|
||||
case "${option}" in
|
||||
'List'|'Configure'|'Install'|'Finalize'|'WiFi Setup'|'Exit')
|
||||
|
||||
28
mount.sh
Executable file
28
mount.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
mount \
|
||||
--types proc \
|
||||
proc \
|
||||
/mnt/proc
|
||||
|
||||
mount \
|
||||
--types sysfs \
|
||||
sys \
|
||||
/mnt/sys
|
||||
|
||||
mount \
|
||||
--bind \
|
||||
/dev \
|
||||
/mnt/dev
|
||||
|
||||
mount \
|
||||
--types devpts \
|
||||
pts \
|
||||
/mnt/dev/pts
|
||||
|
||||
mount \
|
||||
--types efivarfs \
|
||||
efivarfs \
|
||||
/mnt/sys/firmware/efi/efivars
|
||||
@@ -46,8 +46,8 @@ if [[ "${1}" == '--disk' ]]; then
|
||||
if [[ "${enableSwap}" == "yes" ]]; then
|
||||
swapSize="$(((($(vmstat -sS M | grep 'total memory' | sed 's/ M total memory//') / 1024) + 1) * 2))"
|
||||
|
||||
if [[ "${swapSize#}" -gt '32' ]]; then
|
||||
swapSize='32'
|
||||
if [[ "${swapSize#}" -gt '16' ]]; then
|
||||
swapSize='16'
|
||||
fi
|
||||
|
||||
sgdisk \
|
||||
@@ -62,7 +62,9 @@ if [[ "${1}" == '--disk' ]]; then
|
||||
-t3:BF00 \
|
||||
-c3:${ID} \
|
||||
${disk}
|
||||
elif [[ "${1}" == '--efi' ]]; then
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--efi' ]]; then
|
||||
if [[ ! "${disk}" == **/dev/disk/by-id/** ]]; then
|
||||
if [[ "${disk}" == **/dev/nvme** ]]; then
|
||||
part1='p1'
|
||||
|
||||
@@ -84,7 +84,7 @@ elif [[ "${ID}" == 'debian' ]]; then
|
||||
"${baseDir}/debian.sh" --sources
|
||||
fi
|
||||
|
||||
"${baseDir}/rbind.sh"
|
||||
"${baseDir}/mount.sh"
|
||||
|
||||
"${baseDir}/host-id.sh"
|
||||
|
||||
|
||||
4
wifi.sh
4
wifi.sh
@@ -35,9 +35,9 @@ nmcli radio wifi on
|
||||
nmcli device wifi list
|
||||
|
||||
printf "Enter the SSID of the WiFi network you wish to connect to:\n"
|
||||
read -r WIFI_NAME
|
||||
read -r wifiName
|
||||
|
||||
nmcli --ask device wifi connect ${wifiName}
|
||||
nmcli --ask device wifi connect "${wifiName}"
|
||||
|
||||
cat << EOF
|
||||
|
||||
|
||||
16
zfs.sh
16
zfs.sh
@@ -30,14 +30,14 @@ if [[ "${1}" == '--format' ]]; then
|
||||
|
||||
while [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]] || [[ -z "${zpoolPassword}" ]] || [[ "${#zpoolPassword}" -lt '8' ]]; do
|
||||
printf \
|
||||
"\nEnter a password to encrypt your root pool (minimum 8 characters):\n"
|
||||
"Enter a password to encrypt your root pool (minimum 8 characters):\n"
|
||||
read \
|
||||
-r \
|
||||
-s \
|
||||
zpoolPassword
|
||||
|
||||
printf \
|
||||
"\nVerify the password to encrypt your root pool:\n"
|
||||
"Verify the password to encrypt your root pool:\n"
|
||||
read \
|
||||
-r \
|
||||
-s \
|
||||
@@ -45,13 +45,13 @@ if [[ "${1}" == '--format' ]]; then
|
||||
|
||||
if [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]]; then
|
||||
printf \
|
||||
"ERROR:\tPasswords do not match!\n"
|
||||
"ERROR:\tPasswords do not match!\n\n"
|
||||
elif [[ -z "${zpoolPassword}" ]]; then
|
||||
printf \
|
||||
"ERROR:\tPassword is empty!\n"
|
||||
"ERROR:\tPassword is empty!\n\n"
|
||||
elif [[ "${#zpoolPassword}" -lt '8' ]]; then
|
||||
printf \
|
||||
"ERROR:\tPassword is too short!\n"
|
||||
"ERROR:\tPassword is too short!\n\n"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -222,17 +222,13 @@ if [[ "${1}" == '--key' ]]; then
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--unmount' ]]; then
|
||||
mount | grep -v zfs | tac | awk '/\/mnt/ {print $3}' | xargs -I {} umount -Rlf {}
|
||||
|
||||
if [[ "${ID}" == 'fedora' ]]; then
|
||||
umount \
|
||||
-nR \
|
||||
/mnt
|
||||
fi
|
||||
|
||||
zpool \
|
||||
export \
|
||||
-a
|
||||
${hostname,,}
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--host-id' ]]; then
|
||||
|
||||
Reference in New Issue
Block a user