diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-09-30 18:46:00 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-09-30 23:54:17 -0700 |
commit | d30427f475f273ab8c5dd83b2c076bb4fc8a9a82 (patch) | |
tree | 0a34c779e44caa596fabe9a01bc9ffcb5b3f13f2 /meta-networking | |
parent | 7d54d59df08369e9695b398b7b2b696af8b7cfac (diff) | |
download | meta-openembedded-d30427f475f273ab8c5dd83b2c076bb4fc8a9a82.tar.gz |
openl2tp: Fix ptests
- Detect active network interface to use, instead of asking user, this needs
to run in automation
- Find the location of ppp_null.so with find instead of rpm, rpm is a distro choice
it can be assumed to be always there.
- Add missing runtime deps for ptests
- Kill openl2tpd started by run-ptest script before exiting, otherwise
ptest runner hangs forever.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest | 7 | ||||
-rw-r--r-- | meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest b/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest index 01c9c7b447..b8fb08b758 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest | |||
@@ -30,9 +30,7 @@ else | |||
30 | fi | 30 | fi |
31 | 31 | ||
32 | #read -p "Please input the network interface you use to test(such as eth0, em1 etc):" ETH_TEST | 32 | #read -p "Please input the network interface you use to test(such as eth0, em1 etc):" ETH_TEST |
33 | echo "Please input the network interface you use to test(such as eth0, em1 etc):" | 33 | ETH_TEST=`ip route get 8.8.8.8 | awk -- '{print $5}'` |
34 | read ETH_TEST > /dev/null | ||
35 | |||
36 | if [ x"$ETH_TEST" = x ]; then | 34 | if [ x"$ETH_TEST" = x ]; then |
37 | exit_cus "The network interface cannot be null" 1 | 35 | exit_cus "The network interface cannot be null" 1 |
38 | fi | 36 | fi |
@@ -73,7 +71,7 @@ lsmod | grep l2tp_ppp > /dev/null || exit_cus "FAIL: Load module l2tp_ppp" 2 | |||
73 | 71 | ||
74 | # start openl2tpd | 72 | # start openl2tpd |
75 | ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null | 73 | ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null |
76 | ppp_path=`rpm -ql openl2tp | grep ppp_null.so` | 74 | ppp_path=`find / -name ppp_null.so` |
77 | echo "test it here" | 75 | echo "test it here" |
78 | /usr/sbin/openl2tpd -d all -D -f -p ${ppp_path} & > /dev/null | 76 | /usr/sbin/openl2tpd -d all -D -f -p ${ppp_path} & > /dev/null |
79 | 77 | ||
@@ -95,3 +93,4 @@ else | |||
95 | fi | 93 | fi |
96 | 94 | ||
97 | restore_file | 95 | restore_file |
96 | ps aux | grep openl2tpd | grep -v grep > /dev/null && killall openl2tpd > /dev/null | ||
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb index f64c7340d1..f3b74d1e61 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb | |||
@@ -94,3 +94,4 @@ do_install_ptest () { | |||
94 | } | 94 | } |
95 | 95 | ||
96 | RDEPENDS:${PN} = "ppp ppp-l2tp bash" | 96 | RDEPENDS:${PN} = "ppp ppp-l2tp bash" |
97 | RDEPENDS:${PN}-ptest += "rpcbind kernel-module-l2tp-ppp procps-ps tcl" | ||