Am gasit buba... Scriptul ruleaza si trimite mail pe hostmaster. Iata
ce mail mi-a trimis mie:
Subject: The root.hints file update has FAILED.
From: "system" <[EMAIL PROTECTED]>
Date: Mon, June 14, 2004 15:51
To: "hostmaster" <[EMAIL PROTECTED]>
Priority: Normal
The root.hints update has failed
This is the dig output reported:
; <<>> DiG 9.2.3rc2 <<>> @e.root-servers.net . ns
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18701
;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
;; QUESTION SECTION:
;. IN NS
;; ANSWER SECTION:
. 518400 IN NS
D.ROOT-SERVERS.NET.
. 518400 IN NS
A.ROOT-SERVERS.NET.
. 518400 IN NS
H.ROOT-SERVERS.NET.
. 518400 IN NS
C.ROOT-SERVERS.NET.
. 518400 IN NS
G.ROOT-SERVERS.NET.
. 518400 IN NS
F.ROOT-SERVERS.NET.
. 518400 IN NS
B.ROOT-SERVERS.NET.
. 518400 IN NS
J.ROOT-SERVERS.NET.
. 518400 IN NS
K.ROOT-SERVERS.NET.
. 518400 IN NS
L.ROOT-SERVERS.NET.
. 518400 IN NS
M.ROOT-SERVERS.NET.
. 518400 IN NS
I.ROOT-SERVERS.NET.
. 518400 IN NS
E.ROOT-SERVERS.NET.
;; ADDITIONAL SECTION:
D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90
A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4
H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53
C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12
G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4
F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241
B.ROOT-SERVERS.NET. 3600000 IN A
192.228.79.201
J.ROOT-SERVERS.NET. 3600000 IN A
192.58.128.30
K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129
L.ROOT-SERVERS.NET. 3600000 IN A 198.32.64.12
M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33
I.ROOT-SERVERS.NET. 3600000 IN A
192.36.148.17
E.ROOT-SERVERS.NET. 3600000 IN A
192.203.230.10
;; Query time: 2935 msec
;; SERVER: 192.203.230.10#53(e.root-servers.net)
;; WHEN: Mon Jun 14 15:51:20 2004
;; MSG SIZE rcvd: 436
Care e buba?
Buhus Teodor-Marius said:
>
> Salut,
>
> Urmatorul script ar trebui sa faca actualizare automata a fisierului
> root.hints. Scriptul presupune ca
> merge serviciul de mail si ca este definita adresa de hostmaster,
> conditii care la mine sunt indeplinite.
> #
> # Update the nameserver cache information file once per month.
> # This is run automatically by a cron entry.
> #
> # Original by Al Longyear
> # Updated for BIND 8 by Nicolai Langfeldt
> # Miscelanious error-conditions reported by David A. Ranch
> # Ping test suggested by Martin Foster
> # named up-test suggested by Erik Bryer.
> #
> (
> echo "To: hostmaster <hostmaster>"
> echo "From: system <root>"
>
> # Is named up? Check the status of named.
> case 'ndc status 2>&1 in
> *'cannot connect to command channel'*)
> echo "named is DOWN. root.hints was NOT updated"
> echo
> exit 0
> ;;
> esac
> PATH=/sbin:/usr/sbin:/bin:/usr/bin:
> export PATH
> # NOTE: /var/named must be writable only by trusted users or this
> script
> # will cause root compromise/denial of service opportunities.
> cd /var/named 2>/dev/null || {
> echo "Subject: Cannot cd to /var/named, error $?"
> echo
> echo "The subject says it all"
> exit 1
> }
>
> # Are we online? Ping a server at your ISP
> case 'ping -qnc 1 some.machine.net 2>&1' in
> *'100% packet loss'*)
> echo "Subject: root.hints NOT updated. The network is
> DOWN."
> echo
> echo "The subject says it all"
> exit 1
> ;;
> esac
>
> dig @e.root-servers.net . ns >root.hints.new 2> errors
>
> case 'cat root.hints.new' in
> *NOERROR*)
> # It worked
> :;;
> *)
> echo "Subject: The root.hints file update has FAILED."
> echo
> echo "The root.hints update has failed"
> echo "This is the dig output reported:"
> echo
> cat root.hints.new errors
> exit 1
> ;;
> esac
>
> echo "Subject: The root.hints file has been updated"
> echo
> echo "The root.hints file has been updated to contain the following
> information:"
> echo
> cat root.hints.new
>
> chown root.root root.hints.new
> chmod 444 root.hints.new
> rm -f root.hints.old errors
> mv root.hints root.hints.old
> mv root.hints.new root.hints
> ndc restart
> echo
> echo "The nameserver has been restarted to ensure that the update
> is
> complete"
> echo "The previous root.hints file is now called
> /var/named/root.hints.old."
> ) 2>&1 | /usr/lib/sendmail -t
> exit 0
>
> iata ce eroare imi returneaza:
> /root/dns_alive.sh: line 18: syntax error near unexpected token
> `connect'
> /root/dns_alive.sh: line 18: ` *'cannot connect to command
> channel'*)'
>
> Ca si sistem de operare folosesc Mandrake 9.2
>
> Multumesc!
>
>
>
> -----------------------------------------
> This email was sent using RulbdMail. Webmail developed by IT
> Department of SC Rulmenti SA Barlad.
>
>
> ---
> Detalii despre listele noastre de mail: http://www.lug.ro/
>
>
>
-----------------------------------------
This email was sent using RulbdMail. Webmail developed by IT Department of SC Rulmenti
SA Barlad.
---
Detalii despre listele noastre de mail: http://www.lug.ro/