The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Article Feedback - Get your name in the kernel!
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 more info
Author: Greg Prosser 
Date:   28-10-01 19:10

I figured I'd give you more info on the username/etc on the compile for
the kernel, like you were saying.

First of all, there is more than one place where your user@host like when
you build a kernel. Several apps built when you rebuild the world
(named for example, check out named -v) tag on your username and hostname,
along with the date, for future reference. Also, the IRC client EPIC does
the same thing, at startup it will echo back 'Compiled by ..', and will
show you the user@host it was compiled at.

So what does this all mean?

It's quite simple actually. The compiles can detect these things by
various means, for example, a kernel build checks out its working
directory. So whether you use make buildkernel, which uses the /usr/obj
staging area, or the regular process, which uses /sys/compile staging
area, you'll see that. 'su' by itself is akin to 'su -m' (if you read the
manual pages), as is 'su -' equal to 'su -l'. The -m option to su invokes
your current shell, instead of the target users, and leaves most of the
environment intact (including the USER variable used during compiles),
whereas -l simulates a new login, calling the target users shell, and
discarding or resetting certain environment variables for the new shell.

Normally, when running around as a normal user, I'll use my 'xyst' login
(although recently I've been using gregp for similar purposes), when I
make the world, or a kernel for that matter, I'll usually use 'su - gregp'
to go back to my gregp login (simulating its environment conditions) and
then use 'su', so that it's name gets put on the kernel. It's all about
the environment.

Hope that helps.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org