blob: 79bd2bdec6f6ec324d814b676d2c39a901e46df0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
--- a/genconfig.sh 2018-05-05 10:09:05.942853150 +0200
+++ b/genconfig.sh 2018-05-05 10:26:38.668441749 +0200
@@ -274,28 +274,35 @@
OS_VERSION=`grep ^base_version /etc/product | awk '{ print $3 }'`
OS_URL=https://www.clearos.com/
fi
- # use lsb_release (Linux Standard Base) when available
- LSB_RELEASE=`which lsb_release`
- if [ 0 -eq $? ]; then
- OS_NAME=`${LSB_RELEASE} -i -s`
- OS_VERSION=`${LSB_RELEASE} -r -s`
- case $OS_NAME in
- Debian)
- OS_URL=http://www.debian.org/
- OS_VERSION=`${LSB_RELEASE} -c -s`
- ;;
- Ubuntu)
- OS_URL=http://www.ubuntu.com/
- OS_VERSION=`${LSB_RELEASE} -c -s`
- ;;
- Gentoo)
- OS_URL=http://www.gentoo.org/
- ;;
- arch)
- OS_URL=http://www.archlinux.org/
- OS_VERSION=`uname -r`
- ;;
- esac
+ # Slackware specific
+ if [ -f /etc/os-release ]; then
+ OS_NAME=$(cat /etc/os-release | grep ^NAME= | cut -d= -f 2 | sed -e 's/^"//' -e 's/"$//')
+ OS_VERSION=$(cat /etc/os-release | grep ^VERSION= | cut -d= -f 2 | sed -e 's/^"//' -e 's/"$//')
+ OS_URL=$(cat /etc/os-release | grep ^HOME_URL= | cut -d= -f 2 | sed -e 's/^"//' -e 's/"$//')
+ else
+ # otherwise use lsb_release (Linux Standard Base) when available
+ LSB_RELEASE=`which lsb_release`
+ if [ 0 -eq $? ]; then
+ OS_NAME=`${LSB_RELEASE} -i -s`
+ OS_VERSION=`${LSB_RELEASE} -r -s`
+ case $OS_NAME in
+ Debian)
+ OS_URL=http://www.debian.org/
+ OS_VERSION=`${LSB_RELEASE} -c -s`
+ ;;
+ Ubuntu)
+ OS_URL=http://www.ubuntu.com/
+ OS_VERSION=`${LSB_RELEASE} -c -s`
+ ;;
+ Gentoo)
+ OS_URL=http://www.gentoo.org/
+ ;;
+ arch)
+ OS_URL=http://www.archlinux.org/
+ OS_VERSION=`uname -r`
+ ;;
+ esac
+ fi
fi
echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE}
FW=netfilter
|