Add support for Devuan in hostname module (#25525)

Fixes #25395

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/25540/head
Abhijeet Kasurde 8 years ago committed by jctanner
parent 4e6fee212a
commit ba4f6de35a

@ -260,7 +260,7 @@ def get_distribution():
''' return the distribution name '''
if platform.system() == 'Linux':
try:
supported_dists = platform._supported_dists + ('arch', 'alpine')
supported_dists = platform._supported_dists + ('arch', 'alpine', 'devuan')
distribution = platform.linux_distribution(supported_dists=supported_dists)[0].capitalize()
if not distribution and os.path.isfile('/etc/system-release'):
distribution = platform.linux_distribution(supported_dists=['system'])[0].capitalize()

@ -707,6 +707,11 @@ class LinaroHostname(Hostname):
distribution = 'Linaro'
strategy_class = DebianStrategy
class DevuanHostname(Hostname):
platform = 'Linux'
distribution = 'Devuan'
strategy_class = DebianStrategy
class GentooHostname(Hostname):
platform = 'Linux'
distribution = 'Gentoo base system'

Loading…
Cancel
Save