1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
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.
(int@link.xs4all.nl)
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 waltje@uwalt.nl.mugnet.org for the idea)
-----CHANGES news-0.5
as suggested by: cmiyagis@husc.harvard.edu, 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 <mwf@engr.engr.uark.edu> for the idea..)
Added long options.
|