summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-02-01 19:01:02 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-02-01 19:01:02 +0000
commitae992d98aa69fa9fd6feb47ebc0da41800b36df3 (patch)
tree0825b4d6c72acda1b94aad8390c76127ef2e74e9 /src
parentd77f62cc12639ab1e7de1d980ee7bdb09aeee893 (diff)
downloadbcfg2-ae992d98aa69fa9fd6feb47ebc0da41800b36df3.tar.gz
bcfg2-ae992d98aa69fa9fd6feb47ebc0da41800b36df3.tar.bz2
bcfg2-ae992d98aa69fa9fd6feb47ebc0da41800b36df3.zip
Finish up improving interactive mode log messages (Resolves Ticket #367)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2753 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Tools/POSIX.py25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py
index 2b10d7cd3..c111f52c0 100644
--- a/src/lib/Client/Tools/POSIX.py
+++ b/src/lib/Client/Tools/POSIX.py
@@ -105,13 +105,29 @@ class POSIX(Bcfg2.Client.Tools.Tool):
if owner != entry.get('owner'):
entry.set('current_owner', owner)
self.logger.debug("%s %s ownership wrong" % (entry.tag, entry.get('name')))
+ nqtext = entry.get('qtext', '') + '\n'
+ nqtext += "%s owner wrong. is %s should be %s" % \
+ (entry.get('name'), owner, entry.get('owner'))
+ entry.set('qtext', nqtext)
if group != entry.get('group'):
entry.set('current_group', group)
self.logger.debug("%s %s group wrong" % (entry.tag, entry.get('name')))
+ nqtext = entry.get('qtext', '') + '\n'
+ nqtext += "%s group wrong. is %s should be %s" % \
+ (entry.get('name'), group, entry.get('group'))
+ entry.set('qtext', nqtext)
if perms != entry.get('perms'):
entry.set('current_perms', perms)
self.logger.debug("%s %s permissions wrong: are %s should be %s" %
(entry.tag, entry.get('name'), perms, entry.get('perms')))
+ nqtext = entry.get('qtext', '') + '\n'
+ nqtext += "%s perms wrong. is %s should be %s" % \
+ (entry.get('name'), perms, entry.get('perms'))
+ entry.set('qtext', nqtext)
+ if entry.tag != 'ConfigFile':
+ nnqtext = entry.get('qtext')
+ nnqtext += '\nInstall %s %s: (y/N) ' % (entry.tag, entry.get('name'))
+ entry.set('qtext', nnqtext)
return False
def InstallDirectory(self, entry):
@@ -210,8 +226,13 @@ class POSIX(Bcfg2.Client.Tools.Tool):
eudiff = udiff.encode('ascii')
except:
eudiff = "Binary file: no diff printed"
- entry.set('qtext', eudiff + "\nInstall ConfigFile %s: (y/N) " % \
- (entry.get('name')))
+ question = "Install ConfigFile %s: (y/N) " % (entry.get('name'))
+ nqtext = entry.get('qtext')
+ if nqtext:
+ nqtext += '\n'
+ nqtext += eudiff + '\n' + question
+ entry.set('qtext', nqtext)
+
return contentStatus and permissionStatus
def InstallConfigFile(self, entry):