Update remove_node_tsm.sh

This commit is contained in:
Demonic 2022-04-14 13:41:12 +02:00
parent 3a209331eb
commit 7511dab90a

View File

@ -1,12 +1,39 @@
#!/bin/sh #!/bin/bash
# TITRE remove_node_tsm.sh
# DESCRIPTION :
# HISTORIQUE :
# T | Date | Auteur | Description
#---+------------+------------------------------+------------------------------------
# A | 14/04/22 | Demonic | Création
# -----------------------------------------------------------------------------------
# LOGGING
# exec > ./log/remove_node_tsm.log 2>&1
#########################################
## DECLARATION DES VARIABLES ##
#########################################
_HOME_PATH="$(cd $(dirname $0) && pwd)"
_SCRIPT_PATH="$_HOME_PATH/$(basename $0)"
list="$_HOME_PATH/listnode.txt"
. $_HOME_PATH/environment
#########################################
## DEFINITION FONCTIONS ##
#########################################
tsmcmd(){ tsmcmd(){
dsmadmc -id=script -pa=scripttsm -datao=yes $* dsmadmc -id=$id -pa=$passwd -datao=yes $*
return $? return $?
} }
pwd=$(pwd) #########################################
list="$pwd/listnode.txt" ## PROGRAMME PRINCIPAL ##
#########################################
for node in $(cat $list) for node in $(cat $list)
do do