mirror of
https://github.com/hackacad/bastille.git
synced 2026-05-19 21:55:25 +02:00
shellcheck: export, mount. Logic syntax
This commit is contained in:
@@ -209,7 +209,7 @@ if [ "${COMP_OPTION}" -gt "1" ]; then
|
||||
error_exit "Error: Only one compression format can be used during export."
|
||||
fi
|
||||
|
||||
if [ -n "${TXZ_EXPORT}" ] || [ -n "${TGZ_EXPORT}" ] && [ -n "${SAFE_EXPORT}" ]; then
|
||||
if { [ -n "${TXZ_EXPORT}" ] || [ -n "${TGZ_EXPORT}" ]; } && [ -n "${SAFE_EXPORT}" ]; then
|
||||
error_exit "Error: Simple archive modes with safe ZFS export can't be used together."
|
||||
fi
|
||||
|
||||
|
||||
@@ -69,11 +69,11 @@ fi
|
||||
|
||||
# if host path doesn't exist, type is not "nullfs" or are using advanced mount type "tmpfs,linprocfs,linsysfs, fdescfs,
|
||||
# procfs"
|
||||
if [ "${_hostpath}" = "tmpfs" ] && [ "$_type" = "tmpfs" ] ||
|
||||
[ "${_hostpath}" = "linprocfs" ] && [ "${_type}" = "linprocfs" ] ||
|
||||
[ "${_hostpath}" = "linsysfs" ] && [ "${_type}" = "linsysfs" ] ||
|
||||
[ "${_hostpath}" = "proc" ] && [ "${_type}" = "procfs" ] ||
|
||||
[ "${_hostpath}" = "fdesc" ] && [ "${_type}" = "fdescfs" ]; then
|
||||
if { [ "${_hostpath}" = "tmpfs" ] && [ "$_type" = "tmpfs" ]; } ||
|
||||
{ [ "${_hostpath}" = "linprocfs" ] && [ "${_type}" = "linprocfs" ]; } ||
|
||||
{ [ "${_hostpath}" = "linsysfs" ] && [ "${_type}" = "linsysfs" ]; } ||
|
||||
{ [ "${_hostpath}" = "proc" ] && [ "${_type}" = "procfs" ]; } ||
|
||||
{ [ "${_hostpath}" = "fdesc" ] && [ "${_type}" = "fdescfs" ]; } then
|
||||
warn "Detected advanced mount type ${_hostpath}"
|
||||
elif [ ! -d "${_hostpath}" ] || [ "${_type}" != "nullfs" ]; then
|
||||
error_notify "Detected invalid host path or incorrect mount type in FSTAB."
|
||||
|
||||
Reference in New Issue
Block a user