17 lines
333 B
Bash
Executable file
17 lines
333 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test -f /swap/swapfile && exit 0
|
|
|
|
set -xe
|
|
|
|
truncate -s 0 /swap/swapfile
|
|
|
|
chattr +C /swap/swapfile
|
|
btrfs property set /swap/swapfile compression none
|
|
|
|
dd if=/dev/zero of=/swap/swapfile bs=100M count=100 status=progress
|
|
|
|
chmod 600 /swap/swapfile
|
|
mkswap /swap/swapfile
|
|
swapon /swap/swapfile
|
|
dotfiles/scripts/_create-swapfile
|