Skip to content

Commit

Permalink
try fix swapfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaechus committed May 4, 2024
1 parent ae8b86e commit e0cc7cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/iamchroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ sed -i '/%wheel ALL=(ALL) ALL/s/^#//g' /etc/sudoers

# Other stuff you should do
if [ "$MY_INIT" = "openrc" ]; then
sed -i '/rc_need="localmount"/s/^#//g' /etc/conf.d/swap
rc-update add connmand default
elif [ "$MY_INIT" = "dinit" ]; then
ln -s /etc/dinit.d/connmand /etc/dinit.d/boot.d/
fi

printf "\n/swap/swapfile\t\tswap\t\tswap\t\tsw\t0 0\n" >>/etc/fstab

# Configure mkinitcpio
[ "$MY_FS" = "btrfs" ] && sed -i 's/BINARIES=()/BINARIES=(\/usr\/bin\/btrfs)/g' /etc/mkinitcpio.conf
if [ "$ENCRYPTED" = "y" ]; then
Expand Down
2 changes: 2 additions & 0 deletions src/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ elif [ "$MY_FS" = "btrfs" ]; then
btrfs filesystem mkswapfile -s "$SWAP_SIZE"G /mnt/swap/swapfile
fi

swapon /mnt/swap/swapfile

mkdir /mnt/boot
mount "$PART1" /mnt/boot

Expand Down

0 comments on commit e0cc7cd

Please sign in to comment.