$Log$
+ Revision 590.91 2002/01/26 09:23:40 error
+ * setup now has a silent running mode (-q option) where it silently sets
+ defaults for everything. This is intended for use in scripts such as
+ the RPM packages, eliminating a step from the installation process.
+
Revision 590.90 2002/01/26 09:19:16 error
* citadel.spec has been completely overhauled, we can make RPMs now!
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
#define UI_TEXT 0 /* Default setup type -- text only */
#define UI_DIALOG 1 /* Use the 'dialog' program (REMOVED) */
#define UI_CURSES 2 /* Use curses */
+#define UI_SILENT 3 /* Silent running, for use in scripts */
#define SERVICE_NAME "citadel"
#define PROTO_NAME "tcp"
return;
}
#endif
- printf("Press return to continue...");
- fgets(junk, 5, stdin);
+ if (setup_type == UI_TEXT) {
+ printf("Press return to continue...");
+ fgets(junk, 5, stdin);
+ }
}
int yesno(char *question)
if (!strcmp(argv[a], "-i")) {
info_only = 1;
}
+ if (!strcmp(argv[a], "-q")) {
+ setup_type = UI_SILENT;
+ }
}
/* Go through a series of dialogs prompting for config info */
- for (curr = 1; curr <= MAXSETUP; ++curr) {
- edit_value(curr);
+ if (setup_type != UI_SILENT) {
+ for (curr = 1; curr <= MAXSETUP; ++curr) {
+ edit_value(curr);
+ }
}
/*