nomadbsd/NomadBSD

change uname output from FreeBSD to NomadBSD

Opened this issue · 10 comments

I would like to change uname output from FreeBSD to NomadBSD.
I changed the /work/src/sys/conf/newvers.sh file before buildkernel, but it had no effect.
How to proceed?

uname retrieves its information about the OS type, version, etc. from the environment and the sysctl variables. If you want to
change the OS type, you can either set it via the UNAME_s environment variable (UNAME_s=NomadBSD uname -s), or you can set kern.ostype=NomadBSDin/etc/loader.conf. After a reboot, uname -sshould showNomadBSD`

UNAME_s=NomadBSD give me command not found.
And add kern.ostype=NomadBSD give me this
image

And...
image

UNAME_s=NomadBSD give me command not found.

This works with Bourne shell compatible shells. In (t)csh it is setenv UNAME_s NomadBSD; uname -s.

And add kern.ostype=NomadBSD give me this

Ok, this is ... interesting.

And...

kern.ostype can only be set via /boot/loader.conf, or from the loader prompt.

setenv UNAME_s NomadBSD; uname -s

Sorry! This is works perfectly setenv UNAME_s NomadBSD; uname -s thank you very much!

But how to make this change permanent in nomadbsd build file?

Every time I restart, the original information is restored

Every time I restart, the original information is restored

It's just an environment variable which is, in this case, only visible to the current shell and all processes started from it. See man environ for more information.

Every time I restart, the original information is restored

It's just an environment variable which is, in this case, only visible to the current shell and all processes started from it. See man environ for more information.

I believe that modifying the work/sys/usr/sys/conf/newvers.sh file right after the nomadbsd updatebase is the best option

after updatebase and before buildkernel