Class: Yast::DistroClass
- Inherits:
-
Module
- Object
- Module
- Yast::DistroClass
- Defined in:
- ../../library/general/src/modules/Distro.rb
Instance Method Summary (collapse)
-
- (Object) debian
Is it Debian based? Ubuntu, …
-
- (Object) fedora
Is it Fedora based? RHEL, Oracle, …
- - (Object) main
-
- (Object) suse
Is it SUSE based? openSUSE, SLES, SLED, …
Instance Method Details
- (Object) debian
Is it Debian based? Ubuntu, …
67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File '../../library/general/src/modules/Distro.rb', line 67 def debian if @_distro == nil if SCR.Execute( path(".target.bash"), "grep DISTRIB_ID=Ubuntu /etc/lsb-release" ) == 0 @_distro = "debian" Builtins.y2milestone("Found Debian/Ubuntu") end end @_distro == "debian" end |
- (Object) fedora
Is it Fedora based? RHEL, Oracle, …
55 56 57 58 59 60 61 62 63 64 |
# File '../../library/general/src/modules/Distro.rb', line 55 def fedora if @_distro == nil if SCR.Read(path(".target.size"), "/etc/fedora-release") != -1 @_distro = "fedora" Builtins.y2milestone("Found Fedora") end end @_distro == "fedora" end |
- (Object) main
34 35 36 37 38 39 40 |
# File '../../library/general/src/modules/Distro.rb', line 34 def main textdomain "base" # Cache @_distro = nil end |
- (Object) suse
Is it SUSE based? openSUSE, SLES, SLED, …
43 44 45 46 47 48 49 50 51 52 |
# File '../../library/general/src/modules/Distro.rb', line 43 def suse if @_distro == nil if SCR.Read(path(".target.size"), "/etc/SuSE-release") != -1 @_distro = "suse" Builtins.y2milestone("Found SUSE") end end @_distro == "suse" end |