diff options
author | Sangjung Woo <sangjung.woo@samsung.com> | 2016-11-16 14:16:20 +0900 |
---|---|---|
committer | Sangjung Woo <sangjung.woo@samsung.com> | 2016-11-16 20:46:14 +0900 |
commit | 863335a0dec22abbc9d2444e9031db15b6822707 (patch) | |
tree | b2f9c0a4024601c58b113b2514233791a4ac3871 | |
parent | 791ae807fbebce2779eb62465ff2df5bb8c31b60 (diff) | |
download | system-plugin-863335a0dec22abbc9d2444e9031db15b6822707.tar.gz system-plugin-863335a0dec22abbc9d2444e9031db15b6822707.tar.bz2 system-plugin-863335a0dec22abbc9d2444e9031db15b6822707.zip |
udev: use fixed IP address for Clustersubmit/tizen_3.0/20161116.231358accepted/tizen/3.0/wearable/20161117.022344accepted/tizen/3.0/tv/20161117.022321accepted/tizen/3.0/mobile/20161117.022309accepted/tizen/3.0/ivi/20161117.022406accepted/tizen/3.0/common/20161117.090722
This patch assigns the fixed IP address to USB Ethernet device to
communicate with the Cluster device.
Change-Id: I5f9e37d7b729517577cc646c92fc38a1577414ff
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
-rw-r--r-- | packaging/system-plugin.spec | 10 | ||||
-rw-r--r-- | rules/99-usb-ethernet.rules | 6 | ||||
-rw-r--r-- | scripts/usb_net_init.sh | 9 |
3 files changed, 21 insertions, 4 deletions
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index 1bfacec..3622003 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -131,7 +131,6 @@ mkdir -p %{buildroot}/csa mkdir -p %{buildroot}/initrd install -m 644 units/resize2fs@.service %{buildroot}%{_unitdir} install -m 644 units/tizen-system-env.service %{buildroot}%{_unitdir} -install -m 644 units/ivi-network.service %{buildroot}%{_unitdir} # csa mount install -m 644 units/csa.mount %{buildroot}%{_unitdir} @@ -149,11 +148,11 @@ ln -s ../resize2fs@.service %{buildroot}%{_unitdir}/basic.target.wants/resize2fs ln -s ../resize2fs@.service %{buildroot}%{_unitdir}/basic.target.wants/resize2fs@dev-disk-by\\x2dpartlabel-rootfs.service ln -s ../tizen-system-env.service %{buildroot}%{_unitdir}/basic.target.wants/tizen-system-env.service -%install_service multi-user.target.wants ivi-network.service mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d/ install -m 644 rules/51-system-plugin-exynos.rules %{buildroot}%{_prefix}/lib/udev/rules.d/ install -m 644 rules/51-system-plugin-spreadtrum.rules %{buildroot}%{_prefix}/lib/udev/rules.d/ +install -m 644 rules/99-usb-ethernet.rules %{buildroot}%{_prefix}/lib/udev/rules.d/ # fstab mkdir -p %{buildroot}%{_sysconfdir} @@ -185,6 +184,9 @@ install -m 644 units/offline-update.service %{buildroot}%{_unitdir} ln -s ../offline-update.service %{buildroot}%{_unitdir}/system-update.target.wants/offline-update.service ln -s %{_datadir}/upgrade %{buildroot}/system-update +# ivi +install -m 755 scripts/usb_net_init.sh %{buildroot}%{_bindir} + # fixed-multi-user install -m 775 -D scripts/fixed-multi-user.sh %{buildroot}%{_datadir}/fixed_multiuser/fixed-multi-user.sh @@ -314,5 +316,5 @@ cp -a /usr/lib/systemd/system/user\@.service /usr/lib/systemd/system/__user@.ser echo 'RemainAfterExit=yes' >> /usr/lib/systemd/system/user\@.service %files profile_ivi -%{_unitdir}/ivi-network.service -%{_unitdir}/multi-user.target.wants/ivi-network.service +%{_prefix}/lib/udev/rules.d/99-usb-ethernet.rules +%{_bindir}/usb_net_init.sh diff --git a/rules/99-usb-ethernet.rules b/rules/99-usb-ethernet.rules new file mode 100644 index 0000000..6c0307d --- /dev/null +++ b/rules/99-usb-ethernet.rules @@ -0,0 +1,6 @@ +# USB ETHERNET +SUBSYSTEM!="net", GOTO="usb_ethernet_end" + +ACTION=="add", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="8152", RUN+="/usr/bin/usb_net_init.sh %k" + +LABEL="usb_ethernet_end" diff --git a/scripts/usb_net_init.sh b/scripts/usb_net_init.sh new file mode 100644 index 0000000..ab245b1 --- /dev/null +++ b/scripts/usb_net_init.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +interface=$1 + +/sbin/ifconfig ${interface} down +/sbin/ifconfig ${interface} 192.20.16.11 +/sbin/ifconfig ${interface} up + |