# server lifetime:
START_FUNCS=`grep ServerStartModule_ *.c |sed "s;.*:;;" |sort -u`
INIT_FUNCS=`grep InitModule_ *.c |sed "s;.*:;;" |sort -u`
+INIT2_FUNCS=`grep InitModule2_ *.c |sed "s;.*:;;" |sort -u`
FINALIZE_FUNCS=`grep FinalizeModule_ *.c |sed "s;.*:;;" |sort -u`
SHUTDOWN_FUNCS=`grep ServerShutdownModule_ *.c |sed "s;.*:;;" |sort -u`
* server lifetime:
*/
void initialise_modules (void);
+void initialise2_modules (void);
void start_modules (void);
void shutdown_modules (void);
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "Starting $HOOKNAME\n");
+ syslog(LOG_DEBUG, "Starting $HOOKNAME\n");
#endif
$HOOK();
EOF
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "Initializing $HOOKNAME\n");
+ syslog(LOG_DEBUG, "Initializing $HOOKNAME\n");
#endif
$HOOK();
EOF
EOF
done
+#********************************************************************************
+# server module ******** initialisation ******** second stage.
+#********************************************************************************
+cat <<EOF >> $H_FILE
+
+/* Server Init Hooks: */
+EOF
+
+cat <<EOF >>$C_FILE
+}
+
+
+void initialise2_modules (void)
+{
+
+EOF
+for HOOK in $INIT2_FUNCS; do
+ HOOKNAME=`echo $HOOK |sed "s;InitModule2_;;"`
+# Add this entry point to the .c file
+ cat <<EOF >> $C_FILE
+#ifdef DBG_PRINNT_HOOKS_AT_START
+ syslog(LOG_DEBUG, "Initializing $HOOKNAME\n");
+#endif
+ $HOOK();
+EOF
+# Add this entry point to the .h file
+ cat <<EOF >> $H_FILE
+extern void $HOOK(void);
+EOF
+done
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "Shutting down $HOOKNAME\n");
+ syslog(LOG_DEBUG, "Shutting down $HOOKNAME\n");
#endif
$HOOK();
EOF
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "Initializing $HOOKNAME\n");
+ syslog(LOG_DEBUG, "Initializing $HOOKNAME\n");
#endif
$HOOK(sess);
EOF
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "Attaching Session; $HOOKNAME\n");
+ syslog(LOG_DEBUG, "Attaching Session; $HOOKNAME\n");
#endif
$HOOK(sess);
EOF
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "Initializing $HOOKNAME\n");
+ syslog(LOG_DEBUG, "Initializing $HOOKNAME\n");
#endif
$HOOK(sess);
EOF
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "Initializing $HOOKNAME\n");
+ syslog(LOG_DEBUG, "Initializing $HOOKNAME\n");
#endif
$HOOK(*sess);
EOF
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "NEW $HOOKNAME\n");
+ syslog(LOG_DEBUG, "NEW $HOOKNAME\n");
#endif
$HOOK(httpreq);
EOF
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "Detaching $HOOKNAME\n");
+ syslog(LOG_DEBUG, "Detaching $HOOKNAME\n");
#endif
$HOOK(httpreq);
EOF
# Add this entry point to the .c file
cat <<EOF >> $C_FILE
#ifdef DBG_PRINNT_HOOKS_AT_START
- syslog(CTDL_INFO, "Destructing $HOOKNAME\n");
+ syslog(LOG_DEBUG, "Destructing $HOOKNAME\n");
#endif
$HOOK(httpreq);
EOF