hostname: add 'convertible' chassis type

Add the 'convertible' type to the set of allowed chassis. This applies
to all devices that can be transformed by the user from laptop style to
tablet style.

This does not add any auto-detection, yet. It only makes 'set-chassis'
accept 'convertible' as valid input.
This commit is contained in:
David Herrmann 2017-02-28 11:54:52 +01:00
parent caf49b95b3
commit 34b52450c5
5 changed files with 5 additions and 2 deletions

View File

@ -173,6 +173,7 @@
defined:
<literal>desktop</literal>,
<literal>laptop</literal>,
<literal>convertible</literal>,
<literal>server</literal>,
<literal>tablet</literal>,
<literal>handset</literal>,

View File

@ -120,6 +120,7 @@
chassis types are defined:
<literal>desktop</literal>,
<literal>laptop</literal>,
<literal>convertible</literal>,
<literal>server</literal>,
<literal>tablet</literal>,
<literal>handset</literal>,

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 embedded vm container'
comps='desktop laptop convertible server tablet handset watch embedded vm container'
elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then
comps=''
fi

View File

@ -18,7 +18,7 @@ _hostnamectl_set-icon-name() {
_hostnamectl_set-chassis() {
if (( CURRENT <= 3 )); then
_chassis=( desktop laptop server tablet handset watch embedded vm container )
_chassis=( desktop laptop convertible server tablet handset watch embedded vm container )
_describe chassis _chassis
else
_message "no more options"

View File

@ -133,6 +133,7 @@ static bool valid_chassis(const char *chassis) {
"container\0"
"desktop\0"
"laptop\0"
"convertible\0"
"server\0"
"tablet\0"
"handset\0"