crypttab: Trim trailing newlines (#51594)
Having a comment or an empty line in /etc/crypttab results in an additional empty line being added, because the newline that is part of the line being read is getting re-injected in addition to the newline used to concatenate the lines. Signed-off-by: Sven Wegener <sven.wegener@inovex.de>
This commit is contained in:
parent
8724c0deda
commit
a966662e9a
1 changed files with 1 additions and 0 deletions
|
@ -218,6 +218,7 @@ class Line(object):
|
|||
self.opts = Options(opts)
|
||||
|
||||
if line is not None:
|
||||
self.line = self.line.rstrip('\n')
|
||||
if self._line_valid(line):
|
||||
self.name, backing_device, password, opts = self._split_line(line)
|
||||
|
||||
|
|
Loading…
Reference in a new issue