Abolish wrapper around refresh-auth
authorPaul Crowley <paul@lshift.net>
Fri, 06 Mar 2009 13:06:36 +0000
changeset 76 e6a35b0f853c
parent 75 5af89523a9d3
child 77 8d14aac93b5d
Abolish wrapper around refresh-auth
doc/PLAN
install
src/do-refresh-auth
src/init/conf/refresh-auth
src/refresh-auth
--- a/doc/PLAN	Fri Mar 06 13:03:46 2009 +0000
+++ b/doc/PLAN	Fri Mar 06 13:06:36 2009 +0000
@@ -8,10 +8,10 @@
 - same for refresh-auth
 - move most of do-refresh-auth into a module
 - give that module a hook, and call the hook instead of the exe
+- abolish refresh-auth shell script and rename do-refresh-auth to refresh-auth
 
 Todo:
 
-- abolish refresh-auth shell script and rename do-refresh-auth to refresh-auth
 - replace env vars with Python globals
 - change refresh-auth to refer to hg-ssh directly, abolish hg-ssh-wrapper
 - add comment check and -f flag to refresh-auth
--- a/install	Fri Mar 06 13:03:46 2009 +0000
+++ b/install	Fri Mar 06 13:06:36 2009 +0000
@@ -5,7 +5,7 @@
 install -o root -g root -d /usr/local/lib/mercurial-server
 install -o root -g root -t /usr/local/lib/mercurial-server \
     src/hg-ssh \
-    src/do-refresh-auth
+    src/refresh-auth
 install -o root -g root -d /usr/local/lib/mercurial-server/mercurialserver
 install -o root -g root -t /usr/local/lib/mercurial-server/mercurialserver -m 644 \
     src/mercurialserver/__init__.py \
@@ -22,8 +22,7 @@
     src/init/hgadmin-hgrc
 install -o root -g root -d /etc/mercurial-server
 install -o root -g root -t /etc/mercurial-server \
-    src/init/conf/hg-ssh-wrapper \
-    src/init/conf/refresh-auth
+    src/init/conf/hg-ssh-wrapper 
 install -o root -g root -t /etc/mercurial-server -m 644 \
     src/init/conf/remote-hgrc \
     src/init/conf/access.conf
--- a/src/do-refresh-auth	Fri Mar 06 13:03:46 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2008-2009 LShift Ltd
-
-# WARNING
-# This script completely destroys your ~/.ssh/authorized_keys
-# file every time it is run
-# WARNING
-
-import sys
-from mercurialserver import refreshauth
-
-if len(sys.argv) != 1:
-    sys.stderr.write("refresh-auth: must be called with no arguments (%s)\n" % sys.argv)
-    sys.exit(-1)
-
-refreshauth.refreshAuth()
--- a/src/init/conf/refresh-auth	Fri Mar 06 13:03:46 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#!/bin/sh
-# Copyright 2008-2009 LShift Ltd
-
-# This file should live in /etc/mercurial-server.
-
-exec /usr/local/lib/mercurial-server/do-refresh-auth
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/refresh-auth	Fri Mar 06 13:06:36 2009 +0000
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# Copyright 2008-2009 LShift Ltd
+
+# WARNING
+# This script completely destroys your ~/.ssh/authorized_keys
+# file every time it is run
+# WARNING
+
+import sys
+from mercurialserver import refreshauth
+
+if len(sys.argv) != 1:
+    sys.stderr.write("refresh-auth: must be called with no arguments (%s)\n" % sys.argv)
+    sys.exit(-1)
+
+refreshauth.refreshAuth()