parent
f0a143cd5c
commit
40c3b3dd04
@ -8,6 +8,7 @@
|
||||
# Copyright 2016, David McKinney <mckinney@subgraph.com>
|
||||
# Copyright 2016, Kevin Kofler <kevin.kofler@chello.at>
|
||||
# Copyright 2017, Alf Gaida <agaida@siduction.org>
|
||||
# Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
#
|
||||
# Calamares is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -48,14 +49,19 @@ def copy_initramfs_hooks(partitions, root_mount_point):
|
||||
if encrypt_hook:
|
||||
target = "{!s}/usr/share/initramfs-tools/hooks/encrypt_hook".format(
|
||||
root_mount_point)
|
||||
|
||||
# Find where this module is installed
|
||||
_filename = inspect.getframeinfo(inspect.currentframe()).filename
|
||||
_path = os.path.dirname(os.path.abspath(_filename))
|
||||
|
||||
if unencrypted_separate_boot:
|
||||
shutil.copy2(
|
||||
"/usr/lib/calamares/modules/initramfscfg/encrypt_hook_nokey",
|
||||
os.path.join(_path, "encrypt_hook_nokey"),
|
||||
target
|
||||
)
|
||||
else:
|
||||
shutil.copy2(
|
||||
"/usr/lib/calamares/modules/initramfscfg/encrypt_hook",
|
||||
os.path.join(_path, "encrypt_hook"),
|
||||
target
|
||||
)
|
||||
os.chmod(target, 0o755)
|
||||
|
Loading…
Reference in New Issue
Block a user