packages: dhcp_probe/dhcp_probe.spec, dhcp_probe/dhcp_probe.sysconfig, dhcp...
baggins
baggins at pld-linux.org
Fri Apr 20 15:05:57 CEST 2012
Author: baggins Date: Fri Apr 20 13:05:57 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- add generator for systemd services
---- Files affected:
packages/dhcp_probe:
dhcp_probe.spec (1.2 -> 1.3) , dhcp_probe.sysconfig (1.1 -> 1.2) , dhcp_probe at .service (1.1 -> 1.2) , dhcp_probe-service-generator (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/dhcp_probe/dhcp_probe.spec
diff -u packages/dhcp_probe/dhcp_probe.spec:1.2 packages/dhcp_probe/dhcp_probe.spec:1.3
--- packages/dhcp_probe/dhcp_probe.spec:1.2 Fri Apr 20 13:53:28 2012
+++ packages/dhcp_probe/dhcp_probe.spec Fri Apr 20 15:05:52 2012
@@ -2,7 +2,7 @@
Summary: Tool for discovering DHCP and BootP servers
Name: dhcp_probe
Version: 1.3.0
-Release: 0.2
+Release: 0.3
License: GPLv2+ and MIT
Group: Applications
Source0: http://www.net.princeton.edu/software/dhcp_probe/%{name}-%{version}.tar.gz
@@ -10,6 +10,7 @@
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: dhcp_probe at .service
+Source4: dhcp_probe-service-generator
Patch0: dhcp_probe-guignard-03_implicit_point_conv_bootp.c.patch
Patch1: dhcp_probe-guignard-04_linux_32_or_64bits.patch
Patch2: dhcp_probe-virta-01-pcap-loop.patch
@@ -60,6 +61,7 @@
install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dhcp_probe
install -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe at .service
ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe.service
+install -p %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/generators/dhcp_probe-service-generator
%clean
rm -rf $RPM_BUILD_ROOT
@@ -87,6 +89,7 @@
%attr(755,root,root) %{_sbindir}/dhcp_probe
%attr(754,root,root) /etc/rc.d/init.d/dhcp_probe
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp_probe
+%attr(755,root,root) /lib/systemd/generators/dhcp_probe-service-generator
%{systemdunitdir}/%{name}.service
%{systemdunitdir}/%{name}@.service
%{_mandir}/man5/dhcp_probe.cf.5*
@@ -98,6 +101,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.3 2012/04/20 13:05:52 baggins
+- add generator for systemd services
+
Revision 1.2 2012/04/20 11:53:28 baggins
- fix build on 64 bit archs
- mask SysV service for systemd
================================================================
Index: packages/dhcp_probe/dhcp_probe.sysconfig
diff -u packages/dhcp_probe/dhcp_probe.sysconfig:1.1 packages/dhcp_probe/dhcp_probe.sysconfig:1.2
--- packages/dhcp_probe/dhcp_probe.sysconfig:1.1 Fri Apr 20 13:41:22 2012
+++ packages/dhcp_probe/dhcp_probe.sysconfig Fri Apr 20 15:05:52 2012
@@ -2,5 +2,4 @@
#DHCP_PROBE_OPTIONS=
# Space separated list of interfaces to listen on.
-# Only valid for SysV startup script.
#INTERFACES="eth0 eth1"
================================================================
Index: packages/dhcp_probe/dhcp_probe at .service
diff -u packages/dhcp_probe/dhcp_probe at .service:1.1 packages/dhcp_probe/dhcp_probe at .service:1.2
--- packages/dhcp_probe/dhcp_probe at .service:1.1 Fri Apr 20 13:41:22 2012
+++ packages/dhcp_probe/dhcp_probe at .service Fri Apr 20 15:05:52 2012
@@ -1,12 +1,3 @@
-# To set-up a new interface do the following (for example eth0):
-#
-# ln -s /lib/systemd/system/dhcp_probe at .service \
-# /etc/systemd/system/network.target.wants/dhcp_probe at eth0.service
-# or
-# cp -a /lib/systemd/system/dhcp_probe at .service \
-# /etc/systemd/system/network.target.wants/dhcp_probe at eth0.service
-# if you have to edit this service
-#
[Unit]
Description=Start dhcp_probe on %I
After=network.target
================================================================
Index: packages/dhcp_probe/dhcp_probe-service-generator
diff -u /dev/null packages/dhcp_probe/dhcp_probe-service-generator:1.1
--- /dev/null Fri Apr 20 15:05:57 2012
+++ packages/dhcp_probe/dhcp_probe-service-generator Fri Apr 20 15:05:52 2012
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+[ -f /etc/sysconfig/dhcp_probe ] && . /etc/sysconfig/dhcp_probe
+
+for nic in $INTERFACES; do
+ [ -d /run/systemd/generator/multi-user.target.wants ] || \
+ mkdir -p /run/systemd/generator/multi-user.target.wants
+ ln -s /lib/systemd/system/dhcp_probe at .service \
+ /run/systemd/generator/multi-user.target.wants/dhcp_probe@$nic.service
+done
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/dhcp_probe/dhcp_probe.spec?r1=1.2&r2=1.3
http://cvs.pld-linux.org/packages/dhcp_probe/dhcp_probe.sysconfig?r1=1.1&r2=1.2
http://cvs.pld-linux.org/packages/dhcp_probe/dhcp_probe@.service?r1=1.1&r2=1.2
More information about the pld-cvs-commit
mailing list