aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--loginutils/login.c23
-rw-r--r--mailutils/Config.in15
2 files changed, 25 insertions, 13 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index 8732b99f1..861382f12 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -118,18 +118,25 @@ static void die_if_nologin(void)
118{ 118{
119 FILE *fp; 119 FILE *fp;
120 int c; 120 int c;
121 int empty = 1;
121 122
122 if (access("/etc/nologin", F_OK)) 123 fp = fopen_for_read("/etc/nologin");
124 if (!fp) /* assuming it does not exist */
123 return; 125 return;
124 126
125 fp = fopen_for_read("/etc/nologin"); 127 while ((c = getc(fp)) != EOF) {
126 if (fp) { 128 if (c == '\n')
127 while ((c = getc(fp)) != EOF) 129 bb_putchar('\r');
128 bb_putchar((c=='\n') ? '\r' : c); 130 bb_putchar(c);
129 fflush(stdout); 131 empty = 0;
130 fclose(fp); 132 }
131 } else 133 if (empty)
132 puts("\r\nSystem closed for routine maintenance\r"); 134 puts("\r\nSystem closed for routine maintenance\r");
135
136 fclose(fp);
137 fflush(NULL);
138 /* Users say that they do need this prior to exit: */
139 tcdrain(STDOUT_FILENO);
133 exit(EXIT_FAILURE); 140 exit(EXIT_FAILURE);
134} 141}
135#else 142#else
diff --git a/mailutils/Config.in b/mailutils/Config.in
index b8d697737..4edb0aefd 100644
--- a/mailutils/Config.in
+++ b/mailutils/Config.in
@@ -17,15 +17,18 @@ config POPMAILDIR
17 bool "popmaildir" 17 bool "popmaildir"
18 default n 18 default n
19 help 19 help
20 Simple yet powerful POP3 mail popper. Delivers content of remote mailboxes to local Maildir. 20 Simple yet powerful POP3 mail popper. Delivers content
21 of remote mailboxes to local Maildir.
21 22
22config FEATURE_POPMAILDIR_DELIVERY 23config FEATURE_POPMAILDIR_DELIVERY
23 bool "Allow message filters and custom delivery program" 24 bool "Allow message filters and custom delivery program"
24 default n 25 default n
25 depends on POPMAILDIR 26 depends on POPMAILDIR
26 help 27 help
27 Allow to use a custom program to filter the content of the message before actual delivery (-F "prog [args...]"). 28 Allow to use a custom program to filter the content
28 Allow to use a custom program for message actual delivery (-M "prog [args...]"). 29 of the message before actual delivery (-F "prog [args...]").
30 Allow to use a custom program for message actual delivery
31 (-M "prog [args...]").
29 32
30config REFORMIME 33config REFORMIME
31 bool "reformime" 34 bool "reformime"
@@ -38,7 +41,8 @@ config FEATURE_REFORMIME_COMPAT
38 default y 41 default y
39 depends on REFORMIME 42 depends on REFORMIME
40 help 43 help
41 Accept (for compatibility only) and ignore options other than -x and -X. 44 Accept (for compatibility only) and ignore options
45 other than -x and -X.
42 46
43config SENDMAIL 47config SENDMAIL
44 bool "sendmail" 48 bool "sendmail"
@@ -59,6 +63,7 @@ config FEATURE_SENDMAIL_MAILXX
59 default n 63 default n
60 depends on FEATURE_SENDMAIL_MAILX 64 depends on FEATURE_SENDMAIL_MAILX
61 help 65 help
62 Allow to specify Cc: addresses and some additional headers: Errors-To:. 66 Allow to specify Cc: addresses and some additional headers:
67 Errors-To:
63 68
64endmenu 69endmenu