From 8ed2f8de3fda6531a3f737e4f6f92fe7f864a546 Mon Sep 17 00:00:00 2001 From: Christian Prause Date: Wed, 16 Apr 2014 16:35:46 +0200 Subject: Added suse to the list of supported OS --- handlers/sys.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/handlers/sys.in b/handlers/sys.in index 55e0799..605e583 100644 --- a/handlers/sys.in +++ b/handlers/sys.in @@ -53,6 +53,11 @@ then os=redhat debug "Redhat detected" osversion="/etc/redhat-release" +elif [ -f /etc/SuSE-release ] +then + os=suse + debug "SuSE detected" + osversion="/etc/SuSE-release" else warning "Unknown OS detected!" fi @@ -66,14 +71,14 @@ if [ ! -d $parentdir ]; then mkdir -p $parentdir fi -if [ $os = "debian" ] +if [ "$os" = "debian" ] then getconf packagesfile $parentdir/dpkg-selections.txt getconf packagemgr `which dpkg` getconf packagemgroptions ' --get-selections *' getconf selectionsfile $parentdir/debconfsel.txt getconf debconfgetselections `which debconf-get-selections` -elif [ $os = "redhat" ] +elif [ "$os" = "redhat" ] then getconf packagesfile $parentdir/rpmpackages.txt getconf packagemgr `which rpm` @@ -81,6 +86,11 @@ then getconf SYSREPORT `which sysreport` getconf sysreport_options ' -norpm ' +elif [ "$os" = "suse" ] +then + getconf packagesfile $parentdir/rpmpackages.txt + getconf packagemgr `which rpm` + getconf packagemgroptions ' -qa ' else getconf packagesfile $parentdir/unknownOS.txt fi -- cgit v1.2.3