Hi Guys;
No offense to Tim for his suggestion on making Hobbit work with Leopard.
I think that a superior method of testing for the presence of a user and finding that user's home directory is this:
80c80
< USERDATA="nireport / /users name home | grep $BBUSER"
USERDATA="`dscl . -list /Users | grep $BBUSER`"
83c83 < echo "Found NetInfo entry for user: $USERDATA"
echo "Found Directory entry for user: $USERDATA"
85c85 < echo "FAILURE: The user $BBUSER does not exist. Create user and try again."
echo "FAILURE: The user $BBUSER does not exist locally. Create user and try again."
89c89
< HOMEDIR="echo $USERDATA | awk '{print $2}'"
HOMEDIR="`dscl . -read /Users/$BBUSER | grep HomeDirectory | awk '{print $2}'`"
The dscl command actually queries OSX's internal directory store (OpenDirectory). The above code will only find local users, but I think that this is probably a best practice for Hobbit. Additionally, the above should work for 10.4 (Tiger) and 10.5 (Leopard) and onwards.
Isaac Vetter
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/dscl...
The nireport command has been deprecated in Leopard so I made the following code changes:
File: configure.server
From: USERDATA="
nireport / /users name home | grep $BBUSER"To: USERDATA="
ls -1 /Users | grep $BBUSER" Probably not the most eloquent method but functional for me.
On 1/13/08 2:29 AM, "Henrik Stoerner" <henrik (at) hswn.dk> wrote:
On Thu, Jan 10, 2008 at 03:46:35PM -0600, Tim Rotunda wrote:
So I am building 4.1.2p2 on OSX 10.5.1 and have gotten to the point where the user is requested. Turns out configure.server is still using nireport. Has anyone fixed this in a beta or should I just go ahead and make the changes and submit it?
I haven't had any reports about problems with nireport, and since I have no OSX knowledge at all I depend on others reporting/fixing bugs.
So if you can provide a patch for me, that would be nice. But I'd also like to know what the problem is - and if this is something that has changed from one OSX version to the next.