[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] OSX 10.5 and nireport
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] OSX 10.5 and nireport
- From: "Isaac Vetter" <ivetter (at) math.purdue.edu>
- Date: Fri, 8 Feb 2008 14:06:50 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=pbN9I0k3HlX4zn8zS1wfBJnp6TifftF8AXnWgmm8VCA=; b=yCiDeBvZ1xwST349aMg19/WAzus4ZOpeUigzq+JXjJAsQrfJLiY9DmDsv5dBPGYZtObPSA5SAv0wVkSCTR6cgQd9H44Pq9O4kMOGmi0zfEOkXdP+kzL928OOfOp02enTRrkhFMw6vsGozjvrX2Zb78hBBLBHbEIJZNLw26DG0Co=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=pyXh0aTYB1di5NMvnoFsLbYBDT4b8+CukpDIvua8gQ0VRxIf6N6/oSgAIHTlnFWM+7SMs4hySBYkFr/iwqlN8+qXZMVjKHNxSBiDSZSahPR30RSlqpMHMHsYhvIVt0fia5cdInlAoHySo/KFvUn7C5iuwFHqdzgt0/tCAzr7SCQ=
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.1.html
> 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.