[systemd-devel] [PATCH 1/4] Add ENVIRONMENT to hostnamectl

"Jóhann B. Guðmundsson" johannbg at gmail.com
Tue Jul 8 06:16:43 PDT 2014


On 07/08/2014 11:40 AM, Lennart Poettering wrote:
> On Tue, 08.07.14 02:55, Kay Sievers (kay at vrfy.org) wrote:
>
>> On Tue, Jul 8, 2014 at 2:38 AM, Jóhann B. Guðmundsson
>> <johannbg at gmail.com> wrote:
>>> ---
>>>   src/hostname/hostnamectl.c | 20 +++++++++++++++++---
>>>   1 file changed, 17 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c
>>> index 267cd74..e164086 100644
>>> --- a/src/hostname/hostnamectl.c
>>> +++ b/src/hostname/hostnamectl.c
>>> @@ -67,6 +67,7 @@ typedef struct StatusInfo {
>>>           char *pretty_hostname;
>>>           char *icon_name;
>>>           char *chassis;
>>> +        char *environment;
>>>           char *kernel_name;
>>>           char *kernel_release;
>>>           char *os_pretty_name;
>>> @@ -92,9 +93,11 @@ static void print_status_info(StatusInfo *i) {
>>>                   printf("Transient hostname: %s\n", i->hostname);
>>>
>>>           printf("         Icon name: %s\n"
>>> -               "           Chassis: %s\n",
>>> +               "           Chassis: %s\n"
>>> +               "           Environment: %s\n",
>> Shouldn't we possibly we find a word for "environment" which explains
>> itself a bit better? Environment we usually call the numerous
>> variables of a process or service.
> Yeah, I don't really like "environment" as name for this either. This is
> already used quite commonly in the environment variable sense, we
> shouldn't redefine this in this comment.

I hardly call this redefinition but OK

>
> I'd go for something generic like "description" or "comment" or so. Or
> maybe "purpose". I think simply "description" appears to be the best
> option for me.

This is very specific to deployment environment and to solve a very 
specific long standing problem ( describe the operating environment ) so 
the options can only be development,staging,production or if people see 
the need to extend it further, it could include as well integration and 
testing so an "description" ( which is even more generic than 
environment) is a no go.

I think personally that "atmosphere" is the best synonym for 
"environment" and should be used here since people are insisting using 
something else then environment and are under the assumption that 
administrators, developers and end users in in general will be confused 
by this .

In the long run I think we should be working on an machine information 
specificationand amongst other thing redefine "Computer Chassis" as 
"System Enclosure" or even just drop it altogethersince it's usefulness 
is limited to application which might behave differently based on the 
"System Enclosure" type it's running on

For example M$ has 24 definition for "chassis" [1] while we have 5 ( 
vm,container,desktop,laptop,handset,server ) which we arguably could 
simply reduce to 3 vm,container,hardware provided information ( limited 
to the 29 bios standard only [2] ).

Anyway as I said in the long run I think we should be working on an 
machine information specification

1. http://technet.microsoft.com/en-us/library/ee156537.aspx
2. 
http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.8.0.pdf


More information about the systemd-devel mailing list