1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-05-06 11:32:38 +00:00

udhcpd: Fixes and new udev rule

This moves the logic to configure and start dhcp to a udev rule which
is a better place than a systemd service

Also fixes a bug where stopping and starting network service would
cause dhcp to fail.

Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Joel A Fernandes
2011-11-11 08:51:47 -06:00
committed by Koen Kooi
parent 245e5c80ca
commit 77e4288231
4 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
DESCRIPTION = "Units to initialize usb gadgets"
PR = "r10"
PR = "r11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
@@ -15,6 +15,7 @@ SRC_URI = "file://storage-gadget-init.service \
file://99-hokey-pokey.rules \
file://hokey-pokey.sh \
file://bone-gmass-eject.rules \
file://udhcpd.rules \
file://g-storage-reinsert.sh \
file://g-ether-start-service.sh \
file://g-ether-load.sh \
@@ -50,7 +51,8 @@ FILES_${PN}-storage = "${base_libdir}/systemd/system/storage-gadget-init.service
FILES_${PN}-network = "${base_libdir}/systemd/system/network-gadget-init.service \
${base_libdir}/systemd/system/basic.target.wants/network-gadget-init.service \
${bindir}/g-ether-load.sh \
${bindir}/g-ether-start-service.sh"
${bindir}/g-ether-start-service.sh \
${sysconfdir}/udev/rules.d/udhcpd.rules"
FILES_${PN}-udhcpd = "${base_libdir}/systemd/system/udhcpd.service \
${base_libdir}/systemd/system/basic.target.wants/udhcpd.service \

View File

@@ -6,6 +6,5 @@ then
then
/bin/systemctl stop storage-gadget-init.service
/bin/systemctl start network-gadget-init.service
/bin/systemctl start udhcpd.service
fi
fi

View File

@@ -4,8 +4,7 @@ Conflicts=storage-gadget-init.service
[Service]
RemainAfterExit=yes
ExecStartPre=/usr/bin/g-ether-load.sh
ExecStart=/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252
ExecStart=/usr/bin/g-ether-load.sh
ExecStop=/sbin/rmmod g_ether
[Install]

View File

@@ -0,0 +1,2 @@
SUBSYSTEM=="net",ACTION=="add",KERNEL=="usb0",RUN+="/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252",RUN+="/bin/systemctl start udhcpd.service"
SUBSYSTEM=="net",ACTION=="remove",KERNEL=="usb0",RUN+="/bin/systemctl stop udhcpd.service"