|File Search||Catalog||Content Search|
sysnews - program to display system news… more info»
This program is used to display system related news to the users at login. it should be placed in the system-wide startup file of the shells available on the system. (/etc/profile for bash/sh, /etc/csh.login for csh/tcsh, /etc/zprofile for zsh, etc..), so its executed every time a user logs in. (i suggest to use `news -n', that way only article titles will be displayed and the user can decide when s/he wants to read it) the system news is kept in a directory /var/sysnews (this can be changed) where each sysnews article is a separate file (with the filename being the sysnews title.) to add a system news article, just edit one with your favorite editor and copy it /var/sysnews read the man-page for more details.. to compile, just type `make' to install type `make install' you have to create the /var/sysnews dir yourself.. Charles. (email@example.com) Latest version can be obtained from http://link.xs4all.nl/~int/software -----CHANGES news-0.4 implemented a news expire function, which will delete news older than a given number of days, for example, you can the following in your crontab: 0 2 * * * news -e 30 this will run the news command every day at 2:00am and delete all articles older than 30 days. you can also specify acticles which may not be deleted, i.e. a 'newusers' article.. this is done by specifying the `-x' flag, followed by a comma separated list of article names, like: 0 2 * * * news -e 30 -x newusers,important,etcetc which will purge all news older than 30 days, excluding newusers, important and etcetc. (thanks to firstname.lastname@example.org for the idea) -----CHANGES news-0.5 as suggested by: email@example.com, i made the following changes: Added -l flag, which will, when used with the -n flag, print one article name per line. Added -d flag, this adds a date stamp when used with the -nl flags. Fixed a pager problem, some pagers don't pause after a short (less then 1 page) file is shown, and just exit. this can cause a short article to be scrolled of the screen, if the next article is longer then a page.. Now all articles are piped through one pager, instead of a new pager for each article. -----CHANGES news-0.8 Added -D flag, which allows you to specify a date format, see strftime(3) for detail on the format. Added -f flag, to read news from a dir other than the default. all article names (one per line, and/or comma separated) read from the file .noexpire in the sysnews directory, will not expire when `news -e #' is executed. added getopt.[ch] to the dist, for systems where its not included in libc. -----CHANGES news-0.9 the $SYSNEWSFLAGS environment variable is checked for options. (thanks to Matt Foster <firstname.lastname@example.org> for the idea..) Added long options.