diff --git a/src/export/cfgafs.c b/src/export/cfgafs.c index 6f1892344f..ca4d5a293e 100644 --- a/src/export/cfgafs.c +++ b/src/export/cfgafs.c @@ -33,6 +33,12 @@ extern int sysconfig(int cmd, void *arg, int len); #include "AFS_component_version_number.c" +#if defined(AFS_AIX42_ENV) +static const char *execerror = "/usr/sbin/execerror"; +#else +static const char *execerror = "/etc/execerror"; +#endif + static void usage(void) { @@ -105,7 +111,7 @@ main(int argc, char **argv) if (res != 0) { perror("SYS_KLOAD"); loadquery(L_GETMESSAGES, &buf[2], sizeof buf - 8); - execvp("/etc/execerror", buf); + execvp(execerror, buf); exit(1); } diff --git a/src/export/cfgexport.c b/src/export/cfgexport.c index 04eecb445c..f8f3df20ce 100644 --- a/src/export/cfgexport.c +++ b/src/export/cfgexport.c @@ -48,6 +48,12 @@ static void dump_ksym(sym_t *ksp, char *strings); static void error(); static void sys_error(); +#if defined(AFS_AIX42_ENV) +static const char *execerror = "/usr/sbin/execerror"; +#else +static const char *execerror = "/etc/execerror"; +#endif + static void usage(void) { @@ -126,7 +132,7 @@ main(int argc, char **argv) cload.path = file; if (sysconfig(SYS_KLOAD, &cload, sizeof(cload)) == -1) { loadquery(L_GETMESSAGES, &buf[2], sizeof buf - 8); - execvp("/etc/execerror", buf); + execvp(execerror, buf); perror("SYS_KLOAD"); exit(1); }