From 6fd684358e3b2b2d73631b703d403cc2ddd5715a Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 10 Nov 2004 02:31:52 +0000 Subject: [PATCH] Use "/bin/sh" for SHELL if environment variable isn't set (eliminate FAQ #1 for Synchronet-Unix). --- src/sbbs3/main.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index 0b05e13d4b..367c862497 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -2411,10 +2411,20 @@ bool sbbs_t::init() #endif ); if(comspec==NULL) { -#if defined(__unix__) && defined(_PATH_BSHELL) + errormsg(WHERE, ERR_CHK, +#ifdef __unix__ + "SHELL" +#else + "COMSPEC" +#endif + " environment variable", 0); +#if defined(__unix__) + #if defined(_PATH_BSHELL) comspec = _PATH_BSHELL; + #else + comspec = "/bin/sh"; + #endif #else - errormsg(WHERE, ERR_CHK, "SHELL or COMSPEC environment variable", 0); return(false); #endif } -- GitLab