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.

(cherry picked from commit 25fa306ed5)
This commit is contained in:
Lennart Poettering
2014-11-06 20:26:43 -05:00
committed by Zbigniew Jędrzejewski-Szmek
parent 4d4eff2436
commit 2203c07490
4 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -217,7 +217,8 @@
<literal>server</literal>,
<literal>tablet</literal>,
<literal>handset</literal>,
<literal>watch</literal>, as well as
<literal>watch</literal>,
<literal>embedded</literal> as well as
the special chassis types
<literal>vm</literal> and
<literal>container</literal> for
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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"
+2 -1
View File
@@ -138,7 +138,8 @@ static bool valid_chassis(const char *chassis) {
"server\0"
"tablet\0"
"handset\0"
"watch\0",
"watch\0"
"embedded\0",
chassis);
}