diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-10-31 12:16:42 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-10-31 12:16:42 +0200 |
commit | 1398d07799c988357630824eb2656ba26fce4a8d (patch) | |
tree | 4b31122ad219a30c652d3eb8dedbbc8c7c3cd073 /rex | |
parent | d777de47b14d6919400f3359f9edad97096b9e11 (diff) | |
download | rex-1398d07799c988357630824eb2656ba26fce4a8d.tar.gz rex-1398d07799c988357630824eb2656ba26fce4a8d.tar.bz2 |
Add function for overriding the PTR record from the rc file.
* rex (config::hostname): New function.
* rex.man8: Document it.
Diffstat (limited to 'rex')
-rwxr-xr-x | rex | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -403,6 +403,11 @@ namespace eval ::pmres { set dnscache($mode,$arg) $res return $res } + + proc setname {mode arg val} { + variable dnscache + set dnscache($mode,$arg) $val + } } proc hostname {arg} { @@ -2486,6 +2491,10 @@ namespace eval ::config { lappend hostlist {*}$args } + proc hostname {ip name} { + ::pmres::setname -ip $ip $name + } + proc ifmode {args} { switch -- $::config(mode) {*}$args } |