aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Prause <cprause@suse.com>2014-04-16 16:35:46 +0200
committerintrigeri <intrigeri@boum.org>2014-05-03 13:12:10 +0000
commit8ed2f8de3fda6531a3f737e4f6f92fe7f864a546 (patch)
tree8c624260f21406589ac73fd5267a21049183248b
parentc6418f2f6e90ea5ae4c3ce8348538e76f9f74390 (diff)
downloadbackupninja-8ed2f8de3fda6531a3f737e4f6f92fe7f864a546.tar.gz
backupninja-8ed2f8de3fda6531a3f737e4f6f92fe7f864a546.tar.bz2
Added suse to the list of supported OS
-rw-r--r--handlers/sys.in14
1 files 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