[lxc-devel] [lxc/master] lxc.spec.in: fixed hardcoded path to lxc-net config file

ojkastl on Github lxc-bot at linuxcontainers.org
Thu Mar 24 08:22:04 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 436 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160324/508a7022/attachment.bin>
-------------- next part --------------
From bf3843213405d02d905a1392631a991828cd1743 Mon Sep 17 00:00:00 2001
From: Johannes Kastl <git at ojkastl.de>
Date: Thu, 24 Mar 2016 09:16:53 +0100
Subject: [PATCH] lxc.spec.in: fixed hardcoded path to lxc-net config file

---
 lxc.spec.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxc.spec.in b/lxc.spec.in
index d0816d3..9cc8dc5 100644
--- a/lxc.spec.in
+++ b/lxc.spec.in
@@ -169,7 +169,7 @@ fi
 
 %post
 # This test should trigger a network configure on a new install.
-if [ ! -f %{_sysconfdir}/sysconfig/lxc-net ] || ! grep -q 'USE_LXC_BRIDGE=' %{_sysconfdir}/sysconfig/lxc-net
+if [ ! -f @LXC_DISTRO_SYSCONF@/lxc-net ] || ! grep -q 'USE_LXC_BRIDGE=' @LXC_DISTRO_SYSCONF@/lxc-net
 then
 	# Grab a random 10net subnet.  Need to add test logic...
 	while [ true ]
@@ -181,7 +181,7 @@ then
 		fi
 	done
 
-	cat >  %{_sysconfdir}/sysconfig/lxc-net <<EOF
+	cat >  @LXC_DISTRO_SYSCONF@/lxc-net <<EOF
 # Leave USE_LXC_BRIDGE as "true" if you want to use lxcbr0 for your
 # containers.  Set to "false" if you'll use virbr0 or another existing
 # bridge, or mavlan to your host's NIC.


More information about the lxc-devel mailing list