aboutsummaryrefslogtreecommitdiff
path: root/multihome.c
diff options
context:
space:
mode:
Diffstat (limited to 'multihome.c')
-rw-r--r--multihome.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/multihome.c b/multihome.c
index c553cc0..18fe413 100644
--- a/multihome.c
+++ b/multihome.c
@@ -295,13 +295,17 @@ void write_init_script() {
char buf[PATH_MAX];
char date[100];
char *path;
+ char *entry_point;
struct tm *tm;
time_t now;
FILE *fp;
- path = find_program("multihome");
+ strcpy(buf, multihome.entry_point);
+ entry_point = basename(buf);
+
+ path = find_program(entry_point);
if (path == NULL) {
- fprintf(stderr, "multihome not found on $PATH");
+ fprintf(stderr, "%s not found on $PATH\n", buf);
exit(1);
}