Skip to content

Commit

Permalink
mount: Add debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tschettervictor authored Jan 21, 2025
1 parent f994df3 commit 0bf87b1
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions usr/local/share/bastille/mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,34 @@
. /usr/local/etc/bastille/bastille.conf

usage() {
error_exit "Usage: bastille mount TARGET HOST_PATH JAIL_PATH [filesystem_type options dump pass_number]"
error_notify "Usage: bastille mount TARGET HOST_PATH JAIL_PATH [filesystem_type options dump pass_number]"
cat << EOF
Options:
-x | --debug Enable debug mode.
EOF
exit 1
}

# Handle special-case commands first.
case "${1}" in
help|-h|--help)
usage
;;
esac
# Handle options.
while [ "$#" -gt 0 ]; do
case "${1}" in
-h|--help|help)
usage
;;
-x|--debug)
enable_debug
shift
;;
-*)
error_exit "Unknown Option: \"${1}\""
;;
*)
break
;;
esac
done

if [ "$#" -lt 3 ] || [ "$#" -gt 7 ]; then
usage
Expand Down

0 comments on commit 0bf87b1

Please sign in to comment.