forked from Mirror/pmbootstrap
deviceinfo: add and require _codename (!1732)
deviceinfo_codneame holds the device's code name, so we can easily look it up in the finished postmarketOS installation by reading /etc/deviceinfo. Related: postmarketOS/pmaports#157
This commit is contained in:
parent
23df933db4
commit
747ccfdd75
3 changed files with 9 additions and 0 deletions
|
@ -42,6 +42,12 @@ def sanity_check(info, path):
|
|||
" delete the deviceinfo_msm_refresher line in: " +
|
||||
path)
|
||||
|
||||
# "codename" is required
|
||||
codename = os.path.basename(os.path.dirname(path)).replace("device-", "")
|
||||
if "codename" not in info or info["codename"] != codename:
|
||||
raise RuntimeError("Please add 'deviceinfo_codename=\"" + codename +
|
||||
"\"' to: " + path)
|
||||
|
||||
|
||||
def deviceinfo(args, device=None):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue