From ce937ea3e89f3b729bd780b7017f5efcf0d68370 Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Wed, 15 Jun 2005 10:41:54 +0000 Subject: [PATCH] cscvs to tla changeset 10 Author: noodles Date: 2005/05/16 17:24:10 Add MASTER command to allow changing the master server to slave from. git-archimport-id: noodles@earth.li--pie/autodns--mainline--1.0--patch-9 --- autodns.pl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/autodns.pl b/autodns.pl index 8e1e20b..e221c09 100755 --- a/autodns.pl +++ b/autodns.pl @@ -5,7 +5,7 @@ # http://www.earth.li/projectpurple/progs/autodns.html # Released under the GPL. # -# $Id: autodns.pl,v 1.9 2005/04/13 17:24:40 noodles Exp $ +# $Id: autodns.pl,v 1.10 2005/05/16 17:24:10 noodles Exp $ # use strict; @@ -456,6 +456,17 @@ zone \"$domain\" { } else { print REPLY "Couldn't open $domainlistroot$user: $!\n"; } + } elsif ($inprocess && /^MASTER\s(.*)$/) { + if (($priv & 1) != 1) { + print REPLY "You're not authorised to use the MASTER ", + "command.\n"; + } elsif ($1 =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/) { + $server = $1; + print REPLY "Set master IP address to $1\n"; + } else { + print REPLY "$1 doesn't look like a valid IPv4 ", + "address to me.\n"; + } } elsif ($inprocess && /^HELP$/) { print REPLY "In order to use the service, you will need to send GPG signed\n"; print REPLY "messages.\n\n"; -- 2.39.2