[users] Document new hostname.location setting

- add to schema
- add to tests
- mention in CHANGES
This commit is contained in:
Adriaan de Groot 2022-04-11 12:05:00 +02:00
parent 3524d4a0d0
commit 92b1341730
3 changed files with 13 additions and 2 deletions

View File

@ -20,7 +20,9 @@ This release contains contributions from (alphabetically by first name):
- *users* module has rearranged configuration for setting the hostname.
Legacy settings are preserved, but produce a warning. Please see
`users.conf` for details.
- *users* module has a new hostname.location setting, *Transient*, which
will force the installed system to transient-hostname-setting by removing
the file `/etc/hostname`.
# 3.2.54 (2022-03-21) #

View File

@ -229,6 +229,15 @@ UserTests::testHostActions_data()
QTest::newRow( "bad " ) << true << QString( "derp" ) << int( HostNameAction::EtcHostname );
QTest::newRow( "none " ) << true << QString( "none" ) << int( HostNameAction::None );
QTest::newRow( "systemd" ) << true << QString( "Hostnamed" ) << int( HostNameAction::SystemdHostname );
QTest::newRow( "etc(1) " ) << true << QString( "etcfile" ) << int( HostNameAction::EtcHostname );
QTest::newRow( "etc(2) " ) << true << QString( "etc" ) << int( HostNameAction::EtcHostname );
QTest::newRow( "etc-bad" )
<< true << QString( "etchost" )
<< int( HostNameAction::EtcHostname ); // This isn't a valid name, but defaults to EtcHostname
QTest::newRow( "ci-sysd" ) << true << QString( "hOsTnaMed" )
<< int( HostNameAction::SystemdHostname ); // Case-insensitive
QTest::newRow( "trbs " ) << true << QString( "transient" ) << int( HostNameAction::Transient );
QTest::newRow( "ci-trns" ) << true << QString( "trANSient" ) << int( HostNameAction::Transient );
}
void

View File

@ -44,7 +44,7 @@ properties:
additionalProperties: false
type: object
properties:
location: { type: string, enum: [ None, EtcFile, Hostnamed ] }
location: { type: string, enum: [ None, EtcFile, Hostnamed, Transient ] }
writeHostsFile: { type: boolean, default: true }
# Legacy Hostname setting
setHostname: { type: string, enum: [ None, EtcFile, Hostnamed ] }