From 0ebfdcfd10895bad54b9dd8f07b5220bba646b95 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 3 Jan 2011 05:42:19 +0000 Subject: removed errors committed by Vutral in 37141f04 (in November) --- scripts/db/ip/cidr | 1 - scripts/db/ip/owner | 1 - 2 files changed, 2 deletions(-) delete mode 100644 scripts/db/ip/cidr delete mode 100644 scripts/db/ip/owner (limited to 'scripts') diff --git a/scripts/db/ip/cidr b/scripts/db/ip/cidr deleted file mode 100644 index 08e0d8a..0000000 --- a/scripts/db/ip/cidr +++ /dev/null @@ -1 +0,0 @@ -1.22.187 diff --git a/scripts/db/ip/owner b/scripts/db/ip/owner deleted file mode 100644 index d5fe3b2..0000000 --- a/scripts/db/ip/owner +++ /dev/null @@ -1 +0,0 @@ -Vutral -- cgit v1.2.3 From 267867f11141cd9a7d1293f95b8967271e99fabf Mon Sep 17 00:00:00 2001 From: lex Date: Mon, 10 Jan 2011 17:25:44 -0600 Subject: Fixed the bind generator to qualify full domain names properly in the generated zonefile --- scripts/nameserver_autogen/bind_tld_zonefile | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/nameserver_autogen/bind_tld_zonefile b/scripts/nameserver_autogen/bind_tld_zonefile index 4755cfd..3850d92 100755 --- a/scripts/nameserver_autogen/bind_tld_zonefile +++ b/scripts/nameserver_autogen/bind_tld_zonefile @@ -11,6 +11,7 @@ foreach ($names as $name) { print($name.' IN NS '.$server."\n"); $ips = file($name.'/ns/'.$server, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if (substr($server, -4, 4) == ".ano") $server .= "."; foreach ($ips as $ip) { print($server.' IN A '.$ip."\n"); } -- cgit v1.2.3 From 3466f25bd377b70c2b8930055603cfd4c9b08feb Mon Sep 17 00:00:00 2001 From: lex Date: Mon, 10 Jan 2011 17:45:04 -0600 Subject: Updated the bind generator script so that it checks that FQDNs are actually ending in . properly now so that stupid things don't happen whenever we transfer zones or, well, do anything with DNS --- scripts/nameserver_autogen/bind_tld_zonefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/nameserver_autogen/bind_tld_zonefile b/scripts/nameserver_autogen/bind_tld_zonefile index 3850d92..344bb4e 100755 --- a/scripts/nameserver_autogen/bind_tld_zonefile +++ b/scripts/nameserver_autogen/bind_tld_zonefile @@ -8,12 +8,14 @@ foreach ($names as $name) { $servers = scandir($name.'/ns/'); foreach ($servers as $server) { if ($server[0] == '.') continue; - print($name.' IN NS '.$server."\n"); + if (substr($name, -4) == ".ano") $name .= "."; + $fqserver = $server; + if (substr($server, -4) == ".ano") $fqserver .= "."; + print($name.' IN NS '.$fqserver."\n"); $ips = file($name.'/ns/'.$server, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - if (substr($server, -4, 4) == ".ano") $server .= "."; foreach ($ips as $ip) { - print($server.' IN A '.$ip."\n"); + print($fqserver.' IN A '.$ip."\n"); } } } -- cgit v1.2.3 From 93ebf26f9a32da2caa15f6951425b03e04d1936a Mon Sep 17 00:00:00 2001 From: Anonymous Coward Date: Wed, 2 Feb 2011 16:21:07 +0000 Subject: Add a very basic script which creates a git remote for each resdb user who has registered a git url. --- scripts/update-git-remotes | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 scripts/update-git-remotes (limited to 'scripts') diff --git a/scripts/update-git-remotes b/scripts/update-git-remotes new file mode 100644 index 0000000..8048d54 --- /dev/null +++ b/scripts/update-git-remotes @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Creates git remotes from the user db +# TODO: detect users' git address changes +# + +if ! ./scripts/check_db_safety; then + exit 1 +fi + +USR_DB_DIR=./db/usr +GIT_REPO=./.git +GIT_REMOTES_DIR=$GIT_REPO/refs/remotes + +for u in `ls -1 $USR_DB_DIR`; do + git_url_file="$USR_DB_DIR/$u/git" + + if [ -f $git_url_file ]; then + git_url=`cat $git_url_file` + git_remote_name="anonet_$u" + + if [ -d $GIT_REMOTES_DIR/$git_remote_name ]; then + # The remote already exists; + # TODO: Update it if it has changed. + echo "skipping $u" >&2 + + else + git remote add -t master -m master $git_remote_name $git_url + + fi + + fi +done -- cgit v1.2.3