die; } if ($argv[1] == "--default") { autofs_default(); die; } $ldap = new clladp(); $suffix = "dc=organizations,{$ldap->suffix}"; $filter = "(&(ObjectClass=SharedFolders)(SharedFolderList=*))"; $attr = array("gidNumber"); $sr = @ldap_search($ldap->ldap_connection, $suffix, $filter, $attr); $hash = ldap_get_entries($ldap->ldap_connection, $sr); for ($i = 0; $i < $hash["count"]; $i++) { $gpid = $hash[$i][strtolower("gidNumber")][0]; $auto = new autofs(); $auto->AutofsSharedDir($gpid); } function Autocount() { $auto = new autofs(); $hash = $auto->automounts_Browse(); $sock = new sockets(); $count = count($hash); echo "Starting......: " . date("H:i:s") . " AutoFS {$count} mounted directories\n"; $sock->SET_INFO("AutoFSCountDirs", $count); } function davfs() { Autocount(); $f = array(); $f[] = "# davfs2 configuration file 2009-04-12";
function SHARED_REBUILD() { $autofs = new autofs(); $autofs->AutofsSharedDir($_GET["shared-rebuild"]); }