Remove debug lock and code cleanup
This commit is contained in:
parent
bbbb75a004
commit
ce6717fc00
1 changed files with 0 additions and 17 deletions
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#SUBVOLS_DEFAULT=("@home" "@root" "@srv" "@opt" "@local" "@cache" "@containers" "@libvirt" \
|
|
||||||
# "@machines" "@portables" "@log" "@spool" "@tmp" "@www" "@swap" "@snapshots")
|
|
||||||
|
|
||||||
declare -rA SUBVOLS_DEFAULT=(
|
declare -rA SUBVOLS_DEFAULT=(
|
||||||
["@home"]="home"
|
["@home"]="home"
|
||||||
["@root"]="root"
|
["@root"]="root"
|
||||||
|
@ -42,8 +39,6 @@ function create_luks() {
|
||||||
local cmd="echo"
|
local cmd="echo"
|
||||||
else
|
else
|
||||||
local cmd=""
|
local cmd=""
|
||||||
echo "WARNING: Not in Debug mode, exiting now"
|
|
||||||
exit 254
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${cmd} cryptsetup --cipher aes-xts-plain64 --hash sha512 --use-random --verify-passphrase luksFormat "$RootPart"
|
${cmd} cryptsetup --cipher aes-xts-plain64 --hash sha512 --use-random --verify-passphrase luksFormat "$RootPart"
|
||||||
|
@ -55,8 +50,6 @@ function prepare_format() {
|
||||||
local cmd="echo"
|
local cmd="echo"
|
||||||
else
|
else
|
||||||
local cmd=""
|
local cmd=""
|
||||||
echo "WARNING: Not in Debug mode, exiting now"
|
|
||||||
exit 254
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Formatting EFI: $EFIPart"
|
echo "Formatting EFI: $EFIPart"
|
||||||
|
@ -83,8 +76,6 @@ function create_subvolumes() {
|
||||||
local cmd="echo"
|
local cmd="echo"
|
||||||
else
|
else
|
||||||
local cmd=""
|
local cmd=""
|
||||||
echo "WARNING: Not in Debug mode, exiting now"
|
|
||||||
exit 254
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$BootPart" == "@boot" ]]; then
|
if [[ "$BootPart" == "@boot" ]]; then
|
||||||
|
@ -123,8 +114,6 @@ function prepare_target() {
|
||||||
local cmd="echo"
|
local cmd="echo"
|
||||||
else
|
else
|
||||||
local cmd=""
|
local cmd=""
|
||||||
echo "WARNING: Not in Debug mode, exiting now"
|
|
||||||
exit 254
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${cmd} mkdir /target
|
${cmd} mkdir /target
|
||||||
|
@ -141,9 +130,6 @@ function prepare_target() {
|
||||||
do
|
do
|
||||||
${cmd} mkdir -p /target/"${SUBVOLS_DEFAULT[$subvol]}"
|
${cmd} mkdir -p /target/"${SUBVOLS_DEFAULT[$subvol]}"
|
||||||
done
|
done
|
||||||
#${cmd} mkdir -p /target/{boot,home,root,srv,opt,.snapshots,usr/local}
|
|
||||||
#${cmd} mkdir -p /target/{var/lib/containers,var/lib/libvirt/images,var/lib/machines,var/lib/portables}
|
|
||||||
#${cmd} mkdir -p /target/{var/cache,var/log,var/spool,var/tmp,var/www}
|
|
||||||
|
|
||||||
if [[ "$BootPart" == "@boot" ]]; then
|
if [[ "$BootPart" == "@boot" ]]; then
|
||||||
${cmd} mount -o noatime,space_cache=v2,ssd,subvol=@boot "$rootmount" /target/boot
|
${cmd} mount -o noatime,space_cache=v2,ssd,subvol=@boot "$rootmount" /target/boot
|
||||||
|
@ -174,8 +160,6 @@ function expert_step() {
|
||||||
local cmd="echo"
|
local cmd="echo"
|
||||||
else
|
else
|
||||||
local cmd=""
|
local cmd=""
|
||||||
echo "WARNING: Not in Debug mode, exiting now"
|
|
||||||
exit 254
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${cmd} apt install -y arch-install-scripts
|
${cmd} apt install -y arch-install-scripts
|
||||||
|
@ -195,7 +179,6 @@ function expert_step() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#if [[ -f /target/swap/hibernate.swp ]]; then
|
|
||||||
if [[ "$SWAP" ]]; then
|
if [[ "$SWAP" ]]; then
|
||||||
if [[ "$DEBUG" ]]; then
|
if [[ "$DEBUG" ]]; then
|
||||||
echo "echo \"/swap/hibernate.swp none swap defaults 0 0\" >> /target/etc/fstab"
|
echo "echo \"/swap/hibernate.swp none swap defaults 0 0\" >> /target/etc/fstab"
|
||||||
|
|
Loading…
Reference in a new issue