Make Swap subvol optional.
This commit is contained in:
parent
28d30d3700
commit
bbbb75a004
1 changed files with 8 additions and 4 deletions
|
@ -18,7 +18,6 @@ declare -rA SUBVOLS_DEFAULT=(
|
|||
["@spool"]="var/spool"
|
||||
["@tmp"]="var/tmp"
|
||||
["@www"]="var/www"
|
||||
["@swap"]="swap"
|
||||
["@snapshots"]=".snapshots"
|
||||
)
|
||||
|
||||
|
@ -92,6 +91,10 @@ function create_subvolumes() {
|
|||
subvols+=("@boot")
|
||||
fi
|
||||
|
||||
if [[ "$SWAP" ]]; then
|
||||
subvols+=("@swap")
|
||||
fi
|
||||
|
||||
subvols+=(${!SUBVOLS_DEFAULT[@]})
|
||||
|
||||
if [[ "$ENCRYPTION" ]]; then
|
||||
|
@ -105,7 +108,7 @@ function create_subvolumes() {
|
|||
${cmd} btrfs subvolume create /mnt/"$subvol"
|
||||
done
|
||||
|
||||
${cmd} mount /mnt
|
||||
${cmd} umount /mnt
|
||||
}
|
||||
|
||||
function get_hibernate_size() {
|
||||
|
@ -175,7 +178,7 @@ function expert_step() {
|
|||
exit 254
|
||||
fi
|
||||
|
||||
${cmd} apt install arch-install-scripts
|
||||
${cmd} apt install -y arch-install-scripts
|
||||
|
||||
if [[ "$DEBUG" ]]; then
|
||||
echo "genfstab -U /target >> /target/etc/genfstab"
|
||||
|
@ -192,7 +195,8 @@ function expert_step() {
|
|||
fi
|
||||
fi
|
||||
|
||||
if [[ -f /target/swap/hibernate.swp ]]; then
|
||||
#if [[ -f /target/swap/hibernate.swp ]]; then
|
||||
if [[ "$SWAP" ]]; then
|
||||
if [[ "$DEBUG" ]]; then
|
||||
echo "echo \"/swap/hibernate.swp none swap defaults 0 0\" >> /target/etc/fstab"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue