Bug 25437

Summary: kernel configs are the only precious files in /usr/src/sys
Product: Documentation Reporter: leifn <leifn>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description leifn 2001-02-27 23:40:01 UTC
	/usr/src can be considered as not important to backup, as it can
just be cvsup'ped again.
Sometime it is suggested to remove /usr/src and cvsup it if it is believed
to be hosed.

However, kernel config files is usually stored in /usr/src/sys/i386/conf,
and it is easy to forget to take backup of the kernel configs.

If the config files were just symlinks to somewhere more safe, like
/etc/kernconf, or /usr/local/etc/kernconf eg, it would be more difficult to
shoot oneself in the foot.

Fix: 

Either just make the suggestion in a manual, or (more agressively)
	make config complain if the configfile is not a symlink.

	Just as config hints "Don't forget to do a 'make depend'", it could 
	hint "It would be safer to have the kernel config be a symlink
	to outside /usr/src".
How-To-Repeat: 	rm -r /usr/src/sys
	cvsup
	cd /usr/src/sys/i386/conf
	config MYVERYSPECIALKERNELCONFIGITTOOKLONGTIMETOMAKE
	curse :-)
Comment 1 Peter Avalos 2001-02-28 19:59:34 UTC
Or maybe you could have a make option in /etc/make.conf that allows you to
define an optional kernel config file similar to the new SENDMAIL_MC flag so
it doesn't get wiped out.

Pete
Comment 2 Murray Stokely freebsd_committer freebsd_triage 2001-09-04 12:58:06 UTC
State Changed
From-To: open->closed

The handbook mentions that it might be safer to symlink your kernel 
config somewhere out of /usr/src in case you accidently overwrite your 
kernel config.  Thanks for the submission! 

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html