]> git.pld-linux.org Git - packages/dhcp_probe.git/commitdiff
- add generator for systemd services
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 20 Apr 2012 13:05:52 +0000 (13:05 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dhcp_probe-service-generator -> 1.1
    dhcp_probe.spec -> 1.3
    dhcp_probe.sysconfig -> 1.2
    dhcp_probe@.service -> 1.2

dhcp_probe-service-generator [new file with mode: 0644]
dhcp_probe.spec
dhcp_probe.sysconfig
dhcp_probe@.service

diff --git a/dhcp_probe-service-generator b/dhcp_probe-service-generator
new file mode 100644 (file)
index 0000000..dd4fef5
--- /dev/null
@@ -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@.service \
+               /run/systemd/generator/multi-user.target.wants/dhcp_probe@$nic.service
+done
index 817eb80ae32fe245e9f217d2568294759f3b3207..a49c9d48a0a33156a51582aa5b0e3316e3688f95 100644 (file)
@@ -1,7 +1,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
@@ -9,6 +9,7 @@ Source0:        http://www.net.princeton.edu/software/dhcp_probe/%{name}-%{version}.tar
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       dhcp_probe@.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
@@ -59,6 +60,7 @@ install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp_probe
 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dhcp_probe
 install -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe@.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
@@ -86,6 +88,7 @@ fi
 %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*
index ce081951327710e0343fdaef2c219b4267c2ab71..bf192e818f2431eb69b4b9009d1b57a28e1725d9 100644 (file)
@@ -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 d716cae6117d186446ae70326208fd25ada2214a..ed92984b74d3e64d714777db764cf9e1422fd8c4 100644 (file)
@@ -1,12 +1,3 @@
-# To set-up a new interface do the following (for example eth0):
-#
-# ln -s /lib/systemd/system/dhcp_probe@.service \
-#              /etc/systemd/system/network.target.wants/dhcp_probe@eth0.service
-# or
-# cp -a /lib/systemd/system/dhcp_probe@.service \
-#              /etc/systemd/system/network.target.wants/dhcp_probe@eth0.service
-# if you have to edit this service
-#
 [Unit]
 Description=Start dhcp_probe on %I
 After=network.target
This page took 0.093125 seconds and 4 git commands to generate.