commit:     9132b305a6b5a5663378b361c696757bfb84d39a
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 28 12:40:53 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Aug 28 12:40:53 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9132b305

net-analyzer/nessus-agent-bin: handle version updates properly

Nessus must be made aware of a new version of its core components having
been installed. Do it the same way as upstream distro packages, i.e. use
the undocumented nessuscli command 'install'.

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 ...us-agent-bin-8.0.0.ebuild => nessus-agent-bin-8.0.0-r1.ebuild} | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/net-analyzer/nessus-agent-bin/nessus-agent-bin-8.0.0.ebuild 
b/net-analyzer/nessus-agent-bin/nessus-agent-bin-8.0.0-r1.ebuild
similarity index 79%
rename from net-analyzer/nessus-agent-bin/nessus-agent-bin-8.0.0.ebuild
rename to net-analyzer/nessus-agent-bin/nessus-agent-bin-8.0.0-r1.ebuild
index d53ad12d43a..bcc8308edd0 100644
--- a/net-analyzer/nessus-agent-bin/nessus-agent-bin-8.0.0.ebuild
+++ b/net-analyzer/nessus-agent-bin/nessus-agent-bin-8.0.0-r1.ebuild
@@ -50,6 +50,12 @@ src_install() {
 }
 
 pkg_postinst() {
+       # Actually update Nessus core components. According to upstream 
packages,
+       # harmless to invoke on fresh installations too - and it may make life 
easier
+       # for people who had restored Nessus state from backups, had it lying 
around
+       # from older installations and so on.
+       "${EROOT}"/opt/nessus_agent/sbin/nessuscli install 
"${EROOT}"/opt/nessus_agent/var/nessus/plugins-core.tar.gz
+
        if [[ -z "${REPLACING_VERSIONS}" ]]; then
                elog "In order to link the agent to Tenable.io or an instance 
of Nessus Manager,"
                elog "obtain an appropriate linking key and run"
@@ -57,5 +63,7 @@ pkg_postinst() {
                elog "  /opt/nessus_agent/sbin/nessuscli agent link --key=<key> 
--host=<host> --port=<port> [optional parameters]"
                elog ""
                elog "This can be done before the agent is started."
+       else
+               elog "Please restart the nessusagent service to complete the 
update process"
        fi
 }

Reply via email to