Skip to content

Commit

Permalink
Added /dev/pts to bind mount locations
Browse files Browse the repository at this point in the history
During runtime several kernel filesystems are bind mounted into
the image root system such that programs expecting it can work.
/dev/pts was not needed so far but seems to be a good addition
to the list to make tools like sudo to work properly when called
e.g. from a config.sh script. This Fixes #2686
  • Loading branch information
schaefi committed Dec 2, 2024
1 parent 2e95503 commit daf1323
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions kiwi/system/root_bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def __init__(self, root_init: RootInit):
self.bind_locations = [
'/proc',
'/dev',
'/dev/pts',
'/var/run/dbus',
'/sys'
]
Expand Down
9 changes: 9 additions & 0 deletions test/unit/system/root_bind_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ def setup(self):
root.root_dir = 'root-dir'
self.bind_root = RootBind(root)

# test expected real bind mount locations
assert self.bind_root.bind_locations == [
'/proc',
'/dev',
'/dev/pts',
'/var/run/dbus',
'/sys'
]

# stub config files and bind locations
self.bind_root.config_files = ['/etc/sysconfig/proxy']
self.bind_root.bind_locations = ['/proc']
Expand Down

0 comments on commit daf1323

Please sign in to comment.