@@ -0,0 +1,187 @@
1+--- a/frontend/linux/workbench/mysql-workbench.in
2++++ b/frontend/linux/workbench/mysql-workbench.in
3+@@ -99,8 +99,8 @@
4+ if test "$WB_DEBUG" != ""; then
5+ $WB_DEBUG $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
6+ else
7+- if type -p catchsegv > /dev/null; then
8+- catchsegv $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
9++ if type -p @catchsegv@ > /dev/null; then
10++ @catchsegv@ $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
11+ else
12+ $MWB_BINARIES_DIR/mysql-workbench-bin "$@"
13+ fi
14+--- a/plugins/migration/frontend/migration_bulk_copy_data.py
15++++ b/plugins/migration/frontend/migration_bulk_copy_data.py
16+@@ -110,7 +110,7 @@
17+ return 'sh'
18+
19+ def generate_import_script(self, connection_args, path_to_file, schema_name):
20+- output = ['#!/bin/bash']
21++ output = ['#!/usr/bin/env bash']
22+ output.append('MYPATH=\`pwd\`')
23+
24+ output.append('if [ -f \$MYPATH/%s ] ; then' % self.error_log_name)
25+@@ -164,7 +164,7 @@
26+ return 'sh'
27+
28+ def generate_import_script(self, connection_args, path_to_file, schema_name):
29+- output = ['#!/bin/bash']
30++ output = ['#!/usr/bin/env bash']
31+ output.append('MYPATH=\`pwd\`')
32+
33+ output.append('if [ -f \$MYPATH/%s ] ; then' % self.error_log_name)
34+@@ -417,7 +417,7 @@
35+
36+ with open(script_path, 'w+') as f:
37+ os.chmod(script_path, 0700)
38+- f.write('#!/bin/bash\n\n')
39++ f.write('#!/usr/bin/env bash\n\n')
40+ f.write('MYPATH=`pwd`\n')
41+
42+ f.write("arg_source_password=\"<put source password here>\"\n")
43+@@ -521,7 +521,7 @@
44+
45+ with open(script_path, 'w+') as f:
46+ os.chmod(script_path, 0700)
47+- f.write('#!/bin/bash\n\n')
48++ f.write('#!/usr/bin/env bash\n\n')
49+ f.write('MYPATH=`pwd`\n')
50+
51+ f.write("arg_source_password=\"<put source password here>\"\n")
52+--- a/plugins/wb.admin/backend/wb_server_control.py
53++++ b/plugins/wb.admin/backend/wb_server_control.py
54+@@ -39,7 +39,7 @@
55+
56+ UnixVariant = {
57+ "" : {
58+- 'sudo_command' : "/usr/bin/sudo -k -S -p EnterPasswordHere ",
59++ 'sudo_command' : "@sudo@ -k -S -p EnterPasswordHere ",
60+ }
61+ }
62+
63+--- a/plugins/wb.admin/backend/wb_server_management.py
64++++ b/plugins/wb.admin/backend/wb_server_management.py
65+@@ -40,7 +40,7 @@
66+
67+ def reset_sudo_prefix():
68+ global default_sudo_prefix
69+- default_sudo_prefix = '/usr/bin/sudo -k -S -p EnterPasswordHere'
70++ default_sudo_prefix = '@sudo@ -k -S -p EnterPasswordHere'
71+
72+ reset_sudo_prefix()
73+
74+@@ -100,7 +100,7 @@
75+
76+ if to_spawn:
77+ command += ' &'
78+- sudo_prefix += ' /usr/bin/nohup'
79++ sudo_prefix += ' @nohup@'
80+
81+ # If as_user is the CURRENT then there's no need to sudo
82+ if as_user != Users.CURRENT:
83+@@ -111,7 +111,7 @@
84+ if '/bin/sh' in sudo_prefix or '/bin/bash' in sudo_prefix:
85+ command = "LANG=C " + sudo_prefix + " \"" + command.replace('\\', '\\\\').replace('"', r'\"').replace('$','\\$') + "\""
86+ else:
87+- command = "LANG=C " + sudo_prefix + " /bin/bash -c \"" + command.replace('\\', '\\\\').replace('"', r'\"').replace('$','\\$') + "\""
88++ command = "LANG=C " + sudo_prefix + " @bash@ -c \"" + command.replace('\\', '\\\\').replace('"', r'\"').replace('$','\\$') + "\""
89+
90+ return command
91+
92+@@ -896,9 +896,9 @@
93+ if as_user == Users.CURRENT:
94+ raise PermissionDeniedError("Cannot set owner of directory %s" % path)
95+ else:
96+- command = "/bin/mkdir %s && chown %s %s" % (quote_path(path), with_owner, quote_path(path))
97++ command = "@mkdir@ %s && chown %s %s" % (quote_path(path), with_owner, quote_path(path))
98+ else:
99+- command = "/bin/mkdir %s" % (quote_path(path))
100++ command = "@mkdir@ %s" % (quote_path(path))
101+
102+ res = self.process_ops.exec_cmd(command,
103+ as_user = as_user,
104+@@ -927,7 +927,7 @@
105+ @useAbsPath("path")
106+ def remove_directory(self, path, as_user = Users.CURRENT, user_password = None):
107+ output = StringIO.StringIO()
108+- res = self.process_ops.exec_cmd('/bin/rmdir ' + quote_path(path),
109++ res = self.process_ops.exec_cmd('@rmdir@ ' + quote_path(path),
110+ as_user = as_user,
111+ user_password = user_password,
112+ output_handler = output.write,
113+@@ -940,7 +940,7 @@
114+ @useAbsPath("path")
115+ def remove_directory_recursive(self, path, as_user = Users.CURRENT, user_password = None):
116+ output = StringIO.StringIO()
117+- res = self.process_ops.exec_cmd('/bin/rm -R ' + quote_path(path),
118++ res = self.process_ops.exec_cmd('@rm@ -R ' + quote_path(path),
119+ as_user = as_user,
120+ user_password = user_password,
121+ output_handler = output.write,
122+@@ -953,7 +953,7 @@
123+ @useAbsPath("path")
124+ def delete_file(self, path, as_user = Users.CURRENT, user_password = None):
125+ output = StringIO.StringIO()
126+- res = self.process_ops.exec_cmd("/bin/rm " + quote_path(path),
127++ res = self.process_ops.exec_cmd("@rm@ " + quote_path(path),
128+ as_user = as_user,
129+ user_password = user_password,
130+ output_handler = output.write,
131+@@ -1001,7 +1001,7 @@
132+ def _copy_file(self, source, dest, as_user = Users.CURRENT, user_password = None):
133+ output = StringIO.StringIO()
134+
135+- res = self.process_ops.exec_cmd("LC_ALL=C /bin/cp " + quote_path(source) + " " + quote_path(dest),
136++ res = self.process_ops.exec_cmd("LC_ALL=C @cp@ " + quote_path(source) + " " + quote_path(dest),
137+ as_user = as_user,
138+ user_password = user_password,
139+ output_handler = output.write,
140+@@ -1077,9 +1077,9 @@
141+ # for ls -l, the output format changes depending on stdout being a terminal or not
142+ # since both cases are possible, we need to handle both at the same time (1st line being total <nnnn> or not)
143+ # the good news is that if the line is there, then it will always start with total, regardless of the locale
144+- command = 'LC_ALL=C /bin/ls -l -p %s' % quote_path(path)
145++ command = 'LC_ALL=C @ls@ -l -p %s' % quote_path(path)
146+ else:
147+- command = 'LC_ALL=C /bin/ls -1 -p %s' % quote_path(path)
148++ command = 'LC_ALL=C @ls@ -1 -p %s' % quote_path(path)
149+
150+ output = StringIO.StringIO()
151+ res = self.process_ops.exec_cmd(command,
152+@@ -2160,9 +2160,9 @@
153+ def get_range(self, start, end):
154+ f = StringIO.StringIO()
155+ if not self._need_sudo:
156+- ret = self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
157++ ret = self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
158+ else:
159+- ret = self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.ADMIN, user_password=self.get_password, output_handler=f.write)
160++ ret = self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i count=%i 2> /dev/null" % (quote_path(self.path), start, end-start), as_user = Users.ADMIN, user_password=self.get_password, output_handler=f.write)
161+
162+ if ret != 0:
163+ raise RuntimeError("Could not get data from file %s" % self.path)
164+@@ -2170,9 +2170,9 @@
165+
166+ def read_task(self, offset, file):
167+ if not self._need_sudo:
168+- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=file.write)
169++ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=file.write)
170+ else:
171+- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self.get_password, output_handler=file.write)
172++ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self.get_password, output_handler=file.write)
173+ # this will signal the reader end that there's no more data
174+ file.close()
175+
176+@@ -2198,9 +2198,9 @@
177+ self._pos = offset
178+ f = StringIO.StringIO()
179+ if not self._need_sudo:
180+- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
181++ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.CURRENT, user_password=None, output_handler=f.write)
182+ else:
183+- self.server_helper.execute_command("/bin/dd if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self._password, output_handler=f.write)
184++ self.server_helper.execute_command("@dd@ if=%s ibs=1 skip=%i 2> /dev/null" % (quote_path(self.path), offset), as_user = Users.ADMIN, user_password=self._password, output_handler=f.write)
185+ self.data = f
186+ self.data.seek(0)
187+ if self.skip_first_newline: