]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/commitdiff
gadget-init: minor logic cleanups
authorKoen Kooi <koen@dominion.thruhere.net>
Thu, 10 Nov 2011 11:42:14 +0000 (12:42 +0100)
committerKoen Kooi <koen@dominion.thruhere.net>
Thu, 10 Nov 2011 11:42:14 +0000 (12:42 +0100)
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
recipes-ti/beagleboard/gadget-init.bb
recipes-ti/beagleboard/gadget-init/network-gadget-init.service
recipes-ti/beagleboard/gadget-init/udhcpd.service

index 247d2e10d4dae09a93e3e677d105555e7a24f6c6..8ddefaa24caca7688ccdaa3b10523a79e94a7352 100644 (file)
@@ -1,6 +1,6 @@
 DESCRIPTION = "Units to initialize usb gadgets"
 
 DESCRIPTION = "Units to initialize usb gadgets"
 
-PR = "r9"
+PR = "r10"
 
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
 
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
@@ -24,7 +24,7 @@ do_install() {
        install -d ${D}${base_libdir}/systemd/system/basic.target.wants
        install -m 0644 ${WORKDIR}/*.service ${D}${base_libdir}/systemd/system
 
        install -d ${D}${base_libdir}/systemd/system/basic.target.wants
        install -m 0644 ${WORKDIR}/*.service ${D}${base_libdir}/systemd/system
 
-       for i in ${WORKDIR}/*.service ; do
+       for i in ${WORKDIR}/storage-gadget-init.service ; do
                install -m 0644 $i ${D}${base_libdir}/systemd/system
                ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/
        done
                install -m 0644 $i ${D}${base_libdir}/systemd/system
                ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/
        done
@@ -48,7 +48,7 @@ FILES_${PN}-storage = "${base_libdir}/systemd/system/storage-gadget-init.service
                        ${sysconfdir}/udev/rules.d/bone-gmass-eject.rules"
 
 FILES_${PN}-network = "${base_libdir}/systemd/system/network-gadget-init.service \
                        ${sysconfdir}/udev/rules.d/bone-gmass-eject.rules"
 
 FILES_${PN}-network = "${base_libdir}/systemd/system/network-gadget-init.service \
-                       ${base_libdir}systemd/system/basic.target.wants/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-load.sh \
                        ${bindir}/g-ether-start-service.sh"
 
index 979d8aa4314507c92ffd13f324954027fe02896d..1e226272efa64cfb1728eaeac267107312db7ab5 100644 (file)
@@ -4,6 +4,9 @@ Conflicts=storage-gadget-init.service
 
 [Service]
 RemainAfterExit=yes
 
 [Service]
 RemainAfterExit=yes
-ExecStart=/usr/bin/g-ether-load.sh
-ExecStartPost=/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252
+ExecStartPre=/usr/bin/g-ether-load.sh
+ExecStart=/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252
 ExecStop=/sbin/rmmod g_ether
 ExecStop=/sbin/rmmod g_ether
+
+[Install]
+WantedBy=gether.target
index f0766733fd9e48f9814c37a83831a156587584ce..1f4ac688de67ee2f9f6b971314c61851d1a87ad8 100644 (file)
@@ -1,6 +1,7 @@
 [Unit]
 Description=DHCP server for USB0 network gadget
 [Unit]
 Description=DHCP server for USB0 network gadget
-After=sys-devices-platform-omap-ti81xx\x2dusbss-musb\x2dhdrc.0-gadget-net-usb0.device
+After=dev-usb0.device
+Conflicts=storage-gadget-init.service
 
 [Service]
 ExecStart=/usr/sbin/udhcpd -f -S /etc/udhcpd.conf
 
 [Service]
 ExecStart=/usr/sbin/udhcpd -f -S /etc/udhcpd.conf
@@ -8,4 +9,4 @@ ExecStop=/bin/kill -TERM $MAINPID
 KillSignal=SIGINT
 
 [Install]
 KillSignal=SIGINT
 
 [Install]
-WantedBy=basic.target
+WantedBy=gether.target