mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #51425 from aplanas/backport_51094
cmdmod: add sysfs into the chroot
This commit is contained in:
commit
2e8bf0589c
@ -3035,12 +3035,16 @@ def run_chroot(root,
|
||||
'''
|
||||
__salt__['mount.mount'](
|
||||
os.path.join(root, 'dev'),
|
||||
'udev',
|
||||
'devtmpfs',
|
||||
fstype='devtmpfs')
|
||||
__salt__['mount.mount'](
|
||||
os.path.join(root, 'proc'),
|
||||
'proc',
|
||||
fstype='proc')
|
||||
__salt__['mount.mount'](
|
||||
os.path.join(root, 'sys'),
|
||||
'sysfs',
|
||||
fstype='sysfs')
|
||||
|
||||
# Execute chroot routine
|
||||
sh_ = '/bin/sh'
|
||||
@ -3092,6 +3096,7 @@ def run_chroot(root,
|
||||
log.error('Processes running in chroot could not be killed, '
|
||||
'filesystem will remain mounted')
|
||||
|
||||
__salt__['mount.umount'](os.path.join(root, 'sys'))
|
||||
__salt__['mount.umount'](os.path.join(root, 'proc'))
|
||||
__salt__['mount.umount'](os.path.join(root, 'dev'))
|
||||
if hide_output:
|
||||
|
Loading…
Reference in New Issue
Block a user