From 25fa306ed58b0b7fe30ca9be37c66a7b3b2de70e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 6 Nov 2014 14:37:12 +0100 Subject: [PATCH] hostnamed: introduce new "embedded" chassis type We really don't want to get lost in adding fridge, car, plane, drone, or whatever else, hence add a generic term "embedded" cover all the cases where the computer is just part of something bigger, and not at the focus of things. --- man/hostnamectl.xml | 3 ++- shell-completion/bash/hostnamectl | 2 +- shell-completion/zsh/_hostnamectl | 2 +- src/hostname/hostnamed.c | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml index 128d92f57..ffae5e6b0 100644 --- a/man/hostnamectl.xml +++ b/man/hostnamectl.xml @@ -217,7 +217,8 @@ server, tablet, handset, - watch, as well as + watch, + embedded as well as the special chassis types vm and container for diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl index a5e34600c..7a0850dbe 100644 --- a/shell-completion/bash/hostnamectl +++ b/shell-completion/bash/hostnamectl @@ -52,7 +52,7 @@ _hostnamectl() { if [[ -z $verb ]]; then comps=${VERBS[*]} elif __contains_word "$verb" ${VERBS[CHASSIS]}; then - comps='desktop laptop server tablet handset watch vm container' + comps='desktop laptop server tablet handset watch embedded vm container' elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then comps='' fi diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl index e02f6de30..a7217a199 100644 --- a/shell-completion/zsh/_hostnamectl +++ b/shell-completion/zsh/_hostnamectl @@ -18,7 +18,7 @@ _hostnamectl_set-icon-name() { _hostnamectl_set-chassis() { if (( CURRENT <= 3 )); then - _chassis=( desktop laptop server tablet handset watch vm container ) + _chassis=( desktop laptop server tablet handset watch embedded vm container ) _describe chassis _chassis else _message "no more options" diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index a449610bb..0123922c4 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -138,7 +138,8 @@ static bool valid_chassis(const char *chassis) { "server\0" "tablet\0" "handset\0" - "watch\0", + "watch\0" + "embedded\0", chassis); } -- 2.30.2