add compatibility with swapfile directory (for btrfs)
This commit is contained in:
parent
e89ae1a694
commit
f511cc73ab
2 changed files with 19 additions and 6 deletions
|
@ -1,6 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Deletes the swapfile created by mkswp()
|
||||
sudo swapoff -v /swapfile
|
||||
sudo rm /swapfile
|
||||
|
||||
if [ -d /swap ]; then
|
||||
SWAPFILE=/swap/swapfile
|
||||
else
|
||||
SWAPFILE=/swapfile
|
||||
fi
|
||||
|
||||
sudo swapoff -v "$SWAPFILE"
|
||||
sudo rm "$SWAPFILE"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue