daemon: changes usage of running scripts using /bin/sh to bash to help provide consistency in what could be ran, added bash as a dependency in installation scripts, added bash as an executable check during startup

This commit is contained in:
Blake Harnden 2020-07-28 16:13:37 -07:00
parent eb70386238
commit 0d2dd70727
20 changed files with 71 additions and 62 deletions

View file

@ -22,6 +22,7 @@ from core.emulator.enumerations import (
RegisterTlvs,
)
from core.errors import CoreError
from core.executables import BASH
from core.nodes.base import CoreNode
from core.nodes.interface import CoreInterface
from core.nodes.network import WlanNode
@ -1167,7 +1168,7 @@ class Ns2ScriptedMobility(WayPointMobility):
if filename is None or filename == "":
return
filename = self.findfile(filename)
args = f"/bin/sh {filename} {typestr}"
args = f"{BASH} {filename} {typestr}"
utils.cmd(
args, cwd=self.session.session_dir, env=self.session.get_environment()
)