GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Devel::CheckOS::Helpers::LinuxOSrelease(3) User Contributed Perl Documentation Devel::CheckOS::Helpers::LinuxOSrelease(3)

Devel::CheckOS::Helpers::LinuxOSrelease - functions to deal with /etc/os-release file

    use Devel::CheckOS::Helpers::LinuxOSrelease 'distributor_id';
    my $id = distributor_id;

This module exports functions to handle text files related to Debian-like distributions.

The following subs are exported.

Retrieves and returns the distributor ID from the /etc/os-release file.

It is expected that the file exists, it is readable and have the following (minimum) content format:

    NAME="Ubuntu"
    VERSION_ID="22.04"
    VERSION="22.04.4 LTS (Jammy Jellyfish)"
    VERSION_CODENAME=jammy
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"

This excerpt is from Ubuntu 22.04, but other distributions might have fewer, more or different fields and values.

It returns the value of "ID" or "undef", if the conditions are not those specified above.

Copyright 2024 David Cantrell

This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.

2024-05-22 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.