Fix init btrfs check location, fix error msg spelling brtfs -> btrfs

This commit is contained in:
William Hirigoyen (Evolix) 2022-03-09 16:16:35 +01:00
parent 7f0bb53cd2
commit 595be40c38
5 changed files with 8 additions and 9 deletions

View File

@ -16,7 +16,7 @@ create_inc_btrfs() {
btrfs_bin=$(command -v btrfs)
if [ -z "${btrfs_bin}" ]; then
error "btrfs not found. Please install brtfs-progs."
error "btrfs not found. Please install btrfs-progs."
fi
if dry_run; then

View File

@ -14,7 +14,7 @@ lock_target() {
target="${1:?}"
btrfs_bin=$(command -v btrfs)
if [ -z ${btrfs_bin} ]; then
error "btrfs not found. Please install brtfs-progs."
error "btrfs not found. Please install btrfs-progs."
fi
if is_btrfs "${target}"; then
${btrfs_bin} property set -ts "${target}" ro true

View File

@ -18,12 +18,11 @@ test -d "${jail_path}" && error "Skip jail \`${jail_name}' : it already exists"
# Create config and jails directory
mkdir --parents "${CONFDIR}" "${JAILDIR}"
btrfs_bin=$(command -v btrfs)
if [ -z ${btrfs_bin} ]; then
error "btrfs not found. Please install brtfs-progs."
fi
if is_btrfs "$(dirname "${JAILDIR}")" || is_btrfs "${JAILDIR}"; then
btrfs_bin=$(command -v btrfs)
if [ -z ${btrfs_bin} ]; then
error "btrfs not found. Please install btrfs-progs."
fi
${btrfs_bin} subvolume create "${jail_path}"
else
mkdir --parents "${jail_path}"

View File

@ -54,7 +54,7 @@ rm -rf "$(jail_config_dir "${jail_name}")"
btrfs_bin=$(command -v btrfs)
if [ -z ${btrfs_bin} ]; then
error "btrfs not found. Please install brtfs-progs."
error "btrfs not found. Please install btrfs-progs."
fi
if is_btrfs "${jail_path}"; then

View File

@ -64,7 +64,7 @@ delete_inc_btrfs() {
btrfs_bin=$(command -v btrfs)
if [ -z ${btrfs_bin} ]; then
error "btrfs not found. Please install brtfs-progs."
error "btrfs not found. Please install btrfs-progs."
fi
if dry_run; then