mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-03 20:21:33 +00:00
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:
committed by
Zbigniew Jędrzejewski-Szmek
parent
4d4eff2436
commit
2203c07490
+2
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -138,7 +138,8 @@ static bool valid_chassis(const char *chassis) {
|
||||
"server\0"
|
||||
"tablet\0"
|
||||
"handset\0"
|
||||
"watch\0",
|
||||
"watch\0"
|
||||
"embedded\0",
|
||||
chassis);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user