Subject: Re: Allow config extract embedded configuration files
To: Greywolf <email@example.com>
From: Andrew Brown <firstname.lastname@example.org>
Date: 04/14/2003 14:04:27
>RP> .... although it doesn't help in the not-running case.
>RP> I know Linux examples often aren't well-regarded, but in this case it
>RP> looks like they've got a good one to offer. Perhaps NetBSD should have
>RP> a /kern/config that can just be read to get the current configuration?
>FB> "/kern" isn't well-regarded either, so it would probably be OK. ;-)
fwiw, i've toyed with the idea, but never settled on something that
seemed "right" to me.
>Or you can do what I did and just write a SLSS to handle it as described
>in the man page...
>[note: I probably spent too much time writing this, but if anyone else
>finds it useful, have at.]
fwiw, i use this:
if [ $# = 0 ]; then cd /; fi
if [ $# = 0 ]; then set `sysctl -n machdep.booted_kernel`; fi
if [ $# = 0 ]; then set netbsd; fi
strings - "$@" | sed -n 's/^_CFG_//p' | unvis
and then i just redirect the output as i see fit. it works.
|-----< "CODE WARRIOR" >-----|
email@example.com * "ah! i see you have the internet
firstname.lastname@example.org (Andrew Brown) that goes *ping*!"
email@example.com * "information is power -- share the wealth."