version 1.30, 2025/04/03 20:48:14
|
version 1.31, 2025/04/04 19:43:18
|
Line 24
|
Line 24
|
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
* $Log$ |
* $Log$ |
|
* Revision 1.31 2025/04/04 19:43:18 snw |
|
* Switch to using environment catalog to determine user and group for environment, and remove -u and -g flags from freem |
|
* |
* Revision 1.30 2025/04/03 20:48:14 snw |
* Revision 1.30 2025/04/03 20:48:14 snw |
* Improve daemon error diagnostics and bump to 0.63.0-rc3 |
* Improve daemon error diagnostics and bump to 0.63.0-rc3 |
* |
* |
Line 1213 int fm_validate_environment (char *env)
|
Line 1216 int fm_validate_environment (char *env)
|
return FALSE; |
return FALSE; |
} |
} |
|
|
int fm_start_environment (char *env, char *e_user, char *e_grp) |
int fm_start_environment (char *env) |
{ |
{ |
char basecmd[255]; |
char basecmd[255]; |
char cmd[4096]; |
char cmd[4096]; |
Line 1229 int fm_start_environment (char *env, cha
|
Line 1232 int fm_start_environment (char *env, cha
|
#endif |
#endif |
|
|
#if !defined(__OS2__) |
#if !defined(__OS2__) |
snprintf (cmd, 4095, "%s -d -e %s -u %s -g %s", basecmd, env, e_user, e_grp); |
snprintf (cmd, 4095, "%s -d -e %s", basecmd, env); |
#else |
#else |
sprintf (cmd, 4095, "%s -d -k -e %s -u %s -g %s", basecmd, env, e_user, e_grp); |
sprintf (cmd, 4095, "%s -d -k -e %s", basecmd, env); |
#endif |
#endif |
|
|
system (cmd); |
system (cmd); |
Line 1389 int fm_daemonctl (short action, short ob
|
Line 1392 int fm_daemonctl (short action, short ob
|
switch (action) { |
switch (action) { |
|
|
case ACT_START: |
case ACT_START: |
result = fm_start_environment (cur_env, e_user, e_grp); |
result = fm_start_environment (cur_env); |
if (result == TRUE) { |
if (result == TRUE) { |
fprintf (stderr, "[OK]\n"); |
fprintf (stderr, "[OK]\n"); |
} |
} |
Line 1411 int fm_daemonctl (short action, short ob
|
Line 1414 int fm_daemonctl (short action, short ob
|
|
|
case ACT_RESTART: |
case ACT_RESTART: |
if (fm_stop_environment (cur_env) == TRUE) { |
if (fm_stop_environment (cur_env) == TRUE) { |
result = fm_start_environment (cur_env, e_user, e_grp); |
result = fm_start_environment (cur_env); |
if (result == TRUE) { |
if (result == TRUE) { |
fprintf (stderr, "[OK]\n"); |
fprintf (stderr, "[OK]\n"); |
} |
} |