Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

linux::distribution(3pm) [debian man page]

Linux::Distribution(3pm)				User Contributed Perl Documentation				  Linux::Distribution(3pm)

NAME
Linux::Distribution - Perl extension to detect on which Linux distribution we are running. SYNOPSIS
use Linux::Distribution qw(distribution_name distribution_version); if(my $distro = distribution_name) { my $version = distribution_version(); print "you are running $distro, version $version "; } else { print "distribution unknown "; } Or else do it OO: use Linux::Distribution qw(distribution_name distribution_version); my $linux = Linux::Distribution->new; if(my $distro = $linux->distribution_name()) { my $version = $linux->distribution_version(); print "you are running $distro, version $version "; } else { print "distribution unknown "; } DESCRIPTION
This is a simple module that tries to guess on what linux distribution we are running by looking for release's files in /etc. It now looks for 'lsb-release' first as that should be the most correct and adds ubuntu support. Secondly, it will look for the distro specific files. It currently recognizes slackware, debian, suse, fedora, redhat, turbolinux, yellowdog, knoppix, mandrake, conectiva, immunix, tinysofa, va-linux, trustix, adamantix, yoper, arch-linux, libranet, gentoo, ubuntu, scientific, oracle enterprise linux and redflag. It has function to get the version for debian, suse, fedora, redhat, gentoo, slackware, scientific, oracle enterprise linux, redflag and ubuntu(lsb). People running unsupported distro's are greatly encouraged to submit patches :-) EXPORT None by default. TODO
Add the capability of recognize the version of the distribution for all recognized distributions. AUTHORS
Alexandr Ciornii <alexchorny@gmail.com>, <http://chorny.net> Alberto Re, <alberto@accidia.net> Judith Lebzelter, <judith@osdl.org> COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2012-03-18 Linux::Distribution(3pm)

Check Out this Related Man Page

RINSE(8)						 Perl Programmers Reference Guide						  RINSE(8)

NAME
rinse - RPM Installation Entity. SYNOPSIS
rinse [options] Help Options: --help Show help information. --manual Read the manual for this script. --version Show the version information and exit. Mandatory Options: --arch Specify the architecture to install. --directory The directory to install the distribution within. --distribution The distribution to install. Customization Options: --add-pkg-list Additional packages to download and install --after-post-install Additionally run the specified script after the post install script. --before-post-install Additionally run the specified script before the post install script. --post-install Run the given post-install script instead of the default files in /usr/lib/rinse/$distro Misc Options: --cache Should we use a local cache? (Default is 1) --cache-dir Specify the directory we should use for the cache. --clean-cache Clean our cache of .rpm files. --config Specify a different configuration file. (Default is /etc/rinse/rinse.conf) --pkgs-dir Specify a different directory containing <distribution>.packages files. --mirror Specify the URL of the mirror. (Default is to read it from /etc/rinse/rinse.conf) --list-distributions Show installable distributions. --print-uris Only show the RPMs which should be downloaded. default files in /usr/lib/rinse/$distro --verbose Enable verbose output. OPTIONS
--arch Specify the architecture to install. Valid choices are 'amd64' and 'i386' only. --add-pkg-list Add a list of additional packages. --cache Specify whether to cache packages (1) or not (0). --cache-dir Specify the directory we should use for the cache. --clean-cache Remove all cached .rpm files. --directory Specify the directory into which the distribution should be installed. --distribution Specify the distribution to be installed. --help Show help information. --mirror Specify the URL of the mirror. Normally this is read from /etc/rinse/rinse.conf. --list-distributions Show the distributions which are installable. --manual Read the manual for this script. --print-uris Only show the files we would download, don't actually do so. --verbose Enable verbose output. --version Show the version number and exit. DESCRIPTION
rinse is a simple script which is designed to be able to install a minimal working installation of an RPM-based distribution into a directory. The tool is analogous to the standard Debian GNU/Linux debootstrap utility. USAGE
To use this script you will need to be root. This is required to mount /proc, run chroot, and more. Basic usage is as simple as: rinse --distribution fedora-core-6 --directory /tmp/test This will download the required RPM files and unpack them into a minimal installation of Fedora Core 6. To see which RPM files would be downloaded, without actually performing an installation or downloading anything, then you may run the following: rinse --distribution fedora-core-6 --print-uris TODO
Short of supporting more distributions or architectures there aren't really any outstanding issues. AUTHOR
Steve -- http://www.steve.org.uk/ LICENSE
Copyright (c) 2007-2010 by Steve Kemp. All rights reserved. Copyright (c) 2011-2013 by Thomas Lange. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. 2.0.1 2013-01-28 RINSE(8)
Man Page