[fpc-pascal] Detecting what is the linux distro

Sven Barth pascaldragon at googlemail.com
Tue Oct 12 16:29:42 CEST 2010


Am 12.10.2010 14:01, schrieb David W Noon:
> 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
>> <henry.vermaak at gmail.com>wrote:
> [snip]
>>> 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.
>

ArchLinux does not use a System V init system, but a simpler BSD one. 
And thus it does not use /etc/init.d, but only /etc/rc.d.

> 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.

ArchLinux handles only its own ArchLinux Package Manager format 
(basically a .tar.gz with some script files) - as far as I'm aware of.

Regards,
Sven



More information about the fpc-pascal mailing list