Class: Yast::OSReleaseClass
- Inherits:
-
Module
- Object
- Module
- Yast::OSReleaseClass
- Defined in:
- ../../library/general/src/modules/OSRelease.rb
Instance Method Summary (collapse)
-
- (OSReleaseClass) initialize
constructor
A new instance of OSReleaseClass.
-
- (String) ReleaseInformation(directory)
Get information about the OS release.
-
- (String) ReleaseName
Get information about the OS name Is limited for the currently running product.
-
- (String) ReleaseVersion
Get information about the OS version Is limited for the currently running product.
Constructor Details
- (OSReleaseClass) initialize
Returns a new instance of OSReleaseClass
35 36 37 |
# File '../../library/general/src/modules/OSRelease.rb', line 35 def initialize @file_path = "/etc/os-release" end |
Instance Method Details
- (String) ReleaseInformation(directory)
Get information about the OS release
42 43 44 |
# File '../../library/general/src/modules/OSRelease.rb', line 42 def ReleaseInformation(directory) MakeNiceName(Misc.CustomSysconfigRead("PRETTY_NAME", "?", directory + @file_path)) end |
- (String) ReleaseName
Get information about the OS name Is limited for the currently running product
49 50 51 52 53 54 55 |
# File '../../library/general/src/modules/OSRelease.rb', line 49 def ReleaseName if Stage.initial return SCR.Read(path(".content.PRODUCT")) end directory = "/" # TODO make this optional argument Misc.CustomSysconfigRead("NAME", "SUSE LINUX", directory + @file_path) end |
- (String) ReleaseVersion
Get information about the OS version Is limited for the currently running product
60 61 62 63 64 65 66 |
# File '../../library/general/src/modules/OSRelease.rb', line 60 def ReleaseVersion if Stage.initial return SCR.Read(path(".content.VERSION")) end directory = "/" Misc.CustomSysconfigRead("VERSION_ID", "", directory + @file_path) end |