Fix init btrfs check location, fix error msg spelling brtfs -> btrfs
This commit is contained in:
parent
7f0bb53cd2
commit
595be40c38
|
@ -16,7 +16,7 @@ create_inc_btrfs() {
|
||||||
|
|
||||||
btrfs_bin=$(command -v btrfs)
|
btrfs_bin=$(command -v btrfs)
|
||||||
if [ -z "${btrfs_bin}" ]; then
|
if [ -z "${btrfs_bin}" ]; then
|
||||||
error "btrfs not found. Please install brtfs-progs."
|
error "btrfs not found. Please install btrfs-progs."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if dry_run; then
|
if dry_run; then
|
||||||
|
|
|
@ -14,7 +14,7 @@ lock_target() {
|
||||||
target="${1:?}"
|
target="${1:?}"
|
||||||
btrfs_bin=$(command -v btrfs)
|
btrfs_bin=$(command -v btrfs)
|
||||||
if [ -z ${btrfs_bin} ]; then
|
if [ -z ${btrfs_bin} ]; then
|
||||||
error "btrfs not found. Please install brtfs-progs."
|
error "btrfs not found. Please install btrfs-progs."
|
||||||
fi
|
fi
|
||||||
if is_btrfs "${target}"; then
|
if is_btrfs "${target}"; then
|
||||||
${btrfs_bin} property set -ts "${target}" ro true
|
${btrfs_bin} property set -ts "${target}" ro true
|
||||||
|
|
|
@ -18,12 +18,11 @@ test -d "${jail_path}" && error "Skip jail \`${jail_name}' : it already exists"
|
||||||
# Create config and jails directory
|
# Create config and jails directory
|
||||||
mkdir --parents "${CONFDIR}" "${JAILDIR}"
|
mkdir --parents "${CONFDIR}" "${JAILDIR}"
|
||||||
|
|
||||||
|
if is_btrfs "$(dirname "${JAILDIR}")" || is_btrfs "${JAILDIR}"; then
|
||||||
btrfs_bin=$(command -v btrfs)
|
btrfs_bin=$(command -v btrfs)
|
||||||
if [ -z ${btrfs_bin} ]; then
|
if [ -z ${btrfs_bin} ]; then
|
||||||
error "btrfs not found. Please install brtfs-progs."
|
error "btrfs not found. Please install btrfs-progs."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if is_btrfs "$(dirname "${JAILDIR}")" || is_btrfs "${JAILDIR}"; then
|
|
||||||
${btrfs_bin} subvolume create "${jail_path}"
|
${btrfs_bin} subvolume create "${jail_path}"
|
||||||
else
|
else
|
||||||
mkdir --parents "${jail_path}"
|
mkdir --parents "${jail_path}"
|
||||||
|
|
|
@ -54,7 +54,7 @@ rm -rf "$(jail_config_dir "${jail_name}")"
|
||||||
|
|
||||||
btrfs_bin=$(command -v btrfs)
|
btrfs_bin=$(command -v btrfs)
|
||||||
if [ -z ${btrfs_bin} ]; then
|
if [ -z ${btrfs_bin} ]; then
|
||||||
error "btrfs not found. Please install brtfs-progs."
|
error "btrfs not found. Please install btrfs-progs."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if is_btrfs "${jail_path}"; then
|
if is_btrfs "${jail_path}"; then
|
||||||
|
|
|
@ -64,7 +64,7 @@ delete_inc_btrfs() {
|
||||||
btrfs_bin=$(command -v btrfs)
|
btrfs_bin=$(command -v btrfs)
|
||||||
|
|
||||||
if [ -z ${btrfs_bin} ]; then
|
if [ -z ${btrfs_bin} ]; then
|
||||||
error "btrfs not found. Please install brtfs-progs."
|
error "btrfs not found. Please install btrfs-progs."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if dry_run; then
|
if dry_run; then
|
||||||
|
|
Loading…
Reference in a new issue