You are not logged in.

#1 2009-02-10 16:53:06

X/ax
Member
From: Oost vlaanderen, Belgium
Registered: 2008-01-13
Posts: 275
Website

System detection

Hi @ archers

I'd like to know if there's any way to detect what system you're running (aside from the -for me- not usable uname)
The goal is to know where configuration files are kept, where init scripts are kept, etc...
Configs are generally /etc/, but init scripts are scattered around depending on what distro you're running.
That's the part really hard to detect... Especially generic. The current way I'd think about is having the most commonly used folders (/etc/init.d, /etc/init.[nr], /etc/[whatever is common]) to scan, but that's perhaps not really clean.

So, is there any way the system gives that information, somewhere, can I determine that from the init script/configs itself, etc...?
Or is init actually different on almost any great distro?

Thanks in advance,
X/ax


My coding blog (or an attempt at it)
Archer start page (or an attempt at it)

Offline

Board footer

Powered by FluxBB