From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: network@lists.ipfire.org Subject: Re: [PATCH 3/8] zone: config list print also hids Date: Tue, 25 Jul 2017 23:28:18 +0100 Message-ID: <1501021698.20312.34.camel@ipfire.org> In-Reply-To: <1500998833-10543-4-git-send-email-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2074548966966853216==" List-Id: --===============2074548966966853216== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit This looks good. It might be better to print just "-" if there is no HID, but that only makes parsing this output easier which nobody should be doing any ways... -Michael On Tue, 2017-07-25 at 18:07 +0200, Jonatan Schlag wrote: > Signed-off-by: Jonatan Schlag > --- >  src/functions/functions.zone | 9 +++++---- >  1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/src/functions/functions.zone b/src/functions/functions.zone > index 091bcd6..17d0858 100644 > --- a/src/functions/functions.zone > +++ b/src/functions/functions.zone > @@ -634,21 +634,22 @@ zone_config_list() { >   assert isset zone >   >   # Print a nice header > - local format="%-3s %-20s" > - print "${format}" "ID" "HOOK" > + local format="%-3s %-20s %-20s" > + print "${format}" "ID" "HOOK" "HID" >   >   local config >   local hook >   local id > + local hid >   >   # Print for all config: >   # id and hook > - # TODO: Add hids here >   for config in $(zone_configs_list "${zone}"); do >   id=${config##*.} >   hook=$(zone_config_get_hook "${zone}" "${config}") > + hid=$(zone_config_get_hid "${zone}" "${config}") >   assert isset hook > - print "${format}" "${id}" "${hook}" > + print "${format}" "${id}" "${hook}" "${hid}" >   done >  } >   --===============2074548966966853216== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIKCmlRSWNCQUFC Q2dBR0JRSlpkOFlDQUFvSkVJQjU4UDl2a0FrSDI4WVFBTFBjaG9xRDZDcXM1alNUU0NaUnJ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