fix a typo
[dyn-nsupdate.git] / server-scripts / update
index 5fc519b3530bbed36303202e0d6e5f95dc82deb2..bd4ae8362eb6964e6816dec491b82a6ad5af7f76 100755 (executable)
 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# 
-# The views and conclusions contained in the software and documentation are those
-# of the authors and should not be interpreted as representing official policies, 
-# either expressed or implied, of the FreeBSD Project.
 
 import cgi, os, sys, subprocess
 form = cgi.FieldStorage(keep_blank_values=True)
@@ -42,6 +38,8 @@ domain = form.getfirst("domain")
 password = form.getfirst("password")
 ip = form.getfirst("ip")
 ipv6 = form.getfirst("ipv6")
+assert domain is not None and password is not None
+assert ip is not None or ipv6 is not None
 
 # run update program
 args = ["/var/lib/bind/dyn-nsupdate", "--domain", domain, "--password", password]
@@ -59,4 +57,9 @@ if p.returncode or stderr or stdout:
     if stdout: print stdout
     if stderr: print stderr
 else:
-    print "good",ip
+    print "good",
+    if ip is not None:
+        print ip,
+    if ipv6 is not None:
+        print ipv6,
+    print