Comment 22 for bug 1307069

Revision history for this message
Martin Pitt (pitti) wrote :

- snprintf(command, sizeof(command), "grep -q \"%s: module\" /var/log/syslog",
> + snprintf(command, sizeof(command), "journalctl -p 4 -k -o cat --no-pager | grep -q \"%s: module\"",

Sorry to be blunt here, but this makes me weep, and this kind of code is absolutely wrong. What on earth is this trying to do? A C program calling system() on boot to grep the syslog/journal can't possibly be a correct solution. If you merely want to check if a module is present/not present, check if /sys/module/<name> exists/does not exist.

Please let's find a proper solution here.