diff options
author | Karel Zak | 2006-12-07 00:26:24 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:24 +0100 |
commit | d162fcb550a77875c8f58fda0e0a0bd91f211c99 (patch) | |
tree | bd984959acd465b3058bd805f216d29dc0c3c1a6 /login-utils/login.c | |
parent | Imported from util-linux-2.12i tarball. (diff) | |
download | kernel-qcow2-util-linux-d162fcb550a77875c8f58fda0e0a0bd91f211c99.tar.gz kernel-qcow2-util-linux-d162fcb550a77875c8f58fda0e0a0bd91f211c99.tar.xz kernel-qcow2-util-linux-d162fcb550a77875c8f58fda0e0a0bd91f211c99.zip |
Imported from util-linux-2.12j tarball.
Diffstat (limited to 'login-utils/login.c')
-rw-r--r-- | login-utils/login.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/login-utils/login.c b/login-utils/login.c index 3b1bfa56e..666121240 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -1081,17 +1081,28 @@ Michael Riepe <michael@stud.uni-hannover.de> } if (!quietlog) { - struct stat st; - char *mail; - motd(); - mail = getenv("MAIL"); - if (mail && stat(mail, &st) == 0 && st.st_size != 0) { + +#ifdef DO_STAT_MAIL + /* + * This turns out to be a bad idea: when the mail spool + * is NFS mounted, and the NFS connection hangs, the + * login hangs, even root cannot login. + * Checking for mail should be done from the shell. + */ + { + struct stat st; + char *mail; + + mail = getenv("MAIL"); + if (mail && stat(mail, &st) == 0 && st.st_size != 0) { if (st.st_mtime > st.st_atime) printf(_("You have new mail.\n")); else printf(_("You have mail.\n")); + } } +#endif } signal(SIGALRM, SIG_DFL); |