starter: Only create self-signed certificate if scepclient is built.

This commit is contained in:
Tobias Brunner
2011-10-12 16:37:21 +02:00
parent e9f23d6264
commit aa82ae3aa4
2 changed files with 49 additions and 41 deletions
+4
View File
@@ -46,6 +46,10 @@ if USE_LOAD_WARNING
AM_CFLAGS += -DLOAD_WARNING AM_CFLAGS += -DLOAD_WARNING
endif endif
if USE_TOOLS
AM_CFLAGS += -DGENERATE_SELFCERT
endif
keywords.c: $(srcdir)/keywords.txt $(srcdir)/keywords.h keywords.c: $(srcdir)/keywords.txt $(srcdir)/keywords.h
$(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@ $(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@
+4
View File
@@ -161,6 +161,7 @@ static void fsig(int signal)
} }
} }
#ifdef GENERATE_SELFCERT
static void generate_selfcert() static void generate_selfcert()
{ {
struct stat stb; struct stat stb;
@@ -216,6 +217,7 @@ static void generate_selfcert()
umask(oldmask); umask(oldmask);
} }
} }
#endif /* GENERATE_SELFCERT */
static bool check_pid(char *pid_file) static bool check_pid(char *pid_file)
{ {
@@ -414,7 +416,9 @@ int main (int argc, char **argv)
exit(LSB_RC_SUCCESS); exit(LSB_RC_SUCCESS);
} }
#ifdef GENERATE_SELFCERT
generate_selfcert(); generate_selfcert();
#endif
/* fork if we're not debugging stuff */ /* fork if we're not debugging stuff */
if (!no_fork) if (!no_fork)