159 lines
6.7 KiB
Plaintext
159 lines
6.7 KiB
Plaintext
@(#)sadmin:README 2.3 /sccs/src/cmd/sadmin/s.README
|
|
%W%
|
|
Simple Administration (sadmin) software
|
|
|
|
UPDATING A PREVIOUSLY INSTALLED SIMPLE ADMINISTRATION
|
|
If a previous installation of sadmin is in place and you intend to
|
|
replace that one with a new one, perform the following sequence to remove
|
|
the installed product, clobber intermediate files in the source tree,
|
|
remove the previous source files and remove the source tree directory
|
|
structure. See the note about INSTALLING UNDER A DIFFERENT ROOT, below.
|
|
|
|
make -f sadmin.mk ROOT=`pwd`/installdir remove clobber
|
|
rm -f `make -f sadmin.mk partslist`
|
|
find * -type d -print | sort -r | xargs rmdir
|
|
|
|
Then install all the new source files and follow the instructions below.
|
|
It is possible to install new source without going through this sequence,
|
|
but there is a chance that it won't work because of name collisions and the
|
|
like. This is guaranteed to give a clean sweep and properly build the product.
|
|
|
|
INSTALLATION INSTRUCTIONS
|
|
All source files are installed under a single directory, traditionally
|
|
/usr/src/cmd/sadmin.
|
|
|
|
All the product pieces are built by the issuing the command
|
|
make -f sadmin.mk
|
|
|
|
All the product pieces are installed by the super-user issuing the command
|
|
make -f sadmin.mk install
|
|
|
|
INSTALLING UNDER A DIFFERENT ROOT
|
|
The installation above installs relative to /. The relative position of
|
|
these files can be modified by adding a ROOT:
|
|
make -f sadmin.mk ROOT=`pwd`/installdir install
|
|
|
|
This will make the file in "installdir" below the current directory.
|
|
DO NOT set ROOT=`pwd` ! It will wipe out your source!
|
|
|
|
|
|
On the final system, the following must be done:
|
|
|
|
/etc/passwd must have the following entries:
|
|
sysadm::0:0:general system administration:/usr/admin:/bin/rsh
|
|
setup::0:0:first time setup:/usr/admin:/bin/rsh
|
|
powerdown::0:0:power down machine:/usr/admin:/bin/rsh
|
|
checkfsys::0:0:check diskette file system:/usr/admin:/bin/rsh
|
|
makefsys::0:0:make diskette file system:/usr/admin:/bin/rsh
|
|
mountfsys::0:0:mount diskette file system:/usr/admin:/bin/rsh
|
|
umountfsys::0:0:unmount diskette file system:/usr/admin:/bin/rsh
|
|
(This can be found in admin/passwd after the product is built.)
|
|
|
|
NOTE: This old way of defining removable disk device to SA will work
|
|
for a while, but there must be only one such device.
|
|
Link /dev/diskette to the largest block device of the diskette
|
|
e.g. ln /dev/ifdsk00 /dev/diskette
|
|
Link /dev/rdiskette to the largest character device of the diskette
|
|
e.g. ln /dev/rifdsk00 /dev/rdiskette
|
|
|
|
BUG!!! This does not work with System V Release 2 mount(1M) and umount(1M)!
|
|
Note: To define one or more removable disk or tape device to SA:
|
|
mkdir /dev/SA /dev/rSA
|
|
chmod 755 /dev/SA /dev/rSA
|
|
In /dev/SA, link the largest block devices for the removable media. Give
|
|
them the names you want them to be know as when the user is asked to select
|
|
one. E.g.:
|
|
ln /dev/dsk/10s1 /dev/SA/diskette1
|
|
ln /dev/dsk/11s1 /dev/SA/diskette2
|
|
ln /dev/mt/0m /dev/SA/tape0
|
|
Similarly, the same must be done for character (raw) devices. E.g.:
|
|
ln /dev/rdsk/0s1 /dev/rSA/diskette1
|
|
ln /dev/rdsk/1s1 /dev/rSA/diskette2
|
|
ln /dev/rmt/0m /dev/rSA/tape0
|
|
end BUG!!!
|
|
|
|
Assuming that
|
|
init state 0 takes the machine down and turns off the power
|
|
init state 1 takes the machine down and goes to single-user state
|
|
init state 2 is traditional multi-user
|
|
init state 5 takes the machine down and goes to firmware
|
|
init state 6 takes the machine down and reboots UNIX OS
|
|
etc/inittab must have the following entries:
|
|
3B2 ONLY!!!
|
|
s2:2:wait:/etc/rc2 >/dev/console 2>&1 </dev/console
|
|
fl:056:wait:/etc/restart -f >/dev/console 2>&1 </dev/console
|
|
s0:056:wait:/etc/rc0 >/dev/console 2>&1 </dev/console
|
|
of:0:wait:/etc/uadmin 2 0 >/dev/console 2>&1 # turn off power
|
|
fw:5:wait:/etc/uadmin 2 2 >/dev/console 2>&1 # return to firmware
|
|
RB:6:wait:echo Automatic Reboot >/dev/console 2>&1
|
|
rb:6:wait:/etc/uadmin 2 1 >/dev/console 2>&1 # reboot
|
|
su:1:wait:/etc/shutdown -is -y -g0 </dev/console >/dev/console 2>&1 # go to single user mode
|
|
3B5 ONLY!!!!
|
|
s2:2:wait:/etc/rc2 >/dev/console 2>&1 </dev/console
|
|
fl:056:wait:/etc/restart -f >/dev/console 2>&1 </dev/console
|
|
s0:056:wait:/etc/rc0 >/dev/console 2>&1 </dev/console
|
|
of:0:wait:echo You may now turn off the power. >/dev/console 2>&1
|
|
fw:5:wait:/etc/restart >/dev/console 2>&1 </dev/console
|
|
rb:6:wait:echo You may now reboot UNIX. >/dev/console 2>&1
|
|
su:1:wait:/etc/shutdown -is -y -g0 </dev/console >/dev/console 2>&1 # go to single user mode
|
|
ALL OTHER MACHINES
|
|
s2:2:wait:/etc/rc2 >/dev/console 2>&1 </dev/console
|
|
fl:056:wait:/etc/restart -f >/dev/console 2>&1 </dev/console
|
|
s0:056:wait:/etc/rc0 >/dev/console 2>&1 </dev/console
|
|
of:0:wait:echo You may now turn off the power. >/dev/console 2>&1
|
|
fw:5:wait:echo You may now go to firmware. >/dev/console 2>&1
|
|
rb:6:wait:echo You may now reboot UNIX. >/dev/console 2>&1
|
|
su:1:wait:/etc/shutdown -is -y -g0 </dev/console >/dev/console 2>&1 # go to single user mode
|
|
|
|
There needs to be a file /etc/fstab .
|
|
This file contains the mount information for all file systems (except /)
|
|
to be mounted when the machine is in multi-user state.
|
|
Its format is tab separated columns.
|
|
Column 1 Block special device (e.g. /dev/idsk02)
|
|
Column 2 Mount point directory (e.g. /usr)
|
|
Column 3 optional -r indicating "mount read-only"
|
|
Lines beginning with # are comments.
|
|
|
|
|
|
MISCELLANEOUS make TARGETS
|
|
Note:
|
|
All the following use the same ROOT conventions as "make install", above.
|
|
|
|
To list all product files created by "make install", type
|
|
make -f sadmin.mk product
|
|
|
|
To list all product directories created by "make install", type
|
|
make -f sadmin.mk productdir
|
|
|
|
To create a PROTO file, see mkfs(1M), for the product files installed, type
|
|
make -f sadmin.mk proto
|
|
(This will only work after a make install has been done.)
|
|
|
|
To list all parts (delivered) files, type
|
|
make -f sadmin.mk partslist
|
|
|
|
To list all commands used within Simple Administration shell scripts, type
|
|
make -f sadmin.mk cmdsused
|
|
|
|
To clean out all intermediate files from the source directories (i.e. *.o), type
|
|
make -f sadmin.mk clean
|
|
|
|
To clean out all intermediate and final product files
|
|
from the source directories, type
|
|
make -f sadmin.mk clobber
|
|
|
|
To remove the product files from the installed directories, type
|
|
make -f sadmin.mk remove
|
|
(This must be done by the same user who issued make install .)
|
|
|
|
|
|
RECOMMENDATIONS:
|
|
The agefile(1) command can be used to keep logs from growing without bound.
|
|
Add the following line to /var/spool/cron/crontab/root
|
|
0 0 * * * /usr/lbin/agefile -h /usr/lib/cron/log /usr/adm/sulog /etc/wtmp
|
|
|
|
The spacewatch(1) command can be used to watch over "head room" in the file
|
|
systems and give warnings BEFORE they actually run out of free blocks or inodes.
|
|
A typical cron line in /var/spool/cron/crontab/root
|
|
10,40 * * * * /usr/lbin/spacewatch -u -b500 -i100 ALL >/dev/null 2>&1
|