[fpc-pascal] Detecting what is the linux distro
ik
idokan at gmail.com
Tue Oct 12 18:06:23 CEST 2010
It's not just that. Lets say you have a UI for IPTables. In Redhat based, it
will be located under /etc/sysconfig/iptables . On debian based, it should
be under /etc/networking/post-config or something like that (don't have a
debian based machine here), and so on...
Please note that I do not talk about exited scripts such as Arno's scripts
or shorewall, just plain IPTables client, and it's different on each distro.
If you require to read settings of the system (that located at /etc/), no
one guarantee you that all distro's will store then at the same place.
That's the reason why so many software/driver vendors are so reluctant to
release Linux support.
For example Foomatic drivers for CUPS, the drivers of the printers in Mac
OS-X are the same as with Linux, but many vendors ignore Linux just because
this mess.
So it's not just "lets create a package and get over with it", It's not that
simple.
Ido
LINESIP websites:
http://www.linesip.com
http://www.linesip.co.il
On Tue, Oct 12, 2010 at 14:01, David W Noon <david.w.noon at ntlworld.com>wrote:
> 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.
>
> 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 at ntlworld.com (David W Noon)
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20101012/a7a459f6/attachment.html>
More information about the fpc-pascal
mailing list