mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-08 21:17:47 +03:00
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:
parent
caf49b95b3
commit
34b52450c5
@ -173,6 +173,7 @@
|
||||
defined:
|
||||
<literal>desktop</literal>,
|
||||
<literal>laptop</literal>,
|
||||
<literal>convertible</literal>,
|
||||
<literal>server</literal>,
|
||||
<literal>tablet</literal>,
|
||||
<literal>handset</literal>,
|
||||
|
@ -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>,
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user