Index: trunk/packages/sipb-xen-remote-server/files/usr/sbin/sipb-xen-remconffs
===================================================================
--- trunk/packages/sipb-xen-remote-server/files/usr/sbin/sipb-xen-remconffs	(revision 518)
+++ trunk/packages/sipb-xen-remote-server/files/usr/sbin/sipb-xen-remconffs	(revision 519)
@@ -105,17 +105,11 @@
 				    ''])
 		
-	def getconf(self, machine_name):
-		"""Build the command file for a machine
-		"""
-		return ("control %s /usr/sbin/sipb-xen-remote-proxy-control"
-			" /etc/remctl/sipb-xen-auto/acl/%s\n"
-			% (machine_name, machine_name))
-		
-	def getfile(self, dir, machine_name):
-		"""Build the ACL or command file for a machine
-		"""
-		if dir == 'acl':    return self.getacl(machine_name)
-		if dir == 'conf.d': return self.getconf(machine_name)
-		raise "this shouldn't happen"
+	def getconf(self):
+		"""Build the master conf file, with all machines
+		"""
+		return '\n'.join("control %s /usr/sbin/sipb-xen-remote-proxy-control"
+				 " /etc/remctl/remconffs/acl/%s"
+				 % (machine_name, machine_name)
+				 for machine_name in self.getMachines())+'\n'
 	
 	def userToPrinc(self, user):
@@ -156,10 +150,15 @@
 			st.st_nlink = 2
 		elif depth == 1:
-			if parts[0] not in ('acl', 'conf.d'):
-				return -errno.ENOENT
-			st.st_mode = stat.S_IFDIR | 0755
-			st.st_nlink = 2
+			if parts[0] == 'acl':
+				st.st_mode = stat.S_IFDIR | 0755
+				st.st_nlink = 2
+			elif parts[0] == 'conf':
+				st.st_mode = stat.S_IFREG | 0444
+				st.st_nlink = 1
+				st.st_size = len(self.getconf())
+			else:
+				return -errno.ENOENT
 		elif depth == 2:
-			if parts[0] not in ('acl', 'conf.d'):
+			if parts[0] != 'acl':
 				return -errno.ENOENT
 			if parts[1] not in self.getMachines():
@@ -167,5 +166,5 @@
 			st.st_mode = stat.S_IFREG | 0444
 			st.st_nlink = 1
-			st.st_size = len(self.getfile(parts[0], parts[1]))
+			st.st_size = len(self.getacl(parts[1]))
 
 		return st.toTuple()
@@ -191,7 +190,7 @@
 
 		if depth == 0:
-			contents = ('acl', 'conf.d')
+			contents = ('acl', 'conf')
 		elif depth == 1:
-			if parts[0] in ('acl', 'conf.d'):
+			if parts[0] == 'acl':
 				contents = self.getMachines()
 			else:
@@ -212,14 +211,13 @@
 		parts, depth = parse(path)
 		
-		# If the depth is not 2, then either it's a directory or the file
-		# doesn't exist
-		# (realistically this doesn't appear to ever happen)
-		if getDepth(path) != 2:
-			return -errno.ENOENT
-		elif parts[1] in self.getMachines():
-			if parts[0] == 'acl':
+		if depth == 0:
+			return -errno.EISDIR
+		elif parts[0] == 'conf':
+			return self.getconf()[offset:offset+length]
+		elif parts[0] == 'acl':
+			if depth == 1:
+				return -errno.EISDIR
+			if parts[1] in self.getMachines():
 				return self.getacl(parts[1])[offset:offset+length]
-			if parts[0] == 'conf.d':
-				return self.getconf(parts[1])[offset:offset+length]
 		return -errno.ENOENT
 	
