home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / ckdns / ckdns.shar next >
SHell self-extracting ARchive  |  1996-10-25  |  8.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert SHell self-extracting ARchive (archive/shar) ext Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% perlTextCheck Likely Text (Perl) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 23 48 65 72 65 27 73 20 | 61 20 73 68 61 72 20 66 |#Here's |a shar f|
|00000010| 69 6c 65 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 74 |ile cont|aining t|
|00000020| 77 6f 20 73 63 72 69 70 | 74 73 20 66 6f 72 20 72 |wo scrip|ts for r|
|00000030| 75 6e 6e 69 6e 67 20 66 | 72 6f 6d 20 63 72 6f 6e |unning f|rom cron|
|00000040| 20 74 6f 0a 23 63 68 65 | 63 6b 20 7a 6f 6e 65 20 | to.#che|ck zone |
|00000050| 64 61 74 61 20 61 6e 64 | 20 61 20 6d 6f 64 69 66 |data and| a modif|
|00000060| 69 65 64 20 64 6f 63 20 | 32 2e 30 20 66 6f 72 20 |ied doc |2.0 for |
|00000070| 75 73 65 20 62 79 20 74 | 68 65 20 73 63 72 69 70 |use by t|he scrip|
|00000080| 74 73 2e 0a 23 0a 23 4a | 69 6d 20 4b 6e 75 74 73 |ts..#.#J|im Knuts|
|00000090| 6f 6e 0a 23 6b 6e 75 74 | 73 6f 6e 40 6d 63 63 2e |on.#knut|son@mcc.|
|000000a0| 63 6f 6d 0a 23 63 73 2e | 75 74 65 78 61 73 2e 65 |com.#cs.|utexas.e|
|000000b0| 64 75 21 6d 69 6c 61 6e | 6f 21 6b 6e 75 74 73 6f |du!milan|o!knutso|
|000000c0| 6e 0a 23 57 6b 3a 20 28 | 35 31 32 29 20 33 33 38 |n.#Wk: (|512) 338|
|000000d0| 2d 33 33 36 32 0a 0a 23 | 20 54 68 69 73 20 69 73 |-3362..#| This is|
|000000e0| 20 61 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 | a shell| archive|
|000000f0| 2e 20 20 52 65 6d 6f 76 | 65 20 61 6e 79 74 68 69 |. Remov|e anythi|
|00000100| 6e 67 20 62 65 66 6f 72 | 65 20 74 68 69 73 20 6c |ng befor|e this l|
|00000110| 69 6e 65 2c 0a 23 20 74 | 68 65 6e 20 75 6e 70 61 |ine,.# t|hen unpa|
|00000120| 63 6b 20 69 74 20 62 79 | 20 73 61 76 69 6e 67 20 |ck it by| saving |
|00000130| 69 74 20 69 6e 20 61 20 | 66 69 6c 65 20 61 6e 64 |it in a |file and|
|00000140| 20 74 79 70 69 6e 67 20 | 22 73 68 20 66 69 6c 65 | typing |"sh file|
|00000150| 22 2e 0a 23 0a 23 20 57 | 72 61 70 70 65 64 20 62 |"..#.# W|rapped b|
|00000160| 79 20 77 65 62 65 72 2e | 73 77 2e 6d 63 63 2e 63 |y weber.|sw.mcc.c|
|00000170| 6f 6d 21 6b 6e 75 74 73 | 6f 6e 20 6f 6e 20 57 65 |om!knuts|on on We|
|00000180| 64 20 41 70 72 20 32 34 | 20 31 30 3a 30 33 3a 30 |d Apr 24| 10:03:0|
|00000190| 37 20 43 44 54 20 31 39 | 39 31 0a 23 20 43 6f 6e |7 CDT 19|91.# Con|
|000001a0| 74 65 6e 74 73 3a 20 20 | 63 6b 64 6f 6d 61 69 6e |tents: |ckdomain|
|000001b0| 63 66 2e 73 68 20 63 6b | 73 65 72 69 61 6c 2e 73 |cf.sh ck|serial.s|
|000001c0| 68 0a 20 0a 65 63 68 6f | 20 78 20 2d 20 63 6b 64 |h. .echo| x - ckd|
|000001d0| 6f 6d 61 69 6e 63 66 2e | 73 68 0a 73 65 64 20 27 |omaincf.|sh.sed '|
|000001e0| 73 2f 5e 40 2f 2f 27 20 | 3e 20 22 63 6b 64 6f 6d |s/^@//' |> "ckdom|
|000001f0| 61 69 6e 63 66 2e 73 68 | 22 20 3c 3c 27 40 2f 2f |aincf.sh|" <<'@//|
|00000200| 45 2a 4f 2a 46 20 63 6b | 64 6f 6d 61 69 6e 63 66 |E*O*F ck|domaincf|
|00000210| 2e 73 68 2f 2f 27 0a 23 | 21 2f 62 69 6e 2f 73 68 |.sh//'.#|!/bin/sh|
|00000220| 0a 23 20 40 28 23 29 63 | 6b 64 6f 6d 61 69 6e 63 |.# @(#)c|kdomainc|
|00000230| 66 2e 73 68 09 31 2e 33 | 09 31 2f 34 2f 39 31 0a |f.sh.1.3|.1/4/91.|
|00000240| 23 0a 23 20 63 6b 64 6f | 6d 61 69 6e 63 66 20 2d |#.# ckdo|maincf -|
|00000250| 20 63 68 65 63 6b 20 64 | 6f 6d 61 69 6e 20 63 6f | check d|omain co|
|00000260| 6e 66 69 67 75 72 61 74 | 69 6f 6e 0a 23 0a 23 20 |nfigurat|ion.#.# |
|00000270| 53 59 4e 4f 50 53 49 53 | 0a 23 09 63 6b 64 6f 6d |SYNOPSIS|.#.ckdom|
|00000280| 61 69 6e 63 66 20 5b 20 | 2d 6e 20 5d 0a 23 0a 23 |aincf [ |-n ].#.#|
|00000290| 20 63 6b 64 6f 6d 61 69 | 6e 63 66 20 63 68 65 63 | ckdomai|ncf chec|
|000002a0| 6b 73 20 74 68 65 20 64 | 6f 6d 61 69 6e 20 63 6f |ks the d|omain co|
|000002b0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 2e 20 20 49 74 |nfigurat|ion. It|
|000002c0| 20 64 65 74 65 72 6d 69 | 6e 65 73 20 77 68 69 63 | determi|nes whic|
|000002d0| 68 0a 23 20 64 6f 6d 61 | 69 6e 73 20 74 6f 20 63 |h.# doma|ins to c|
|000002e0| 68 65 63 6b 20 62 79 20 | 65 78 61 6d 69 6e 69 6e |heck by |examinin|
|000002f0| 67 20 2f 65 74 63 2f 6e | 61 6d 65 64 2e 62 6f 6f |g /etc/n|amed.boo|
|00000300| 74 20 61 6e 64 20 63 68 | 65 63 6b 69 6e 67 20 61 |t and ch|ecking a|
|00000310| 6c 6c 20 64 6f 6d 61 69 | 6e 73 0a 23 20 6c 69 73 |ll domai|ns.# lis|
|00000320| 74 65 64 20 6f 6e 20 74 | 68 65 20 70 72 69 6d 61 |ted on t|he prima|
|00000330| 72 79 20 61 6e 64 20 73 | 65 63 6f 6e 64 61 72 20 |ry and s|econdar |
|00000340| 6c 69 6e 65 73 2e 20 20 | 48 6f 77 65 76 65 72 2c |lines. |However,|
|00000350| 20 63 6b 64 6f 6d 61 69 | 6e 63 66 20 69 67 6e 6f | ckdomai|ncf igno|
|00000360| 72 65 73 0a 23 20 63 68 | 65 63 6b 69 6e 67 20 74 |res.# ch|ecking t|
|00000370| 68 65 20 30 2e 30 2e 31 | 32 37 2e 69 6e 2d 61 64 |he 0.0.1|27.in-ad|
|00000380| 64 72 2e 61 72 70 61 20 | 64 6f 6d 61 69 6e 20 61 |dr.arpa |domain a|
|00000390| 6e 64 20 61 6e 79 20 64 | 6f 6d 61 69 6e 20 77 69 |nd any d|omain wi|
|000003a0| 74 68 20 75 6e 69 78 68 | 6f 73 74 73 0a 23 20 61 |th unixh|osts.# a|
|000003b0| 73 20 74 68 65 20 64 61 | 74 61 20 66 69 6c 65 2e |s the da|ta file.|
|000003c0| 20 20 49 74 20 69 73 20 | 61 73 73 75 6d 65 64 20 | It is |assumed |
|000003d0| 74 68 61 74 20 74 68 65 | 73 65 20 64 6f 6d 61 69 |that the|se domai|
|000003e0| 6e 20 64 61 74 61 20 66 | 69 6c 65 73 20 77 69 6c |n data f|iles wil|
|000003f0| 6c 0a 23 20 63 6f 6e 74 | 61 69 6e 20 64 6f 6d 61 |l.# cont|ain doma|
|00000400| 69 6e 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 66 |in defin|itions f|
|00000410| 6f 72 20 74 68 65 20 75 | 6e 69 78 20 6c 6f 63 61 |or the u|nix loca|
|00000420| 6c 68 6f 73 74 20 61 6e | 64 20 77 69 6c 6c 20 62 |lhost an|d will b|
|00000430| 65 20 73 70 65 63 69 66 | 69 63 0a 23 20 74 6f 20 |e specif|ic.# to |
|00000440| 74 68 65 20 6c 6f 63 61 | 6c 20 64 65 66 69 6e 69 |the loca|l defini|
|00000450| 74 69 6f 6e 2e 0a 23 20 | 0a 23 20 49 66 20 74 68 |tion..# |.# If th|
|00000460| 65 20 2d 6e 20 66 6c 61 | 67 20 69 73 20 73 70 65 |e -n fla|g is spe|
|00000470| 63 69 66 69 65 64 2c 20 | 6e 6f 20 6d 61 69 6c 20 |cified, |no mail |
|00000480| 77 69 6c 6c 20 62 65 20 | 73 65 6e 74 20 61 66 74 |will be |sent aft|
|00000490| 65 72 20 63 68 65 63 6b | 69 6e 67 2e 0a 23 20 0a |er check|ing..# .|
|000004a0| 42 4f 4f 54 46 49 4c 45 | 3d 2f 65 74 63 2f 6e 61 |BOOTFILE|=/etc/na|
|000004b0| 6d 65 64 2e 62 6f 6f 74 | 0a 4d 41 49 4c 3d 2f 75 |med.boot|.MAIL=/u|
|000004c0| 73 72 2f 75 63 62 2f 4d | 61 69 6c 0a 4e 4f 54 49 |sr/ucb/M|ail.NOTI|
|000004d0| 46 59 3d 68 6f 73 74 6d | 61 73 74 65 72 0a 4e 4f |FY=hostm|aster.NO|
|000004e0| 54 49 46 59 4c 45 56 45 | 4c 3d 31 30 09 23 20 31 |TIFYLEVE|L=10.# 1|
|000004f0| 30 20 2d 20 61 6e 79 20 | 77 61 72 6e 69 6e 67 20 |0 - any |warning |
|00000500| 6f 72 20 67 72 65 61 74 | 65 72 0a 09 09 23 20 35 |or great|er...# 5|
|00000510| 30 20 2d 20 61 6e 79 20 | 65 72 72 6f 72 20 6f 72 |0 - any |error or|
|00000520| 20 67 72 65 61 74 65 72 | 0a 09 09 23 20 31 30 30 | greater|...# 100|
|00000530| 20 2d 20 61 6e 79 20 61 | 62 6f 72 74 0a 50 41 54 | - any a|bort.PAT|
|00000540| 48 3d 24 50 41 54 48 3a | 2f 75 73 72 2f 6c 6f 63 |H=$PATH:|/usr/loc|
|00000550| 61 6c 2f 65 74 63 20 65 | 78 70 6f 72 74 20 50 41 |al/etc e|xport PA|
|00000560| 54 48 0a 54 4d 50 3d 2f | 74 6d 70 2f 2e 63 6b 64 |TH.TMP=/|tmp/.ckd|
|00000570| 24 24 0a 0a 73 65 74 20 | 2d 2d 20 60 67 65 74 6f |$$..set |-- `geto|
|00000580| 70 74 20 6e 20 24 2a 60 | 0a 69 66 20 5b 20 24 3f |pt n $*`|.if [ $?|
|00000590| 20 21 3d 20 30 20 5d 3b | 20 74 68 65 6e 0a 09 65 | != 0 ];| then..e|
|000005a0| 63 68 6f 20 75 73 61 67 | 65 3a 20 63 6b 64 6f 6d |cho usag|e: ckdom|
|000005b0| 61 69 6e 63 66 20 5b 20 | 2d 6e 20 5d 0a 09 65 78 |aincf [ |-n ]..ex|
|000005c0| 69 74 20 32 0a 66 69 0a | 66 6f 72 20 69 20 69 6e |it 2.fi.|for i in|
|000005d0| 20 24 2a 3b 20 64 6f 0a | 09 63 61 73 65 20 24 69 | $*; do.|.case $i|
|000005e0| 20 69 6e 0a 09 2d 6e 20 | 29 20 4d 41 49 4c 3d 22 | in..-n |) MAIL="|
|000005f0| 65 63 68 6f 20 2f 75 73 | 72 2f 75 63 62 2f 4d 61 |echo /us|r/ucb/Ma|
|00000600| 69 6c 22 3b 20 73 68 69 | 66 74 3b 3b 0a 09 2d 2d |il"; shi|ft;;..--|
|00000610| 29 09 20 73 68 69 66 74 | 3b 20 62 72 65 61 6b 3b |). shift|; break;|
|00000620| 3b 0a 09 65 73 61 63 0a | 64 6f 6e 65 0a 0a 74 6f |;..esac.|done..to|
|00000630| 6c 6f 77 65 72 28 29 20 | 7b 0a 09 65 63 68 6f 20 |lower() |{..echo |
|00000640| 24 31 20 7c 20 74 72 20 | 41 2d 5a 20 61 2d 7a 0a |$1 | tr |A-Z a-z.|
|00000650| 7d 0a 0a 69 73 5f 69 6e | 5f 61 64 64 72 28 29 20 |}..is_in|_addr() |
|00000660| 7b 0a 09 69 66 20 5b 20 | 60 65 78 70 72 20 24 31 |{..if [ |`expr $1|
|00000670| 20 3a 20 27 2e 2a 69 6e | 2d 61 64 64 72 27 60 20 | : '.*in|-addr'` |
|00000680| 2d 67 74 20 30 20 5d 3b | 20 74 68 65 6e 0a 09 09 |-gt 0 ];| then...|
|00000690| 74 72 75 65 3b 0a 09 65 | 6c 73 65 0a 09 09 66 61 |true;..e|lse...fa|
|000006a0| 6c 73 65 3b 0a 09 66 69 | 0a 7d 0a 0a 23 20 73 74 |lse;..fi|.}..# st|
|000006b0| 72 69 70 20 63 6f 6d 6d | 65 6e 74 73 20 66 72 6f |rip comm|ents fro|
|000006c0| 6d 20 7a 6f 6e 65 20 64 | 61 74 61 0a 73 74 72 69 |m zone d|ata.stri|
|000006d0| 70 63 6f 6d 6d 65 6e 74 | 73 28 29 20 7b 0a 20 20 |pcomment|s() {. |
|000006e0| 20 20 20 20 20 20 73 65 | 64 20 2d 65 20 27 2f 5e | se|d -e '/^|
|000006f0| 3b 2f 64 27 20 2d 65 20 | 27 73 2f 3b 2e 2a 2f 2f |;/d' -e |'s/;.*//|
|00000700| 27 20 24 2a 0a 7d 0a 0a | 23 20 67 65 74 20 6d 61 |' $*.}..|# get ma|
|00000710| 69 6c 20 61 64 64 72 65 | 73 73 20 6f 66 20 70 65 |il addre|ss of pe|
|00000720| 72 73 6f 6e 20 69 6e 20 | 63 68 61 72 67 65 20 6f |rson in |charge o|
|00000730| 66 20 74 68 65 20 7a 6f | 6e 65 0a 67 65 74 70 65 |f the zo|ne.getpe|
|00000740| 72 73 6f 6e 69 6e 63 68 | 61 72 67 65 28 29 20 7b |rsoninch|arge() {|
|00000750| 0a 09 64 69 67 20 73 6f | 61 20 24 31 2e 20 2b 70 |..dig so|a $1. +p|
|00000760| 66 73 65 74 3d 30 78 61 | 32 32 34 20 7c 20 5c 0a |fset=0xa|224 | \.|
|00000770| 20 20 20 20 20 20 20 20 | 73 74 72 69 70 63 6f 6d | |stripcom|
|00000780| 6d 65 6e 74 73 20 7c 20 | 74 72 20 61 2d 7a 20 41 |ments | |tr a-z A|
|00000790| 2d 5a 20 7c 20 61 77 6b | 20 27 24 33 20 3d 3d 20 |-Z | awk| '$3 == |
|000007a0| 22 53 4f 41 22 20 7b 70 | 72 69 6e 74 20 24 35 7d |"SOA" {p|rint $5}|
|000007b0| 27 0a 7d 0a 0a 23 20 63 | 6f 6e 76 65 72 74 20 64 |'.}..# c|onvert d|
|000007c0| 6f 6d 61 69 6e 20 6e 61 | 6d 65 20 74 6f 20 6d 61 |omain na|me to ma|
|000007d0| 69 6c 20 61 64 64 72 65 | 73 73 0a 64 6f 6d 61 69 |il addre|ss.domai|
|000007e0| 6e 74 6f 61 64 64 72 28 | 29 20 7b 0a 20 20 20 20 |ntoaddr(|) {. |
|000007f0| 20 20 20 20 65 63 68 6f | 20 24 31 20 7c 20 73 65 | echo| $1 | se|
|00000800| 64 20 2d 65 20 27 73 2f | 5c 2e 24 2f 2f 27 20 2d |d -e 's/|\.$//' -|
|00000810| 65 20 27 73 2f 5c 2e 2f | 40 2f 27 0a 7d 0a 0a 23 |e 's/\./|@/'.}..#|
|00000820| 20 6e 6f 74 69 66 79 20 | 74 68 65 20 70 65 72 73 | notify |the pers|
|00000830| 6f 6e 20 69 6e 20 63 68 | 61 72 67 65 20 6f 66 20 |on in ch|arge of |
|00000840| 61 20 7a 6f 6e 65 20 6f | 66 20 64 65 74 65 63 74 |a zone o|f detect|
|00000850| 65 64 20 65 72 72 6f 72 | 73 0a 6e 6f 74 69 66 79 |ed error|s.notify|
|00000860| 70 65 72 73 6f 6e 69 6e | 63 68 61 72 67 65 28 29 |personin|charge()|
|00000870| 20 7b 0a 09 66 61 69 6c | 74 79 70 65 3d 70 72 6f | {..fail|type=pro|
|00000880| 62 6c 65 6d 73 0a 09 69 | 66 20 5b 20 24 32 20 2d |blems..i|f [ $2 -|
|00000890| 67 74 20 35 30 20 5d 3b | 20 74 68 65 6e 0a 09 09 |gt 50 ];| then...|
|000008a0| 66 61 69 6c 74 79 70 65 | 3d 65 72 72 6f 72 73 0a |failtype|=errors.|
|000008b0| 09 66 69 0a 09 69 66 20 | 5b 20 24 32 20 2d 67 74 |.fi..if |[ $2 -gt|
|000008c0| 20 31 30 30 20 5d 3b 20 | 74 68 65 6e 0a 09 09 66 | 100 ]; |then...f|
|000008d0| 61 69 6c 74 79 70 65 3d | 66 61 69 6c 75 72 65 73 |ailtype=|failures|
|000008e0| 0a 09 66 69 0a 20 20 20 | 20 20 20 20 20 4d 42 3d |..fi. | MB=|
|000008f0| 60 67 65 74 70 65 72 73 | 6f 6e 69 6e 63 68 61 72 |`getpers|oninchar|
|00000900| 67 65 20 24 31 60 0a 09 | 28 20 63 61 74 20 24 31 |ge $1`..|( cat $1|
|00000910| 2e 6c 6f 67 3b 0a 09 20 | 20 65 63 68 6f 20 22 22 |.log;.. | echo ""|
|00000920| 3b 20 65 63 68 6f 20 22 | 22 3b 20 65 63 68 6f 20 |; echo "|"; echo |
|00000930| 22 22 3b 20 65 63 68 6f | 20 22 43 6f 6d 70 6c 65 |""; echo| "Comple|
|00000940| 74 65 20 6c 6f 67 20 6f | 66 20 74 65 73 74 20 66 |te log o|f test f|
|00000950| 6f 6c 6c 6f 77 73 3a 22 | 3b 20 65 63 68 6f 20 22 |ollows:"|; echo "|
|00000960| 0c 22 3b 0a 09 20 20 63 | 61 74 20 6c 6f 67 2e 24 |.";.. c|at log.$|
|00000970| 31 2e 0a 09 29 20 7c 20 | 5c 0a 20 20 20 20 20 20 |1...) | |\. |
|00000980| 20 20 24 4d 41 49 4c 20 | 2d 73 20 22 24 31 20 7a | $MAIL |-s "$1 z|
|00000990| 6f 6e 65 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |one conf|iguratio|
|000009a0| 6e 20 24 66 61 69 6c 74 | 79 70 65 22 20 24 4e 4f |n $failt|ype" $NO|
|000009b0| 54 49 46 59 20 60 64 6f | 6d 61 69 6e 74 6f 61 64 |TIFY `do|maintoad|
|000009c0| 64 72 20 24 4d 42 60 20 | 0a 20 20 20 20 20 20 20 |dr $MB` |. |
|000009d0| 20 65 63 68 6f 20 24 31 | 20 7a 6f 6e 65 20 63 6f | echo $1| zone co|
|000009e0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 24 66 61 69 |nfigurat|ion $fai|
|000009f0| 6c 74 79 70 65 0a 09 73 | 65 64 20 27 73 2f 5e 2f |ltype..s|ed 's/^/|
|00000a00| 20 20 2f 27 20 24 31 2e | 6c 6f 67 0a 20 20 20 20 | /' $1.|log. |
|00000a10| 20 20 20 20 65 63 68 6f | 20 22 20 20 24 4e 4f 54 | echo| " $NOT|
|00000a20| 49 46 59 2c 20 60 64 6f | 6d 61 69 6e 74 6f 61 64 |IFY, `do|maintoad|
|00000a30| 64 72 20 24 4d 42 60 20 | 6e 6f 74 69 66 69 65 64 |dr $MB` |notified|
|00000a40| 20 76 69 61 20 6d 61 69 | 6c 2e 22 0a 09 65 63 68 | via mai|l."..ech|
|00000a50| 6f 20 22 22 0a 7d 0a 0a | 63 64 20 2f 74 6d 70 0a |o "".}..|cd /tmp.|
|00000a60| 0a 74 72 61 70 20 22 72 | 6d 20 2d 66 20 24 54 4d |.trap "r|m -f $TM|
|00000a70| 50 2a 3b 20 65 78 69 74 | 20 31 22 20 32 20 33 0a |P*; exit| 1" 2 3.|
|00000a80| 0a 65 67 72 65 70 20 27 | 5e 28 70 72 69 6d 61 72 |.egrep '|^(primar|
|00000a90| 79 7c 73 65 63 6f 6e 64 | 61 72 79 29 27 20 24 42 |y|second|ary)' $B|
|00000aa0| 4f 4f 54 46 49 4c 45 20 | 3e 24 54 4d 50 2e 64 6f |OOTFILE |>$TMP.do|
|00000ab0| 6d 61 69 6e 73 0a 0a 77 | 68 69 6c 65 20 72 65 61 |mains..w|hile rea|
|00000ac0| 64 20 6c 69 6e 65 3b 20 | 64 6f 0a 09 73 65 74 20 |d line; |do..set |
|00000ad0| 2d 2d 20 24 6c 69 6e 65 | 0a 0a 09 64 6f 6d 61 69 |-- $line|...domai|
|00000ae0| 6e 6e 61 6d 65 3d 60 74 | 6f 6c 6f 77 65 72 20 24 |nname=`t|olower $|
|00000af0| 32 60 0a 09 69 66 20 69 | 73 5f 69 6e 5f 61 64 64 |2`..if i|s_in_add|
|00000b00| 72 20 24 64 6f 6d 61 69 | 6e 6e 61 6d 65 3b 20 74 |r $domai|nname; t|
|00000b10| 68 65 6e 0a 09 09 70 61 | 72 65 6e 74 3d 61 72 70 |hen...pa|rent=arp|
|00000b20| 61 2e 0a 09 65 6c 73 65 | 0a 09 09 70 61 72 65 6e |a...else|...paren|
|00000b30| 74 3d 0a 09 66 69 0a 0a | 09 23 20 66 69 6e 64 20 |t=..fi..|.# find |
|00000b40| 64 61 74 61 20 66 69 6c | 65 0a 09 77 68 69 6c 65 |data fil|e..while|
|00000b50| 20 5b 20 22 24 32 22 20 | 21 3d 20 22 22 20 5d 3b | [ "$2" |!= "" ];|
|00000b60| 20 64 6f 0a 09 09 73 68 | 69 66 74 0a 09 64 6f 6e | do...sh|ift..don|
|00000b70| 65 0a 09 64 61 74 61 66 | 69 6c 65 3d 24 31 0a 0a |e..dataf|ile=$1..|
|00000b80| 09 23 20 69 67 6e 6f 72 | 65 20 6c 6f 63 61 6c 68 |.# ignor|e localh|
|00000b90| 6f 73 74 20 64 6f 6d 61 | 69 6e 20 73 74 75 66 66 |ost doma|in stuff|
|00000ba0| 0a 09 69 66 20 5b 20 24 | 64 6f 6d 61 69 6e 6e 61 |..if [ $|domainna|
|00000bb0| 6d 65 20 3d 20 30 2e 30 | 2e 31 32 37 2e 69 6e 2d |me = 0.0|.127.in-|
|00000bc0| 61 64 64 72 2e 61 72 70 | 61 20 2d 6f 20 24 64 61 |addr.arp|a -o $da|
|00000bd0| 74 61 66 69 6c 65 20 3d | 20 75 6e 69 78 68 6f 73 |tafile =| unixhos|
|00000be0| 74 73 20 5d 3b 20 74 68 | 65 6e 0a 09 09 63 6f 6e |ts ]; th|en...con|
|00000bf0| 74 69 6e 75 65 0a 09 66 | 69 0a 0a 09 72 6d 20 2d |tinue..f|i...rm -|
|00000c00| 66 20 6c 6f 67 2e 24 64 | 6f 6d 61 69 6e 6e 61 6d |f log.$d|omainnam|
|00000c10| 65 2e 0a 09 64 6f 63 20 | 2d 77 20 2d 65 20 24 64 |e...doc |-w -e $d|
|00000c20| 6f 6d 61 69 6e 6e 61 6d | 65 2e 20 24 70 61 72 65 |omainnam|e. $pare|
|00000c30| 6e 74 20 32 3e 2f 64 65 | 76 2f 6e 75 6c 6c 20 3e |nt 2>/de|v/null >|
|00000c40| 24 54 4d 50 2e 64 6f 63 | 6f 75 74 0a 09 73 74 61 |$TMP.doc|out..sta|
|00000c50| 74 75 73 3d 24 3f 0a 09 | 65 67 72 65 70 20 2d 76 |tus=$?..|egrep -v|
|00000c60| 20 27 5e 28 44 6f 63 2d | 7c 44 49 47 45 52 52 7c | '^(Doc-||DIGERR||
|00000c70| 44 6f 6e 65 20 74 65 73 | 74 69 6e 67 29 27 20 3c |Done tes|ting)' <|
|00000c80| 24 54 4d 50 2e 64 6f 63 | 6f 75 74 20 3e 24 64 6f |$TMP.doc|out >$do|
|00000c90| 6d 61 69 6e 6e 61 6d 65 | 2e 6c 6f 67 0a 09 0a 09 |mainname|.log....|
|00000ca0| 69 66 20 5b 20 24 73 74 | 61 74 75 73 20 2d 67 74 |if [ $st|atus -gt|
|00000cb0| 20 24 4e 4f 54 49 46 59 | 4c 45 56 45 4c 20 5d 3b | $NOTIFY|LEVEL ];|
|00000cc0| 20 74 68 65 6e 0a 09 09 | 6e 6f 74 69 66 79 70 65 | then...|notifype|
|00000cd0| 72 73 6f 6e 69 6e 63 68 | 61 72 67 65 20 24 64 6f |rsoninch|arge $do|
|00000ce0| 6d 61 69 6e 6e 61 6d 65 | 20 24 73 74 61 74 75 73 |mainname| $status|
|00000cf0| 0a 09 66 69 0a 09 0a 09 | 72 6d 20 2d 66 20 6c 6f |..fi....|rm -f lo|
|00000d00| 67 2e 24 64 6f 6d 61 69 | 6e 6e 61 6d 65 2e 20 24 |g.$domai|nname. $|
|00000d10| 64 6f 6d 61 69 6e 6e 61 | 6d 65 2e 6c 6f 67 0a 64 |domainna|me.log.d|
|00000d20| 6f 6e 65 20 3c 24 54 4d | 50 2e 64 6f 6d 61 69 6e |one <$TM|P.domain|
|00000d30| 73 0a 0a 72 6d 20 2d 66 | 20 24 54 4d 50 2a 0a 40 |s..rm -f| $TMP*.@|
|00000d40| 2f 2f 45 2a 4f 2a 46 20 | 63 6b 64 6f 6d 61 69 6e |//E*O*F |ckdomain|
|00000d50| 63 66 2e 73 68 2f 2f 0a | 63 68 6d 6f 64 20 75 3d |cf.sh//.|chmod u=|
|00000d60| 72 2c 67 3d 72 2c 6f 3d | 72 20 63 6b 64 6f 6d 61 |r,g=r,o=|r ckdoma|
|00000d70| 69 6e 63 66 2e 73 68 0a | 20 0a 65 63 68 6f 20 78 |incf.sh.| .echo x|
|00000d80| 20 2d 20 63 6b 73 65 72 | 69 61 6c 2e 73 68 0a 73 | - ckser|ial.sh.s|
|00000d90| 65 64 20 27 73 2f 5e 40 | 2f 2f 27 20 3e 20 22 63 |ed 's/^@|//' > "c|
|00000da0| 6b 73 65 72 69 61 6c 2e | 73 68 22 20 3c 3c 27 40 |kserial.|sh" <<'@|
|00000db0| 2f 2f 45 2a 4f 2a 46 20 | 63 6b 73 65 72 69 61 6c |//E*O*F |ckserial|
|00000dc0| 2e 73 68 2f 2f 27 0a 23 | 21 2f 62 69 6e 2f 73 68 |.sh//'.#|!/bin/sh|
|00000dd0| 0a 23 20 40 28 23 29 63 | 6b 73 65 72 69 61 6c 2e |.# @(#)c|kserial.|
|00000de0| 73 68 09 31 2e 34 09 31 | 31 2f 32 31 2f 39 30 0a |sh.1.4.1|1/21/90.|
|00000df0| 23 0a 23 20 63 6b 73 65 | 72 69 61 6c 20 2d 20 63 |#.# ckse|rial - c|
|00000e00| 68 65 63 6b 20 7a 6f 6e | 65 20 66 69 6c 65 20 73 |heck zon|e file s|
|00000e10| 65 72 69 61 6c 20 6e 75 | 6d 62 65 72 73 0a 23 0a |erial nu|mbers.#.|
|00000e20| 23 20 63 6b 73 65 72 69 | 61 6c 20 63 68 65 63 6b |# ckseri|al check|
|00000e30| 73 20 74 68 65 20 73 65 | 72 69 61 6c 20 6e 75 6d |s the se|rial num|
|00000e40| 62 65 72 73 20 6f 66 20 | 7a 6f 6e 65 20 66 69 6c |bers of |zone fil|
|00000e50| 65 73 20 74 6f 20 65 6e | 73 75 72 65 0a 23 20 74 |es to en|sure.# t|
|00000e60| 68 61 74 20 74 68 65 79 | 20 61 72 65 20 73 65 71 |hat they| are seq|
|00000e70| 75 65 6e 63 65 64 20 70 | 72 6f 70 65 72 6c 79 2e |uenced p|roperly.|
|00000e80| 20 20 49 74 20 6b 65 65 | 70 73 20 61 20 63 68 65 | It kee|ps a che|
|00000e90| 63 6b 70 6f 69 6e 74 65 | 64 0a 23 20 73 65 74 20 |ckpointe|d.# set |
|00000ea0| 6f 66 20 64 61 74 61 20 | 66 6f 72 20 63 6f 6d 70 |of data |for comp|
|00000eb0| 61 72 69 73 6f 6e 20 70 | 75 72 70 6f 73 65 73 2e |arison p|urposes.|
|00000ec0| 0a 23 0a 23 20 55 53 41 | 47 45 0a 23 09 63 6b 73 |.#.# USA|GE.#.cks|
|00000ed0| 65 72 69 61 6c 20 5b 20 | 62 6f 6f 74 66 69 6c 65 |erial [ |bootfile|
|00000ee0| 20 5d 0a 23 0a 23 20 42 | 55 47 53 0a 23 09 41 73 | ].#.# B|UGS.#.As|
|00000ef0| 73 75 6d 65 73 20 6f 70 | 74 69 6f 6e 61 6c 20 74 |sumes op|tional t|
|00000f00| 74 6c 20 66 69 65 6c 64 | 20 66 6f 72 20 53 4f 41 |tl field| for SOA|
|00000f10| 20 72 65 63 6f 72 64 20 | 69 73 20 6e 6f 74 20 75 | record |is not u|
|00000f20| 73 65 64 2e 0a 0a 42 4f | 4f 54 46 49 4c 45 3d 2f |sed...BO|OTFILE=/|
|00000f30| 65 74 63 2f 6e 61 6d 65 | 64 2e 62 6f 6f 74 0a 43 |etc/name|d.boot.C|
|00000f40| 4b 50 54 44 49 52 3d 63 | 6b 70 6f 69 6e 74 09 09 |KPTDIR=c|kpoint..|
|00000f50| 23 20 72 65 6c 61 74 69 | 76 65 20 74 6f 20 27 64 |# relati|ve to 'd|
|00000f60| 69 72 65 63 74 6f 72 79 | 27 20 69 6e 20 62 6f 6f |irectory|' in boo|
|00000f70| 74 66 69 6c 65 0a 4c 4f | 47 46 49 4c 45 3d 2f 74 |tfile.LO|GFILE=/t|
|00000f80| 6d 70 2f 2e 63 6b 73 6c | 6f 67 24 24 0a 53 45 44 |mp/.cksl|og$$.SED|
|00000f90| 46 49 4c 45 3d 2f 74 6d | 70 2f 2e 63 6b 73 73 65 |FILE=/tm|p/.cksse|
|00000fa0| 64 24 24 0a 4d 41 49 4c | 3d 2f 75 73 72 2f 75 63 |d$$.MAIL|=/usr/uc|
|00000fb0| 62 2f 4d 61 69 6c 0a 4e | 4f 54 49 46 59 3d 68 6f |b/Mail.N|OTIFY=ho|
|00000fc0| 73 74 6d 61 73 74 65 72 | 0a 0a 23 20 63 68 61 6e |stmaster|..# chan|
|00000fd0| 67 65 20 64 65 66 61 75 | 6c 74 20 62 6f 6f 74 66 |ge defau|lt bootf|
|00000fe0| 69 6c 65 20 69 66 20 6e | 65 63 65 73 73 61 72 79 |ile if n|ecessary|
|00000ff0| 0a 69 66 20 5b 20 22 24 | 31 22 20 21 3d 20 22 22 |.if [ "$|1" != ""|
|00001000| 20 5d 3b 20 74 68 65 6e | 0a 09 69 66 20 5b 20 2d | ]; then|..if [ -|
|00001010| 66 20 24 31 20 5d 3b 20 | 74 68 65 6e 0a 09 09 42 |f $1 ]; |then...B|
|00001020| 4f 4f 54 46 49 4c 45 3d | 24 31 0a 09 65 6c 73 65 |OOTFILE=|$1..else|
|00001030| 0a 09 09 65 63 68 6f 20 | 75 73 61 67 65 3a 20 60 |...echo |usage: `|
|00001040| 62 61 73 65 6e 61 6d 65 | 20 24 30 60 20 22 5b 20 |basename| $0` "[ |
|00001050| 62 6f 6f 74 66 69 6c 65 | 20 5d 22 0a 09 09 65 78 |bootfile| ]"...ex|
|00001060| 69 74 20 31 0a 09 66 69 | 0a 66 69 0a 0a 74 72 61 |it 1..fi|.fi..tra|
|00001070| 70 20 22 72 6d 20 2d 66 | 20 2f 74 6d 70 2f 2e 63 |p "rm -f| /tmp/.c|
|00001080| 6b 73 2a 24 24 3b 20 65 | 78 69 74 20 31 22 20 32 |ks*$$; e|xit 1" 2|
|00001090| 20 33 0a 0a 23 20 73 65 | 64 20 66 69 6c 65 20 66 | 3..# se|d file f|
|000010a0| 6f 72 20 6d 61 73 73 61 | 67 69 6e 67 20 7a 6f 6e |or massa|ging zon|
|000010b0| 65 20 64 61 74 61 0a 63 | 61 74 20 3e 24 53 45 44 |e data.c|at >$SED|
|000010c0| 46 49 4c 45 20 3c 3c 21 | 0a 2f 5e 3b 2f 64 0a 73 |FILE <<!|./^;/d.s|
|000010d0| 2f 3b 2e 2a 2f 2f 0a 3a | 6a 6f 69 6e 0a 2f 28 5b |/;.*//.:|join./([|
|000010e0| 5e 29 5d 2a 24 2f 4e 0a | 73 2f 5c 6e 5b 20 09 5d |^)]*$/N.|s/\n[ .]|
|000010f0| 2a 2f 20 2f 0a 74 20 6a | 6f 69 6e 0a 73 2f 28 5c |*/ /.t j|oin.s/(\|
|00001100| 28 2e 2a 5c 29 29 2f 5c | 31 2f 0a 21 0a 0a 23 20 |(.*\))/\|1/.!..# |
|00001110| 73 74 72 69 70 20 63 6f | 6d 6d 65 6e 74 73 20 66 |strip co|mments f|
|00001120| 72 6f 6d 20 7a 6f 6e 65 | 20 64 61 74 61 0a 73 74 |rom zone| data.st|
|00001130| 72 69 70 63 6f 6d 6d 65 | 6e 74 73 28 29 20 7b 0a |ripcomme|nts() {.|
|00001140| 09 73 65 64 20 2d 65 20 | 27 2f 5e 3b 2f 64 27 20 |.sed -e |'/^;/d' |
|00001150| 2d 65 20 27 73 2f 3b 2e | 2a 2f 2f 27 20 24 2a 0a |-e 's/;.|*//' $*.|
|00001160| 7d 0a 0a 23 20 6c 69 73 | 74 20 7a 6f 6e 65 20 66 |}..# lis|t zone f|
|00001170| 69 6c 65 73 20 75 73 65 | 64 20 62 79 20 62 6f 6f |iles use|d by boo|
|00001180| 74 20 66 69 6c 65 0a 23 | 20 20 73 65 63 6f 6e 64 |t file.#| second|
|00001190| 61 72 79 20 7a 6f 6e 65 | 73 20 61 72 65 20 6e 6f |ary zone|s are no|
|000011a0| 74 20 63 68 65 63 6b 65 | 64 2e 20 20 54 68 65 73 |t checke|d. Thes|
|000011b0| 65 20 61 72 65 20 61 73 | 73 75 6d 65 64 20 74 6f |e are as|sumed to|
|000011c0| 20 62 65 20 63 6f 72 72 | 65 63 74 0a 23 20 20 61 | be corr|ect.# a|
|000011d0| 73 20 66 61 72 20 61 73 | 20 74 72 61 6e 73 66 65 |s far as| transfe|
|000011e0| 72 73 20 67 6f 20 62 65 | 63 61 75 73 65 20 6f 6c |rs go be|cause ol|
|000011f0| 64 20 73 65 72 69 61 6c | 20 6e 75 6d 62 65 72 73 |d serial| numbers|
|00001200| 20 77 6f 6e 27 74 20 28 | 73 68 6f 75 6c 64 6e 27 | won't (|shouldn'|
|00001210| 74 29 0a 23 20 20 62 65 | 20 74 72 61 6e 73 66 65 |t).# be| transfe|
|00001220| 72 72 65 64 2e 20 20 42 | 65 73 69 64 65 73 2c 20 |rred. B|esides, |
|00001230| 49 27 6d 20 6e 6f 74 20 | 73 75 72 65 20 6f 66 20 |I'm not |sure of |
|00001240| 74 68 65 20 73 65 6d 61 | 6e 74 69 63 73 20 66 6f |the sema|ntics fo|
|00001250| 72 20 64 65 74 65 72 6d | 69 6e 69 6e 67 0a 23 20 |r determ|ining.# |
|00001260| 20 77 68 65 74 68 65 72 | 20 74 68 65 20 6c 61 73 | whether| the las|
|00001270| 74 20 65 6e 74 72 79 20 | 69 73 20 61 20 66 69 6c |t entry |is a fil|
|00001280| 65 20 6f 72 20 6e 6f 74 | 2e 20 20 49 20 73 75 70 |e or not|. I sup|
|00001290| 70 6f 73 65 20 61 20 73 | 69 6d 70 6c 65 20 74 65 |pose a s|imple te|
|000012a0| 73 74 20 6f 66 0a 23 20 | 20 65 78 69 73 74 65 6e |st of.# | existen|
|000012b0| 63 65 20 77 6f 75 6c 64 | 20 77 6f 72 6b 20 74 68 |ce would| work th|
|000012c0| 6f 75 67 68 2e 0a 67 65 | 74 7a 6f 6e 65 66 69 6c |ough..ge|tzonefil|
|000012d0| 65 73 28 29 20 7b 0a 09 | 61 77 6b 20 27 5c 0a 09 |es() {..|awk '\..|
|000012e0| 24 31 20 3d 3d 20 22 63 | 61 63 68 65 22 20 7c 7c |$1 == "c|ache" |||
|000012f0| 20 24 31 20 3d 3d 20 22 | 43 41 43 48 45 22 20 7c | $1 == "|CACHE" ||
|00001300| 7c 20 5c 0a 09 24 31 20 | 3d 3d 20 22 70 72 69 6d || \..$1 |== "prim|
|00001310| 61 72 79 22 20 7c 7c 20 | 24 31 20 3d 3d 20 22 50 |ary" || |$1 == "P|
|00001320| 52 49 4d 41 52 59 22 20 | 7b 0a 09 09 70 72 69 6e |RIMARY" |{...prin|
|00001330| 74 66 20 22 25 73 5c 6e | 22 2c 24 4e 46 20 7d 27 |tf "%s\n|",$NF }'|
|00001340| 20 24 31 0a 7d 0a 0a 23 | 20 67 65 74 20 7a 6f 6e | $1.}..#| get zon|
|00001350| 65 20 66 69 6c 65 20 64 | 69 72 65 63 74 6f 72 79 |e file d|irectory|
|00001360| 0a 67 65 74 7a 6f 6e 65 | 64 69 72 28 29 20 7b 0a |.getzone|dir() {.|
|00001370| 09 73 74 72 69 70 63 6f | 6d 6d 65 6e 74 73 20 24 |.stripco|mments $|
|00001380| 31 20 7c 20 61 77 6b 20 | 27 42 45 47 49 4e 20 7b |1 | awk |'BEGIN {|
|00001390| 20 64 69 72 20 3d 20 22 | 2f 22 3b 20 7d 0a 09 24 | dir = "|/"; }..$|
|000013a0| 31 20 3d 3d 20 22 64 69 | 72 65 63 74 6f 72 79 22 |1 == "di|rectory"|
|000013b0| 20 7c 7c 20 24 31 20 3d | 3d 20 22 44 49 52 45 43 | || $1 =|= "DIREC|
|000013c0| 54 4f 52 59 22 20 7b 0a | 09 09 64 69 72 20 3d 20 |TORY" {.|..dir = |
|000013d0| 24 32 20 7d 0a 09 45 4e | 44 20 7b 70 72 69 6e 74 |$2 }..EN|D {print|
|000013e0| 20 64 69 72 7d 27 0a 7d | 0a 0a 23 20 67 65 74 20 | dir}'.}|..# get |
|000013f0| 53 4f 41 20 73 65 72 69 | 61 6c 20 6e 75 6d 62 65 |SOA seri|al numbe|
|00001400| 72 0a 67 65 74 73 65 72 | 69 61 6c 6e 75 6d 62 65 |r.getser|ialnumbe|
|00001410| 72 28 29 20 7b 0a 09 74 | 72 20 61 2d 7a 20 41 2d |r() {..t|r a-z A-|
|00001420| 5a 20 3c 24 31 20 7c 20 | 73 65 64 20 2d 66 20 24 |Z <$1 | |sed -f $|
|00001430| 53 45 44 46 49 4c 45 20 | 7c 20 61 77 6b 20 27 24 |SEDFILE || awk '$|
|00001440| 33 20 3d 3d 20 22 53 4f | 41 22 20 7b 20 70 72 69 |3 == "SO|A" { pri|
|00001450| 6e 74 20 24 36 7d 27 0a | 7d 0a 0a 23 20 67 65 74 |nt $6}'.|}..# get|
|00001460| 20 6d 61 69 6c 20 61 64 | 64 72 65 73 73 20 6f 66 | mail ad|dress of|
|00001470| 20 70 65 72 73 6f 6e 20 | 69 6e 20 63 68 61 72 67 | person |in charg|
|00001480| 65 20 6f 66 20 74 68 65 | 20 7a 6f 6e 65 0a 67 65 |e of the| zone.ge|
|00001490| 74 70 65 72 73 6f 6e 69 | 6e 63 68 61 72 67 65 28 |tpersoni|ncharge(|
|000014a0| 29 20 7b 0a 09 73 74 72 | 69 70 63 6f 6d 6d 65 6e |) {..str|ipcommen|
|000014b0| 74 73 20 24 31 20 7c 20 | 74 72 20 61 2d 7a 20 41 |ts $1 | |tr a-z A|
|000014c0| 2d 5a 20 7c 20 61 77 6b | 20 27 24 33 20 3d 3d 20 |-Z | awk| '$3 == |
|000014d0| 22 53 4f 41 22 20 7b 70 | 72 69 6e 74 20 24 35 7d |"SOA" {p|rint $5}|
|000014e0| 27 0a 7d 0a 0a 23 20 67 | 65 74 20 7a 6f 6e 65 20 |'.}..# g|et zone |
|000014f0| 6f 72 69 67 69 6e 0a 67 | 65 74 7a 6f 6e 65 28 29 |origin.g|etzone()|
|00001500| 20 7b 0a 09 23 20 67 65 | 74 20 7a 6f 6e 65 20 66 | {..# ge|t zone f|
|00001510| 72 6f 6d 20 7a 6f 6e 65 | 20 64 61 74 61 20 66 69 |rom zone| data fi|
|00001520| 6c 65 0a 09 7a 6f 6e 65 | 3d 60 73 74 72 69 70 63 |le..zone|=`stripc|
|00001530| 6f 6d 6d 65 6e 74 73 20 | 24 31 20 7c 20 74 72 20 |omments |$1 | tr |
|00001540| 61 2d 7a 20 41 2d 5a 20 | 7c 20 61 77 6b 20 27 24 |a-z A-Z || awk '$|
|00001550| 33 20 3d 3d 20 22 53 4f | 41 22 20 7b 70 72 69 6e |3 == "SO|A" {prin|
|00001560| 74 20 24 31 7d 27 60 0a | 09 23 20 69 66 20 7a 6f |t $1}'`.|.# if zo|
|00001570| 6e 65 20 69 73 20 63 75 | 72 72 65 6e 74 20 6f 72 |ne is cu|rrent or|
|00001580| 69 67 69 6e 0a 09 69 66 | 20 5b 20 22 24 7a 6f 6e |igin..if| [ "$zon|
|00001590| 65 22 20 3d 20 22 40 22 | 20 5d 3b 20 74 68 65 6e |e" = "@"| ]; then|
|000015a0| 0a 09 09 23 20 67 65 74 | 20 7a 6f 6e 65 20 66 72 |...# get| zone fr|
|000015b0| 6f 6d 20 62 6f 6f 74 66 | 69 6c 65 0a 09 09 7a 6f |om bootf|ile...zo|
|000015c0| 6e 65 3d 60 67 72 65 70 | 20 24 31 20 24 42 4f 4f |ne=`grep| $1 $BOO|
|000015d0| 54 46 49 4c 45 20 7c 20 | 61 77 6b 20 27 7b 70 72 |TFILE | |awk '{pr|
|000015e0| 69 6e 74 20 24 32 7d 27 | 60 0a 09 66 69 0a 09 65 |int $2}'|`..fi..e|
|000015f0| 63 68 6f 20 24 7a 6f 6e | 65 0a 7d 0a 0a 23 20 63 |cho $zon|e.}..# c|
|00001600| 68 65 63 6b 70 6f 69 6e | 74 20 61 20 6c 69 73 74 |heckpoin|t a list|
|00001610| 20 6f 66 20 66 69 6c 65 | 73 0a 63 68 65 63 6b 70 | of file|s.checkp|
|00001620| 6f 69 6e 74 28 29 20 7b | 0a 09 77 68 69 6c 65 20 |oint() {|..while |
|00001630| 5b 20 22 24 31 22 20 21 | 3d 20 22 22 20 5d 3b 20 |[ "$1" !|= "" ]; |
|00001640| 64 6f 0a 09 09 23 20 63 | 6f 70 79 20 66 69 6c 65 |do...# c|opy file|
|00001650| 20 70 72 65 73 65 72 76 | 69 6e 67 20 6d 6f 64 65 | preserv|ing mode|
|00001660| 73 2f 64 61 74 65 73 0a | 09 09 63 70 20 2d 70 20 |s/dates.|..cp -p |
|00001670| 24 31 20 24 43 4b 50 54 | 44 49 52 2f 24 31 0a 09 |$1 $CKPT|DIR/$1..|
|00001680| 09 73 68 69 66 74 0a 09 | 64 6f 6e 65 0a 7d 0a 0a |.shift..|done.}..|
|00001690| 23 20 67 65 74 20 6c 69 | 73 74 20 6f 66 20 69 6e |# get li|st of in|
|000016a0| 63 6c 75 64 65 20 66 69 | 6c 65 73 20 66 72 6f 6d |clude fi|les from|
|000016b0| 20 7a 6f 6e 65 20 66 69 | 6c 65 0a 69 6e 63 6c 75 | zone fi|le.inclu|
|000016c0| 64 65 66 69 6c 65 73 28 | 29 20 7b 0a 09 67 72 65 |defiles(|) {..gre|
|000016d0| 70 20 2d 69 20 27 5e 5c | 24 69 6e 63 6c 75 64 65 |p -i '^\|$include|
|000016e0| 27 20 24 31 20 7c 20 61 | 77 6b 20 27 7b 70 72 69 |' $1 | a|wk '{pri|
|000016f0| 6e 74 20 24 32 7d 27 0a | 7d 0a 0a 23 20 69 73 20 |nt $2}'.|}..# is |
|00001700| 61 72 67 20 31 20 3c 20 | 61 72 67 32 0a 23 20 20 |arg 1 < |arg2.# |
|00001710| 74 65 73 74 20 69 6e 74 | 65 67 65 72 20 61 6e 64 |test int|eger and|
|00001720| 20 66 6c 6f 61 74 69 6e | 67 20 6e 75 6d 62 65 72 | floatin|g number|
|00001730| 73 0a 6c 74 28 29 20 7b | 0a 09 61 77 6b 20 27 42 |s.lt() {|..awk 'B|
|00001740| 45 47 49 4e 7b 20 69 66 | 20 28 27 24 31 27 20 3c |EGIN{ if| ('$1' <|
|00001750| 20 27 24 32 27 29 20 65 | 78 69 74 20 30 3b 20 65 | '$2') e|xit 0; e|
|00001760| 6c 73 65 20 65 78 69 74 | 20 31 3b 20 7d 27 0a 7d |lse exit| 1; }'.}|
|00001770| 0a 0a 23 20 63 6f 6d 70 | 61 72 65 20 74 77 6f 20 |..# comp|are two |
|00001780| 66 69 6c 65 73 20 69 67 | 6e 6f 72 69 6e 67 20 77 |files ig|noring w|
|00001790| 68 69 74 65 20 73 70 61 | 63 65 20 63 68 61 6e 67 |hite spa|ce chang|
|000017a0| 65 73 0a 63 6f 6d 70 61 | 72 65 28 29 20 7b 0a 09 |es.compa|re() {..|
|000017b0| 64 69 66 66 20 2d 62 20 | 24 31 20 24 32 20 3e 2f |diff -b |$1 $2 >/|
|000017c0| 64 65 76 2f 6e 75 6c 6c | 0a 7d 0a 0a 23 20 6c 6f |dev/null|.}..# lo|
|000017d0| 67 20 61 20 7a 6f 6e 65 | 66 69 6c 65 20 65 72 72 |g a zone|file err|
|000017e0| 6f 72 20 6d 65 73 73 61 | 67 65 0a 65 72 72 6c 6f |or messa|ge.errlo|
|000017f0| 67 28 29 20 7b 0a 09 45 | 52 52 4f 52 46 49 4c 45 |g() {..E|RRORFILE|
|00001800| 3d 24 31 09 23 20 73 61 | 76 65 20 7a 6f 6e 65 20 |=$1.# sa|ve zone |
|00001810| 66 69 6c 65 20 66 6f 72 | 20 65 72 72 6f 72 20 72 |file for| error r|
|00001820| 65 70 6f 72 74 69 6e 67 | 0a 09 65 63 68 6f 20 22 |eporting|..echo "|
|00001830| 24 32 22 20 31 3e 26 32 | 0a 09 65 63 68 6f 20 22 |$2" 1>&2|..echo "|
|00001840| 24 32 22 20 3e 3e 24 4c | 4f 47 46 49 4c 45 0a 7d |$2" >>$L|OGFILE.}|
|00001850| 0a 0a 23 20 63 6f 6e 76 | 65 72 74 20 64 6f 6d 61 |..# conv|ert doma|
|00001860| 69 6e 20 6e 61 6d 65 20 | 74 6f 20 6d 61 69 6c 20 |in name |to mail |
|00001870| 61 64 64 72 65 73 73 0a | 64 6f 6d 61 69 6e 74 6f |address.|domainto|
|00001880| 61 64 64 72 28 29 20 7b | 0a 09 65 63 68 6f 20 24 |addr() {|..echo $|
|00001890| 31 20 7c 20 73 65 64 20 | 2d 65 20 27 73 2f 5c 2e |1 | sed |-e 's/\.|
|000018a0| 24 2f 2f 27 20 2d 65 20 | 27 73 2f 5c 2e 2f 40 2f |$//' -e |'s/\./@/|
|000018b0| 27 0a 7d 0a 0a 23 20 6e | 6f 74 69 66 79 20 74 68 |'.}..# n|otify th|
|000018c0| 65 20 70 65 72 73 6f 6e | 20 69 6e 20 63 68 61 72 |e person| in char|
|000018d0| 67 65 20 6f 66 20 61 20 | 7a 6f 6e 65 20 6f 66 20 |ge of a |zone of |
|000018e0| 64 65 74 65 63 74 65 64 | 20 65 72 72 6f 72 73 0a |detected| errors.|
|000018f0| 6e 6f 74 69 66 79 70 65 | 72 73 6f 6e 69 6e 63 68 |notifype|rsoninch|
|00001900| 61 72 67 65 28 29 20 7b | 0a 09 4d 42 3d 60 67 65 |arge() {|..MB=`ge|
|00001910| 74 70 65 72 73 6f 6e 69 | 6e 63 68 61 72 67 65 20 |tpersoni|ncharge |
|00001920| 24 31 60 0a 09 5a 4f 4e | 45 3d 60 67 65 74 7a 6f |$1`..ZON|E=`getzo|
|00001930| 6e 65 20 24 31 60 0a 09 | 24 4d 41 49 4c 20 2d 73 |ne $1`..|$MAIL -s|
|00001940| 20 22 24 5a 4f 4e 45 20 | 7a 6f 6e 65 20 63 6f 6e | "$ZONE |zone con|
|00001950| 66 69 67 75 72 61 74 69 | 6f 6e 20 65 72 72 6f 72 |figurati|on error|
|00001960| 22 20 24 4e 4f 54 49 46 | 59 20 60 64 6f 6d 61 69 |" $NOTIF|Y `domai|
|00001970| 6e 74 6f 61 64 64 72 20 | 24 4d 42 60 20 3c 24 4c |ntoaddr |$MB` <$L|
|00001980| 4f 47 46 49 4c 45 0a 09 | 65 63 68 6f 20 22 09 24 |OGFILE..|echo ".$|
|00001990| 4e 4f 54 49 46 59 2c 20 | 60 64 6f 6d 61 69 6e 74 |NOTIFY, |`domaint|
|000019a0| 6f 61 64 64 72 20 24 4d | 42 60 20 6e 6f 74 69 66 |oaddr $M|B` notif|
|000019b0| 69 65 64 20 76 69 61 20 | 6d 61 69 6c 2e 22 0a 7d |ied via |mail.".}|
|000019c0| 0a 0a 70 72 6f 63 65 73 | 73 65 72 72 6f 72 73 28 |..proces|serrors(|
|000019d0| 29 20 7b 0a 09 23 20 69 | 66 20 65 72 72 6f 72 73 |) {..# i|f errors|
|000019e0| 20 66 6f 75 6e 64 2c 20 | 6e 6f 74 69 66 79 20 70 | found, |notify p|
|000019f0| 65 72 73 6f 6e 20 69 6e | 20 63 68 61 72 67 65 0a |erson in| charge.|
|00001a00| 09 69 66 20 5b 20 2d 66 | 20 24 4c 4f 47 46 49 4c |.if [ -f| $LOGFIL|
|00001a10| 45 20 5d 3b 20 74 68 65 | 6e 0a 09 09 6e 6f 74 69 |E ]; the|n...noti|
|00001a20| 66 79 70 65 72 73 6f 6e | 69 6e 63 68 61 72 67 65 |fyperson|incharge|
|00001a30| 20 24 45 52 52 4f 52 46 | 49 4c 45 0a 0a 09 09 23 | $ERRORF|ILE....#|
|00001a40| 20 74 72 75 6e 63 61 74 | 65 20 65 72 72 6f 72 20 | truncat|e error |
|00001a50| 6c 6f 67 20 66 69 6c 65 | 0a 09 09 72 6d 20 2d 66 |log file|...rm -f|
|00001a60| 20 24 4c 4f 47 46 49 4c | 45 0a 09 66 69 0a 7d 0a | $LOGFIL|E..fi.}.|
|00001a70| 0a 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |.#######|########|
|00001a80| 23 23 23 23 23 23 23 23 | 23 23 0a 23 20 72 65 61 |########|##.# rea|
|00001a90| 6c 20 77 6f 72 6b 20 73 | 74 61 72 74 73 20 68 65 |l work s|tarts he|
|00001aa0| 72 65 20 23 0a 23 23 23 | 23 23 23 23 23 23 23 23 |re #.###|########|
|00001ab0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 0a 0a |########|######..|
|00001ac0| 23 20 63 64 20 74 6f 20 | 74 68 65 20 7a 6f 6e 65 |# cd to |the zone|
|00001ad0| 20 66 69 6c 65 20 64 61 | 74 61 20 64 69 72 65 63 | file da|ta direc|
|00001ae0| 74 6f 72 79 0a 63 64 20 | 60 67 65 74 7a 6f 6e 65 |tory.cd |`getzone|
|00001af0| 64 69 72 20 24 42 4f 4f | 54 46 49 4c 45 60 0a 0a |dir $BOO|TFILE`..|
|00001b00| 5a 4f 4e 45 46 49 4c 45 | 53 3d 60 67 65 74 7a 6f |ZONEFILE|S=`getzo|
|00001b10| 6e 65 66 69 6c 65 73 20 | 24 42 4f 4f 54 46 49 4c |nefiles |$BOOTFIL|
|00001b20| 45 60 0a 53 4f 41 46 49 | 4c 45 53 3d 60 67 72 65 |E`.SOAFI|LES=`gre|
|00001b30| 70 20 2d 69 6c 20 27 5b | 20 09 5d 49 4e 5b 20 09 |p -il '[| .]IN[ .|
|00001b40| 5d 2a 53 4f 41 5b 20 09 | 5d 27 20 24 5a 4f 4e 45 |]*SOA[ .|]' $ZONE|
|00001b50| 46 49 4c 45 53 20 7c 20 | 73 74 72 69 70 63 6f 6d |FILES | |stripcom|
|00001b60| 6d 65 6e 74 73 60 0a 45 | 58 49 54 3d 30 0a 0a 66 |ments`.E|XIT=0..f|
|00001b70| 6f 72 20 66 20 69 6e 20 | 24 53 4f 41 46 49 4c 45 |or f in |$SOAFILE|
|00001b80| 53 3b 20 64 6f 0a 09 23 | 20 70 72 6f 63 65 73 73 |S; do..#| process|
|00001b90| 20 61 6e 79 20 6c 6f 67 | 67 65 64 20 65 72 72 6f | any log|ged erro|
|00001ba0| 72 73 0a 09 70 72 6f 63 | 65 73 73 65 72 72 6f 72 |rs..proc|esserror|
|00001bb0| 73 0a 0a 09 23 20 63 68 | 65 63 6b 20 66 6f 72 20 |s...# ch|eck for |
|00001bc0| 7a 6f 6e 65 20 66 69 6c | 65 20 65 78 69 73 74 65 |zone fil|e existe|
|00001bd0| 6e 63 65 0a 09 69 66 20 | 5b 20 21 20 2d 66 20 24 |nce..if |[ ! -f $|
|00001be0| 66 20 5d 3b 20 74 68 65 | 6e 0a 09 09 65 63 68 6f |f ]; the|n...echo|
|00001bf0| 20 22 24 42 4f 4f 54 46 | 49 4c 45 3a 20 24 66 20 | "$BOOTF|ILE: $f |
|00001c00| 64 6f 65 73 6e 27 74 20 | 65 78 69 73 74 22 20 31 |doesn't |exist" 1|
|00001c10| 3e 26 32 0a 09 09 63 6f | 6e 74 69 6e 75 65 0a 09 |>&2...co|ntinue..|
|00001c20| 66 69 0a 0a 09 23 20 69 | 66 20 74 68 69 73 20 7a |fi...# i|f this z|
|00001c30| 6f 6e 65 20 66 69 6c 65 | 20 69 73 20 6e 65 77 2c |one file| is new,|
|00001c40| 20 63 68 65 63 6b 70 6f | 69 6e 74 20 69 74 0a 09 | checkpo|int it..|
|00001c50| 69 66 20 5b 20 21 20 2d | 66 20 24 43 4b 50 54 44 |if [ ! -|f $CKPTD|
|00001c60| 49 52 2f 24 66 20 5d 3b | 20 74 68 65 6e 20 0a 09 |IR/$f ];| then ..|
|00001c70| 09 63 68 65 63 6b 70 6f | 69 6e 74 20 24 66 0a 09 |.checkpo|int $f..|
|00001c80| 09 63 6f 6e 74 69 6e 75 | 65 0a 09 66 69 0a 0a 09 |.continu|e..fi...|
|00001c90| 23 67 65 74 20 73 65 72 | 69 61 6c 20 6e 75 6d 62 |#get ser|ial numb|
|00001ca0| 65 72 20 6f 66 20 63 75 | 72 72 65 6e 74 20 76 65 |er of cu|rrent ve|
|00001cb0| 72 73 69 6f 6e 0a 09 6e | 73 65 72 69 61 6c 6e 6f |rsion..n|serialno|
|00001cc0| 3d 60 67 65 74 73 65 72 | 69 61 6c 6e 75 6d 62 65 |=`getser|ialnumbe|
|00001cd0| 72 20 24 66 60 0a 0a 09 | 23 67 65 74 20 73 65 72 |r $f`...|#get ser|
|00001ce0| 69 61 6c 20 6e 75 6d 62 | 65 72 20 6f 66 20 63 68 |ial numb|er of ch|
|00001cf0| 65 63 6b 70 6f 69 6e 74 | 65 64 20 76 65 72 73 69 |eckpoint|ed versi|
|00001d00| 6f 6e 0a 09 6f 73 65 72 | 69 61 6c 6e 6f 3d 60 67 |on..oser|ialno=`g|
|00001d10| 65 74 73 65 72 69 61 6c | 6e 75 6d 62 65 72 20 24 |etserial|number $|
|00001d20| 43 4b 50 54 44 49 52 2f | 24 66 60 0a 0a 09 23 69 |CKPTDIR/|$f`...#i|
|00001d30| 66 20 73 65 72 69 61 6c | 20 6e 75 6d 62 65 72 20 |f serial| number |
|00001d40| 64 69 66 66 65 72 73 2c | 20 63 6f 6e 74 69 6e 75 |differs,| continu|
|00001d50| 65 0a 09 69 66 20 5b 20 | 24 6e 73 65 72 69 61 6c |e..if [ |$nserial|
|00001d60| 6e 6f 20 21 3d 20 24 6f | 73 65 72 69 61 6c 6e 6f |no != $o|serialno|
|00001d70| 20 5d 3b 20 74 68 65 6e | 0a 09 09 23 20 73 61 6e | ]; then|...# san|
|00001d80| 69 74 79 20 63 68 65 63 | 6b 20 66 69 72 73 74 0a |ity chec|k first.|
|00001d90| 09 09 69 66 20 6c 74 20 | 24 6e 73 65 72 69 61 6c |..if lt |$nserial|
|00001da0| 6e 6f 20 24 6f 73 65 72 | 69 61 6c 6e 6f 3b 20 74 |no $oser|ialno; t|
|00001db0| 68 65 6e 0a 09 09 09 65 | 72 72 6c 6f 67 20 24 66 |hen....e|rrlog $f|
|00001dc0| 20 22 24 66 3a 20 73 65 | 72 69 61 6c 20 6e 75 6d | "$f: se|rial num|
|00001dd0| 62 65 72 20 28 24 6e 73 | 65 72 69 61 6c 6e 6f 29 |ber ($ns|erialno)|
|00001de0| 20 3c 20 70 72 65 76 69 | 6f 75 73 20 28 24 6f 73 | < previ|ous ($os|
|00001df0| 65 72 69 61 6c 6e 6f 29 | 22 0a 09 09 09 45 58 49 |erialno)|"....EXI|
|00001e00| 54 3d 31 0a 09 09 09 63 | 6f 6e 74 69 6e 75 65 0a |T=1....c|ontinue.|
|00001e10| 09 09 66 69 0a 0a 09 09 | 23 20 63 68 65 63 6b 70 |..fi....|# checkp|
|00001e20| 6f 69 6e 74 20 6e 65 77 | 20 7a 6f 6e 65 20 66 69 |oint new| zone fi|
|00001e30| 6c 65 20 61 6e 64 20 69 | 6e 63 6c 75 64 65 64 20 |le and i|ncluded |
|00001e40| 66 69 6c 65 73 0a 09 09 | 63 68 65 63 6b 70 6f 69 |files...|checkpoi|
|00001e50| 6e 74 20 24 66 20 60 69 | 6e 63 6c 75 64 65 66 69 |nt $f `i|ncludefi|
|00001e60| 6c 65 73 20 24 66 60 0a | 09 09 63 6f 6e 74 69 6e |les $f`.|..contin|
|00001e70| 75 65 0a 09 66 69 0a 0a | 09 23 69 66 20 66 69 6c |ue..fi..|.#if fil|
|00001e80| 65 20 64 69 66 66 65 72 | 73 20 66 72 6f 6d 20 63 |e differ|s from c|
|00001e90| 6b 70 6f 69 6e 74 20 2d | 20 65 72 72 6f 72 0a 09 |kpoint -| error..|
|00001ea0| 69 66 20 63 6f 6d 70 61 | 72 65 20 24 66 20 24 43 |if compa|re $f $C|
|00001eb0| 4b 50 54 44 49 52 2f 24 | 66 3b 20 74 68 65 6e 0a |KPTDIR/$|f; then.|
|00001ec0| 09 09 3a 20 61 6c 6c 20 | 6f 6b 0a 09 65 6c 73 65 |..: all |ok..else|
|00001ed0| 0a 09 09 65 72 72 6c 6f | 67 20 24 66 20 22 24 66 |...errlo|g $f "$f|
|00001ee0| 3a 20 7a 6f 6e 65 20 66 | 69 6c 65 20 63 68 61 6e |: zone f|ile chan|
|00001ef0| 67 65 64 2c 20 62 75 74 | 20 73 65 72 69 61 6c 20 |ged, but| serial |
|00001f00| 6e 75 6d 62 65 72 20 64 | 69 64 6e 27 74 22 0a 09 |number d|idn't"..|
|00001f10| 09 45 58 49 54 3d 31 0a | 09 09 63 6f 6e 74 69 6e |.EXIT=1.|..contin|
|00001f20| 75 65 0a 09 66 69 0a 0a | 09 23 20 74 65 73 74 20 |ue..fi..|.# test |
|00001f30| 69 6e 63 6c 75 64 65 64 | 20 66 69 6c 65 73 20 61 |included| files a|
|00001f40| 73 20 77 65 6c 6c 0a 09 | 66 6f 72 20 69 20 69 6e |s well..|for i in|
|00001f50| 20 60 69 6e 63 6c 75 64 | 65 66 69 6c 65 73 20 24 | `includ|efiles $|
|00001f60| 66 60 3b 20 64 6f 0a 09 | 09 23 20 69 66 20 74 68 |f`; do..|.# if th|
|00001f70| 69 73 20 7a 6f 6e 65 20 | 66 69 6c 65 20 69 73 20 |is zone |file is |
|00001f80| 6e 65 77 2c 20 63 68 65 | 63 6b 70 6f 69 6e 74 20 |new, che|ckpoint |
|00001f90| 69 74 0a 09 09 69 66 20 | 5b 20 21 20 2d 66 20 24 |it...if |[ ! -f $|
|00001fa0| 43 4b 50 54 44 49 52 2f | 24 69 20 5d 3b 20 74 68 |CKPTDIR/|$i ]; th|
|00001fb0| 65 6e 20 0a 09 09 09 63 | 68 65 63 6b 70 6f 69 6e |en ....c|heckpoin|
|00001fc0| 74 20 24 69 0a 09 09 09 | 63 6f 6e 74 69 6e 75 65 |t $i....|continue|
|00001fd0| 0a 09 09 66 69 0a 0a 09 | 09 23 69 66 20 66 69 6c |...fi...|.#if fil|
|00001fe0| 65 20 64 69 66 66 65 72 | 73 20 66 72 6f 6d 20 63 |e differ|s from c|
|00001ff0| 6b 70 6f 69 6e 74 20 2d | 20 65 72 72 6f 72 0a 09 |kpoint -| error..|
|00002000| 09 69 66 20 63 6f 6d 70 | 61 72 65 20 24 69 20 24 |.if comp|are $i $|
|00002010| 43 4b 50 54 44 49 52 2f | 24 69 3b 20 74 68 65 6e |CKPTDIR/|$i; then|
|00002020| 0a 09 09 09 3a 20 61 6c | 6c 20 6f 6b 0a 09 09 65 |....: al|l ok...e|
|00002030| 6c 73 65 0a 09 09 09 65 | 72 72 6c 6f 67 20 24 66 |lse....e|rrlog $f|
|00002040| 20 22 24 66 20 69 6e 63 | 6c 75 64 65 64 20 63 68 | "$f inc|luded ch|
|00002050| 61 6e 67 65 64 20 7a 6f | 6e 65 20 64 61 74 61 20 |anged zo|ne data |
|00002060| 66 72 6f 6d 20 24 69 2c | 20 62 75 74 20 73 65 72 |from $i,| but ser|
|00002070| 69 61 6c 20 6e 75 6d 62 | 65 72 20 64 69 64 6e 27 |ial numb|er didn'|
|00002080| 74 20 63 68 61 6e 67 65 | 22 0a 09 09 09 45 58 49 |t change|"....EXI|
|00002090| 54 3d 31 0a 09 09 09 63 | 6f 6e 74 69 6e 75 65 0a |T=1....c|ontinue.|
|000020a0| 09 09 66 69 0a 0a 09 09 | 23 20 63 68 65 63 6b 20 |..fi....|# check |
|000020b0| 66 6f 72 20 6e 65 73 74 | 65 64 20 69 6e 63 6c 75 |for nest|ed inclu|
|000020c0| 64 65 73 2e 20 20 74 68 | 65 73 65 20 61 72 65 6e |des. th|ese aren|
|000020d0| 27 74 20 68 61 6e 64 6c | 65 64 0a 09 09 23 20 62 |'t handl|ed...# b|
|000020e0| 75 74 20 77 65 20 64 6f | 6e 27 74 20 65 78 70 65 |ut we do|n't expe|
|000020f0| 63 74 20 74 68 65 6d 20 | 65 69 74 68 65 72 2e 0a |ct them |either..|
|00002100| 09 09 69 66 20 5b 20 22 | 60 67 72 65 70 20 2d 69 |..if [ "|`grep -i|
|00002110| 20 27 5c 24 69 6e 63 6c | 75 64 65 27 20 24 69 60 | '\$incl|ude' $i`|
|00002120| 22 20 21 3d 20 22 22 20 | 5d 3b 20 74 68 65 6e 0a |" != "" |]; then.|
|00002130| 09 09 09 65 72 72 6c 6f | 67 20 24 69 20 22 69 6e |...errlo|g $i "in|
|00002140| 63 6c 75 64 65 20 66 69 | 6c 65 20 24 69 20 69 6e |clude fi|le $i in|
|00002150| 63 6c 75 64 65 73 20 6f | 74 68 65 72 20 66 69 6c |cludes o|ther fil|
|00002160| 65 73 2e 22 0a 09 09 09 | 45 58 49 54 3d 31 0a 09 |es."....|EXIT=1..|
|00002170| 09 66 69 0a 09 64 6f 6e | 65 0a 64 6f 6e 65 0a 0a |.fi..don|e.done..|
|00002180| 23 20 70 72 6f 63 65 73 | 73 20 61 6e 79 20 72 65 |# proces|s any re|
|00002190| 6d 61 69 6e 69 6e 67 20 | 65 72 72 6f 72 73 0a 70 |maining |errors.p|
|000021a0| 72 6f 63 65 73 73 65 72 | 72 6f 72 73 0a 0a 72 6d |rocesser|rors..rm|
|000021b0| 20 2d 66 20 2f 74 6d 70 | 2f 2e 63 6b 73 2a 24 24 | -f /tmp|/.cks*$$|
|000021c0| 0a 0a 65 78 69 74 20 24 | 45 58 49 54 0a 40 2f 2f |..exit $|EXIT.@//|
|000021d0| 45 2a 4f 2a 46 20 63 6b | 73 65 72 69 61 6c 2e 73 |E*O*F ck|serial.s|
|000021e0| 68 2f 2f 0a 63 68 6d 6f | 64 20 75 3d 72 2c 67 3d |h//.chmo|d u=r,g=|
|000021f0| 72 2c 6f 3d 72 20 63 6b | 73 65 72 69 61 6c 2e 73 |r,o=r ck|serial.s|
|00002200| 68 0a 20 0a 65 78 69 74 | 20 30 0a |h. .exit| 0. |
+--------+-------------------------+-------------------------+--------+--------+