1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | bool is_running_on_classic_distribution() { FILE *f SC_CLEANUP(sc_cleanup_file) = fopen(os_release, "r"); if (f == NULL) { return true; } char buf[255] = { 0 }; while (fgets(buf, sizeof buf, f) != NULL) { if (strcmp(buf, "ID=ubuntu-core\n") == 0) { return false; } } return true; } |