Hi Thuan, When i run with "if [ $? -ne 0 ]; then" , the test_shellcheck is failed. So I use ret_val.
Best Regards, ThienHuynh -----Original Message----- From: Tran Thuan <thuan.t...@dektech.com.au> Sent: Friday, November 8, 2019 9:11 AM To: 'thien.m.huynh' <thien.m.hu...@dektech.com.au>; vu.m.ngu...@dektech.com.au Cc: opensaf-devel@lists.sourceforge.net Subject: RE: [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110] Hi Thien, ACK with minor comment inline. Best Regards, ThuanTr -----Original Message----- From: thien.m.huynh <thien.m.hu...@dektech.com.au> Sent: Thursday, November 7, 2019 2:26 PM To: thuan.t...@dektech.com.au; vu.m.ngu...@dektech.com.au Cc: opensaf-devel@lists.sourceforge.net; thien.m.huynh <thien.m.hu...@dektech.com.au> Subject: [PATCH 1/1] nid: Change the path of TIPC_MODULE [#3110] --- src/nid/configure_tipc.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in index 73dd1cb..218de65 100644 --- a/src/nid/configure_tipc.in +++ b/src/nid/configure_tipc.in @@ -21,7 +21,11 @@ . $pkgsysconfdir/nid.conf MANAGE_TIPC=${OPENSAF_MANAGE_TIPC:-"yes"} -TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc.ko +TIPC_MODULE=$(modinfo tipc -n 2> /dev/null) ret_val=$? [Thuan] Not really need ret_val, can use $? In below IF, e.g: if [ $? -ne 0 ]; then +if [ $ret_val -ne 0 ] ; then + TIPC_MODULE=/lib/modules/$(uname -r)/kernel/net/tipc/tipc.ko fi CHASSIS_ID_FILE=$pkgsysconfdir/chassis_id SLOT_ID_FILE=$pkgsysconfdir/slot_id SUBSLOT_ID_FILE=$pkgsysconfdir/subslot_id -- 2.7.4 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel