Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#4573 - Weird cron emails
Attached to Project:
Arch Linux
Opened by David Rosenstrauch (darose) - Friday, 05 May 2006, 13:39 GMT
Last edited by Dale Blount (dale) - Monday, 19 June 2006, 19:11 GMT
Opened by David Rosenstrauch (darose) - Friday, 05 May 2006, 13:39 GMT
Last edited by Dale Blount (dale) - Monday, 19 June 2006, 19:11 GMT
|
DetailsAs detailed in this email thread:
http://www.archlinux.org/pipermail/arch/2006-March/009292.html cron is sending out emails nightly that read like this: From: "root" Subject: cron: /usr/sbin/run-cron /etc/cron.daily Body: %G --- According to Judd's email, this is an issue in /etc/profile.d/locale.sh. That script is echoing those characters in an attempt to set the console to use unicode. However, this is winding up getting executed on scripts as well, not just tty consoles. The locale.sh should be changed to only perform this setting if the console is a tty. |
This task depends upon
Closed by Judd Vinet (judd)
Thursday, 28 September 2006, 19:24 GMT
Reason for closing: Fixed
Additional comments about closing: Added for next build -- thanks guys.
Thursday, 28 September 2006, 19:24 GMT
Reason for closing: Fixed
Additional comments about closing: Added for next build -- thanks guys.
From: root
Subject: cron: /usr/sbin/run-cron /etc/cron.daily
Body: (K
if [ "$CONSOLE" == "" ]; then
# script run from terminal, execute locale settings or whatever you not want to run with cron
fi
No more junks mails (the same applies if you wrote a fortune script in profile.d, no more fortunes in your mails) :)
Please note that the locale.sh is regenerated by boot scripts, so you may want to patch them instead of this file directly.
Please see my previously attached file (rasko_locale.sh) for a fix...
But like you said, /etc/profile.d/locale.sh gets regenerated (by /etc/rc.sysinit) on every boot. So this really needs to get fixed via a patch to the initscripts package.
Judd, can you apply the following patch so we can close out this bug?
--- /tmp/rc.sysinit 2006-09-06 09:31:00.000000000 -0400
+++ /etc/rc.sysinit 2006-07-07 11:00:20.000000000 -0400
@@ -241,7 +241,7 @@
stat_busy "Setting Consoles to UTF-8"
/usr/bin/kbd_mode -u
/usr/bin/dumpkeys | /bin/loadkeys --unicode
- echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a isatty ]; then echo -ne "\e%G"; fi' >>/etc/profile.d/locale.sh
+ echo 'if [ "$TERM" = "linux" -a isatty ]; then echo -ne "\e%G"; fi' >>/etc/profile.d/locale.sh
stat_done
fi
fi
@@ -254,7 +254,7 @@
/usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i}
fi
done
- echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a isatty ]; then echo -ne "\e(K"; fi' >>/etc/profile.d/locale.sh
+ echo 'if [ "$TERM" = "linux" -a isatty ]; then echo -ne "\e(K"; fi' >>/etc/profile.d/locale.sh
stat_done
fi