Hi Tom,
Starting with openSUSE 13.1 there will be no more /etc/SuSE-release but
/etc/os-release
The following patch corrects this behavior and checks for both
Togan
--
Life is endless possibilities
>From c6d35dd1672f8e3347ebb019aeb5199fb82bc4ee Mon Sep 17 00:00:00 2001
From: Togan Muftuoglu <[email protected]>
Date: Thu, 8 Aug 2013 10:57:56 +0200
Subject: [PATCH] Use /etc/os-release as of release 13.1
Signed-off-by: Togan Muftuoglu <[email protected]>
---
Shorewall-core/configure | 2 +-
Shorewall-core/configure.pl | 2 ++
Shorewall-core/install.sh | 2 +-
Shorewall-init/install.sh | 2 +-
Shorewall-lite/install.sh | 2 +-
Shorewall/install.sh | 2 +-
6 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Shorewall-core/configure b/Shorewall-core/configure
index 8efeea7..062d858 100755
--- a/Shorewall-core/configure
+++ b/Shorewall-core/configure
@@ -114,7 +114,7 @@ if [ -z "$vendor" ]; then
elif [ -f /etc/slackware-version ] ; then
params[HOST]=slackware
rcfile=shorewallrc.slackware
- elif [ -f /etc/SuSE-release ]; then
+ elif [ -f /etc/SuSE-release ] | [ -f /etc/os-release ]; then
params[HOST]=suse
rcfile=shorewallrc.suse
elif [ -f /etc/arch-release ] ; then
diff --git a/Shorewall-core/configure.pl b/Shorewall-core/configure.pl
index f2b213c..ea24622 100755
--- a/Shorewall-core/configure.pl
+++ b/Shorewall-core/configure.pl
@@ -72,6 +72,8 @@ if ( defined $vendor ) {
} elsif ( -f '/etc/SuSE-release' ) {
$vendor = 'suse';
$rcfilename = 'shorewallrc.suse';
+ } elseif ( -f '/etc/os-release' ) {
+ $vendor = 'suse';
} elsif ( -f '/etc/arch-release' ) {
$vendor = 'archlinux';
$rcfilename = 'shorewallrc.archlinux';
diff --git a/Shorewall-core/install.sh b/Shorewall-core/install.sh
index 9f97909..fc5af07 100755
--- a/Shorewall-core/install.sh
+++ b/Shorewall-core/install.sh
@@ -200,7 +200,7 @@ if [ -z "$BUILD" ]; then
BUILD=redhat
elif [ -f /etc/slackware-version ] ; then
BUILD=slackware
- elif [ -f /etc/SuSE-release ]; then
+ elif [ -f /etc/SuSE-release ] | [ -f /etc/os-release ]; then
BUILD=suse
elif [ -f /etc/arch-release ] ; then
BUILD=archlinux
diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh
index 60e4a54..a4bf38e 100755
--- a/Shorewall-init/install.sh
+++ b/Shorewall-init/install.sh
@@ -186,7 +186,7 @@ if [ -z "$BUILD" ]; then
BUILD=debian
elif [ -f /etc/redhat-release ]; then
BUILD=redhat
- elif [ -f /etc/SuSE-release ]; then
+ elif [ -f /etc/SuSE-release ] | [ -f /etc/os-release ]; then
BUILD=suse
elif [ -f /etc/slackware-version ] ; then
BUILD=slackware
diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh
index fcc2596..3a43ebd 100755
--- a/Shorewall-lite/install.sh
+++ b/Shorewall-lite/install.sh
@@ -204,7 +204,7 @@ if [ -z "$BUILD" ]; then
BUILD=debian
elif [ -f ${CONFDIR}/redhat-release ]; then
BUILD=redhat
- elif [ -f ${CONFDIR}/SuSE-release ]; then
+ elif [ -f ${CONFDIR}/SuSE-release ]|[ -f ${CONFDIR}/os-release ]; then
BUILD=suse
elif [ -f ${CONFDIR}/slackware-version ] ; then
BUILD=slackware
diff --git a/Shorewall/install.sh b/Shorewall/install.sh
index 64a0b4d..3083467 100755
--- a/Shorewall/install.sh
+++ b/Shorewall/install.sh
@@ -218,7 +218,7 @@ if [ -z "$BUILD" ]; then
BUILD=redhat
elif [ -f /etc/slackware-version ] ; then
BUILD=slackware
- elif [ -f /etc/SuSE-release ]; then
+ elif [ -f /etc/SuSE-release ]|[ -f /etc/os-release ]; then
BUILD=suse
elif [ -f /etc/arch-release ] ; then
BUILD=archlinux
--
1.8.3.1
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel