diff --git a/README.md b/README.md index f7f6a9ce..cd72b4cb 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Available Commands: htop Interactive process viewer (requires htop). import Import a specified container. limits Apply resources limits to targeted container(s). See rctl(8). - list List containers (running and stopped). + list List containers (running). mount Mount a volume inside the targeted container(s). pkg Manipulate binary packages within targeted container(s). See pkg(8). rdr Redirect host port to container port. diff --git a/docs/chapters/usage.rst b/docs/chapters/usage.rst index fb6b9e55..9cad2220 100644 --- a/docs/chapters/usage.rst +++ b/docs/chapters/usage.rst @@ -26,7 +26,7 @@ Usage htop Interactive process viewer (requires htop). import Import a specified container. limits Apply resources limits to targeted container(s). See rctl(8). - list List containers (running and stopped). + list List containers (running). mount Mount a volume inside the targeted container(s). pkg Manipulate binary packages within targeted container(s). See pkg(8). rdr Redirect host port to container port. diff --git a/usr/local/bin/bastille b/usr/local/bin/bastille index a6f6967d..dd9cbb25 100755 --- a/usr/local/bin/bastille +++ b/usr/local/bin/bastille @@ -88,7 +88,7 @@ Available Commands: htop Interactive process viewer (requires htop). import Import a specified container. limits Apply resources limits to targeted container(s). See rctl(8). - list List containers (running and stopped). + list List containers (running). mount Mount a volume inside the targeted container(s). pkg Manipulate binary packages within targeted container(s). See pkg(8). rcp reverse cp(1) files from a single container to the host. diff --git a/usr/local/share/bastille/common.sh b/usr/local/share/bastille/common.sh index aef59e38..74c12e67 100644 --- a/usr/local/share/bastille/common.sh +++ b/usr/local/share/bastille/common.sh @@ -58,7 +58,7 @@ error_notify() { # Notify message on error and exit error_exit() { - error_notify $@ + error_notify "$@" exit 1 } diff --git a/usr/local/share/bastille/rdr.sh b/usr/local/share/bastille/rdr.sh index 9e3ebf7b..6bd7fbcd 100644 --- a/usr/local/share/bastille/rdr.sh +++ b/usr/local/share/bastille/rdr.sh @@ -183,21 +183,21 @@ while [ $# -gt 0 ]; do jail_port=$3 shift 3 if [ $# -gt 3 ]; then - for last in $@; do + for last in "$@"; do true done if [ $2 == "(" ] && [ $last == ")" ] ; then check_jail_validity - persist_rdr_log_rule $proto $host_port $jail_port $@ - load_rdr_log_rule $proto $host_port $jail_port $@ + persist_rdr_log_rule $proto $host_port $jail_port "$@" + load_rdr_log_rule $proto $host_port $jail_port "$@" shift $# else usage fi elif [ $# -eq 1 ]; then check_jail_validity - persist_rdr_log_rule $proto $host_port $jail_port $@ - load_rdr_log_rule $proto $host_port $jail_port $@ + persist_rdr_log_rule $proto $host_port $jail_port "$@" + load_rdr_log_rule $proto $host_port $jail_port "$@" shift 1 else usage diff --git a/usr/local/share/bastille/setup.sh b/usr/local/share/bastille/setup.sh index dce3230c..f6153e5b 100644 --- a/usr/local/share/bastille/setup.sh +++ b/usr/local/share/bastille/setup.sh @@ -123,6 +123,11 @@ configure_zfs() { else ## attempt to determine bastille_zroot from `zpool list` bastille_zroot=$(zpool list | grep -v NAME | awk '{print $1}') + if [ "$(echo "${bastille_zroot}" | wc -l)" -gt 1 ]; then + error_notify "Error: Multiple ZFS pools available:\n${bastille_zroot}" + error_notify "Set desired pool using \"sysrc -f ${bastille_config} bastille_zfs_zpool=ZPOOL_NAME\"" + error_exit "Don't forget to also enable ZFS using \"sysrc -f ${bastille_config} bastille_zfs_enable=YES\"" + fi sysrc -f "${bastille_config}" bastille_zfs_enable=YES sysrc -f "${bastille_config}" bastille_zfs_zpool="${bastille_zroot}" fi