create-user: Make DAV lock directories on both mire and deleuze
authorbigmike160 <bigmike160>
Tue, 9 Oct 2007 01:07:41 +0000 (01:07 +0000)
committerbigmike160 <bigmike160>
Tue, 9 Oct 2007 01:07:41 +0000 (01:07 +0000)
Also, add new convenience function mire_and_deleuze.

create-user

index 85dc6c3..ff57c9d 100755 (executable)
@@ -19,6 +19,16 @@ if test -z "$USER"; then
        exit 1
 fi
 
        exit 1
 fi
 
+#
+# Helper functions
+#
+
+# Run a command on both mire and deleuze; assumes that no escaping is
+# needed.
+function mire_and_deleuze() {
+    $*
+    ssh mire.hcoop.net $*
+}
 
 #
 # Kerberos principals
 
 #
 # Kerberos principals
@@ -220,15 +230,14 @@ vos syncserv deleuze
 vos syncvldb deleuze
 
 # refresh volume location cache (takes ~2hrs otherwise)
 vos syncvldb deleuze
 
 # refresh volume location cache (takes ~2hrs otherwise)
-fs checkvolumes
-ssh mire.hcoop.net fs checkvolumes
+mire_and_deleuze fs checkvolumes
 
 #
 
 #
-# Files and directories on deleuze
+# Non-AFS files and directories
 #
 
 # Make per-user apache DAV lock directory -- the directory must be
 # both user and group-writable, which is silly.
 #
 
 # Make per-user apache DAV lock directory -- the directory must be
 # both user and group-writable, which is silly.
-sudo mkdir -p /var/lock/apache2/dav/$USER
-sudo chown $USER:www-data /var/lock/apache2/dav/$USER
-sudo chmod ug=rwx,o= /var/lock/apache2/dav/$USER
+mire_and_deleuze sudo mkdir -p /var/lock/apache2/dav/$USER
+mire_and_deleuze sudo chown $USER:www-data /var/lock/apache2/dav/$USER
+mire_and_deleuze sudo chmod ug=rwx,o= /var/lock/apache2/dav/$USER