Identifying a system as a LMDE

Archived topics about LMDE 1 and LMDE 2
Locked
bronto

Identifying a system as a LMDE

Post by bronto »

Hi all

I am a CFEngine user (see http://cfengine.com/community). From the point of view of the cfengine agent, a "normal" Mint is indistinguishable from an Ubuntu system, and an LMDE is indistinguishable from a Debian testing. I have opened a bug with them (see https://cfengine.com/dev/issues/2278), and we are trying to find a way for the agent to correctly identify a system as a Mint system in general, and as an LMDE in particular.

The information is contained in /etc/lsb-release, however we are not sure if that file is always present in a Mint system, even when the lsb-release package is not installed. Nor we know if the same information can be found elsewhere in the system. I suggested we could look for "typical" mint packages via dpkg, but it's an heavyweight way to find that information out -- just imagine the agent running a dpkg --list every five minutes..

Can any of the Mint people here help us find a "lightweight" way to correctly identify Mint, and LMDE in particular?

Thanks in advance, ciao!
-- bronto
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Identifying a system as a LMDE

Post by Monsta »

Try these files:

Code: Select all

/etc/issue
/etc/os-release
bronto

Re: Identifying a system as a LMDE

Post by bronto »

Monsta wrote:Try these files:

Code: Select all

/etc/issue
/etc/os-release
/etc/issue is usually a file the users fiddle with, so not really suitable for OS detection. /etc/os-release seems a better fit though, thanks!
bronto

Re: Identifying a system as a LMDE

Post by bronto »

Unfortunately I found out that /etc/os-release is not particularly useful in a "standard" Linux Mint:

Code: Select all

NAME="Ubuntu"
VERSION="12.10, Quantal Quetzal"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu quantal (12.10)"
VERSION_ID="12.10"
Any other file that is sure to always be in the filesystem and identifies a system as a standard Linux Mint (ubuntu-derived)?

Thanks
-- M
caribriz

Re: Identifying a system as a LMDE

Post by caribriz »

Hi,

What about /etc/linuxmint/info

In an LMDE install it says:

Code: Select all

RELEASE=1
CODENAME=debian
EDITION="Cinnamon 32-bit"
DESCRIPTION="LMDE Cinnamon Edition"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_debian_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_debian.php
USER_GUIDE_URL=http://www.linuxmint.com/documentation.php
GRUB_TITLE=LMDE Cinnamon 32-bit
and in an LM13 Cinnamon install it says:

Code: Select all

RELEASE=13
CODENAME=maya
EDITION="Cinnamon 32-bit"
DESCRIPTION="Linux Mint 13 Maya"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_maya_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_maya.php
USER_GUIDE_URL=http://www.linuxmint.com/documentation.php
GRUB_TITLE=Linux Mint 13 Cinnamon 32-bit
:?:
bronto

Re: Identifying a system as a LMDE

Post by bronto »

caribriz wrote:What about /etc/linuxmint/info
This is GREAT! Thanks, I'll start working on this immediately!!!

Thanks (also on behalf of the CFEngine community)
-- bronto
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Identifying a system as a LMDE

Post by Monsta »

Note that this file is present only if any of mint-info-* packages is installed.
kurotsugi

Re: Identifying a system as a LMDE

Post by kurotsugi »

there are several way to describe what linux we're using. aside what monsta have mentioned we also have /etc/lsb-release which can be called via 'lsb_release -a'. this command also have becomes standard on every linux distro. the /etc/linuxmint/info doesn't work if mintsystem got uninstalled. that file only work as a reference when /etc/lsb-release got modified.
bronto

Re: Identifying a system as a LMDE

Post by bronto »

Monsta wrote:Note that this file is present only if any of mint-info-* packages is installed.
Thanks, that's an important info.

The best thing would be something on the system that is always there, even on a very basic install of Mint, and that is either unique by itself (that file is there only on Mint, it's not found on other distros), or it's unique in its content (the content of the file tell that we are on Mint).

Is there anything like that in Mint? I understand that neither /etc/lsb-release nor /etc/linuxmint/info satisfy the prerequisite of being there on any type of installation.

Thanks
-- bronto
Locked

Return to “LMDE Archive”