mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 09:19:15 -04:00
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:
parent
0147d90a3b
commit
db2201b8f6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=118451
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue