Index: debathena-pyhesiodfs-0.0.r162/pyHesiodFS.py =================================================================== --- debathena-pyhesiodfs-0.0.r162.orig/pyHesiodFS.py 2008-12-22 13:53:01.000000000 -0500 +++ debathena-pyhesiodfs-0.0.r162/pyHesiodFS.py 2008-12-22 14:20:36.000000000 -0500 @@ -69,13 +69,6 @@ fuse.fuse_python_api = (0, 2) -hello_path = '/README.txt' -hello_str = """This is the pyhesiodfs FUSE autmounter. To access a Hesiod filsys, just access -%(mountpoint)s/name. - -If you're using the Finder, try pressing Cmd+Shift+G and then entering -%(mountpoint)s/name""" - if not hasattr(fuse, 'Stat'): fuse.Stat = object @@ -128,10 +121,6 @@ if path == '/': st.st_mode = stat.S_IFDIR | 0777 st.st_nlink = 2 - elif path == hello_path: - st.st_mode = stat.S_IFREG | 0444 - st.st_nlink = 1 - st.st_size = len(hello_str) elif '/' not in path[1:]: if path[1:] not in self.negcache and self.findLocker(path[1:]): st.st_mode = stat.S_IFLNK | 0777 @@ -178,7 +167,7 @@ return None def getdir(self, path): - return [(i, 0) for i in (['.', '..', hello_path[1:]] + self.getCachedLockers())] + return [(i, 0) for i in (['.', '..'] + self.getCachedLockers())] def readdir(self, path, offset): for (r, zero) in self.getdir(path): @@ -187,27 +176,8 @@ def readlink(self, path): return self.findLocker(path[1:]) - def open(self, path, flags): - if path != hello_path: - return -errno.ENOENT - accmode = os.O_RDONLY | os.O_WRONLY | os.O_RDWR - if (flags & accmode) != os.O_RDONLY: - return -errno.EACCES - - def read(self, path, size, offset): - if path != hello_path: - return -errno.ENOENT - slen = len(hello_str) - if offset < slen: - if offset + size > slen: - size = slen - offset - buf = hello_str[offset:offset+size] - else: - buf = '' - return buf - def symlink(self, src, path): - if path == '/' or path == hello_path: + if path == '/': return -errno.EPERM elif '/' not in path[1:]: self.mounts[self._user()][path[1:]] = src @@ -217,7 +187,7 @@ return -errno.EPERM def unlink(self, path): - if path == '/' or path == hello_path: + if path == '/': return -errno.EPERM elif '/' not in path[1:]: del self.mounts[self._user()][path[1:]] @@ -226,7 +196,6 @@ return -errno.EPERM def main(): - global hello_str try: usage = Fuse.fusage server = PyHesiodFS(version="%prog " + fuse.__version__, @@ -242,7 +211,6 @@ sys.argv.pop(1) server = PyHesiodFS() - hello_str = hello_str % {'mountpoint': server.parse(errex=1).mountpoint} server.main() if __name__ == '__main__':