fs_make_btrfs_swap
This commit is contained in:
parent
7611ee6103
commit
4590c5cda6
1 changed files with 18 additions and 0 deletions
18
bash/fs.sh
18
bash/fs.sh
|
@ -18,6 +18,24 @@ fs_make_btrfs() {
|
|||
fi
|
||||
}
|
||||
|
||||
fs_make_btrfs_swap() {
|
||||
local path="${1}"
|
||||
local size="${2}"
|
||||
local uuid="${3}"
|
||||
if [ -n "${path}" ]; then
|
||||
set filesystem mkswapfile
|
||||
if [ -n "${size}" ]; then
|
||||
set -- "${@}" \
|
||||
--size "${size}"
|
||||
fi
|
||||
if [ -n "${uuid}" ]; then
|
||||
set -- "${@}" \
|
||||
--uuid "${uuid}"
|
||||
fi
|
||||
btrfs "${@}" "${path}"
|
||||
fi
|
||||
}
|
||||
|
||||
fs_make_fat() {
|
||||
local device="${1}"
|
||||
local name="${2}"
|
||||
|
|
Loading…
Reference in a new issue