mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
remove existing swap file
This commit is contained in:
parent
fabb98183d
commit
2681aab191
1 changed files with 2 additions and 0 deletions
|
@ -455,6 +455,8 @@ _mkfs() {
|
|||
if echo "${1}" | grep -q '^/dev'; then
|
||||
mkswap -L "${6}" "${1}" &>"${_LOG}" || : >/tmp/.mp-error
|
||||
else
|
||||
# remove existing swap file
|
||||
[[ -f "${3}${1}" ]] && rm "${3}${1}"
|
||||
mkswap "${7}" -U clear -L "${6}" -F "${3}${1}" &>"${_LOG}" || : >/tmp/.mp-error
|
||||
# btrfs needs NO_COW attribute
|
||||
chattr +C "${3}${1}" &>"${_LOG}"
|
||||
|
|
Loading…
Reference in a new issue