SYSTEMD: Use sysconfig file for different device options
authorAnas Nashif <anas.nashif@intel.com>
Tue, 17 Jul 2012 12:33:07 +0000 (08:33 -0400)
committerAnas Nashif <anas.nashif@intel.com>
Tue, 17 Jul 2012 12:46:48 +0000 (08:46 -0400)
- Fixes bug TDIS-94
- 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/wpa_supplicant <<EOF
OPTIONS="-Woption"
EOF

Change-Id: If96287c2e49d09500596cca114e06b93550bfa66

packaging/wpa_supplicant.manifest [moved from packaging/wpasupplicant.manifest with 100% similarity]
packaging/wpa_supplicant.service [new file with mode: 0644]
packaging/wpa_supplicant.spec

diff --git a/packaging/wpa_supplicant.service b/packaging/wpa_supplicant.service
new file mode 100644 (file)
index 0000000..51cf977
--- /dev/null
@@ -0,0 +1,12 @@
+[Unit]
+Description=WPA Supplicant daemon
+Before=network.target
+
+[Service]
+Type=dbus
+BusName=fi.w1.wpa_supplicant1
+EnvironmentFile=-/etc/sysconfig/wpa_supplicant
+ExecStart=/usr/sbin/wpa_supplicant -u -t -B -ddd -f /var/log/wpa_supplicant.log $OPTIONS
+
+[Install]
+WantedBy=multi-user.target
index 8f42220..c68ab23 100644 (file)
@@ -5,7 +5,8 @@ License:        BSD license
 Summary:        Support for WPA and WPA2 (IEEE 802)
 Group:          System/Network
 Source0:        %{name}-%{version}.tar.gz
-Source1001:     wpasupplicant.manifest
+Source1:        wpa_supplicant.service
+Source1001:     wpa_supplicant.manifest
 
 BuildRequires:  pkgconfig(dbus-1)
 BuildRequires:  pkgconfig(libcrypto)
@@ -56,7 +57,7 @@ sed 's/^\([^#]\+=.*\|}\)/#\1/' < ./wpa_supplicant.conf | gzip > %{buildroot}%{_d
 
 # install systemd service file
 mkdir -p %{buildroot}%{_libdir}/systemd/system
-install -m 0644 systemd/wpa_supplicant.service %{buildroot}%{_libdir}/systemd/system/
+install -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/
 mkdir -p %{buildroot}%{_libdir}/systemd/system/network.target.wants
 ln -s ../wpa_supplicant.service %{buildroot}%{_libdir}/systemd/system/network.target.wants/wpa_supplicant.service
 
@@ -70,7 +71,7 @@ rm -rf %{buildroot}%{_sbindir}/wpa_passphrase
 
 
 %files
-%manifest wpasupplicant.manifest
+%manifest wpa_supplicant.manifest
 %{_sbindir}/wpa_cli
 %{_sbindir}/wpa_supplicant
 %attr(644,-,-) %{_sysconfdir}/dbus-1/system.d/*.conf