Actually, on further investigation, i've determined it's better to abuse TR
for this, changing the 'ports=' lines to include calls to tr to swap the
carriage returns for spaces.

ports="$(rpcinfo -p |awk "/tcp.*$service/"' { print $4 }' | uniq | tr '\n'
' ')"

it was complicated to debug, as restarting the first time after a failure
didn't trigger, but the second time does.

with these changes, i see the proper output in the syslog:
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Enabling RPC
service(s) portmapper status statd nfs mountd nlockmgr for net(s)
10.0.2.0/24
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding TCP
ports 111  for RPC service portmapper
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding UDP
ports 111  for RPC service portmapper
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding TCP
ports  for RPC service status
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding UDP
ports  for RPC service status
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding TCP
ports  for RPC service statd
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding UDP
ports  for RPC service statd
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding TCP
ports 2049  for RPC service nfs
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding UDP
ports 2049  for RPC service nfs
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding TCP
ports 34943 40573 40653  for RPC service mountd
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding UDP
ports 59663 50989 33098  for RPC service mountd
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding TCP
ports 45913  for RPC service nlockmgr
Apr 14 13:42:43 qemuhost arno-iptables-firewall[2260537]:   Adding UDP
ports 45674  for RPC service nlockmgr

and NFS is functional.

On Mon, Apr 13, 2020 at 9:21 PM Debian Bug Tracking System <
[email protected]> wrote:

> Thank you for the additional information you have supplied regarding
> this Bug report.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  Debian Security Tools <[email protected]>
>
> If you wish to submit further information on this problem, please
> send it to [email protected].
>
> Please do not send mail to [email protected] unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 956552: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956552
> Debian Bug Tracking System
> Contact [email protected] with problems
>

Reply via email to