Skip to content

Commit

Permalink
Remove status=none' flag from dd' invocation (backwards compatibility)
Browse files Browse the repository at this point in the history
This is in response to the "dd: invalid status flag: none" error seen
here: https://travis-ci.org/xolox/python-linux-utils/jobs/245334722
  • Loading branch information
xolox committed Jun 21, 2017
1 parent 4a16b57 commit a11b957
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions linux_utils/luks.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,11 @@ def generate_key_file(filename, size=DEFAULT_KEY_SIZE, context=None):
logger.debug("Creating key file of %i bytes: %s", size, filename)
context.execute(
'dd', 'if=/dev/urandom', 'of=%s' % filename,
'bs=%i' % size, 'count=1', 'status=none',
sudo=True,
'bs=%i' % size, 'count=1',
# I'd rather use `status=none' then silent=True, however the
# `status=none' flag isn't supported on Ubuntu 12.04 which
# currently runs on Travis CI, so there you go :-p.
silent=True, sudo=True,
)
context.execute('chown', 'root:root', filename, sudo=True)
context.execute('chmod', '400', filename, sudo=True)
Expand Down

0 comments on commit a11b957

Please sign in to comment.