Fixed AmogOwOS detection

This commit is contained in:
TheDarkBug 2021-09-10 01:37:20 +02:00
parent 3ecf05e4a1
commit 2898ee0614

View file

@ -440,6 +440,17 @@ void get_info()
while (fgets(line, sizeof(line), os_release)) while (fgets(line, sizeof(line), os_release))
if (sscanf(line, "\nID=\"%s\"", version_name) || sscanf(line, "\nID=%s", version_name)) if (sscanf(line, "\nID=\"%s\"", version_name) || sscanf(line, "\nID=%s", version_name))
break; break;
// trying to detect amogos because in its os-release file ID value is just "debian"
if (strcmp(version_name, "debian") == 0)
{
DIR *amogos_plymouth = opendir("/usr/share/plymouth/themes/amogos");
if (amogos_plymouth)
{
closedir(amogos_plymouth);
sprintf(version_name, "amogos");
}
}
if (host_model_info) if (host_model_info)
{ {
while (fgets(line, sizeof(line), host_model_info)) while (fgets(line, sizeof(line), host_model_info))