Whamcloud - gitweb
LU-9098 lnet: Move lnet_routes.conf to /etc
[fs/lustre-release.git] / lustre / scripts / lnet
index 7bca8e2..01f7e4f 100644 (file)
@@ -52,23 +52,6 @@ run_postexec_check ()
        fi
 }
 
-stop_lnet ()
-{
-       local errmsg=$(/usr/sbin/lctl network down 2>&1)
-       if [ $? -gt 0 ]; then
-               # The following error message means that lnet is already
-               # unconfigured, and the modules are not loaded.
-               echo $errmsg | grep "LNET unconfigure error 19" > /dev/null
-               if [ $? -gt 0 ]; then
-                       return 0
-               else
-                       echo "$errmsg"
-                       return 1
-               fi
-       fi
-       return 0
-}
-
 status ()
 {
        old_nullglob="`shopt -p nullglob`"
@@ -112,7 +95,7 @@ status ()
        eval $old_nullglob
 }
 
-LUSTRE_ROUTES_CONFIG_FILE="/etc/sysconfig/lnet_routes.conf"
+LUSTRE_ROUTES_CONFIG_FILE="/etc/lnet_routes.conf"
 LUSTRE_LNET_CONFIG_FILE="/etc/sysconfig/lnet.conf"
 LUSTRE_LNET_CONFIG_UTILITY="/usr/sbin/lnetctl"
 
@@ -148,7 +131,7 @@ case "$1" in
        ;;
   stop)
        run_preexec_check "stop"
-       stop_lnet || exit 1
+       lctl network down || exit 1
        lustre_rmmod || exit 1
        rm -f /var/lock/subsys/lnet
        run_postexec_check "stop"
@@ -175,7 +158,7 @@ case "$1" in
        }
        ;;
   *)
-       echo $"Usage: lustre {start|stop|status|restart|reload|condrestart}"
+       echo $"Usage: lnet {start|stop|status|restart|reload|condrestart}"
        exit 1
 esac