polish
This commit is contained in:
parent
f5b68b8441
commit
a6e57f95b4
14
install.sh
14
install.sh
@ -2,34 +2,34 @@
|
||||
|
||||
source install.conf
|
||||
|
||||
|
||||
# make command silent
|
||||
s() {
|
||||
$* >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# check for internet
|
||||
|
||||
echo "checking internet connection"
|
||||
s ping -c1 archlinux.org
|
||||
if [[ "$?" -ne 0 ]]; then
|
||||
echo "internet connection needed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# determine efi or bios boot mode
|
||||
echo "determining boot mode"
|
||||
if [[ ! "$boot_mode" ]]; then
|
||||
s ls /sys/firmware/efi/efivars
|
||||
if [[ "$?" -eq 0 ]]; then
|
||||
echo "selected efi boot mode"
|
||||
boot_mode='efi'
|
||||
else
|
||||
echo "selected bios boot mode"
|
||||
boot_mode='bios'
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "update system clock"
|
||||
echo "updating system clock"
|
||||
s timedatectl set-ntp true
|
||||
|
||||
echo "create partitions"
|
||||
echo "creating partitions"
|
||||
s wipefs -af "$storage_device"
|
||||
if [[ "$boot_mode" == "efi" ]]; then
|
||||
sgdisk -n "1:2048:+1G" -t "1:EF00" "$storage_device"
|
||||
@ -37,8 +37,6 @@ else
|
||||
sgdisk -n "1:2048:+1G" -t "1:EF02" "$storage_device"
|
||||
fi
|
||||
sgdisk -n "2:0:0" -t "2:8309" "$storage_device"
|
||||
|
||||
echo "creating luks partition"
|
||||
echo "$encryption_password" | cryptsetup -q luksFormat --type luks1 "${storage_device}2"
|
||||
echo "$encryption_password" | cryptsetup -q open "${storage_device}2" lvm
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user