Class: Yast::NetworkStorageClass
- Inherits:
-
Module
- Object
- Module
- Yast::NetworkStorageClass
- Defined in:
- ../../src/modules/NetworkStorage.rb
Instance Method Summary (collapse)
-
- (Object) getDevice(mount_point)
Ask /proc/mounts what device a mount point is using.
- - (Object) main
Instance Method Details
- (Object) getDevice(mount_point)
Ask /proc/mounts what device a mount point is using.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File '../../src/modules/NetworkStorage.rb', line 42 def getDevice(mount_point) cmd = Builtins.sformat( "grep ' %1 ' /proc/mounts|grep -v rootfs|tr -d '\n'", mount_point ) out = Convert.to_map(SCR.Execute(path(".target.bash_output"), cmd)) Builtins.y2milestone("mountpoint found %1", out) fields = Builtins.splitstring(Ops.get_string(out, "stdout", ""), " ") vfstype = Ops.get(fields, 2, "") device = vfstype == "nfs" || vfstype == "nfs4" ? "nfs" : Ops.get(fields, 0, "") Builtins.y2milestone("%1 is on device: %2", mount_point, device) device end |
- (Object) main
35 36 37 38 |
# File '../../src/modules/NetworkStorage.rb', line 35 def main Yast.import "Storage" end |