On Tue, 12 Oct 2010 09:54:35 +0200, ik wrote about Re: [fpc-pascal] Detecting what is the linux distro:
On Tue, Oct 12, 2010 at 09:30, Henry Vermaak
wrote:
[snip]
Show quoted text 9 lines
> Just curious, why would you like to detect this?
>
You want to know how to install files for daemons, append information
in other existed packages etc... But instead of creating 1000%
packages types for each distro, you can for example know that Gentoo
and ArchLinux uses /etc/rc.d/ for init deamons.
You know that Debian, CentOS, RedHat and few others uses /etc/init.d/
etc...
Both of those directories are used by virtually all UNIX implementations. /etc/init.d/ contains the init scripts for system daemons, whereas /etc/rc.d/ contains the configuration files that are interpolated into the init scripts to establish environment variables for the daemons. These directories do not have an either/or relationship.
This is a consequence of using an init process based on the System V model.
Why don't you just use a package manager, such as apt/dpkg, Portage, RPM, etc., instead? Most distros can handle more than one of these. For example, I run Gentoo, and it will handle .deb and .rpm packages, as well as its native Portage ebuilds.
Regards,
Dave [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
(David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*