limits: Retain support for no action (will default to add)

This commit is contained in:
tschettervictor
2025-03-23 06:00:09 -06:00
committed by GitHub
parent 27beac434e
commit f5cdff4fc1

View File

@@ -86,6 +86,11 @@ TARGET="${1}"
ACTION="${2}"
shift 2
# Retain support for no action (will default to add)
if [ "${ACTION}" != "remove" ] && [ "${ACTION}" != "clear" ] && [ "${ACTION}" != "list" ] && [ "${ACTION}" != "show" ] && [ "${ACTION}" != "reset" ] && [ "${ACTION}" != "stats" ]; then
ACTION="add"
fi
RACCT_ENABLE="$(sysctl -n kern.racct.enable)"
if [ "${RACCT_ENABLE}" != '1' ]; then
error_exit "Racct not enabled. Append 'kern.racct.enable=1' to /boot/loader.conf and reboot"
@@ -181,5 +186,4 @@ for _jail in ${JAILS}; do
fi
;;
esac
done