SYSTEMD: Use sysconfig file for different device options
authorAnas Nashif <anas.nashif@intel.com>
Tue, 17 Jul 2012 12:26:00 +0000 (08:26 -0400)
committerAnas Nashif <anas.nashif@intel.com>
Tue, 17 Jul 2012 12:44:45 +0000 (08:44 -0400)
- Fixes bug TDIS-95
- in the ks file, we need to set the right options for the device:

and in the %post of the ks file, write the correct options for the specific device
cat > /etc/sysconfig/connman <<EOF
OPTIONS="-Woption"
EOF

Change-Id: I8697ef852d95947baea0de671b0042ab94b606fe

packaging/connman.spec
src/connman.service.in

index 944d868..52046fe 100644 (file)
@@ -89,10 +89,10 @@ cp src/connman.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/
 %post
 systemctl daemon-reload
 systemctl restart connman.service
+
 %preun
 systemctl stop connman.service
+
 %postun
 systemctl daemon-reload
 
index a234a0c..c155955 100644 (file)
@@ -3,9 +3,10 @@ Description=Connection service
 After=syslog.target
 
 [Service]
+EnvironmentFile=-/etc/sysconfig/connman
 Type=dbus
 BusName=net.connman
-ExecStart=@prefix@/sbin/connmand -n
+ExecStart=@prefix@/sbin/connmand -n $OPTIONS
 
 [Install]
 WantedBy=multi-user.target