Add osmajorrelease and osfinger grains for BSD systems

This commit is contained in:
Jason Wolfe 2015-01-21 12:33:12 -07:00
parent 02782e3a14
commit 3718e6e368

View File

@ -1086,6 +1086,12 @@ def os_data():
grains['osfinger'] = '{os}-{ver}'.format(
os=grains['osfullname'],
ver=grains['osrelease'])
elif grains.get('os') in ('FreeBSD', 'OpenBSD', 'NetBSD'):
grains['osmajorrelease'] = grains['osrelease'].split('.', 1)[0]
grains['osfinger'] = '{os}-{ver}'.format(
os=grains['os'],
ver=grains['osrelease'])
if grains.get('osrelease', ''):
osrelease_info = grains['osrelease'].split('.')