1diff --git a/execute.c b/execute.c
2index be06068..3468fa7 100644
3--- a/execute.c
4+++ b/execute.c
5@@ -260,7 +260,7 @@
6 char *output;
7 char *argv[32];
8
9- append(argv, 0, "ssh-add", "-l", NULL);
10+ append(argv, 0, "@ssh-add@", "-l", NULL);
11 output = cmd_pipe_stdout(argv, &error_code, &output_size);
12 free(output);
13
14@@ -300,7 +300,7 @@
15 }
16
17 argc = 0;
18- argc = append(argv, argc, "ssh", "-fN", "-R", port_forwarding, "-S", socket_path, "-M", NULL);
19+ argc = append(argv, argc, "@ssh@", "-fN", "-R", port_forwarding, "-S", socket_path, "-M", NULL);
20 if (ssh_config)
21 (void) append(argv, argc, "-F", ssh_config, host_name, NULL);
22 else
23@@ -309,8 +309,8 @@
24 return ret;
25
26 snprintf(cmd, PATH_MAX,
27- "tar " TAR_OPTIONS " -cf - -C " REPLICATED_DIRECTORY " . "
28- "| ssh -q -S %s %s 'mkdir %s; tar -xf - -C %s'",
29+ "@tar@ " TAR_OPTIONS " -cf - -C " REPLICATED_DIRECTORY " . "
30+ "| @ssh@ -q -S %s %s 'mkdir %s; tar -xf - -C %s'",
31 socket_path, host_name, stagedir(http_port), stagedir(http_port));
32 if ((ret = system(cmd)) != 0)
33 return ret;
34@@ -320,8 +320,8 @@
35 array_to_str(route_label->export_paths, path_repr, sizeof(path_repr), " ");
36
37 snprintf(cmd, PATH_MAX,
38- "tar " TAR_OPTIONS " -cf - %s "
39- "| ssh -q -S %s %s 'tar -xf - -C %s'",
40+ "@tar@ " TAR_OPTIONS " -cf - %s "
41+ "| @ssh@ -q -S %s %s 'tar -xf - -C %s'",
42 path_repr, socket_path, host_name, stagedir(http_port));
43
44 if ((ret = system(cmd)) != 0)
45@@ -407,7 +407,7 @@
46
47 /* construct ssh command */
48 argc = 0;
49- argc = append(argv, argc, "ssh", "-T", "-S", socket_path, NULL);
50+ argc = append(argv, argc, "@ssh@", "-T", "-S", socket_path, NULL);
51
52 (void) append(argv, argc, host_name, cmd, NULL);
53 ret = cmd_pipe_stdin(argv, host_label->content, host_label->content_size);
54@@ -432,7 +432,7 @@
55 snprintf(cmd, sizeof(cmd), "cat > %s/_script", stagedir(http_port));
56 /* construct ssh command */
57 argc = 0;
58- argc = append(argv, argc, "ssh", "-T", "-S", socket_path, NULL);
59+ argc = append(argv, argc, "@ssh@", "-T", "-S", socket_path, NULL);
60 (void) append(argv, argc, host_name, cmd, NULL);
61 cmd_pipe_stdin(argv, host_label->content, host_label->content_size);
62
63@@ -450,7 +450,7 @@
64
65 /* construct ssh command */
66 argc = 0;
67- argc = append(argv, argc, "ssh", "-t", "-S", socket_path, NULL);
68+ argc = append(argv, argc, "@ssh@", "-t", "-S", socket_path, NULL);
69
70 (void) append(argv, argc, host_name, cmd, NULL);
71 ret = run(argv);
72@@ -498,11 +498,11 @@
73 if (access(socket_path, F_OK) == -1)
74 return;
75
76- append(argv, 0, "ssh", "-S", socket_path, host_name, "rm", "-rf", stagedir(http_port), NULL);
77+ append(argv, 0, "@ssh@", "-S", socket_path, host_name, "rm", "-rf", stagedir(http_port), NULL);
78 if (run(argv) != 0)
79 warn("remote tmp dir");
80
81- append(argv, 0, "ssh", "-q", "-S", socket_path, "-O", "exit", host_name, NULL);
82+ append(argv, 0, "@ssh@", "-q", "-S", socket_path, "-O", "exit", host_name, NULL);
83 if (run(argv) != 0)
84 warn("exec ssh -O exit");
85 }
86diff --git a/rset.c b/rset.c
87index 383fc82..9c20f65 100644
88--- a/rset.c
89+++ b/rset.c
90@@ -104,10 +104,8 @@
91
92 if ((renv_bin = findprog("renv")) == 0)
93 not_found("renv");
94- if ((rinstall_bin = findprog("rinstall")) == 0)
95- not_found("rinstall");
96- if ((rsub_bin = findprog("rsub")) == 0)
97- not_found("rsub");
98+ rinstall_bin = "@rinstall@";
99+ rsub_bin = "@rsub@";
100
101 /* all operations must be relative to the routes file */
102 if (realpath(xdirname(routes_file), routes_realpath) == NULL)
103@@ -404,7 +402,7 @@
104 if (socket_path && hostname && http_port) {
105 printf("caught signal %d, terminating connection to '%s'\n", sig, hostname);
106 /* clean up socket and SSH connection; leaving staging dir */
107- execlp("ssh", "ssh", "-S", socket_path, "-O", "exit", hostname, NULL);
108+ execlp("@ssh@", "@ssh@", "-S", socket_path, "-O", "exit", hostname, NULL);
109 err(1, "ssh -O exit");
110 }
111 }
112@@ -533,10 +531,9 @@
113
114 /* Convert http server command line into a vector */
115 inputstring = malloc(PATH_MAX);
116- snprintf(inputstring, PATH_MAX, "miniquark -p %d -d " PUBLIC_DIRECTORY, http_port);
117+ snprintf(inputstring, PATH_MAX, "@miniquark@ -p %d -d " PUBLIC_DIRECTORY, http_port);
118 str_to_array(http_srv_argv, inputstring, sizeof(http_srv_argv), " ");
119- if ((httpd_bin = findprog(http_srv_argv[0])) == 0)
120- not_found(http_srv_argv[0]);
121+ httpd_bin = "@miniquark@";
122
123 /* start the web server */
124 pipe(stdout_pipe);
125diff --git a/rutils.c b/rutils.c
126index 1e182d8..9aef76d 100644
127--- a/rutils.c
128+++ b/rutils.c
129@@ -123,7 +123,7 @@
130
131 pid = fork();
132 if (pid == 0) {
133- if (execl("/usr/bin/install", "/usr/bin/install", src, dst, NULL) != -1)
134+ if (execl("@install@", "@install@", src, dst, NULL) != -1)
135 err(1, "%s", dst);
136 }
137 waitpid(pid, &status, 0);