Replace brctl with ip (remove bridge-utils dependency) 52/39552/3
authorDariusz Michaluk <d.michaluk@samsung.com>
Mon, 18 May 2015 14:05:25 +0000 (16:05 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Tue, 19 May 2015 11:06:14 +0000 (04:06 -0700)
[Feature]       N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run server.

Change-Id: I8acbaff403d611df82bbebaef5d6281defb2acf8

packaging/vasum.spec
server/configs/templates/template.sh
server/configs/templates/tizen-common-wayland.sh

index 22a6363..11c1599 100644 (file)
@@ -27,7 +27,7 @@ BuildRequires:  pkgconfig(libsystemd-journal)
 BuildRequires:  pkgconfig(libsystemd-daemon)
 BuildRequires:  pkgconfig(sqlite3)
 Requires(post): libcap-tools
-Requires:       bridge-utils
+Requires:       iproute2
 Requires:       libjson >= 0.10
 
 %description
index 82cd0f9..945c434 100755 (executable)
@@ -61,10 +61,9 @@ EOF
 # prepare pre start hook
 > ${path}/pre-start.sh
 cat <<EOF >> ${path}/pre-start.sh
-if [ -z "\$(/usr/sbin/brctl show | /bin/grep -P "${br_name}\t")" ]
+if [ -z "\$(/usr/sbin/ip show | /bin/grep -P "${br_name}\t")" ]
 then
-    /usr/sbin/brctl addbr ${br_name}
-    /usr/sbin/brctl setfd ${br_name} 0
+    /usr/sbin/ip link add name ${br_name} type bridge
     /sbin/ifconfig ${br_name} ${ipv4_gateway} netmask 255.255.255.0 up
 fi
 if [ -z "\$(/usr/sbin/iptables -t nat -S | /bin/grep MASQUERADE)" ]
index 48a2ff9..40e401c 100755 (executable)
@@ -277,10 +277,9 @@ EOF
 
 # Prepare zone hook files
 cat <<EOF >>${path}/hooks/pre-start.sh
-if [ -z "\$(/usr/sbin/brctl show | /bin/grep -P "${br_name}\t")" ]
+if [ -z "\$(/usr/sbin/ip show | /bin/grep -P "${br_name}\t")" ]
 then
-    /usr/sbin/brctl addbr ${br_name}
-    /usr/sbin/brctl setfd ${br_name} 0
+    /usr/sbin/ip link add name ${br_name} type bridge
     /sbin/ifconfig ${br_name} ${ipv4_gateway} netmask 255.255.255.0 up
 fi
 if [ -z "\$(/usr/sbin/iptables -t nat -S | /bin/grep MASQUERADE)" ]