aboutsummaryrefslogtreecommitdiff
path: root/rex
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-10-31 12:16:42 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2017-10-31 12:16:42 +0200
commit1398d07799c988357630824eb2656ba26fce4a8d (patch)
tree4b31122ad219a30c652d3eb8dedbbc8c7c3cd073 /rex
parentd777de47b14d6919400f3359f9edad97096b9e11 (diff)
downloadrex-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-xrex9
1 files changed, 9 insertions, 0 deletions
diff --git a/rex b/rex
index 1990587..234e75e 100755
--- a/rex
+++ b/rex
@@ -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
}

Return to:

Send suggestions and report system problems to the System administrator.