Support ${client_user} and ${sudo_cmd} for running commands as root on

machines where we first connect to a non-root user and then increase
privileges.

Approved by:	portmgr (self)
This commit is contained in:
Kris Kennaway 2004-09-26 22:37:22 +00:00
parent 0147d90a3b
commit db2201b8f6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=118451

View file

@ -14,10 +14,14 @@ doarch() {
machines=$(awk '{print $1}' ${pb}/${arch}/mlist)
for i in ${machines}; do
. ${pb}/${arch}/portbuild.conf
if [ -f "${pb}/${arch}/portbuild.${i}" ]; then
. ${pb}/${arch}/portbuild.${i}
fi
if [ ${quiet} -eq 0 ]; then
echo "[$i]"
fi
su ports-${arch} -c "ssh root@$i $@"
su ports-${arch} -c "ssh ${client_user}@$i ${sudo_cmd} $@"
done
}