Skip to content
Snippets Groups Projects
Commit c3c488e2 authored by Tibo's avatar Tibo
Browse files

Show LSB info (distribution name and version)

parent daf44983
No related branches found
No related tags found
No related merge requests found
......@@ -123,6 +123,19 @@ class Server extends Model
}
public function lsb() {
return "";
$record = $this->lastRecordContaining("lsb");
if ($record == null) {
return "";
}
return $this->parseLsb($record->lsb);
}
const LSB = "/^Description: (.+)$/m";
public function parseLsb($string) {
$matches = [];
preg_match(self::LSB, $string, $matches);
return $matches[1];
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment