Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
def lsb_release():
+ """
+ Get LSB release information from lsb_release.
+
+ Returns truple with distro, release and codename. Otherwise
+ the function raises an error (subprocess.CalledProcessError or
+ RuntimeError).
+ """
import subprocess
args = [ 'which', 'lsb_release', ]
def choose_init(distro, codename):
+ """
+ Select a init system for a given distribution.
+
+ Returns the name of a init system (upstart, sysvinit ...).
+ """
if distro == 'Ubuntu':
return 'upstart'
return 'sysvinit'