diff --git a/CHANGELOG.md b/CHANGELOG.md index cb3e69c..cb209c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +* bkctld: Replace xargs with a simple loop + ### Deprecated ### Removed diff --git a/bkctld b/bkctld index 353773b..864b4ed 100755 --- a/bkctld +++ b/bkctld @@ -76,7 +76,9 @@ case "${subcommand}" in "start" | "stop" | "reload" | "restart" | "sync" | "update" | "remove" | "firewall" | "upgrade-config") jail_name="${2:-}" if [ "${jail_name}" = "all" ]; then - "${LIBDIR}/bkctld-list" | xargs --no-run-if-empty --max-args=1 --max-procs=0 "${LIBDIR}/bkctld-${subcommand}" + for jail in $("${LIBDIR}/bkctld-list"); do + "${LIBDIR}/bkctld-${subcommand}" "${jail}" + done elif [ -z "${jail_name}" ]; then "${LIBDIR}/bkctld-help" exit 1 @@ -87,7 +89,9 @@ case "${subcommand}" in "status") jail_name="${2:-}" if [ "${jail_name}" = "all" ] || [ -z "${jail_name}" ]; then - "${LIBDIR}/bkctld-list" | xargs --no-run-if-empty --max-args=1 "${LIBDIR}/bkctld-${subcommand}" + for jail in $("${LIBDIR}/bkctld-list"); do + "${LIBDIR}/bkctld-${subcommand}" "${jail}" + done else "${LIBDIR}/bkctld-${subcommand}" "${jail_name}" fi