mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-06 04:34:19 +01:00
[WIP] shellcheck linting
This commit is contained in:
@@ -45,8 +45,10 @@ esac
|
||||
if [ $# -lt 2 ]; then
|
||||
usage
|
||||
elif [ $# -eq 2 ]; then
|
||||
# shellcheck disable=SC2124
|
||||
_fstab="$@ nullfs ro 0 0"
|
||||
else
|
||||
# shellcheck disable=SC2124
|
||||
_fstab="$@"
|
||||
fi
|
||||
|
||||
@@ -67,8 +69,13 @@ if [ -z "${_hostpath}" ] || [ -z "${_jailpath}" ] || [ -z "${_type}" ] || [ -z "
|
||||
exit 1
|
||||
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" -a "$_type" == "tmpfs" ] || [ "${_hostpath}" == "linprocfs" -a "${_type}" == "linprocfs" ] || [ "${_hostpath}" == "linsysfs" -a "${_type}" == "linsysfs" ] || [ "${_hostpath}" == "proc" -a "${_type}" == "procfs" ] || [ "${_hostpath}" == "fdesc" -a "${_type}" == "fdescfs" ] ; then
|
||||
# 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
|
||||
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