Whamcloud - gitweb
LU-3514 tests: combine dependent sanity tests
[fs/lustre-release.git] / lustre / scripts / lnet
index 7033891..62cbb39 100644 (file)
@@ -168,6 +168,8 @@ status ()
        eval $old_nullglob
 }
 
+LUSTRE_ROUTES_CONFIG_FILE="/etc/sysconfig/lnet_routes.conf"
+
 # See how we were called.
 case "$1" in
   start)
@@ -175,6 +177,13 @@ case "$1" in
        touch /var/lock/subsys/lnet
        modprobe lnet || exit 1
        lctl network up || exit 1
+       # if a routes config file is given then use it to configure the
+       # routes if not then default to LUSTRE_ROUTES_CONFIG_FILE
+       if [ -f "$2" ]; then
+               lustre_routes_config $2
+       elif [ -f "$LUSTRE_ROUTES_CONFIG_FILE" ]; then
+               lustre_routes_config $LUSTRE_ROUTES_CONFIG_FILE
+       fi
        run_postexec_check "start"
        ;;
   stop)