remove cruft; moved to sbin
This commit is contained in:
31
usr/local/sbin/bbsd-pkg
Executable file
31
usr/local/sbin/bbsd-pkg
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# execute $2 inside targeted jail(s)
|
||||
|
||||
if [ $# -gt 2 ] || [ $# -lt 2 ]; then
|
||||
echo "Usage: bbsd-pkg [glob|ALL] 'package command'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = 'ALL' ]; then
|
||||
JAILS=$(jls -N | awk '!/JID/{print $1}')
|
||||
echo "Targeting all containers."
|
||||
echo
|
||||
for i in ${JAILS}; do
|
||||
echo "${i}:"
|
||||
pkg -j "${i}" "$2"
|
||||
echo
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$1" != 'ALL' ]; then
|
||||
JAILS=$(jls -N | awk '!/JID/{print $1}' | grep "$1")
|
||||
echo "Targeting specified containers."
|
||||
echo "${JAILS}"
|
||||
echo
|
||||
for i in ${JAILS}; do
|
||||
echo "${i}:"
|
||||
pkg -j "${i}" "$2"
|
||||
echo
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user