ncsa / puppet-profile_update_os

NCSA Common Puppet Profiles - configure functionality for upgrading OS packages
0 stars 0 forks source link

CRON output via email from wall messages #14

Closed billglick closed 2 years ago

billglick commented 2 years ago

When wall runs from CRON it outputs the following warning:

wall: cannot get tty name: Inappropriate ioctl for device

By default, wall is doing this because the TTY name is in the banner message, e.g.

Broadcast message from user@host (pts/0)

...but there is no TTY when running from CRON.

The solution is to use the -n option for wall to suppress the banner:

0 5 * * * ( /root/cron_scripts/run-if-today.sh 2 Wed && /usr/bin/wall -n 'This server (asd-pup.internal.ncsa.edu) will be updated and rebooted in 1 hour.' )
billglick commented 2 years ago

The following need to be updated:

bsper2 commented 2 years ago

This was fixed in #13