summaryrefslogtreecommitdiffstats
path: root/recipes-ti/beagleboard/gadget-init
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-ti/beagleboard/gadget-init')
-rwxr-xr-xrecipes-ti/beagleboard/gadget-init/g-ether-start-service.sh1
-rw-r--r--recipes-ti/beagleboard/gadget-init/network-gadget-init.service3
-rw-r--r--recipes-ti/beagleboard/gadget-init/udhcpd.rules2
3 files changed, 3 insertions, 3 deletions
diff --git a/recipes-ti/beagleboard/gadget-init/g-ether-start-service.sh b/recipes-ti/beagleboard/gadget-init/g-ether-start-service.sh
index 2db16c26..076a5fe8 100755
--- a/recipes-ti/beagleboard/gadget-init/g-ether-start-service.sh
+++ b/recipes-ti/beagleboard/gadget-init/g-ether-start-service.sh
@@ -6,6 +6,5 @@ then
6 then 6 then
7 /bin/systemctl stop storage-gadget-init.service 7 /bin/systemctl stop storage-gadget-init.service
8 /bin/systemctl start network-gadget-init.service 8 /bin/systemctl start network-gadget-init.service
9 /bin/systemctl start udhcpd.service
10 fi 9 fi
11fi 10fi
diff --git a/recipes-ti/beagleboard/gadget-init/network-gadget-init.service b/recipes-ti/beagleboard/gadget-init/network-gadget-init.service
index 1e226272..0ee29147 100644
--- a/recipes-ti/beagleboard/gadget-init/network-gadget-init.service
+++ b/recipes-ti/beagleboard/gadget-init/network-gadget-init.service
@@ -4,8 +4,7 @@ Conflicts=storage-gadget-init.service
4 4
5[Service] 5[Service]
6RemainAfterExit=yes 6RemainAfterExit=yes
7ExecStartPre=/usr/bin/g-ether-load.sh 7ExecStart=/usr/bin/g-ether-load.sh
8ExecStart=/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252
9ExecStop=/sbin/rmmod g_ether 8ExecStop=/sbin/rmmod g_ether
10 9
11[Install] 10[Install]
diff --git a/recipes-ti/beagleboard/gadget-init/udhcpd.rules b/recipes-ti/beagleboard/gadget-init/udhcpd.rules
new file mode 100644
index 00000000..db65f9ac
--- /dev/null
+++ b/recipes-ti/beagleboard/gadget-init/udhcpd.rules
@@ -0,0 +1,2 @@
1SUBSYSTEM=="net",ACTION=="add",KERNEL=="usb0",RUN+="/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252",RUN+="/bin/systemctl start udhcpd.service"
2SUBSYSTEM=="net",ACTION=="remove",KERNEL=="usb0",RUN+="/bin/systemctl stop udhcpd.service"