/usr/bin/printf "Scanning extension modules for entry points.\n"
-STATIC_FIRST_MODULES="citserver control modules euidindex file_ops msgbase room_ops user_ops nttlist"
+STATIC_FIRST_MODULES="citserver control modules euidindex file_ops msgbase room_ops user_ops nttlist database"
DYNAMIC_MODULES=`grep CTDL_MODULE_INIT modules/*/*.c |$SED 's;.*(\(.*\));\1;'`
if test -d user_modules; then
USER_MODULES=`grep CTDL_MODULE_INIT user_modules/*/*.c |$SED 's;.*(\(.*\));\1;'`
EOF
done
+grep CTDL_MODULE_UPGRADE *.c modules/*/*.c |$SED 's;.*(\(.*\));\CTDL_MODULE_UPGRADE(\1)\;\n;' >> $H_FILE
+
cat <<EOF >> $H_FILE
SERV_MODULES = \\
EOF
-echo modules/*/*.c | $SED "s;\.c ;.o \\\\\n;g" >> $MOD_FILE
+echo modules/*/*.c | $SED -e "s;\.c ;.o \\\\\n;g" -e "s;\.c;.o;" >> $MOD_FILE
echo >> $MOD_FILE
SOURCES = \\
EOF
-
echo modules/*/*.c | $SED "s;\.c ;.c \\\\\n;g" >> $SRC_FILE
echo >> $SRC_FILE
# Add this entry point to the .c file
-grep CTDL_MODULE_UPGRADE *.c modules/*/*.c |$SED 's;.*(\(.*\));\tpMod = CTDL_UPGRADE_CALL(\1)\;\n\tMOD_syslog(LOG_INFO, "%s\\n", pmod)\;\n;' >> $U_FILE
+grep CTDL_MODULE_UPGRADE *.c modules/*/*.c |$SED 's;.*(\(.*\));\tpMod = CTDL_UPGRADE_CALL(\1)\;\n\tMOD_syslog(LOG_INFO, "%s\\n", pMod)\;\n;' >> $U_FILE
#close the upgrade file
/usr/bin/printf "}\n" >> $U_FILE