Documentation and spelling fixes

Some docstrings where clearly leftovers from previous copy-paste actions or
contained wrong information. I fixed those, together with the salt (7) manpage.
This commit is contained in:
Maxim Burgerhout 2011-11-30 22:15:29 +01:00
parent 878bcde9c4
commit a1d934743a
6 changed files with 26 additions and 26 deletions

View file

@ -1912,7 +1912,7 @@ A module to wrap archive calls
.INDENT 0.0
.TP
.B salt.modules.archive.gunzip(gzipfile)
Uses the gzip command to create gzip files
Uses the gunzip command to unpack gzip files
.sp
CLI Example to create \fB/tmp/sourcefile.txt\fP:
.sp
@ -2123,7 +2123,7 @@ CLI Example:
.sp
.nf
.ft C
salt \(aq*\(aq cat
salt \(aq*\(aq cmd.has_exec cat
.ft P
.fi
.UNINDENT
@ -2175,7 +2175,7 @@ CLI Example:
.sp
.nf
.ft C
salt \(aq*\(aq cmd.run "ls \-l | grep foo | awk \(aq{print $2}\(aq"
salt \(aq*\(aq cmd.run_stderr "ls \-l | grep foo | awk \(aq{print $2}\(aq"
.ft P
.fi
.UNINDENT
@ -2188,7 +2188,7 @@ CLI Example:
.sp
.nf
.ft C
salt \(aq*\(aq cmd.run "ls \-l | grep foo | awk \(aq{print $2}\(aq"
salt \(aq*\(aq cmd.run_stdout "ls \-l | grep foo | awk \(aq{print $2}\(aq"
.ft P
.fi
.UNINDENT
@ -2615,7 +2615,7 @@ salt \(aq*\(aq /var/log name=\e*.[0\-9] mtime=+30d size=+10m delete
.INDENT 0.0
.TP
.B salt.modules.file.get_gid(path)
Return the user that owns a given file
Return the id of the group that owns a given file
.sp
CLI Example:
.sp
@ -2628,7 +2628,7 @@ salt \(aq*\(aq file.get_gid /etc/passwd
.INDENT 0.0
.TP
.B salt.modules.file.get_group(path)
Return the user that owns a given file
Return the group that owns a given file
.sp
CLI Example:
.sp
@ -2668,7 +2668,7 @@ salt \(aq*\(aq /etc/passwd sha512
.INDENT 0.0
.TP
.B salt.modules.file.get_uid(path)
Return the user that owns a given file
Return the id of the user that owns a given file
.sp
CLI Example:
.sp
@ -2720,7 +2720,7 @@ salt \(aq*\(aq file.group_to_gid root
.INDENT 0.0
.TP
.B salt.modules.file.set_mode(path, mode)
Set the more of a file
Set the mode of a file
.sp
CLI Example:
.sp
@ -2746,7 +2746,7 @@ salt \(aq*\(aq file.uid_to_user 0
.INDENT 0.0
.TP
.B salt.modules.file.user_to_uid(user)
Convert user name to a gid
Convert user name to a uid
.sp
CLI Example:
.sp
@ -2940,13 +2940,13 @@ salt \(aq*\(aq group.add foo 3456
.INDENT 0.0
.TP
.B salt.modules.groupadd.chgid(name, gid)
Change the default shell of the user
Change the gid for a named group
.sp
CLI Example:
.sp
.nf
.ft C
salt \(aq*\(aq user.chshell foo /bin/zsh
salt \(aq*\(aq group.chgid foo 4376
.ft P
.fi
.UNINDENT
@ -3649,13 +3649,13 @@ salt \(aq*\(aq group.add foo 3456
.INDENT 0.0
.TP
.B salt.modules.pw_group.chgid(name, gid)
Change the default shell of the user
Change the gid for a named group
.sp
CLI Example:
.sp
.nf
.ft C
salt \(aq*\(aq user.chshell foo /bin/zsh
salt \(aq*\(aq group.chgid foo 4376
.ft P
.fi
.UNINDENT

View file

@ -32,7 +32,7 @@ def gzip(sourcefile):
def gunzip(gzipfile):
'''
Uses the gzip command to create gzip files
Uses the gunzip command to unpack gzip files
CLI Example to create ``/tmp/sourcefile.txt``::

View file

@ -54,7 +54,7 @@ def run_stdout(cmd, cwd=DEFAULT_CWD):
CLI Example::
salt '*' cmd.run "ls -l | grep foo | awk '{print $2}'"
salt '*' cmd.run_stdout "ls -l | grep foo | awk '{print $2}'"
'''
log.info('Executing command {0} in directory {1}'.format(cmd, cwd))
stdout = subprocess.Popen(cmd,
@ -71,7 +71,7 @@ def run_stderr(cmd, cwd=DEFAULT_CWD):
CLI Example::
salt '*' cmd.run "ls -l | grep foo | awk '{print $2}'"
salt '*' cmd.run_stderr "ls -l | grep foo | awk '{print $2}'"
'''
log.info('Executing command {0} in directory {1}'.format(cmd, cwd))
stderr = subprocess.Popen(cmd,
@ -130,7 +130,7 @@ def has_exec(cmd):
CLI Example::
salt '*' cat
salt '*' cmd.has_exec cat
'''
if cmd.startswith('/'):
return _is_exec(cmd)

View file

@ -44,7 +44,7 @@ def group_to_gid(group):
def get_gid(path):
'''
Return the user that owns a given file
Return the id of the group that owns a given file
CLI Example::
@ -57,7 +57,7 @@ def get_gid(path):
def get_group(path):
'''
Return the user that owns a given file
Return the group that owns a given file
CLI Example::
@ -85,7 +85,7 @@ def uid_to_user(uid):
def user_to_uid(user):
'''
Convert user name to a gid
Convert user name to a uid
CLI Example::
@ -99,7 +99,7 @@ def user_to_uid(user):
def get_uid(path):
'''
Return the user that owns a given file
Return the id of the user that owns a given file
CLI Example::
@ -142,7 +142,7 @@ def get_mode(path):
def set_mode(path, mode):
'''
Set the more of a file
Set the mode of a file
CLI Example::

View file

@ -74,11 +74,11 @@ def getent():
def chgid(name, gid):
'''
Change the default shell of the user
Change the gid for a named group
CLI Example::
salt '*' user.chshell foo /bin/zsh
salt '*' group.chgid foo 4376
'''
pre_gid = __salt__['file.group_to_gid'](name)
if gid == pre_gid:

View file

@ -73,11 +73,11 @@ def getent():
def chgid(name, gid):
'''
Change the default shell of the user
Change the gid for a named group
CLI Example::
salt '*' user.chshell foo /bin/zsh
salt '*' group.chgid foo 4376
'''
pre_gid = __salt__['file.group_to_gid'](name)
if gid == pre_gid: