tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

System boot profiles



Hi guys.


I have a laptop which I use both at home and work.
One of the things I need is to be able to create custom boot profiles
for my environments.
This includes different config files like /etc/hosts, resolv.conf, xorg.cong, fstab etc and some custom shell scripts acting upon a trigger (i.e starting ypbind in one env only) for each of the profiles. On Linux I just send an argument to my kernel which gets stored in /proc/cmdline [1]. Then I pick this argument by a startup script at boot and configure my system depending on the value of this argument.

I was wondering if I could do something similar in NetBSD.
I tried booting NetBSD with grub sending the same text string to the kernel but this never shows up in any of the sysctl values nor in the /proc (even linux mounted).

One thing I could do is to create two kernel configs with different names and read their names from the output of the uname command. But it's really little convenient to compile two kernels and keep them around. Especially when tracking CURRENT.

Is there any other way to do this thing?


[1]: http://www.ezunix.org/index.php?title=Create_custom_boot_profile


Cheers,
Marcin


Home | Main Index | Thread Index | Old Index