Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
routes: replace sh to bash
Browse files Browse the repository at this point in the history
/bin/sh in most systems will be a symbolic link to others shell.
Usually this link points to /bin/bash and in some distro they point to another
shell. For instance Ubuntu links sh to dash and so on.

With this patch we avoid compability problems that we might have in
distros that sh does not link to bash.

Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
  • Loading branch information
Bruno Bottazzini committed May 18, 2016
1 parent 64e1ddf commit c50212e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
}
if (!err) {
getConfigureFile(current_user(req), conf, function (error) {
child = exec("sh " + script);
child = exec("bash " + script);
child.stdout.on('data', function(data) {
stdout += data;
console.log('stdout: ' + data);
Expand Down Expand Up @@ -447,7 +447,7 @@
var child;
var script = scripts_dir() + "/fbp-runner.sh";
script = script + ' stop ' + env_file(current_user(req));
child = exec("sh " + script);
child = exec("bash " + script);
child.on('close', function(code) {
console.log('closing code: ' + code);
res.sendStatus(code);
Expand Down

0 comments on commit c50212e

Please sign in to comment.