From: Andreas Dilger Date: Tue, 26 Nov 2013 19:55:51 +0000 (-0700) Subject: LU-3862 misc: delete obsolete config script X-Git-Tag: 2.5.53~38 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=64de2f7501738c8a1eb9938673176758e8106336 LU-3862 misc: delete obsolete config script The "lustre" and "lnet" config scripts are currently in use for Lustre/LNET startup/shutdown, but "lustrefs" hasn't been maintained since it was first introduced. Delete it. Signed-off-by: Andreas Dilger Change-Id: Idd77c4a60a1128ad95ec5c8af644feb8793ebbe5 Reviewed-on: http://review.whamcloud.com/8403 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Christopher J. Morrone Reviewed-by: Oleg Drokin --- diff --git a/lustre/scripts/lustrefs b/lustre/scripts/lustrefs deleted file mode 100644 index 18c32b1..0000000 --- a/lustre/scripts/lustrefs +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/bash -# -# lustrefs Mount Lustre filesystems. -# -# Authors: Jacob Berkman -# -# Based on the netfs script: -# -# Authors: Bill Nottingham -# Miquel van Smoorenburg, -# -# chkconfig: - 26 74 -# description: Mounts and unmounts all Lustre mount points. -# -### BEGIN INIT INFO -# Provides: lustrefs -# Required-Start: $network $remote_fs +sshd +lustre -# Required-Stop: $network $remote_fs -# Should-Start: -# Should-Stop: -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Mounts and unmounts all Lustre mount points. -### END INIT INFO - -# Source function library. -if [ -f /etc/init.d/functions ]; then - . /etc/init.d/functions -fi - -# Source networking configuration. -if [ -f /etc/sysconfig/network ]; then - . /etc/sysconfig/network -fi - -# Source lsb-functions. -if [ -f /lib/lsb/init-functions ]; then - . /lib/lsb/init-functions -fi - -[ -x /sbin/fuser ] && FUSER=/sbin/fuser -[ -x /bin/fuser ] && FUSER=/bin/fuser - -# Check that networking is up. -[ "${NETWORKING}" = "no" ] && exit 0 - -# Red Hat has it's own "action"-function for RHGB-messages. -lustre_action () { - STRING=$1 - shift - if [ $(typeset -F action) ]; then - action "$STRING" $* - rc=$? - else - $* - rc=$? - if [ $rc = 0 ]; then - log_success_msg "$STRING" - else - log_failure_msg "$STRING" - fi - fi - return $rc -} - -LUSTREFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "lustre" && $4 !~ /noauto/ { print $2 }' /etc/fstab` -LUSTREMTAB=`LC_ALL=C awk '!/^#/ && ($3 ~ "lustre") { print $2 }' /proc/mounts` - -# See how we were called. -case "$1" in - start) - [ -n "$LUSTREFSTAB" ] && lustre_action $"Mounting Lustre filesystems: " mount -a -t lustre - touch /var/lock/subsys/lustrefs - ;; - stop) - [ -n "$LUSTREMTAB" ] && { - sig= - retry=3 - remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^lustre/ && $2 != "/" {print $2}' /proc/mounts` - while [ -n "$remaining" -a "$retry" -gt 0 ] - do - if [ "$retry" -lt 3 ]; then - lustre_action $"Unmounting Lustre filesystems (retry): " umount -f -a -t lustre - else - lustre_action $"Unmounting Lustre filesystems: " umount -a -t lustre - fi - sleep 2 - remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^lustre/ && $2 != "/" {print $2}' /proc/mounts` - [ -z "$remaining" ] && break - $FUSER -k -m $sig $remaining >/dev/null - sleep 5 - retry=$(($retry - 1)) - sig=-9 - done - } - rm -f /var/lock/subsys/lustrefs - ;; - status) - if [ -f /proc/mounts ] ; then - [ -n "$LUSTREFSTAB" ] && { - echo $"Configured Lustre mountpoints: " - for fs in $LUSTREFSTAB; do echo $fs ; done - } - [ -n "$LUSTREMTAB" ] && { - echo $"Active Lustre mountpoints: " - for fs in $LUSTREMTAB; do echo $fs ; done - } - else - echo $"/proc filesystem unavailable" - fi - ;; - restart) - $0 stop - $0 start - ;; - reload) - $0 start - ;; - *) - echo $"Usage: $0 {start|stop|restart|reload|status}" - exit 1 -esac - -exit 0