[users] Remove legacy settings
This commit is contained in:
parent
bbeba5c9ab
commit
f4e9b3689d
@ -858,25 +858,6 @@ either( T ( *f )( const QVariantMap&, const QString&, U ),
|
||||
}
|
||||
}
|
||||
|
||||
// TODO:3.3: Remove
|
||||
static void
|
||||
copyLegacy( const QVariantMap& source, const QString& sourceKey, QVariantMap& target, const QString& targetKey )
|
||||
{
|
||||
if ( source.contains( sourceKey ) )
|
||||
{
|
||||
if ( target.contains( targetKey ) )
|
||||
{
|
||||
cWarning() << "Legacy *users* key" << sourceKey << "ignored.";
|
||||
}
|
||||
else
|
||||
{
|
||||
const QVariant legacyValue = source.value( sourceKey );
|
||||
cWarning() << "Legacy *users* key" << sourceKey << "overrides hostname-settings.";
|
||||
target.insert( targetKey, legacyValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** @brief Tidy up a list of names
|
||||
*
|
||||
* Remove duplicates, apply lowercase, sort.
|
||||
@ -897,9 +878,6 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
bool ok = false; // Ignored
|
||||
QVariantMap userSettings = CalamaresUtils::getSubMap( configurationMap, "user", ok );
|
||||
|
||||
// TODO:3.3: Remove calls to copyLegacy
|
||||
copyLegacy( configurationMap, "userShell", userSettings, "shell" );
|
||||
|
||||
QString shell( QLatin1String( "/bin/bash" ) ); // as if it's not set at all
|
||||
if ( userSettings.contains( "shell" ) )
|
||||
{
|
||||
@ -925,9 +903,6 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
bool ok = false; // Ignored
|
||||
QVariantMap hostnameSettings = CalamaresUtils::getSubMap( configurationMap, "hostname", ok );
|
||||
|
||||
// TODO:3.3: Remove calls to copyLegacy
|
||||
copyLegacy( configurationMap, "setHostname", hostnameSettings, "location" );
|
||||
copyLegacy( configurationMap, "writeHostsFile", hostnameSettings, "writeHostsFile" );
|
||||
m_hostnameAction = getHostNameAction( hostnameSettings );
|
||||
m_writeEtcHosts = CalamaresUtils::getBool( hostnameSettings, "writeHostsFile", true );
|
||||
m_hostnameTemplate
|
||||
|
@ -161,10 +161,6 @@ allowWeakPasswordsDefault: false
|
||||
user:
|
||||
shell: /bin/bash
|
||||
forbidden_names: [ root ]
|
||||
# TODO:3.3: Remove this setting
|
||||
#
|
||||
# This is the legacy setting for user.shell
|
||||
userShell: /bin/bash
|
||||
|
||||
# Hostname settings
|
||||
#
|
||||
@ -212,17 +208,6 @@ hostname:
|
||||
template: "derp-${cpu}"
|
||||
forbidden_names: [ localhost ]
|
||||
|
||||
# TODO:3.3: Remove this setting
|
||||
#
|
||||
# This is a legacy setting for hostname.location; if it is set
|
||||
# at all, and there is no setting for hostname.location, it is used.
|
||||
setHostname: EtcFile
|
||||
|
||||
# TODO:3.3: Remove this setting
|
||||
#
|
||||
# This is a legacy setting for hostname.writeHostsFile
|
||||
writeHostsFile: true
|
||||
|
||||
presets:
|
||||
fullName:
|
||||
# value: "OEM User"
|
||||
|
@ -6,13 +6,12 @@ $id: https://calamares.io/schemas/users
|
||||
additionalProperties: false
|
||||
type: object
|
||||
properties:
|
||||
# User shell, should be path to /bin/sh or so
|
||||
userShell: { type: string }
|
||||
user:
|
||||
additionalProperties: false
|
||||
type: object
|
||||
properties:
|
||||
shell: { type: string } # Overrides userShell
|
||||
# User shell, should be path to /bin/sh or so
|
||||
shell: { type: string }
|
||||
forbidden_names: { type: array, items: { type: string } }
|
||||
# Group settings
|
||||
defaultGroups:
|
||||
@ -54,9 +53,6 @@ properties:
|
||||
writeHostsFile: { type: boolean, default: true }
|
||||
template: { type: string, default: "${first}-${product}" }
|
||||
forbidden_names: { type: array, items: { type: string } }
|
||||
# Legacy Hostname setting
|
||||
setHostname: { type: string, enum: [ None, EtcFile, Hostnamed ] }
|
||||
writeHostsFile: { type: boolean, default: true }
|
||||
|
||||
# Presets
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user