""
1. 2
2. 3
2.1. 3
2.2. init. 4
2.3. /etc/inittab 5
2.4. 7
2.5. 9
3. 12
3.1. /etc/shutdown 12
3.2. /etc/finito 13
4. 14
4.1. /etc/nuser 14
4.2. /etc/passwd /etc/group 14
5. 17
5.1. /etc/profile 17
5.2. .profile 18
6. UNIX 20
6.1. io.h, master dfile 20
6.2. 22
7. 24
7.1. - 24
7.2. 24
8. 27
A. 29
B. UNIX 33
C. 35
UNIX - .
.
. - -
.
.
- ,
- . -
sy-
sadm(1M). -
.
,
, ,
.
boot:
, .
, , , -
<CR>.
, -
. ,
:
_ unix,
, -,
, , -,
, ( -
).
boot: (, -
, <CR>),
.
, <CR> -
a:/unix, unix,
.
-
- , .
,
, ,
. ,
-
, -,
.
bo-
ot(8) .
UNIX
init - . - -
, -
/etc/inittab [. inittab(4)]. init -
, .
init -
.
,
-
. , init'
, /etc/inittab.
0 6 S.
, -
. -
, root. -
, (,
) -
. -
- S.
2 .
,
.
6 -
.
.
, 3
, .
init /etc/inittab -
, -
,
init'.
/etc/inittab , -
/etc/init q
init init(1M) -
.
/etc/inittab - ,
init(1M) . init -
inittab , ,
.
inittab -
, .
:
_ ,
. -
/etc/inittab ,
, , :
is:2:initdefault:
/etc/inittab
is:S:initdefault:
-
.
inittab :
.
.
_ ,
.
, ,
.
, -
. init
:
init -
. ( -
initdefault 2,
). init
,
.
_,
,
.
inittab -
.
, ,
( init-
tab), .
,
inittab.
, ,
,
SIGTERM 20 ,
SIG-
KILL. , -
.
init' .
shell', -
. , -
;#.
respawn getty(1M),
. -
- (
),
respawn off. , -
, off respawn. -
, init' -
/etc/inittab
/etc/init q
, -
-
- /etc/
inittab.
/etc/inittab,
:
is:2:initdefault:
bc:2345:bootwait:/etc/bcheckrc /dev/console 2>&1
br::bootwait:/etc/brc >/dev/console 2>&1
r0:0:wait:/etc/rc0 >/dev/console 2>&1
r2:2:wait:/etc/rc2 >/dev/console 2>&1
co::respawn:/etc/getty console console
03::off:/etc/getty tty3 9600A
04::respawn:/etc/getty tty4 9600A
init -
2.
bc -
. -
shell- /etc/bcheckrc ,
.
/etc/bcheckrc init
shell- /etc/brc , -
. , _-
.
r0 ,
, -
; /etc/rc2. shell
:
set `who -r`
if [ $9 = "S" ]
then
echo "The system is coming up. Please wait."
elif [ -d /etc/rc2.d ]
then
for f in /etc/rc2.d/K*
do
if [ -s ${f} ]
then
/bin/sh ${f} stop
fi
done
fi
if [ -d /etc/rc2.d ]
then
for f in /etc/rc2.d/S*
do
if [ -s ${f} ]
then
/bin/sh ${f} start
fi
done
fi
if [ $9 = "S" ]
then
echo "\n ****** MULTI-USER MODE `/bin/date` ****** \n"
fi
, who -r -
,
. , -
. S, -
($9 = "S") -
, .
2 -
, /etc/
rc2.d, K.
- ,
2; stop.
, start
, S. -
,
, -
..
, /
, .
/etc/init.d (-
, MOUNTFSYS lineprinter). /etc/rcn.d (n -
)
/etc/init.d
[KS]??__/etc/init.d
- K S - ,
: .
. ,
shell
. ,
. ,
/etc/rc2.d S03MOUNTFSYS S04RMTMPFILES.
,
, -
.
( S80errlog) .
-
.
- -
, -
, , K S.
(k s) -
.
/etc/inittab.
/etc/rc2 init
. getty(1M), -
co, ,
respawn. getty -
( -
), ( get-
ty) . /etc/inittab
, off. -
04
co. init -
, /etc/init-
tab, .
shell- /etc/bcheckrc fsck(1M),
-
. .
fsck -
:
/etc/fsck [-y] [-n] [_ ...]
. _ , -
, /etc/
checklist.
.
(yes) .
:
.
.
.
fsck
. -y -
.
:
/ .
,
, -
.
.
:
;
16.
, .
.
:
, -
;
.
:
65536;
, -
, .
.
-
/ .
, ,
( - ) lost+found.
-n, .
lost+found ,
-
. ,
fsck /lost+found, -
, .
/etc/check-
list -
:
/dev/dsk/hd0s0
/dev/dsk/hd0s1
UNIX.
,
. -
UNIX , -
/etc/fsck -y /dev/dsk/fd
.
,
, fsck .
/dev/console;
,
UNIX . -
-
-
/etc/fsck -y /dev/dsk/hd0s0
/dev/console
, fsck .
, UNIX
,
- , -
/dev/dsk/hd0s0.
,
down , -
root ,
/etc/shutdown
, , Console login:
sysadm reboot
/etc/shutdown,
.
Shell- shutdown(1M)
( -
S, ).
,
. -
.
shutdown :
/etc/shutdown [-y] [-g] [-i_]
:
. ,
-
60 ;
.
. -
. , -g0
.
_ init(1).
-
, .
S.
_ :
. , -
. -
shell- /etc/rc0.
,
/etc/rc0. -
S 1 , S -
, init, ,
. 1 -
, , -
, -
.
down -
/etc/shutdown -g0
.
Shell- finito(1M) -
, -
S. finito -
( ),
init 6
/etc/inittab
rb:6:wait:/etc/uadmin 2 2 >/dev/console 2>&1 6 -
uadmin(1M)
.
uadmin , -
, .
,
, -
finito ( -
shutdown).
-
sysadm(1M)
shell- nuser(1M).
Shell- nuser . -
,
,
/udd/.
;
. ,
sys ,
, people . ,
sys bson -
, root.
4.2. /etc/passwd /etc/group
/etc/passwd .
:
.
.
.
.
.
.
, .
/etc/passwd - .
. , , -
.
, .
, -
shell - /bin/sh.
/etc/
passwd :
root:BuTHhcKTZvFt6:0:3:0000-Admin(0000):/:
down::0:3:0000-Admin(0000):/:/etc/downshut
sysadm::0:0:0000-Admin(0000):/usr/admin:/bin/rsh
guest::100:13:USER:/usr/guest:
userow:oVuwhC5zVY/ro:108:3:USER:/udd/userow:
,
0, -
root . guest userow
- ; guest' . -
guest 100, userow - 108.
root, down userow 3. sy-
sadm , guest - -
13. . -
root down ;
. sysadm -
/usr/admin, guest -
/usr/guest, userow - /udd/userow.
root, guest userow shell
( ). down -
,
/etc/shutdown -g0
/etc/passwd ,
-
. , sysadm
shell, , , -
.
, -
,
down sysadm . ,
down, -
.
/etc/passwd .
-
, , ,
.
/etc/group
, :
.
.
.
lm ( ) , -
newgrp.
/etc/group:
root::0:root
sys::3:root,bin,sys,adm
people::13:
root, sys people,
. , UNIX
. root - 0,
sys - 3, people - 13.
, /etc/passwd,
, guest people,
userow - sys. ,
newgrp(1) root root,
sys - root, bin, sys adm. people
,
. ,
(, guest) -
people.
, ,
/etc/inittab,
n::respawn:/etc/getty ttyn
getty(1M). -
/dev,
.
/etc/gettydefs.
, , ,
.
getty
/etc/issue, -
.
, getty login(1),
. -
, login
,
/etc/passwd. , -
shell.
shell
, shell- ( ):
/etc/profile $HOME/.profile, -
HOME .
/etc/profile
, .
: ,
,
.
/etc/profile:
cat -s /etc/motd
export TERM
ta=`tty`
ta=`grep "$ta " /etc/ttytype`
TERM=`expr "$ta" : '.* \(.*\)' \| "$ta"`
FP=m68881 export FP
DBLALIGN=YES export DBLALIGN
SHLIB=YES export SHLIB
if [ -r /etc/addprofile ]
then
. /etc/addprofile
fi
/etc/motd -
.
-
TERM. , tty(1)
,
. /etc/ttytype ,
.
/etc/ttytype :
/dev/tty1 vt100
/dev/tty3 d211
. . .
/dev/tty10 vt52
. . .
, . -
expr(1) -
TERM.
, /etc/t-
tytype.
FP, DBLALIGN SHLIB
C- cc(1).
, - -
32- ,
-
.
, shell- /etc/addprofile,
, -
.
shell- .profile -
, .
:
export PATH
PATH=${PATH}:/etc
/.profile, root:
set `who -r`
if [ "$7" = "S" -a "$9" = "2" ]
then /etc/finito
fi
, S
root. shell-
/.profile. , -
finito(1M), -
. ,
down
. , -
.
, /.profile
S , ,
"$9" = "2"
.
, UNIX, -
/usr/src/uts.
master(4) dfile(4), -
. -
make(1); /usr/src/uts -
Makefile. ,
-
/usr/include/sys/io.h,
.
/usr/include/sys/io.h -
.
300 , :
#define v_cdc300_0 0x0000,19, 0, 0, 0, 0, 3, 3, 3
#define v_cdc300_1 0x0010,19, 0, 0, 0, 0, 3, 3, 3
. . .
#define l_cdc300_0 0,50000, 80000,220000, 50000,30000,\
0,0, 0,0, 0,0, 0,0, 0,300000
#define l_cdc300_1 0,300000, 0,0, 0,0, 0,0, 0,0, 0,0,\
0,0, 0,300000
0x0000 0x0010, . ,
-
.
#define -
. -
- .
, hd0s0
50000 (50 ). hd0s1
80000 220 . hd0s2, -
,
( ) -
30 . ( )
. -
, : -
300 . hd1 -
- hd1s0 300 .
-
,
/usr/include/sys/io.h.
io(4) .
/usr/src/uts/master /usr/src/uts/dfile -
UNIX.
, -
. ,
, -
, .
master , $
. ,
, .
1 ; 2
; 3
. 4 5 -
,
MC680x0.
difle -
, master'. dfile -
. .
- - . -
, .
-
. .
3 master 2
dfile.
:
, -
dfile.
.
/
( 1 ).
10%
.
.
, -
, -
.
.
( 1 ),
.
.
( ).
.
.
.
.
.
( -
).
- -
, -
dfile.
master(4) dfile(4),
.
, -
make(1)
Makefile /usr/src/uts. , ,
. ,
/usr/src/uts/master, /usr/src/uts/dfile /usr/include/
sys/io.h .
UNIX
root
/usr/src/uts unix - -
.
,
make .
,
boot:
( <CR> ). ,
root,
/usr/src/uts
:
mv /unix /unixold
mv unix /
/unixold, -
.
.
,
- , .
, , -
/unix, [,
ps(1)] . ,
/unix, ps .
,
/unixold /unix.
UNIX
mkuts(8) .
-
.
(
),
, .
-
UNIX -
, ,
.
-
UNIX -
root
mkmini(1M) shell. -
.
mkmini -, -
.
- (800 ) - -
30 .
,
dd if=/dev/rdsk/fd of=/dev/mt bs=256k
.
:
-
.
hd0s0
mount /dev/dsk/hd0s0 /mnt
, -
.
cd /mnt
find . -print | cpio -omv | strout
/etc/strout
256 . -
.
:
-
.
hd0s0
mount /dev/dsk/hd0s0 /mnt
.
cd /mnt
dd if=/dev/mt bs=256k | cpio -idmvu
. ,
cpio(1) , -
.
hd0s0
,
fsck /dev/dsk/hd0s0
. fsck -
,
hd0s0
mkfs /dev/dsk/hd0s0 50000 1 216
-
.
-
backup(8) .
, ,
shell- copall(1) restall(1).
- sysadm(1M).
:
-
. -
, -
.
-
.
,
,
.
-
.
-
, -
, .
,
- ,
.
-
, -
.
, -
, ,
, .. -
.
-
,
.
sysadm - -
. sy-
sadm 20 -
. -
, .
.
root';
,
.
.
().
. delo
.
TIMEZONE
,
.
addprofile
Shell-,
. -
,
.
checklist
-
.
fstab
.
gettydefs
, -
getty.
group
.
init.d
-
.
inittab
init.
issue
, -
.
magic
" ".
.
mnttab
;
.
motd
,
.
passwd
.
profile
Shell-,
.
rcn.d
-
,
n.
termcap
. -
.
ttytype
.
wtmp
-
. -
, .
, -
sysadm.
.
, -
, .
.
.
.
- UNIX.
.
adm
. , pacct -
.
, -
; ,
,
.
bin
-
.
binb
.
include
.
lib
( -
). terminfo -
.
acct - ; holi-
days
.
mail
[. mail(1) ma-
ilx(1)].
news
[. news(1)].
spool
(,
-
). cron/crontabs -
[. cron(1)].
src
-
.
tmp
. -
.
.
, .
,
.
, (
).
:
bcheckrc, brc(1M), getty(1M), init(1M), rc2(1M).
:
finito(1M), rc0(1M), shutdown(1M).
UNIX:
add(1M), addconf, addkern(1M), config(1M).
:
crash(1M), fsdb(1M).
:
acctcms(1M), acctcon1, acctcon2, acctdisk, acctdusg, acct-
merg(1M), accton, acctprc1, acctprc2, acctwtmp, chargefee,
ckpacct, diskusg(1M), dodisk, errdead(1M), errdemon(1M),
errpt(1M), errstop(1M), fwtmp(1M), lastlogin, monacct, nulladm,
prctmp, prdaily, prfdc, prfld, prfpr, prfsnap, prfstat,
prtacct, runacct(1M), sa1, sa2, sadc, shutacct, startup, stra-
ce(1M), strclean(1M), strerr(1M), turnacct, wtmpfix.
:
bcopy(1M), copyto, dcopy(1M), download(1M), finc(1M), frec(1M),
fscv(1M), link(1M), mvdir(1M), saveto(1M), unlink, volcopy(1M).
:
cleall(1M), clri(1M), dfsck, format(1M), fsck(1M), install(1M),
labelit(1M), mkfs(1M), mkmini(1M), mknod(1M), mount(1M), moun-
tall(1M), pitio(1M), setmnt(1M), swap(1M), sync(1M), tstmo-
de(1M), umount, umountall.
:
devnm(1M), ff(1M), fsstat(1M), fstyp(1M), fuser(1M),
ncheck(1M), volume(1M).
:
captoinfo(1M), infocmp(1M), tic(1M).
:
accept(1M), lpadmin(1M), lpmove, lpsched(1M), lpshut, reject.
:
chroot(1M), killall(1M).
:
grpck, nuser(1M), pwck(1M).
:
uucheck(1M), uucico(1M), uucleanup(1M), uugetty(1M), uusc-
hed(1M), uutry(1M), uuxqt(1M).
:
helpadm(1M), sysadm(1M), uadmin(1M).
accept -
acctcms -
/usr/lib/acct/acctcms [-a [-p] [-o]] [-c] [-j] [-n] [-s] [-t] ...
.
.
, "***other".
.
acctcms.
tacct [. acct(4)].
acctcon1 -
/usr/lib/acct/acctcon1 [-p] [-t] [-l ] [-o ]
.
,
.
acctcon2 -
acctdisk -
acctdusg -
/usr/lib/acct/acctdusg [-u 1] [-p 2]
acctmerg -
/usr/lib/acctmerg [-a] [-i] [-p] [-t] [-u] [-v] [ ...]
tacct.
tacct.
.
.
.
accton -
acctprc1 -
/usr/lib/acct/acctprc1 []
acctprc2 -
acctwtmp -
/usr/lib/acct/acctwtmp ""
add - UNIX
/etc/add [-o _] [-m master_] [-d dfile_] [-u ]
[-t _] [-s __] [-l] _ ...
addconf - addkern
/etc/addconf [-t] [-l ] [-c ] [-m master_] [-b ]
[dfile_]
.
addkern - UNIX
/etc/addkern [-a ] [-a _] [-x ]
[-f ] [-l]
addkern.
bcheckrc -
bcopy -
brc -
captoinfo - termcap terminfo
captoinfo [-v ...] [-V] [-1] [-w ] ...
. -v
.
toinfo .
chargefee -
/usr/lib/acct/chargefee _
chroot -
ckpacct - /usr/adm/pacct
/usr/lib/acct/ckpacct [_]
cleall -
clri -
config - UNIX-
/etc/config [-t] [-l ] [-c ] [-m master_] [-b ]
[dfile_]
.
copyto -
/etc/copyto [hd*] [mt] [fd*] [cpio] [_find]
crash -
/etc/crash [-d __] [-n ___]
[-w _]
dcopy -
/etc/dcopy [-s _] [-a []] [-d] [-v]
[-f __[:__]]
__ __
,
.
devnm -
dfsck -
- [__2] __2 ...
diskusg -
/usr/lib/acct/diskusg [-s] [-v] [-i ___]
[-p ____] [-u _]
[ ...]
, diskusg.
.
dodisk -
/usr/lib/acct/dodisk [-o] [ ...]
-
.
download -
download [-t ] [-d ] [-b ]
[-s __] _ _
errdead -
errdemon -
errpt -
errpt [-s ] [-e ] [-a] [-p _] [-f] [ ...]
.
errstop -
ff -
/etc/ff [-I] [-l] [-p ] [-s] [-u] [-a ] [-m ]
[-c ] [-n ] [-i __]
_
.
finc -
finito -
format -
frec - ,
_: ...
fsck -
/etc/fsck [-y] [-n] [-s[___:]]
[-S[___:]] [-t ] [-q] [-D] [-f]
[_ ...]
.
. .
,
.
(1 ) (5 -
).
.
fscv - MC680x0 VAX-11/780
[__]
VAX.
MC680x0.
fsdb -
.
fsstat -
fstyp -
fuser - ,
/etc/fuser [-k] [-u] ... [-] [[-k] [-u] ...]
( ).
fwtmp - /
/usr/lib/acct/fwtmp [-ic]
.
getty - ,
[ [_ [___]]]
.
grpck -
helpadm -
infocmp - , terminfo
infocmp [-d] [-c] [-n] [-I] [-L] [-C] [-r] [-u] [-s [d] [i] [l] [c]] [-v] [-V] [-1]
[-w ] [-A ] [-B ] [ ...]
.
.
.
.
.
, :
d , -
terminfo;
i terminfo-;
l C-;
c termcap-.
init -
/etc/init [0] [1] [2] [3] [4] [5] [6] [S] [s] [Q] [q] [a] [b] [c]
install -
/etc/install [-c _1] [-f _2] [-i] [-n _3]
[-m _] [-u ] [-g ] [-o] [-s]
[ ...]
.
killall -
labelit -
/etc/labelit _ [_ _ [-n]]
.
lastlogin -
link -
lpadmin -
/usr/lib/lpadmin [-p [[-c] [-e] [-h]
[-i] [-l] [-m] [-r] [-v]]]
[-x] [-d[]]
lpmove -
lpsched -
lpshut -
mkfs -
[] [ ___]
mkmini - , UNIX
mknod -
monacct -
mount -
/etc/mount [[-r] [-f _] _ ]
mountall -
/etc/mountall [-] [__ ...]
.
mvdir -
ncheck -
/etc/ncheck [-i _ ...] [-a] [-s] [_]
.
nulladm -
nuser - ߴ
pitio -
pitio [-c] [-l_] [-r] [-t] [_]
prctmp -
/usr/lib/acct/prctmp [""]
prdaily -
/usr/lib/acct/prdaily [-l] [-c] []
prfdc - UNIX
prfld - UNIX
prfpr - UNIX
[____]]
prfsnap - UNIX
prfstat -
prtacct - tacct
/usr/lib/acct/prtacct [""]
pwck -
rc0 -
rc2 -
reject -
/usr/lib/reject [-r []] ...
runacct -
/usr/lib/acct/runacct [ []]
sa1 -
sa2 -
/usr/lib/sa/sa2 [-u] [-b] [-d] [-y] [-c] [-w] [-a] [-q] [-v] [-m] [-A]
[-s ] [-e ] [-i ]
sadc -
saveto -
/etc/saveto [hd*] [mt] [fd*] [cpio] [_find]
setmnt -
shutacct -
/usr/lib/acct/shutacct [""]
shutdown - , ߴ
/etc/shutdown [-y] [-g] [-i_]
startup -
strace -
strclean -
strerr -
swap -
[-d _] [-l]
sync -
sysadm -
tic - terminfo
tstmode -
turnacct -
/usr/lib/acct/turnacct [on] [off] [switch]
uadmin - ߴ
umount -
umountall -
SIGKILL.
unlink -
uucheck - uucp
/usr/lib/uucp/uucheck [-v] [-x _]
Permissions.
uucico - uucp
/usr/lib/uucp/uucico [-r ] [-x _] [-i ]
[-d _] -s
uucleanup -
/usr/lib/uucp/uucleanup [-C ] [-D ] [-W ] [-X ]
[-m _] [-o ] [-s ] [-x _]
uugetty -
/usr/lib/uucp/uugetty [-h] [-t _] [-r]
[ [_ [___]]]
.
uusched - uucp
/usr/lib/uucp/uusched [-x _] [-u _]
Uutry -
/usr/lib/uucp/Uutry [-x _] [-r]
uuxqt -
/usr/lib/uucp/uuxqt [-s ] [-x _]
volcopy -
/etc/volcopy [-a] [-s] __
_ _1
_ _2
if wrong".
volume -
/etc/volume [-u] [-t] [-s] [-h] [-c] [-l] [_ ...]
.
wtmpfix - /
/usr/lib/acct/wtmpfix [ ...]
Last-modified: Tue, 25 Nov 1997 06:59:54 GMT