Skip to content

Commit ee3dea8

Browse files
committed
fix newlines being added to var files
Signed-off-by: Zen <[email protected]>
1 parent 54d1f3f commit ee3dea8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/ugrd/fs/btrfs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '0.8.1'
1+
__version__ = '0.8.2'
22
__author__ = 'desultory'
33

44

@@ -50,7 +50,7 @@ def select_subvol(self) -> str:
5050
" echo 'Invalid selection'",
5151
" else",
5252
' echo "Selected subvolume: $subvol"',
53-
' echo ",subvol=$subvol" >> /run/MOUNTS_ROOT_OPTIONS',
53+
' echo -n ",subvol=$subvol" >> /run/MOUNTS_ROOT_OPTIONS',
5454
" break",
5555
" fi",
5656
" ;;",
@@ -69,5 +69,5 @@ def set_root_subvol(self) -> str:
6969
Set the switch_root_target to the original root_mount path.
7070
"""
7171
if root_subvol := self.get('root_subvol'):
72-
return f'echo ",subvol={root_subvol}" >> /run/MOUNTS_ROOT_OPTIONS'
72+
return f'echo -n ",subvol={root_subvol}" >> /run/MOUNTS_ROOT_OPTIONS'
7373

src/ugrd/fs/mounts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ def mount_root(self) -> str:
302302

303303
def export_mount_info(self) -> None:
304304
""" Exports mount info based on the config to /run/MOUNTS_ROOT_{option} """
305-
return [f'echo "{self["mounts"]["root"]["destination"]}" > "/run/MOUNTS_ROOT_TARGET"',
306-
f'echo "{_get_mount_source(self, self["mounts"]["root"])}" > "/run/MOUNTS_ROOT_SOURCE"',
307-
f'''echo "{','.join(self["mounts"]["root"]["options"])}" > "/run/MOUNTS_ROOT_OPTIONS"''']
305+
return [f'echo -n "{self["mounts"]["root"]["destination"]}" > "/run/MOUNTS_ROOT_TARGET"',
306+
f'echo -n "{_get_mount_source(self, self["mounts"]["root"])}" > "/run/MOUNTS_ROOT_SOURCE"',
307+
f'''echo -n "{','.join(self["mounts"]["root"]["options"])}" > "/run/MOUNTS_ROOT_OPTIONS"''']
308308

309309

310310
def clean_mounts(self) -> list[str]:

0 commit comments

Comments
 (0)