[PEP 8] General Style Part 3
This commit is contained in:
parent
09dc6bb5d7
commit
5c1ee7bbcb
@ -50,6 +50,7 @@ def get_bootloader_entry_name():
|
|||||||
branding = libcalamares.globalstorage.value("branding")
|
branding = libcalamares.globalstorage.value("branding")
|
||||||
return branding["bootloaderEntryName"]
|
return branding["bootloaderEntryName"]
|
||||||
|
|
||||||
|
|
||||||
def create_conf(uuid, conf_path):
|
def create_conf(uuid, conf_path):
|
||||||
distribution = get_bootloader_entry_name()
|
distribution = get_bootloader_entry_name()
|
||||||
kernel = libcalamares.job.configuration["kernel"]
|
kernel = libcalamares.job.configuration["kernel"]
|
||||||
@ -128,9 +129,11 @@ def install_bootloader(boot_loader, fw_type):
|
|||||||
file_name_sanitizer = str.maketrans(" /", "_-")
|
file_name_sanitizer = str.maketrans(" /", "_-")
|
||||||
distribution_translated = distribution.translate(file_name_sanitizer)
|
distribution_translated = distribution.translate(file_name_sanitizer)
|
||||||
conf_path = os.path.join(
|
conf_path = os.path.join(
|
||||||
install_efi_directory, "loader", "entries", "{!s}.conf".format(distribution_translated))
|
install_efi_directory, "loader", "entries",
|
||||||
|
"{!s}.conf".format(distribution_translated))
|
||||||
fallback_path = os.path.join(
|
fallback_path = os.path.join(
|
||||||
install_efi_directory, "loader", "entries", "{!s}-fallback.conf".format(distribution_translated))
|
install_efi_directory, "loader", "entries",
|
||||||
|
"{!s}-fallback.conf".format(distribution_translated))
|
||||||
loader_path = os.path.join(
|
loader_path = os.path.join(
|
||||||
install_efi_directory, "loader", "loader.conf")
|
install_efi_directory, "loader", "loader.conf")
|
||||||
partitions = libcalamares.globalstorage.value("partitions")
|
partitions = libcalamares.globalstorage.value("partitions")
|
||||||
@ -142,17 +145,17 @@ def install_bootloader(boot_loader, fw_type):
|
|||||||
device = boot_device[:-1]
|
device = boot_device[:-1]
|
||||||
print(device)
|
print(device)
|
||||||
subprocess.call(["sgdisk", "--typecode={!s}:EF00".format(boot_p), "{!s}".format(device)])
|
subprocess.call(["sgdisk", "--typecode={!s}:EF00".format(boot_p), "{!s}".format(device)])
|
||||||
subprocess.call(
|
subprocess.call(["gummiboot", "--path={!s}".format(install_efi_directory), "install"])
|
||||||
["gummiboot", "--path={!s}".format(install_efi_directory), "install"])
|
|
||||||
create_conf(uuid, conf_path)
|
create_conf(uuid, conf_path)
|
||||||
create_fallback(uuid, fallback_path)
|
create_fallback(uuid, fallback_path)
|
||||||
create_loader(loader_path)
|
create_loader(loader_path)
|
||||||
else:
|
else:
|
||||||
install_path = boot_loader["installPath"]
|
install_path = boot_loader["installPath"]
|
||||||
check_chroot_call(
|
check_chroot_call(
|
||||||
[libcalamares.job.configuration["grubInstall"], "--target=i386-pc", install_path])
|
[libcalamares.job.configuration["grubInstall"], "--target=i386-pc",
|
||||||
check_chroot_call([libcalamares.job.configuration[
|
install_path])
|
||||||
"grubMkconfig"], "-o", libcalamares.job.configuration["grubCfg"]])
|
check_chroot_call([libcalamares.job.configuration["grubMkconfig"], "-o",
|
||||||
|
libcalamares.job.configuration["grubCfg"]])
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
|
@ -30,8 +30,8 @@ import subprocess
|
|||||||
DesktopEnvironment = collections.namedtuple('DesktopEnvironment', ['executable', 'desktop_file'])
|
DesktopEnvironment = collections.namedtuple('DesktopEnvironment', ['executable', 'desktop_file'])
|
||||||
|
|
||||||
desktop_environments = [
|
desktop_environments = [
|
||||||
DesktopEnvironment('/usr/bin/startkde', 'plasma'), # KDE Plasma 5
|
DesktopEnvironment('/usr/bin/startkde', 'plasma'), # KDE Plasma 5
|
||||||
DesktopEnvironment('/usr/bin/startkde', 'kde-plasma'), # KDE Plasma 4
|
DesktopEnvironment('/usr/bin/startkde', 'kde-plasma'), # KDE Plasma 4
|
||||||
DesktopEnvironment('/usr/bin/gnome-session', 'gnome'),
|
DesktopEnvironment('/usr/bin/gnome-session', 'gnome'),
|
||||||
DesktopEnvironment('/usr/bin/startxfce4', 'xfce'),
|
DesktopEnvironment('/usr/bin/startxfce4', 'xfce'),
|
||||||
DesktopEnvironment('/usr/bin/cinnamon-session', 'cinnamon-session'),
|
DesktopEnvironment('/usr/bin/cinnamon-session', 'cinnamon-session'),
|
||||||
@ -43,17 +43,25 @@ desktop_environments = [
|
|||||||
DesktopEnvironment('/usr/bin/openbox-session', 'openbox')
|
DesktopEnvironment('/usr/bin/openbox-session', 'openbox')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def find_desktop_environment(root_mount_point):
|
def find_desktop_environment(root_mount_point):
|
||||||
for desktop_environment in desktop_environments:
|
for desktop_environment in desktop_environments:
|
||||||
if os.path.exists("{!s}{!s}".format(root_mount_point,desktop_environment.executable)) \
|
if os.path.exists(
|
||||||
and os.path.exists("{!s}/usr/share/xsessions/{!s}.desktop".format(root_mount_point,desktop_environment.desktop_file)):
|
"{!s}{!s}".format(root_mount_point, desktop_environment.executable)) \
|
||||||
|
and os.path.exists("{!s}/usr/share/xsessions/{!s}.desktop".format(root_mount_point,
|
||||||
|
desktop_environment.desktop_file)):
|
||||||
return desktop_environment
|
return desktop_environment
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def have_dm(dm_name, root_mount_point):
|
|
||||||
return os.path.exists("{!s}/usr/bin/{!s}".format(root_mount_point,dm_name)) or os.path.exists("{!s}/usr/sbin/{!s}".format(root_mount_point,dm_name))
|
|
||||||
|
|
||||||
def set_autologin(username, displaymanagers, default_desktop_environment, root_mount_point):
|
def have_dm(dm_name, root_mount_point):
|
||||||
|
return os.path.exists(
|
||||||
|
"{!s}/usr/bin/{!s}".format(root_mount_point, dm_name)) or os.path.exists(
|
||||||
|
"{!s}/usr/sbin/{!s}".format(root_mount_point, dm_name))
|
||||||
|
|
||||||
|
|
||||||
|
def set_autologin(username, displaymanagers, default_desktop_environment,
|
||||||
|
root_mount_point):
|
||||||
""" Enables automatic login for the installed desktop managers """
|
""" Enables automatic login for the installed desktop managers """
|
||||||
|
|
||||||
if "mdm" in displaymanagers:
|
if "mdm" in displaymanagers:
|
||||||
@ -95,12 +103,15 @@ def set_autologin(username, displaymanagers, default_desktop_environment, root_m
|
|||||||
gdm_conf.write('AutomaticLoginEnable=True\n')
|
gdm_conf.write('AutomaticLoginEnable=True\n')
|
||||||
if os.path.exists("{!s}/var/lib/AccountsService/users".format(root_mount_point)):
|
if os.path.exists("{!s}/var/lib/AccountsService/users".format(root_mount_point)):
|
||||||
os.system(
|
os.system(
|
||||||
"echo \"[User]\" > {!s}/var/lib/AccountsService/users/{!s}".format(root_mount_point,username))
|
"echo \"[User]\" > {!s}/var/lib/AccountsService/users/{!s}".format(
|
||||||
|
root_mount_point, username))
|
||||||
if default_desktop_environment is not None:
|
if default_desktop_environment is not None:
|
||||||
os.system(
|
os.system(
|
||||||
"echo \"XSession={!s}\" >> {!s}/var/lib/AccountsService/users/{!s}".format(default_desktop_environment.desktop_file,root_mount_point,username))
|
"echo \"XSession={!s}\" >> {!s}/var/lib/AccountsService/users/{!s}".format(
|
||||||
|
default_desktop_environment.desktop_file, root_mount_point, username))
|
||||||
os.system(
|
os.system(
|
||||||
"echo \"Icon=\" >> {!s}/var/lib/AccountsService/users/{!s}".format(root_mount_point,username))
|
"echo \"Icon=\" >> {!s}/var/lib/AccountsService/users/{!s}".format(
|
||||||
|
root_mount_point, username))
|
||||||
|
|
||||||
if "kdm" in displaymanagers:
|
if "kdm" in displaymanagers:
|
||||||
# Systems with KDM as Desktop Manager
|
# Systems with KDM as Desktop Manager
|
||||||
@ -191,7 +202,7 @@ def set_autologin(username, displaymanagers, default_desktop_environment, root_m
|
|||||||
if default_desktop_environment is not None:
|
if default_desktop_environment is not None:
|
||||||
line = 'Session={}.desktop\n'.format(default_desktop_environment.desktop_file)
|
line = 'Session={}.desktop\n'.format(default_desktop_environment.desktop_file)
|
||||||
sddm_conf.write(line)
|
sddm_conf.write(line)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@ -209,15 +220,16 @@ def run():
|
|||||||
displaymanagers = libcalamares.globalstorage.value("displaymanagers")
|
displaymanagers = libcalamares.globalstorage.value("displaymanagers")
|
||||||
|
|
||||||
if displaymanagers is None:
|
if displaymanagers is None:
|
||||||
return "No display managers selected for the displaymanager module.",\
|
return "No display managers selected for the displaymanager module.", \
|
||||||
"The displaymanagers list is empty or undefined in both globalstorage and displaymanager.conf."
|
"The displaymanagers list is empty or undefined in both globalstorage and displaymanager.conf."
|
||||||
|
|
||||||
username = libcalamares.globalstorage.value("autologinUser")
|
username = libcalamares.globalstorage.value("autologinUser")
|
||||||
root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
|
root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
|
||||||
|
|
||||||
if "default_desktop_environment" in libcalamares.job.configuration:
|
if "default_desktop_environment" in libcalamares.job.configuration:
|
||||||
entry = libcalamares.job.configuration["defaultDesktopEnvironment"]
|
entry = libcalamares.job.configuration["defaultDesktopEnvironment"]
|
||||||
default_desktop_environment = DesktopEnvironment(entry["executable"], entry["desktopFile"])
|
default_desktop_environment = DesktopEnvironment(entry["executable"],
|
||||||
|
entry["desktopFile"])
|
||||||
else:
|
else:
|
||||||
default_desktop_environment = find_desktop_environment(root_mount_point)
|
default_desktop_environment = find_desktop_environment(root_mount_point)
|
||||||
|
|
||||||
@ -247,9 +259,10 @@ def run():
|
|||||||
libcalamares.utils.chroot_call(
|
libcalamares.utils.chroot_call(
|
||||||
['groupadd', '-g', '620', 'lightdm'])
|
['groupadd', '-g', '620', 'lightdm'])
|
||||||
if libcalamares.utils.chroot_call(['getent', 'passwd', 'lightdm']) != 0:
|
if libcalamares.utils.chroot_call(['getent', 'passwd', 'lightdm']) != 0:
|
||||||
libcalamares.utils.chroot_call(['useradd', '-c', '"LightDM Display Manager"',
|
libcalamares.utils.chroot_call(
|
||||||
'-u', '620', '-g', 'lightdm', '-d', '/var/run/lightdm',
|
['useradd', '-c', '"LightDM Display Manager"',
|
||||||
'-s', '/usr/bin/nologin', 'lightdm'])
|
'-u', '620', '-g', 'lightdm', '-d', '/var/run/lightdm',
|
||||||
|
'-s', '/usr/bin/nologin', 'lightdm'])
|
||||||
libcalamares.utils.chroot_call(['passwd', '-l', 'lightdm'])
|
libcalamares.utils.chroot_call(['passwd', '-l', 'lightdm'])
|
||||||
libcalamares.utils.chroot_call(
|
libcalamares.utils.chroot_call(
|
||||||
['chown', '-R', 'lightdm:lightdm', '/run/lightdm'])
|
['chown', '-R', 'lightdm:lightdm', '/run/lightdm'])
|
||||||
@ -257,7 +270,8 @@ def run():
|
|||||||
['chmod', '+r' '/etc/lightdm/lightdm.conf'])
|
['chmod', '+r' '/etc/lightdm/lightdm.conf'])
|
||||||
if default_desktop_environment is not None:
|
if default_desktop_environment is not None:
|
||||||
os.system(
|
os.system(
|
||||||
"sed -i -e \"s/^.*user-session=.*/user-session={!s}/\" {!s}/etc/lightdm/lightdm.conf".format(default_desktop_environment.desktop_file,root_mount_point))
|
"sed -i -e \"s/^.*user-session=.*/user-session={!s}/\" {!s}/etc/lightdm/lightdm.conf".format(
|
||||||
|
default_desktop_environment.desktop_file, root_mount_point))
|
||||||
else:
|
else:
|
||||||
libcalamares.utils.debug("lightdm selected but not installed")
|
libcalamares.utils.debug("lightdm selected but not installed")
|
||||||
displaymanagers.remove("lightdm")
|
displaymanagers.remove("lightdm")
|
||||||
@ -269,9 +283,10 @@ def run():
|
|||||||
if libcalamares.utils.chroot_call(['getent', 'group', 'gdm']) != 0:
|
if libcalamares.utils.chroot_call(['getent', 'group', 'gdm']) != 0:
|
||||||
libcalamares.utils.chroot_call(['groupadd', '-g', '120', 'gdm'])
|
libcalamares.utils.chroot_call(['groupadd', '-g', '120', 'gdm'])
|
||||||
if libcalamares.utils.chroot_call(['getent', 'passwd', 'gdm']) != 0:
|
if libcalamares.utils.chroot_call(['getent', 'passwd', 'gdm']) != 0:
|
||||||
libcalamares.utils.chroot_call(['useradd', '-c', '"Gnome Display Manager"',
|
libcalamares.utils.chroot_call(
|
||||||
'-u', '120', '-g', 'gdm', '-d', '/var/lib/gdm',
|
['useradd', '-c', '"Gnome Display Manager"',
|
||||||
'-s', '/usr/bin/nologin', 'gdm'])
|
'-u', '120', '-g', 'gdm', '-d', '/var/lib/gdm',
|
||||||
|
'-s', '/usr/bin/nologin', 'gdm'])
|
||||||
libcalamares.utils.chroot_call(['passwd', '-l', 'gdm'])
|
libcalamares.utils.chroot_call(['passwd', '-l', 'gdm'])
|
||||||
libcalamares.utils.chroot_call(
|
libcalamares.utils.chroot_call(
|
||||||
['chown', '-R', 'gdm:gdm', '/var/lib/gdm'])
|
['chown', '-R', 'gdm:gdm', '/var/lib/gdm'])
|
||||||
@ -286,16 +301,18 @@ def run():
|
|||||||
if libcalamares.utils.chroot_call(['getent', 'group', 'mdm']) != 0:
|
if libcalamares.utils.chroot_call(['getent', 'group', 'mdm']) != 0:
|
||||||
libcalamares.utils.chroot_call(['groupadd', '-g', '128', 'mdm'])
|
libcalamares.utils.chroot_call(['groupadd', '-g', '128', 'mdm'])
|
||||||
if libcalamares.utils.chroot_call(['getent', 'passwd', 'mdm']) != 0:
|
if libcalamares.utils.chroot_call(['getent', 'passwd', 'mdm']) != 0:
|
||||||
libcalamares.utils.chroot_call(['useradd', '-c', '"Linux Mint Display Manager"',
|
libcalamares.utils.chroot_call(
|
||||||
'-u', '128', '-g', 'mdm', '-d', '/var/lib/mdm',
|
['useradd', '-c', '"Linux Mint Display Manager"',
|
||||||
'-s', '/usr/bin/nologin', 'mdm'])
|
'-u', '128', '-g', 'mdm', '-d', '/var/lib/mdm',
|
||||||
|
'-s', '/usr/bin/nologin', 'mdm'])
|
||||||
libcalamares.utils.chroot_call(['passwd', '-l', 'mdm'])
|
libcalamares.utils.chroot_call(['passwd', '-l', 'mdm'])
|
||||||
libcalamares.utils.chroot_call(
|
libcalamares.utils.chroot_call(
|
||||||
['chown', 'root:mdm', '/var/lib/mdm'])
|
['chown', 'root:mdm', '/var/lib/mdm'])
|
||||||
libcalamares.utils.chroot_call(['chmod', '1770', '/var/lib/mdm'])
|
libcalamares.utils.chroot_call(['chmod', '1770', '/var/lib/mdm'])
|
||||||
if default_desktop_environment is not None:
|
if default_desktop_environment is not None:
|
||||||
os.system(
|
os.system(
|
||||||
"sed -i \"s|default.desktop|{!s}.desktop|g\" {!s}/etc/mdm/custom.conf".format(default_desktop_environment.desktop_file,root_mount_point))
|
"sed -i \"s|default.desktop|{!s}.desktop|g\" {!s}/etc/mdm/custom.conf".format(
|
||||||
|
default_desktop_environment.desktop_file, root_mount_point))
|
||||||
else:
|
else:
|
||||||
libcalamares.utils.debug("mdm selected but not installed")
|
libcalamares.utils.debug("mdm selected but not installed")
|
||||||
displaymanagers.remove("mdm")
|
displaymanagers.remove("mdm")
|
||||||
@ -314,7 +331,8 @@ def run():
|
|||||||
['chmod', '+r', '/etc/lxdm/lxdm.conf'])
|
['chmod', '+r', '/etc/lxdm/lxdm.conf'])
|
||||||
if default_desktop_environment is not None:
|
if default_desktop_environment is not None:
|
||||||
os.system(
|
os.system(
|
||||||
"sed -i -e \"s|^.*session=.*|session={!s}|\" {!s}/etc/lxdm/lxdm.conf".format(default_desktop_environment.executable,root_mount_point))
|
"sed -i -e \"s|^.*session=.*|session={!s}|\" {!s}/etc/lxdm/lxdm.conf".format(
|
||||||
|
default_desktop_environment.executable, root_mount_point))
|
||||||
else:
|
else:
|
||||||
libcalamares.utils.debug("lxdm selected but not installed")
|
libcalamares.utils.debug("lxdm selected but not installed")
|
||||||
displaymanagers.remove("lxdm")
|
displaymanagers.remove("lxdm")
|
||||||
@ -326,8 +344,9 @@ def run():
|
|||||||
if libcalamares.utils.chroot_call(['getent', 'group', 'kdm']) != 0:
|
if libcalamares.utils.chroot_call(['getent', 'group', 'kdm']) != 0:
|
||||||
libcalamares.utils.chroot_call(['groupadd', '-g', '135', 'kdm'])
|
libcalamares.utils.chroot_call(['groupadd', '-g', '135', 'kdm'])
|
||||||
if libcalamares.utils.chroot_call(['getent', 'passwd', 'kdm']) != 0:
|
if libcalamares.utils.chroot_call(['getent', 'passwd', 'kdm']) != 0:
|
||||||
libcalamares.utils.chroot_call(['useradd', '-u', '135', '-g', 'kdm', '-d',
|
libcalamares.utils.chroot_call(
|
||||||
'/var/lib/kdm', '-s', '/bin/false', '-r', '-M', 'kdm'])
|
['useradd', '-u', '135', '-g', 'kdm', '-d',
|
||||||
|
'/var/lib/kdm', '-s', '/bin/false', '-r', '-M', 'kdm'])
|
||||||
libcalamares.utils.chroot_call(
|
libcalamares.utils.chroot_call(
|
||||||
['chown', '-R', '135:135', 'var/lib/kdm'])
|
['chown', '-R', '135:135', 'var/lib/kdm'])
|
||||||
else:
|
else:
|
||||||
|
@ -32,16 +32,13 @@ def run():
|
|||||||
accumulator += "This job's path: " + libcalamares.job.working_path + "\n"
|
accumulator += "This job's path: " + libcalamares.job.working_path + "\n"
|
||||||
accumulator += str(libcalamares.job.configuration)
|
accumulator += str(libcalamares.job.configuration)
|
||||||
accumulator += " *** globalstorage test ***\n"
|
accumulator += " *** globalstorage test ***\n"
|
||||||
accumulator += "lala: " + \
|
accumulator += "lala: " + str(libcalamares.globalstorage.contains("lala")) + "\n"
|
||||||
str(libcalamares.globalstorage.contains("lala")) + "\n"
|
accumulator += "foo: " + str(libcalamares.globalstorage.contains("foo")) + "\n"
|
||||||
accumulator += "foo: " + \
|
|
||||||
str(libcalamares.globalstorage.contains("foo")) + "\n"
|
|
||||||
accumulator += "count: " + str(libcalamares.globalstorage.count()) + "\n"
|
accumulator += "count: " + str(libcalamares.globalstorage.count()) + "\n"
|
||||||
libcalamares.globalstorage.insert("item2", "value2")
|
libcalamares.globalstorage.insert("item2", "value2")
|
||||||
libcalamares.globalstorage.insert("item3", 3)
|
libcalamares.globalstorage.insert("item3", 3)
|
||||||
accumulator += "keys: {}\n".format(str(libcalamares.globalstorage.keys()))
|
accumulator += "keys: {}\n".format(str(libcalamares.globalstorage.keys()))
|
||||||
accumulator += "remove: {}\n".format(
|
accumulator += "remove: {}\n".format(str(libcalamares.globalstorage.remove("item2")))
|
||||||
str(libcalamares.globalstorage.remove("item2")))
|
|
||||||
accumulator += "values: {} {} {}\n".format(
|
accumulator += "values: {} {} {}\n".format(
|
||||||
str(libcalamares.globalstorage.value("foo")),
|
str(libcalamares.globalstorage.value("foo")),
|
||||||
str(libcalamares.globalstorage.value("item2")),
|
str(libcalamares.globalstorage.value("item2")),
|
||||||
|
@ -26,16 +26,17 @@ import shutil
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from libcalamares.utils import check_chroot_call
|
from libcalamares.utils import check_chroot_call
|
||||||
|
|
||||||
|
|
||||||
def cpuinfo():
|
def cpuinfo():
|
||||||
''' Return the information in /proc/cpuinfo
|
"""
|
||||||
as a dictionary in the following format:
|
Return the information in /proc/cpuinfo as a dictionary in the following format:
|
||||||
cpu_info['proc0']={...}
|
cpu_info['proc0']={...}
|
||||||
cpu_info['proc1']={...}
|
cpu_info['proc1']={...}
|
||||||
|
|
||||||
'''
|
"""
|
||||||
|
|
||||||
cpuinfo=OrderedDict()
|
cpuinfo = OrderedDict()
|
||||||
procinfo=OrderedDict()
|
procinfo = OrderedDict()
|
||||||
|
|
||||||
nprocs = 0
|
nprocs = 0
|
||||||
with open('/proc/cpuinfo') as f:
|
with open('/proc/cpuinfo') as f:
|
||||||
@ -45,7 +46,7 @@ def cpuinfo():
|
|||||||
cpuinfo["proc{!s}".format(nprocs)] = procinfo
|
cpuinfo["proc{!s}".format(nprocs)] = procinfo
|
||||||
nprocs += 1
|
nprocs += 1
|
||||||
# Reset
|
# Reset
|
||||||
procinfo=OrderedDict()
|
procinfo = OrderedDict()
|
||||||
else:
|
else:
|
||||||
if len(line.split(':')) == 2:
|
if len(line.split(':')) == 2:
|
||||||
procinfo[line.split(':')[0].strip()] = line.split(':')[1].strip()
|
procinfo[line.split(':')[0].strip()] = line.split(':')[1].strip()
|
||||||
@ -54,6 +55,7 @@ def cpuinfo():
|
|||||||
|
|
||||||
return cpuinfo
|
return cpuinfo
|
||||||
|
|
||||||
|
|
||||||
def set_mkinitcpio_hooks_and_modules(hooks, modules, root_mount_point):
|
def set_mkinitcpio_hooks_and_modules(hooks, modules, root_mount_point):
|
||||||
""" Set up mkinitcpio.conf """
|
""" Set up mkinitcpio.conf """
|
||||||
|
|
||||||
@ -72,6 +74,7 @@ def set_mkinitcpio_hooks_and_modules(hooks, modules, root_mount_point):
|
|||||||
with open(path, "w") as mkinitcpio_file:
|
with open(path, "w") as mkinitcpio_file:
|
||||||
mkinitcpio_file.write("\n".join(mklins) + "\n")
|
mkinitcpio_file.write("\n".join(mklins) + "\n")
|
||||||
|
|
||||||
|
|
||||||
def modify_mkinitcpio_conf(partitions, root_mount_point):
|
def modify_mkinitcpio_conf(partitions, root_mount_point):
|
||||||
""" Modifies mkinitcpio.conf """
|
""" Modifies mkinitcpio.conf """
|
||||||
|
|
||||||
|
@ -3,20 +3,20 @@
|
|||||||
#
|
#
|
||||||
# === This file is part of Calamares - <http://github.com/calamares> ===
|
# === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
#
|
#
|
||||||
# Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
|
# Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
|
||||||
#
|
#
|
||||||
# Calamares is free software: you can redistribute it and/or modify
|
# Calamares is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# Calamares is distributed in the hope that it will be useful,
|
# Calamares is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import libcalamares
|
import libcalamares
|
||||||
import os
|
import os
|
||||||
|
@ -35,7 +35,6 @@ except ImportError:
|
|||||||
|
|
||||||
|
|
||||||
class Job:
|
class Job:
|
||||||
|
|
||||||
def __init__(self, working_path, doc, cfg_doc):
|
def __init__(self, working_path, doc, cfg_doc):
|
||||||
self.module_name = doc["name"]
|
self.module_name = doc["name"]
|
||||||
self.pretty_name = "Testing job " + doc["name"]
|
self.pretty_name = "Testing job " + doc["name"]
|
||||||
|
Loading…
Reference in New Issue
Block a user