1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-25 18:50:18 +03:00

Merge pull request #5484 from dvdhrm/convertible

hostname: support 'convertible' chassis
This commit is contained in:
Lennart Poettering 2017-02-28 15:11:36 +01:00 committed by GitHub
commit 2b827687ef
5 changed files with 8 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"
@ -199,6 +200,9 @@ static const char* fallback_chassis(void) {
case 0x1E: /* Tablet */
return "tablet";
case 0x1F: /* Convertible */
return "convertible";
}
try_acpi: