Ticket #39 (new enhancement)
Change how Warewulf::SystemFactory determines OS
| Reported by: | ikaufman | Owned by: | gmk |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | general | Version: | |
| Keywords: | Cc: |
Description
Currently, Warewulf::SystemFactory looks for /etc/redhat-release to determine that the system is RHEL based. For Debian based distros, you could look for /etc/debian_version, but that would encompass both Ubuntu and Debian, which may have slight differences. It might be better to use "lsb_release -i" which should differentiate all three: i.e.:
on an Ubuntu box:
# lsb_release -i
Distributor ID: Ubuntu
and on a RHEL box:
~$ lsb_release -i
Distributor ID: RedHatEnterpriseServer
and on a CentOS box:
# lsb_release -i
Distributor ID: CentOS
Change History
Note: See
TracTickets for help on using
tickets.

Maybe use a qiven/when block like so (of course, this requires perl 5.10+):
my $OS_test = lsb_release -i;
given ($type) {
}