The tipc-config command is obsolete and no longer being maintained. We should switch to using the "tipc" command instead --- Makefile.am | 3 ++- opensaf.spec.in | 1 + .../archive/scripts => scripts}/tipc-config | 2 +- src/nid/configure_tipc.in | 6 +++--- src/nid/opensafd.in | 20 +++++++++++-------- tools/cluster_sim_uml/build_uml | 2 +- 6 files changed, 20 insertions(+), 14 deletions(-) rename {tools/cluster_sim_uml/archive/scripts => scripts}/tipc-config (99%)
diff --git a/Makefile.am b/Makefile.am index b3d6553c1..6d86ec180 100644 --- a/Makefile.am +++ b/Makefile.am @@ -159,7 +159,8 @@ dist_osaf_execbin_SCRIPTS += \ $(top_srcdir)/scripts/opensaf_reboot \ $(top_srcdir)/scripts/opensaf_sc_active \ $(top_srcdir)/scripts/opensaf_scale_out \ - $(top_srcdir)/scripts/plm_scale_out + $(top_srcdir)/scripts/plm_scale_out \ + $(top_srcdir)/scripts/tipc-config include $(top_srcdir)/src/ais/Makefile.am include $(top_srcdir)/src/base/Makefile.am diff --git a/opensaf.spec.in b/opensaf.spec.in index 0effd59cd..37be5de6d 100644 --- a/opensaf.spec.in +++ b/opensaf.spec.in @@ -950,6 +950,7 @@ fi %{_pkglibdir}/plm_scale_out %{_pkglibdir}/opensaf_sc_active %{_pkglibdir}/configure_tipc +%{_pkglibdir}/tipc-config %files amf-libs diff --git a/tools/cluster_sim_uml/archive/scripts/tipc-config b/scripts/tipc-config similarity index 99% rename from tools/cluster_sim_uml/archive/scripts/tipc-config rename to scripts/tipc-config index f9fd47937..a5c9c4091 100755 --- a/tools/cluster_sim_uml/archive/scripts/tipc-config +++ b/scripts/tipc-config @@ -1,4 +1,4 @@ -#!/bin/ash +#!/bin/bash # # -*- OpenSAF -*- # diff --git a/src/nid/configure_tipc.in b/src/nid/configure_tipc.in index 33621a0ef..2ba3483f3 100644 --- a/src/nid/configure_tipc.in +++ b/src/nid/configure_tipc.in @@ -98,9 +98,9 @@ fi ETH_NAME=$2 TIPC_NETID=$3 -if ! [ -x "${tipc_config}" ]; then - echo "error: tipc-config is not available" - exit 1 +# Prefer using `tipc` instead of obsoleted `tipc-config` +if [ -x "${tipc}" ]; then + tipc_config="${pkglibdir}"/tipc-config fi # Get the Chassis Id and Slot Id from @sysconfdir@/@PACKAGE_NAME@/chassis_id and @sysconfdir@/@PACKAGE_NAME@/slot_id diff --git a/src/nid/opensafd.in b/src/nid/opensafd.in index 94888039a..f85cf5b0c 100644 --- a/src/nid/opensafd.in +++ b/src/nid/opensafd.in @@ -50,7 +50,7 @@ osafcshash=@INTERNAL_VERSION_ID@ unload_tipc() { # Unload TIPC if already loaded - if [ $MANAGE_TIPC = "yes" ] && grep tipc /proc/modules >/dev/null 2>&1; then + if [ "$MANAGE_TIPC" = "yes" ] && grep tipc /proc/modules >/dev/null 2>&1; then modprobe -r tipc >/dev/null 2>&1 if [ $? -eq 1 ]; then logger -t $osafprog "warning: TIPC module unloading failed" @@ -59,13 +59,17 @@ unload_tipc() { } check_tipc() { - # Exit if tipc-config is not installed - if [ "$MANAGE_TIPC" = "yes" ] && [ ! -x /sbin/tipc-config ]; then - which tipc-config >/dev/null 2>&1 - if [ $? -eq 1 ] ; then - logger -s -t $osafprog "Can't find tipc-config in the PATH, exiting." - exit 5 - fi + + if [ "$MANAGE_TIPC" != "yes" ]; then + return 0 + fi + + tipc=$(which tipc 2> /dev/null) + tipc_config=$(which tipc-config 2> /dev/null) + + if ! [ -x "${tipc}" ] && ! [ -x "${tipc_config}" ]; then + logger -s -t $osafprog "error: neither tipc nor tipc-config is available" + exit 1 fi unload_tipc diff --git a/tools/cluster_sim_uml/build_uml b/tools/cluster_sim_uml/build_uml index ce9e8a9f5..8e48bb5a5 100755 --- a/tools/cluster_sim_uml/build_uml +++ b/tools/cluster_sim_uml/build_uml @@ -225,7 +225,7 @@ cmd_create_rootfs() install -m 755 $archive/scripts/*.rc etc/init.d cp $scripts/profile etc - cp $scripts/reboot $scripts/shutdown $scripts/tipc-config usr/sbin + cp $scripts/reboot $scripts/shutdown $opensaf_home/scripts/tipc-config usr/sbin mkdir -p root/www/cgi-bin cp $scripts/rshd root/www/cgi-bin cp $scripts/rsh $scripts/rcp $scripts/sudo usr/bin -- 2.17.1 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel