head 1.2; access; symbols OPENPKG_E1_MP_HEAD:1.2 OPENPKG_E1_MP:1.2 OPENPKG_E1_MP_2_STABLE:1.2.2.2 OPENPKG_E1_FP:1.2.2.2 OPENPKG_2_STABLE_MP:1.2 OPENPKG_2_STABLE_20061018:1.2.2.2 OPENPKG_2_STABLE:1.2.0.2 OPENPKG_CW_FP:1.1; locks; strict; comment @# @; 1.2 date 2005.05.22.08.16.50; author rse; state Exp; branches 1.2.2.1; next 1.1; 1.1 date 2004.12.08.11.17.40; author rse; state Exp; branches; next ; 1.2.2.1 date 2005.05.22.08.16.50; author rse; state dead; branches; next 1.2.2.2; commitid iZxwRSmmWscPXUQr; 1.2.2.2 date 2006.10.16.14.50.50; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; desc @@ 1.2 log @upgrading package: hclnfsd 10.0.0.1 -> 10.0.0.2 @ text @Index: hclnfsd.c --- hclnfsd.c.orig 2005-04-26 21:23:57 +0200 +++ hclnfsd.c 2005-05-22 10:15:55 +0200 @@@@ -223,6 +223,7 @@@@ static time_t GidCacheTimeoutTime=0; int debugmode, DontDoPrinting; char *debuglog; +char *pidfile; struct queueentry { int jobid; @@@@ -2933,6 +2934,7 @@@@ prog = argv[0]; debugmode = 0; debuglog = NULL; + pidfile = NULL; DontDoPrinting = 0; if (sizeof(_uint32) != 4) ErrAndDie("Integral size mismatch. Try defining INT32_LONG and recompiling\n", NULL, NULL, NULL, NULL); @@@@ -3009,6 +3011,19 @@@@ argv++; goto another; } + if ((argc > 0) && (strcmp(*argv, "-P") == 0)) { + argc--; + argv++; + if (argc < 1) + ErrAndDie(USAGE, prog, NULL, NULL, NULL); + if (**argv) + pidfile = my_strdup(*argv); + if (pidfile == NULL) + ErrAndDie("Out of Memory", NULL, NULL, NULL, NULL); + argc--; + argv++; + goto another; + } if ((argc != 1) && (!DontDoPrinting)) ErrAndDie(USAGE, prog, NULL, NULL, NULL); @@@@ -3093,6 +3108,18 @@@@ fprintf(stdout,"%s: [main] real group %d, effective group %d\n", PROGNAME, getgid(), getegid()); debugmode++; } + /* write pid file */ + { + pid_t pid; + FILE *fp; + pid = getpid(); + if ((fp = fopen(pidfile, "w")) == NULL) { + fprintf(stderr, "%s: [main] cannot write pidfile '%s'", PROGNAME, pidfile); + exit(1); + } + fprintf(fp, "%ld\n", (long)pid); + fclose(fp); + } } if (!DontDoPrinting) { @ 1.2.2.1 log @file hclnfsd.patch was added on branch OPENPKG_2_STABLE on 2006-10-16 14:50:50 +0000 @ text @d1 58 @ 1.2.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 58 Index: hclnfsd.c --- hclnfsd.c.orig 2005-04-26 21:23:57 +0200 +++ hclnfsd.c 2005-05-22 10:15:55 +0200 @@@@ -223,6 +223,7 @@@@ static time_t GidCacheTimeoutTime=0; int debugmode, DontDoPrinting; char *debuglog; +char *pidfile; struct queueentry { int jobid; @@@@ -2933,6 +2934,7 @@@@ prog = argv[0]; debugmode = 0; debuglog = NULL; + pidfile = NULL; DontDoPrinting = 0; if (sizeof(_uint32) != 4) ErrAndDie("Integral size mismatch. Try defining INT32_LONG and recompiling\n", NULL, NULL, NULL, NULL); @@@@ -3009,6 +3011,19 @@@@ argv++; goto another; } + if ((argc > 0) && (strcmp(*argv, "-P") == 0)) { + argc--; + argv++; + if (argc < 1) + ErrAndDie(USAGE, prog, NULL, NULL, NULL); + if (**argv) + pidfile = my_strdup(*argv); + if (pidfile == NULL) + ErrAndDie("Out of Memory", NULL, NULL, NULL, NULL); + argc--; + argv++; + goto another; + } if ((argc != 1) && (!DontDoPrinting)) ErrAndDie(USAGE, prog, NULL, NULL, NULL); @@@@ -3093,6 +3108,18 @@@@ fprintf(stdout,"%s: [main] real group %d, effective group %d\n", PROGNAME, getgid(), getegid()); debugmode++; } + /* write pid file */ + { + pid_t pid; + FILE *fp; + pid = getpid(); + if ((fp = fopen(pidfile, "w")) == NULL) { + fprintf(stderr, "%s: [main] cannot write pidfile '%s'", PROGNAME, pidfile); + exit(1); + } + fprintf(fp, "%ld\n", (long)pid); + fclose(fp); + } } if (!DontDoPrinting) { @ 1.1 log @new package: hclnfsd 10.0.0.1 (Hummingbird NFS Authentication Daemon) @ text @d2 3 a4 3 --- hclnfsd.c.orig 2004-11-26 21:37:02 +0100 +++ hclnfsd.c 2004-12-08 12:08:35 +0100 @@@@ -224,6 +224,7 @@@@ d12 1 a12 1 @@@@ -2920,6 +2921,7 @@@@ d20 1 a20 1 @@@@ -2982,6 +2984,19 @@@@ d24 1 a24 1 + if ((argc > 0) && (strcmp(*argv, "-p") == 0)) { d37 1 d40 1 a40 2 @@@@ -3065,6 +3080,18 @@@@ @