From 23dd4f289827fb5bb99223f519e0012766a227ef Mon Sep 17 00:00:00 2001 From: reenoo Date: Thu, 9 May 2002 20:27:01 +0000 Subject: [PATCH] GPL... --- server/main.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/server/main.c b/server/main.c index 4517ce7..0f3e1d3 100644 --- a/server/main.c +++ b/server/main.c @@ -118,6 +118,7 @@ void clear_settings(); int process_command_line (int argc, char **argv); int process_configfile (char *cfgfile); void set_default_settings(); +void output_GPL_notice(); int daemonize(); int init_sockets(); int drop_privs(char *user); @@ -205,6 +206,7 @@ main (int argc, char **argv) report(RPT_NOTICE, "Server forking to background"); ESSENTIAL( daemonize() ); } else { + output_GPL_notice(); report(RPT_NOTICE, "Server running in foreground"); } #endif @@ -484,6 +486,33 @@ set_default_settings() } +void +output_GPL_notice() +{ + /* This will only be invoked when running in foreground + * So, directly output to stderr + */ + fprintf (stderr, "LCDd %s, LCDproc Protocol %s\n", VERSION, PROTOCOL_VERSION); + fprintf (stderr, "Part of LCDproc\n"); + fprintf (stderr, "Copyright (C) 1998-2002 William Ferrell, Scott Scriven\n"); + fprintf (stderr, " and many other contributors\n\n"); + fprintf (stderr, "This program is free software; you can redistribute it and/or\n"); + fprintf (stderr, "modify it under the terms of the GNU General Public License\n"); + fprintf (stderr, "as published by the Free Software Foundation; either version 2\n"); + fprintf (stderr, "of the License, or (at your option) any later version.\n\n"); + + fprintf (stderr, "This program is distributed in the hope that it will be useful,\n"); + fprintf (stderr, "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); + fprintf (stderr, "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"); + fprintf (stderr, "GNU General Public License for more details.\n\n"); + + fprintf (stderr, "The file COPYING contains the GNU General Public License.\n"); + fprintf (stderr, "You should have received a copy of the GNU General Public License\n"); + fprintf (stderr, "along with this program; if not, write to the Free Software\n"); + fprintf (stderr, "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\n"); +} + + int daemonize() {