I’m not able to get mdls to work in single user mode, even after running /usr/libexec/register_mach_bootstrap_servers on /etc/mach_init.d (which does contain the mds.plist to start up the md server).
running mdls will either hang (need CTRL-C to break out of it), or will return an error along the lines of “cannot find ./foo/bar/file.ext”
When I do a ps -ax after the bootstrap, I see that there is no md server in the process list.
Anyone have any clues on how to get this going?
Background: I’m trying to cobble together a way to ascertain if a file is a Mac OS X alias file. Darwin sees it as a regular file, and of course bash has no built-in file test for Mac OS X style aliases, like -L for symbolic link, etc. I need a way, in bash, to find out if certain files are aliases or not, and wrote something that worked for me, using mdls and looking for the kMDItemContentType string and testing to see if it was “com.apple.alias-file”. But when I tried to run the script in single user mode (which is where I need it), no joy.
Anyone out there with some insight? Is it possible to just call /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mds
directly, without messing things up?
Thanks.
Comments are closed