Skip to content

Commit

Permalink
Bug fix for unlocking in reboot-remote-system
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Apr 3, 2018
1 parent 81580c4 commit 6421d94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions debuntu_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Debian and Ubuntu system administration tools.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: April 1, 2018
# Last Change: April 3, 2018
# URL: https://debuntu-tools.readthedocs.io

"""The top level :mod:`debuntu_tools` module."""
Expand All @@ -18,7 +18,7 @@
)

# Semi-standard module versioning.
__version__ = '0.4'
__version__ = '0.4.1'
"""The global version number of the `debuntu-tools` package (a string)."""

# Initialize a logger for this module.
Expand Down
7 changes: 4 additions & 3 deletions debuntu_tools/remote_reboot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Debian and Ubuntu system administration tools.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: March 31, 2018
# Last Change: April 3, 2018
# URL: https://debuntu-tools.readthedocs.io

"""
Expand Down Expand Up @@ -145,11 +145,12 @@ def reboot_remote_system(context):
# Wait for the system to have been rebooted.
if have_config:
# Unlock the root disk encryption.
program = EncryptedSystem(
options = dict(
config_loader=loader,
config_section=context.ssh_alias,
)
program.unlock_system()
with EncryptedSystem(**options) as program:
program.unlock_system()
else:
# Wait for a successful SSH connection to report a lower uptime.
logger.info("Waiting for %s to come back online ..", context)
Expand Down

0 comments on commit 6421d94

Please sign in to comment.