PartKeepr\CoreBundle\System\OperatingSystem::getLinuxDistribution PHP 메소드

getLinuxDistribution() 공개 메소드

Currently, we only execute lsb_release to find out the version number. As I don't have any other distributions at hand to test with, I rely on user feedback which distributions don't have lsb_release.
public getLinuxDistribution ( ) : string
리턴 string
    public function getLinuxDistribution()
    {
        /* Try executing lsb_release */
        $release = @exec('lsb_release -d -s', $void, $retval);
        if ($retval === 0 && $release !== '') {
            return $release;
        }
        //@todo we need better handling here
        return 'unknown';
    }