PIDFile=/tmp/.sdbd.pid
RemainAfterExit=yes
ExecStart=/usr/sbin/sdbd
+USBFunctionDescriptors=/etc/sdbd/descs
+USBFunctionStrings=/etc/sdbd/strs
--- /dev/null
+[Unit]
+Description=sdbd Socket for sdb
+
+[Socket]
+ListenUSBFunction=/dev/usb-funcs/sdb
+Service=sdbd.service
Source1004: sdbd_tcp.service
Source1005: sdbd_device_tv.service
Source1006: sdbd_emulator_tv.service
+Source1007: sdbd.socket
BuildRequires: capi-system-info-devel >= 0.2.0
BuildRequires: cmake >= 2.8.3
mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d/
install -m 644 rules/99-sdbd.rules %{buildroot}%{_prefix}/lib/udev/rules.d/
+install -m 0644 %SOURCE1007 %{buildroot}%{_unitdir}/sdbd.socket
mkdir -p %{buildroot}%{_prefix}/sbin
install -m 755 script/sdk_launch %{buildroot}%{_prefix}/sbin/
%{_prefix}/sbin/sdk_launch
%attr(0755, root, root) %{_sysconfdir}/init.d/sdbd
%{_unitdir}/sdbd.service
+%{_unitdir}/sdbd.socket
%{_unitdir}/sdbd_tcp.service
%{_unitdir}/multi-user.target.wants/sdbd.service
%{_prefix}/lib/udev/rules.d/99-sdbd.rules
--- /dev/null
+[Unit]
+Description=sdbd Socket for %I
+
+[Socket]
+ListenUSBFunction=%I
+Service=sdbd.service
Capabilities=cap_dac_override,cap_setgid,cap_setuid,cap_sys_admin=i
SecureBits=keep-caps
ExecStart=/usr/sbin/sdbd
+USBFunctionDescriptors=/etc/sdbd/descs
+USBFunctionStrings=/etc/sdbd/strs
[Install]
WantedBy=multi-user.target
Capabilities=cap_dac_override,cap_setgid,cap_setuid,cap_sys_admin=i
SecureBits=keep-caps
ExecStart=/usr/sbin/sdbd
+USBFunctionDescriptors=/etc/sdbd/descs
+USBFunctionStrings=/etc/sdbd/strs
[Install]
WantedBy=multi-user.target
Capabilities=cap_dac_override,cap_setgid,cap_setuid,cap_sys_admin=i
SecureBits=keep-caps
ExecStart=/bin/sh -c "/usr/sbin/sdbd `/usr/bin/awk '{match($0, /sdb_port=([0-9]+)/,port_match); match($0, /vm_name=([^, ]*)/,vm_match); print \"--emulator=\" vm_match[1] \":\" port_match[1] \" --connect-to=10.0.2.2:26099\" \" --sensors=10.0.2.2:\"port_match[1]+3 }' /proc/cmdline`"
+USBFunctionDescriptors=/etc/sdbd/descs
+USBFunctionStrings=/etc/sdbd/strs
[Install]
WantedBy=emulator_preinit.target