On Mer, ottobre 20, 2010, 1:54 pm, Mario Vittorio Guenzi wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > buongiorno a tutti, > parlando di bind9 c'e' quella bellissima funzione che permette di > stabile un range e di generare le relative configurazioni che si chiama > appunto generate. > > $GENERATE 140-200 IN PTR pc$.oceano. > e per la rev > $GENERATE 140-200 pc$ A 192.168.2.$ > > mi genereranno da pc 140 a pc 200 senza colpo ferire. > ma... > Se io avessi bisogno di generare pc=n-100? > in altre parole gli host names sono pcn+100 > pc1 = 192.168.2.101 e cosi' via > che stringa gli passo per fargliele generare e non scrivermele tutte a > manina? BIND Master File Extension: the $GENERATE Directive Syntax: $GENERATE range lhs [ttl] [class] type rhs [ comment ] $GENERATE is used to create a series of resource records that only differ from each other by an iterator. $GENERATE can be used to easily generate the sets of records required to support sub /24 reverse delegations described in RFC 2317: Classless IN-ADDR.ARPA delegation. $ORIGIN 0.0.192.IN-ADDR.ARPA. $GENERATE 1-2 0 NS SERVER$.EXAMPLE. $GENERATE 1-127 $ CNAME $.0 is equivalent to 0.0.0.192.IN-ADDR.ARPA NS SERVER1.EXAMPLE. 0.0.0.192.IN-ADDR.ARPA. NS SERVER2.EXAMPLE. 1.0.0.192.IN-ADDR.ARPA. CNAME 1.0.0.0.192.IN-ADDR.ARPA. 2.0.0.192.IN-ADDR.ARPA. CNAME 2.0.0.0.192.IN-ADDR.ARPA. ... 127.0.0.192.IN-ADDR.ARPA. CNAME 127.0.0.0.192.IN-ADDR.ARPA. range This can be one of two forms: start-stop or start-stop/step. If the first form is used then step is set to 1. All of start, stop and step must be positive. lhs lhs describes the owner name of the resource records to be created. Any single $ symbols within the lhs side are replaced by the iterator value. To get a $ in the output you need to escape the $ using a backslash \, e.g. \$. The $ may optionally be followed by modifiers which change the offset from the iterator, field width and base. Modifiers are introduced by a { immediately following the $ as ${offset[,width[,base]]}. e.g. ${-20,3,d} which subtracts 20 from the current value, prints the result as a decimal in a zero padded field of with 3. Available output forms are decimal (d), octal (o) and hexadecimal (x or X for uppercase). The default modifier is ${0,0,d}. If the lhs is not absolute, the current $ORIGIN is appended to the name. For compatibility with earlier versions $$ is still recognized a indicating a literal $ in the output. mi sembra che rhs sia processato come lhs dalla descrizione quindi..... Diaolin > - -- > > Mario Vittorio Guenzi > E-mail jclark@xxxxxxxxxx > Si vis pacem, para bellum > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAky+2GsACgkQm6qs1ZkNrIp2xQCfRdHPhR+qEkx0zz95zUKOosqF > rRUAoIbwKo8Csf1nFgTpNQ7copyEuWOx > =vEFu > -----END PGP SIGNATURE----- > -- > Per iscriversi (o disiscriversi), basta spedire un messaggio con OGGETTO > "subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx > > > -- l’à piangiù par tut el dì, somenàndo ‘ntorn le làgreme pò da sót gió ‘n vèrs la val vèn su un con na manàra el se rampega pan pian, pò ‘l se ferma e ‘l tira ‘l fià el se ‘mpiza su na ghèba, gió doi crèpi e tàse tut Diaolin -- Per iscriversi (o disiscriversi), basta spedire un messaggio con OGGETTO "subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx