@@ -23,6 +23,7 @@
2323
2424DeviceConfigParser::DeviceConfigParser(QObject *parent): QObject(parent)
2525{
26+ // Local files have highest priority
2627 QString path;
2728 Q_FOREACH (const QString &standardPath, QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)) {
2829 if (QFileInfo(standardPath + "/devices.conf").exists()) {
@@ -31,9 +32,16 @@ DeviceConfigParser::DeviceConfigParser(QObject *parent): QObject(parent)
3132 }
3233 }
3334
35+ // Check if there is an override in the device tarball (/system/etc/)
36+ if (path.isEmpty() && QFileInfo::exists("/system/etc/ubuntu/devices.conf")) {
37+ path = "/system/etc/ubuntu/devices.conf";
38+ }
39+
40+ // No higher priority files found. Use standard of /etc/
3441 if (path.isEmpty()) {
3542 path = "/etc/ubuntu/devices.conf";
3643 }
44+
3745 qDebug() << "Using" << path << "as device configuration file";
3846 m_config = new QSettings(path, QSettings::IniFormat, this);
3947}