opensuse: 修复没有创建 swapfile 时 swapoff 报错

This commit is contained in:
bin456789 2025-02-09 00:10:14 +08:00
parent 2bd63ac7ea
commit d9e2231a50
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -3030,7 +3030,9 @@ EOF
fi
restore_resolv_conf $os_dir
swapoff $os_dir/swapfile
# 删除 swap
swapoff -a
rm -f $os_dir/swapfile
fi