--- gvpe/src/util.C 2004/04/02 14:42:45 1.13 +++ gvpe/src/util.C 2005/03/18 02:32:20 1.18 @@ -1,10 +1,12 @@ /* util.C -- process management and other utility functions - Copyright (C) 2003 Marc Lehmann + Copyright (C) 2003-2005 Marc Lehmann Some of these are taken from tinc, see the AUTHORS file. - This program is free software; you can redistribute it and/or modify + This file is part of GVPE. + + GVPE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -15,7 +17,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + along with gvpe; if not, write to the Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -52,7 +54,7 @@ if (pid) { - fprintf (stderr, _("A vped is already running with pid %d.\n"), pid); + fprintf (stderr, _("A gvpe daemon is already running with pid %d.\n"), pid); return 1; } @@ -72,7 +74,7 @@ if (!pid) { - fprintf (stderr, _("No other vped is running.\n")); + fprintf (stderr, _("No other gvpe daemon is running.\n")); return 1; } @@ -81,7 +83,7 @@ /* ESRCH is returned when no process with that pid is found */ if (kill (pid, signal) && errno == ESRCH) { - fprintf (stderr, _("The vped is no longer running. ")); + fprintf (stderr, _("The gvpe daemon is no longer running. ")); fprintf (stderr, _("Removing stale lock file.\n")); remove_pid (conf.pidfilename); @@ -122,21 +124,11 @@ else log_to (LOGTO_SYSLOG | LOGTO_STDERR); - slog (L_INFO, _("vped %s (%s %s) starting"), VERSION, __DATE__, __TIME__); + slog (L_INFO, _("gvpe daemon %s (%s %s) starting"), VERSION, __DATE__, __TIME__); return 0; } -void -make_names (void) -{ - if (!conf.pidfilename) - conf.pidfilename = strdup (LOCALSTATEDIR "/run/vped.pid"); - - if (!confbase) - asprintf (&confbase, "%s/vpe", CONFDIR); -} - void run_script (const run_script_cb &cb, bool wait) { int pid;