Git Product home page Git Product logo

Comments (6)

m0rbo avatar m0rbo commented on July 20, 2024

I change detectProducts like this:
detectProducts() {
OUT=$1
if rpm -q SLES_SAP-release &>/dev/null
then
log_write $OUT "#==[ System ]=======================================#"
log_write $OUT "# Product"
log_write $OUT "SUSE Linux Enterprise Server for SAP Applications"
log_write $OUT
log_cmd $OUT ls -lA --time-style=long-iso /etc/products.d/baseproduct
log_cmd $OUT rpm -qf /etc/products.d/baseproduct

And I reordered the function calls in basic_environment to put the /etc/os-release on top:
conf_files $BASIC_ENVF $RELEASE
detectProducts $BASIC_ENVF
detectVirtualization $BASIC_ENVF

from supportutils.

m0rbo avatar m0rbo commented on July 20, 2024

After further thought, I think these two commands should be directly in the basic_environment function.
We could use this output on any/all OS version.
log_cmd $BASIC_ENVF ls -lA --time-style=long-iso /etc/products.d/baseproduct
log_cmd $BASIC_ENVF rpm -qf /etc/products.d/baseproduct

ie:
basic_environment() {
# This is a minimum required function, do not exclude
printlog "Basic Environment..."
test $MIN_OPTION_ENV -eq 0 && { echolog EXCLUDED; return 1; }
addHeaderFile $BASIC_ENVF
get_customer_info $BASIC_ENVF
log_cmd $BASIC_ENVF 'date'
log_cmd $BASIC_ENVF 'uname -a'
RELEASE=$(ls -1 /etc/release)
detectVirtualization $BASIC_ENVF
conf_files $BASIC_ENVF $RELEASE
detectProducts $BASIC_ENVF
log_cmd $BASIC_ENVF ls -lA --time-style=long-iso /etc/products.d/baseproduct
log_cmd $BASIC_ENVF rpm -qf /etc/products.d/baseproduct

from supportutils.

Thr3d avatar Thr3d commented on July 20, 2024

The ls is a bit redundant with the rpm -qf, but I like the idea.

from supportutils.

m0rbo avatar m0rbo commented on July 20, 2024

The ls is a bit redundant with the rpm -qf, but I like the idea.

The "ls" here would let us see if there is a product mismatch between the file on disk and the rpm claiming to own the file.
Another bit of troubleshooting data.

from supportutils.

Thr3d avatar Thr3d commented on July 20, 2024

Some more product details in basic-environment to make product clear is useful, since os-release doesn't hint to SLES for SAP. But the ls of /etc/products.d/ already exists in updates.txt if someone need to troubleshoot that.

from supportutils.

m0rbo avatar m0rbo commented on July 20, 2024

Some more product details in basic-environment to make product clear is useful, since os-release doesn't hint to SLES for SAP. But the ls of /etc/products.d/ already exists in updates.txt if someone need to troubleshoot that.

Good point. problem solved!

from supportutils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.