xref: /freebsd/usr.sbin/cron/doc/INSTALL (revision 84f33dea627930e57209583fc83ffb3202babc0a)
184f33deaSJordan K. Hubbard/* Copyright 1993,1994 by Paul Vixie
284f33deaSJordan K. Hubbard * All rights reserved
384f33deaSJordan K. Hubbard *
484f33deaSJordan K. Hubbard * Distribute freely, except: don't remove my name from the source or
584f33deaSJordan K. Hubbard * documentation (don't take credit for my work), mark your changes (don't
684f33deaSJordan K. Hubbard * get me blamed for your possible bugs), don't alter or remove this
784f33deaSJordan K. Hubbard * notice.  May be sold if buildable source is provided to buyer.  No
884f33deaSJordan K. Hubbard * warrantee of any kind, express or implied, is included with this
984f33deaSJordan K. Hubbard * software; use at your own risk, responsibility for damages (if any) to
1084f33deaSJordan K. Hubbard * anyone resulting from the use of this software rests entirely with the
1184f33deaSJordan K. Hubbard * user.
1284f33deaSJordan K. Hubbard *
1384f33deaSJordan K. Hubbard * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
1484f33deaSJordan K. Hubbard * I'll try to keep a version up to date.  I can be reached as follows:
1584f33deaSJordan K. Hubbard * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
1684f33deaSJordan K. Hubbard */
1784f33deaSJordan K. Hubbard
1884f33deaSJordan K. Hubbard$Id: INSTALL,v 2.5 1994/01/15 20:43:43 vixie Exp $
1984f33deaSJordan K. Hubbard
2084f33deaSJordan K. HubbardRead the comments at the top of the Makefile, then edit the area marked
2184f33deaSJordan K. Hubbard'configurable stuff'.
2284f33deaSJordan K. Hubbard
2384f33deaSJordan K. HubbardEdit config.h.  The stuff I expect you to change is down a bit from the
2484f33deaSJordan K. Hubbardtop of the file, but it's clearly marked.  Also look at pathnames.h.
2584f33deaSJordan K. Hubbard
2684f33deaSJordan K. HubbardYou don't have to create the /var/cron or /var/cron/tabs directories, since
2784f33deaSJordan K. Hubbardboth the daemon and the `crontab' program will do this the first time they
2884f33deaSJordan K. Hubbardrun if they don't exist.  You do need to have a /var, though -- just "mkdir
2984f33deaSJordan K. Hubbard/var" if you don't have one, or you can "mkdir /usr/var; ln -s /usr/var /var"
3084f33deaSJordan K. Hubbardif you expect your /var to have a lot of stuff in it.
3184f33deaSJordan K. Hubbard
3284f33deaSJordan K. HubbardYou will also need /usr/local/etc and /usr/local/bin directories unless you
3384f33deaSJordan K. Hubbardchange the Makefile.  These will have to be created by hand, but if you are
3484f33deaSJordan K. Hubbarda long-time Usenet user you probably have them already.  /usr/local/man is
3584f33deaSJordan K. Hubbardwhere I keep my man pages, but I have the source for `man' and you probably
3684f33deaSJordan K. Hubbarddo not.  Therefore you may have to put the man pages into /usr/man/manl,
3784f33deaSJordan K. Hubbardwhich will be hard since there will be name collisions.  (Note that the man
3884f33deaSJordan K. Hubbardcommand was originally written by Bill Joy before he left Berkeley, and it
3984f33deaSJordan K. Hubbardcontains no AT&T code, so it is in UUNET's archive of freely-distributable
4084f33deaSJordan K. HubbardBSD code.)
4184f33deaSJordan K. Hubbard
4284f33deaSJordan K. HubbardLINUX note: /usr/include/paths.h on some linux systems shows _PATH_SENDMAIL
4384f33deaSJordan K. Hubbard	to be /usr/bin/sendmail even though sendmail is installed in /usr/lib.
4484f33deaSJordan K. Hubbard	you should check this out.
4584f33deaSJordan K. Hubbard
4684f33deaSJordan K. Hubbardsay:
4784f33deaSJordan K. Hubbard	make all
4884f33deaSJordan K. Hubbard
4984f33deaSJordan K. Hubbardsu and say:
5084f33deaSJordan K. Hubbard	make install
5184f33deaSJordan K. Hubbard
5284f33deaSJordan K. HubbardNote that if I can get you to "su and say" something just by asking, you have
5384f33deaSJordan K. Hubbarda very serious security problem on your system and you should look into it.
5484f33deaSJordan K. Hubbard
5584f33deaSJordan K. HubbardEdit your /usr/lib/crontab file into little pieces -- see the CONVERSION file
5684f33deaSJordan K. Hubbardfor help on this.
5784f33deaSJordan K. Hubbard
5884f33deaSJordan K. HubbardUse the `crontab' command to install all the little pieces you just created.
5984f33deaSJordan K. HubbardSome examples (see below before trying any of these!)
6084f33deaSJordan K. Hubbard
6184f33deaSJordan K. Hubbard	crontab -u uucp -r /usr/lib/uucp/crontab.src
6284f33deaSJordan K. Hubbard	crontab -u news -r /usr/lib/news/crontab.src
6384f33deaSJordan K. Hubbard	crontab -u root -r /usr/adm/crontab.src
6484f33deaSJordan K. Hubbard
6584f33deaSJordan K. HubbardNotes on above examples: (1) the .src files are copied at the time the
6684f33deaSJordan K. Hubbardcommand is issued; changing the source files later will have no effect until
6784f33deaSJordan K. Hubbardthey are reinstalled with another `crontab -r' command.  (2) The crontab
6884f33deaSJordan K. Hubbardcommand will affect the crontab of the person using the command unless `-u
6984f33deaSJordan K. HubbardUSER' is given; `-u' only works for root.  When using most `su' commands
7084f33deaSJordan K. Hubbardunder most BSD's, `crontab' will still think of you as yourself even though
7184f33deaSJordan K. Hubbardyou may think of yourself as root -- so use `-u' liberally.  (3) the `-r'
7284f33deaSJordan K. Hubbardoption stands for `replace'; check the man page for crontab(1) for other
7384f33deaSJordan K. Hubbardpossibilities.
7484f33deaSJordan K. Hubbard
7584f33deaSJordan K. HubbardKill your existing cron daemon -- do `ps aux' and look for /etc/cron.
7684f33deaSJordan K. Hubbard
7784f33deaSJordan K. HubbardEdit your /etc/rc or /etc/rc.local, looking for the line that starts up
7884f33deaSJordan K. Hubbard/etc/cron.  Comment it out and add a line to start the new cron daemon
7984f33deaSJordan K. Hubbard-- usually /usr/local/etc/cron, unless you changed it in the Makefile.
8084f33deaSJordan K. Hubbard
8184f33deaSJordan K. HubbardStart up this cron daemon yourself as root.  Just type /usr/local/etc/cron
8284f33deaSJordan K. Hubbard(or whatever); no '&' is needed since the daemon forks itself and the
8384f33deaSJordan K. Hubbardprocess you executed returns immediately.
8484f33deaSJordan K. Hubbard
8584f33deaSJordan K. HubbardATT notes: for those people unfortunate enough to be stuck on a AT&T UNIX,
8684f33deaSJordan K. Hubbardyou will need the public-domain "libndir", found in the B News source and in
8784f33deaSJordan K. Hubbardany comp.sources.unix archive.  You will also need to hack the code some.
88