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
Identifying a system as a LMDE
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
Identifying a system as a LMDE
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.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Identifying a system as a LMDE
Try these files:
Code: Select all
/etc/issue
/etc/os-release
Re: Identifying a system as a LMDE
/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!Monsta wrote:Try these files:Code: Select all
/etc/issue /etc/os-release
Re: Identifying a system as a LMDE
Unfortunately I found out that /etc/os-release is not particularly useful in a "standard" Linux Mint:
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
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"
Thanks
-- M
Re: Identifying a system as a LMDE
Hi,
What about /etc/linuxmint/info
In an LMDE install it says:
and in an LM13 Cinnamon install it says:
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
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
Re: Identifying a system as a LMDE
This is GREAT! Thanks, I'll start working on this immediately!!!caribriz wrote:What about /etc/linuxmint/info
Thanks (also on behalf of the CFEngine community)
-- bronto
Re: Identifying a system as a LMDE
Note that this file is present only if any of mint-info-* packages is installed.
Re: Identifying a system as a LMDE
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.
Re: Identifying a system as a LMDE
Thanks, that's an important info.Monsta wrote:Note that this file is present only if any of mint-info-* packages is installed.
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