[yast-commit] r51783 - /trunk/audit-laf/src/AuditLaf.ycp

Author: gs Date: Thu Oct 2 13:07:33 2008 New Revision: 51783 URL: http://svn.opensuse.org/viewcvs/yast?rev=51783&view=rev Log: add Summary() for AutoYaST Modified: trunk/audit-laf/src/AuditLaf.ycp Modified: trunk/audit-laf/src/AuditLaf.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/audit-laf/src/AuditLaf.ycp?rev=51... ============================================================================== --- trunk/audit-laf/src/AuditLaf.ycp (original) +++ trunk/audit-laf/src/AuditLaf.ycp Thu Oct 2 13:07:33 2008 @@ -176,6 +176,21 @@ return false; } +global string AuditStatus() +{ + map output = (map)SCR::Execute( .target.bash_output, "auditctl -s" ); + y2milestone( "auditctl: %1", output ); + + string audit_status = output["stdout"]:""; + + if ( regexpmatch( audit_status, "^.*enabled=2.*" ) ) + return _( "The rules for auditctl are locked" ); + else if ( regexpmatch( audit_status, "^.*enabled=1.*" ) ) + return _( "Auditing enabled"); + else + return _( "Auditing disabled"); +} + // // Settings: Define all variables needed for the configuration of the audit daemon // @@ -599,10 +614,16 @@ * Create a textual summary and a list of unconfigured cards * @return summary of the current configuration */ -// TODO FIXME: your code here... -global list Summary() { +global string Summary() { + string summary = ""; + + summary = Summary::AddLine( summary, sformat( "%1: %2", _("Log file"), AuditLaf::GetAuditdOption("log_file")) ); + summary = Summary::AddLine( summary, AuditStatus() ); + + y2milestone ( "Summary: %1", summary ); + /* Configuration summary text for autoyast */ - return [ _("Configuration summary..."), [] ]; + return summary; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn.opensuse.org