Use socket activation, fix rpmlint tabs vs spaces warnings.
This commit is contained in:
parent
31682fe72c
commit
2eb89b85eb
@ -1,18 +1,11 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=ACPI Event Daemon
|
Description=ACPI Event Daemon
|
||||||
After=syslog.target
|
Documentation=man:acpid(8)
|
||||||
|
Requires=acpid.socket
|
||||||
# This could probably benefit from socket activation, but honestly I think it
|
|
||||||
# is time for acpid to go away, and hence I am not planning to spend the time
|
|
||||||
# to add socket activation here. We use Type=forking to ensure that the
|
|
||||||
# communication sockets are in place before boot proceeds with any service
|
|
||||||
# needing this service. Would acpid support socket activation we could use
|
|
||||||
# Type=simple here.
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
|
||||||
EnvironmentFile=/etc/sysconfig/acpid
|
EnvironmentFile=/etc/sysconfig/acpid
|
||||||
ExecStart=/usr/sbin/acpid $OPTIONS
|
ExecStart=/usr/sbin/acpid -f $OPTIONS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
Also=acpid.socket
|
||||||
|
9
acpid.socket
Normal file
9
acpid.socket
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=ACPID Listen Socket
|
||||||
|
Documentation=man:acpid(8)
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=/var/run/acpid.socket
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
15
acpid.spec
15
acpid.spec
@ -8,7 +8,7 @@
|
|||||||
Summary: ACPI Event Daemon
|
Summary: ACPI Event Daemon
|
||||||
Name: acpid
|
Name: acpid
|
||||||
Version: 2.0.20
|
Version: 2.0.20
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source: http://downloads.sourceforge.net/acpid2/%{name}-%{version}.tar.xz
|
Source: http://downloads.sourceforge.net/acpid2/%{name}-%{version}.tar.xz
|
||||||
@ -18,6 +18,7 @@ Source3: acpid.power.conf
|
|||||||
Source4: acpid.power.sh
|
Source4: acpid.power.sh
|
||||||
Source5: acpid.service
|
Source5: acpid.service
|
||||||
Source6: acpid.sysconfig
|
Source6: acpid.sysconfig
|
||||||
|
Source7: acpid.socket
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
ExclusiveArch: ia64 x86_64 %{ix86}
|
ExclusiveArch: ia64 x86_64 %{ix86}
|
||||||
URL: http://sourceforge.net/projects/acpid2/
|
URL: http://sourceforge.net/projects/acpid2/
|
||||||
@ -63,7 +64,7 @@ chmod 755 %{buildroot}%{_sysconfdir}/acpi/events
|
|||||||
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/acpi/events/videoconf
|
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/acpi/events/videoconf
|
||||||
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/acpi/events/powerconf
|
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/acpi/events/powerconf
|
||||||
install -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/acpi/actions/power.sh
|
install -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/acpi/actions/power.sh
|
||||||
install -m 644 %{SOURCE5} %{buildroot}/lib/systemd/system
|
install -m 644 %{SOURCE5} %{SOURCE7} %{buildroot}/lib/systemd/system
|
||||||
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/acpid
|
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/acpid
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
|
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
|
||||||
@ -78,6 +79,7 @@ rm -rf %{buildroot}
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc %{_docdir}/%{name}
|
%doc %{_docdir}/%{name}
|
||||||
/lib/systemd/system/%{name}.service
|
/lib/systemd/system/%{name}.service
|
||||||
|
/lib/systemd/system/%{name}.socket
|
||||||
%dir %{_sysconfdir}/acpi
|
%dir %{_sysconfdir}/acpi
|
||||||
%dir %{_sysconfdir}/acpi/events
|
%dir %{_sysconfdir}/acpi/events
|
||||||
%dir %{_sysconfdir}/acpi/actions
|
%dir %{_sysconfdir}/acpi/actions
|
||||||
@ -108,13 +110,13 @@ if [ "$1" = "2" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post %{name}.service
|
%systemd_post %{name}.socket %{name}.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%systemd_preun %{name}.service
|
%systemd_preun %{name}.socket %{name}.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%systemd_postun_with_restart %{name}.service
|
%systemd_postun_with_restart %{name}.socket %{name}.service
|
||||||
|
|
||||||
%triggerun -- %{name} < 2.0.10-2
|
%triggerun -- %{name} < 2.0.10-2
|
||||||
/sbin/chkconfig --del acpid >/dev/null 2>&1 || :
|
/sbin/chkconfig --del acpid >/dev/null 2>&1 || :
|
||||||
@ -125,6 +127,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 10 2014 Ville Skyttä <ville.skytta@iki.fi> - 2.0.20-3
|
||||||
|
- Use socket activation, fix rpmlint tabs vs spaces warnings.
|
||||||
|
|
||||||
* Wed Nov 13 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.20-2
|
* Wed Nov 13 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.20-2
|
||||||
- Fixed loginctl and added support for cinnamon and mate (patch by Leigh Scott)
|
- Fixed loginctl and added support for cinnamon and mate (patch by Leigh Scott)
|
||||||
Resolves: rhbz#1029868
|
Resolves: rhbz#1029868
|
||||||
|
Loading…
Reference in New Issue
Block a user