mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't expect bash to be the default shell
This commit is contained in:
parent
31c59f7d96
commit
19479a1a28
2 changed files with 9 additions and 5 deletions
|
@ -72,14 +72,15 @@ def _update_nilrt_restart_state():
|
|||
|
||||
"""
|
||||
# TODO: This stat & md5sum should be replaced with _fingerprint_file call -W. Werner, 2020-08-18
|
||||
uname = __salt__["cmd.run_stdout"]("uname -r")
|
||||
__salt__["cmd.shell"](
|
||||
"stat -c %Y /lib/modules/$(uname -r)/modules.dep >{}/modules.dep.timestamp".format(
|
||||
NILRT_RESTARTCHECK_STATE_PATH
|
||||
"stat -c %Y /lib/modules/{}/modules.dep >{}/modules.dep.timestamp".format(
|
||||
uname, NILRT_RESTARTCHECK_STATE_PATH
|
||||
)
|
||||
)
|
||||
__salt__["cmd.shell"](
|
||||
"md5sum /lib/modules/$(uname -r)/modules.dep >{}/modules.dep.md5sum".format(
|
||||
NILRT_RESTARTCHECK_STATE_PATH
|
||||
"md5sum /lib/modules/{}/modules.dep >{}/modules.dep.md5sum".format(
|
||||
uname, NILRT_RESTARTCHECK_STATE_PATH
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -11,7 +11,10 @@ from tests.support.mock import patch
|
|||
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_loader(request):
|
||||
setup_loader_modules = {opkg: {"__salt__": {"cmd.shell": cmd.shell}}, cmd: {}}
|
||||
setup_loader_modules = {
|
||||
opkg: {"__salt__": {"cmd.shell": cmd.shell, "cmd.run_stdout": cmd.run_stdout}},
|
||||
cmd: {},
|
||||
}
|
||||
with pytest.helpers.loader_mock(request, setup_loader_modules) as loader_mock:
|
||||
yield loader_mock
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue