YaST2 Developers Documentation: Configuration of nfs

Configuration of nfs

Nfs.ycp
NFS client configuration data, I/O functions.

This module has an unstable interface.

Imports

  • Progress
  • Report
  • Service
  • SuSEFirewall
  • Summary
  • Wizard

Includes

  • nfs/routines.ycp

Global Variables

Global Functions

Local Functions

global SetModified () -> void

Function sets internal variable, which indicates, that any settings were modified, to "true"

global GetModified () -> boolean

Functions which returns if the settings were modified

Return value:
settings were modified
global required_packages -> list

Required packages

global nfs_entries -> list<map<string,any> >

eg.: [ $["spec": "moon:/cheese", file: "/mooncheese", "mntopts": "defaults"], ...]

global non_nfs_entries -> list<map>

Read only, intended for checking mount-point uniqueness.

global Set (list<map> settings) -> void

Set module data

Parameters:
settings module settings
global Import (list<map> settings) -> boolean

Get all NFS configuration from a map. When called by nfs_auto (preparing autoinstallation data) the map may be empty.

Parameters:
settings a map with a single key: nfs_entries
Return value:
success
global Export () -> list

Dump the NFS settings to a map, for autoinstallation use.

Return value:
a list of nfs entries.
local EscapeSpaces1 (string s) -> string

Escape spaces " " -> "\\040".

Parameters:
s a string or nil
Return value:
escaped string or nil
local EscapeSpaces (list<map<string,any> > entries) -> list<map<string,any> >

Escape spaces " " -> "\\040" in all values of all entries

Parameters:
entries a list of maps, such as nfs_entries
Return value:
escaped entries
local gsub (string regex, string replacement, string s) -> string

(like awk gsub, but return the result, not number of replacements) replaces from back!

Parameters:
regex regular expression to replace
replacement the replacement string
s where to replace
Return value:
the changed string
local UnescapeSpaces1 (string s) -> string

Un-escape spaces "\\040" -> " "

Parameters:
s string or nil
Return value:
escaped string or nil
local UnescapeSpaces (list<map<string,any> > entries) -> list<map<string,any> >

Un-escape spaces "\\040" -> " " in all values of all entries

Parameters:
entries a list of maps, such as nfs_entries
Return value:
escaped entries
global Read () -> boolean

Reads NFS settings from the SCR (.etc.fstab)

Return value:
true on success
global WriteOnly () -> boolean

Writes the NFS client configuration without starting/stopping the service. Autoinstallation uses this and then calls SuSEconfig only once and starts the services together. (No parameters because it is too short to abort)

Return value:
true on success
global Write () -> boolean

Writes the NFS client configuration and starts/stops the service. (No parameters because it is too short to abort)

Return value:
true on success
global Summary () -> string

Summary()

Return value:
Html formatted configuration summary
global Mount (string server, string share, string mpoint, string options) -> string

Mount NFS directory

Parameters:
server remote server name
share name of the exported directory
mpoint mount point (can be empty or nil, in this case it will be mounted in temporary directory)
options mount options - e.g. "ro,hard,intr", see man nfs
Return value:
directory where volume was mounted or nil if mount failed
global Unmount (string mpoint) -> boolean

Unmount NFS directory from the system

Parameters:
mpoint NFS mount point to unmount
Return value:
true on success
global AutoPackages () -> map

Return required packages for auto-installation

Return value:
of packages to be installed and to be removed