$Id: INSTALL,v 1.15 2004/11/15 00:26:30 hbo Exp $

Installation Instructions for ${DIST}

See the file SUDOCONFIG for directions on configuring sudo for use with sudoscript.

Currently supported OSen are:

	Fedora Core Tested on FC3
	Red Hat Linux Tested on RHEL3 and RH 7.3
	Solaris Tested on 9, Intel
	FreeBSD Tested on 5.3,Intel

If your OS isn't on the list and you'd like it to be, see the
file PORTING in the distribution.

For all architectures, the sudoshell script will offer to 
start sudoscriptd if it isn't running. To arrange for the 
daemon to be automatically started at system bootup, additional 
work needs to be done which differs by OS. These steps are included
in the following sections, per OS.


Tarball Installation on All Supported Architectures
===================================================

The source tarball should install on any of the OS architectures
listed above. Instructions to do this follow. There are "binary"
packages for all of the supported OS platforms except HP-UX. 
Installation instructions for those packages follows this section.

As shipped, the archive contains prebuilt mans and html docs. The
Makefile therefore does nothing with 'gmake' or 'gmake doc'.
To run those targets, do a 'gmake clean' before running them.
You will need perltidy to run the 'gmake doc' It is available at 

	http://prdownloads.sourceforge.net/perltidy/

In the following instructions, I give commands that are the least 
common denominator between all the supported OS. For example, I use 
'gmake' for GNU Make. That's the native make on Linux, but 'gmake'
works there too. The other OS all can use gmake one way or another,
but it might not be installed by default. Also, I use the 
"gunzip -c <tarball> | tar xf -" method to unpack the archives. Platforms
that se GNU tar by default (*BSD, Linux) can use the "tar xzf <tarball>"
method instead.

Without further ado, here are the instructions:

	1. Unpack the distribution:

	    gunzip -c ${TARBALL} | tar xf -
	    cd ${DIST}

	2. (Optional) run the 'doc' target to rebuild the mans
	   and HTML (requires pod2[html|man] and perltidy):

	    gmake doc

	3. Install the package

	    sudo gmake install


	4.  Arrange for the daemon to be started and stopped
	    at system startup and shutdown respectively. This
	    varies per OS. Refer to the following sections for
	    per OS.




RPM Install on Red Hat Linux (tested on RHEL3 and 7.3)
and Fedora (Tested on FC3)
========================================================

There is a Red Hat RPM at http://www.egbok.com/sudoscript/download.html
If you are running on Red Hat you just need to grab that 
and do the following:

	sudo rpm -i ${RPM}

or 

	sudo rpm -U ${RPM}

If you are upgrading from an earlier version. (Be sure to read RELEASENOTES.)

After this finishes, you can run 'ss'. The script will offer to start
the daemon for you. If you say yes, it will start the daemon, but warn
you that you need to arrange for it to start itself at boot
time. Here's how to do that.

	sudo chkconfig sudoscriptd on

If you prefer to start the daemon yourself rather than letting
sudoshell do it, after you have done the previous command you can
issue:

	sudo service sudoscriptd start

You can also do any of

	sudo service sudoscriptd stop
	sudo service sudoscriptd restart
	sudo service sudoscriptd status

Solaris (Tested on Solaris 9, Intel)
====================================

There is a Solaris package, tested on Solaris 9, Intel.
at http://www.egbok.com/sudoscript/download.html
Once you have the package, do the following as root:

	gunzip -f ${SOLPKG}.gz
	/usr/sbin/pkgadd -d ${SOLPKG} EGsdosc

If you have an earlier version of sudoscript installed, you may have 
to do

	/usr/sbin/pkgrm RGsdosc

before installing the new package.

Next you should arrange for the daemon to be started and stopped
by init (runlevels and numbers are examples, but they should work fine.)

	sudo ln -s /etc/init.d/sudoscriptd /etc/rc2.d/S97sudoscriptd
	sudo ln -s /etc/init.d/sudoscriptd /etc/rc0.d/K04sudoscriptd

Finally, you can start the daemon:

	either
	    sudo sh /etc/init.d/sudoscriptd start
	or if you have root access through sudoshell
	    ss

HP-UX (Earlier version Tested on 11.0 by Donny Jekels 
and 11i by Kim Westerlund)
======================================================

There is no binary package for HP-UX yet. Follow the tarball 
installation instructions above, then arrange for the daemon to 
be started and stopped by init (runlevels and numbers are examples,
but should work fine.)

	sudo ln -s /sbin/init.d/sudoscriptd /sbin/rc2.d/S97sudoscriptd
	sudo ln -s /sbin/init.d/sudoscriptd /sbin/rc0.d/K04sudoscriptd

Finally, start the daemon:

	either
	    sudo sh /sbin/init.d/sudoscriptd start
	or, if you have root access through sudoshell
	    ss


FreeBSD (Tested on FreeBSD 5.3)
===============================

There is a binary package and a source port at 
http://www.egbok.com/sudoscript/download.html
Once you have the package, do the following as root:

	/usr/sbin/pkg_add ${FBSDPKG}

If you have an earlier version of sudoscript installed, 
you will need to do:

	/usr/sbin/pkg_delete sudoscript\*

before you do the pkg_add.

Next, arrange for the daemon to be started at boot time
	    

	sudo cp /usr/local/etc/rc.d/sudoscriptd.sh.sample \
		/usr/local/etc/rc.d/sudoscriptd.sh

Finally, start the daemon:

	either
	    sudo sh /usr/local/etc/rc.d/sudoscriptd.sh
	or
	    ss


