1) Write small compatibility shell scripts that invoke 'hostname' with
   the right parameters.  For example, the 'dnsdomainname' script would
   invoke 'hostname -d'.

This would cause problems if you do --disable-hostname
--enable-dnsdomainname; and where the system hostname does not provide
the -d flag for whatever reason or prints the results in a non IU
fashion.

   2) Extend the 'hostname' tool to allow that argv[0] influence its mode
   of operation.  This is how Net-Tools work today, they have only one
   program but it is hardlinked to all these names.  Letting argv[0]
   influence mode of operation is a bit ugly, but there are some precedent
   for it even in well-maintained projects like CoreUtils.

I'm quite sure coreutils doesn't depend on the value of argv[0]; it is
also discouraged in the GCS.

   3) Install separate tools that implement the operation.  This would
   result in better documentation, better --help output, etc.  Technically
   the tools could share most of the code and simply use some #define and
   #include's for the gist of the operations.

This is my favourite one; this would be very similar to true/false in
coreutils.  But requires the most work.

Reply via email to