hardware grains fix and lenny gets his own package list

This commit is contained in:
do
2020-06-09 14:59:04 +02:00
parent 808a2cd0d0
commit 36ab65aaf0
5 changed files with 8 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import re
import os.path
def _hardware():
h = "unknown"
@@ -12,7 +13,7 @@ def _hardware():
h = "Pine64"
if re.match("Hardware\s+:\sFreescale\si.MX6\sQuad\/DualLite", line):
h = "RiotBoard"
if h == "unknown":
if h == "unknown" and os.path.isfile("/etc/armbian-release"):
for line in open("/etc/armbian-release","r").readlines():
if re.match("BOARD=espressobin", line):
h = "Espressobin"