--- rc_proc.c 2003/06/30 16:14:58 1.55
+++ rc_proc.c 2003/06/30 16:25:54 1.56
@@ -202,17 +202,6 @@
szVerbose = NULL;
}
scriptAdd(pFatscript, pRc->m_pScriptfunc);
- /* Conditionally print config section notice in verbal mode */
- if (configGetval(RC_VRB_VAL)) {
- nBytes = (strlen(RC_EVN_TEXT) + strlen(RC_DEF_NCF) * 2 + 2) * sizeof (char);
- szVerbose = malloc(nBytes);
- sprintf(szVerbose, RC_EVN_TEXT, RC_DEF_NCF, RC_DEF_NCF);
- strcat(szVerbose, "\n");
- scriptnAppend(pFatscript, szVerbose, strlen(szVerbose));
- free(szVerbose);
- szVerbose = NULL;
- }
- scriptAdd(pFatscript, pRc->m_pScriptcnf);
for (nSecs = 0; nSecs < nTotalsecs; nSecs++) {
for (nRcs = 0; nRcs < pRc->m_pList->m_nFiles; nRcs++) {
for (nTmp = 0; nTmp < pRc->m_pList->m_ppFilevec[nRcs]->m_nSecs && \
@@ -226,6 +215,20 @@
qsort((void *)ppSectmp, (size_t)pRc->m_pList->m_nFiles, \
sizeof(rc_section_t *), priCompare);
for (nTmp = 0; nTmp < pRc->m_pList->m_nFiles && ppSectmp[nTmp]; nTmp++) {
+ /* Conditionally print config section notice in verbal mode */
+ if (configGetval(RC_VRB_VAL)) {
+ /* Conditionally print config section notice in verbal mode */
+ nBytes = (strlen(RC_PRN_TEXT) + strlen(RC_DEF_NCF) + \
+ strlen(sectionGetparent(ppSectmp[nTmp])) + 2) * sizeof (char);
+ szVerbose = malloc(nBytes);
+ sprintf(szVerbose, RC_PRN_TEXT, RC_DEF_NCF, sectionGetparent(ppSectmp[nTmp]));
+ strcat(szVerbose, "\n");
+ scriptnAppend(pFatscript, szVerbose, strlen(szVerbose));
+ free(szVerbose);
+ szVerbose = NULL;
+ }
+ scriptAdd(pFatscript, pRc->m_pScriptcnf);
+
/* Conditionally print each section notice in verbal mode */
if (configGetval(RC_VRB_VAL)) {
szTmp = (char *)sectionGetname(ppSectmp[nTmp]);
@@ -240,8 +243,10 @@
if ((szTmp = (char *)sectionGetlogin(ppSectmp[nTmp])) != NULL) {
scriptnAppend(pFatscript, "#su ", strlen("#su "));
scriptnAppend(pFatscript, szTmp, strlen(szTmp));
- scriptnAppend(pFatscript, "\n", strlen("\n"));
}
+ else
+ scriptnAppend(pFatscript, "#exit ", strlen("#exit "));
+ scriptnAppend(pFatscript, "\n", strlen("\n"));
scriptAdd(pFatscript, sectionGetscript(ppSectmp[nTmp]));
}
}
|