diff options
| author | Andrew Tridgell <tridge@samba.org> | 2008-07-11 15:22:11 +1000 |
|---|---|---|
| committer | Andrew Tridgell <tridge@samba.org> | 2008-07-11 15:22:11 +1000 |
| commit | a1336eddefa0626652bba89be4de0ecfba59fe30 (patch) | |
| tree | 8a7de4a93079ae04562f5fb5c15427d611761590 /base/root/scripts/setup_tsm_client.sh | |
| parent | 221b3b60fb4f25692d514e9f64e319b3a9d29523 (diff) | |
automate setting the password in TSM client
Diffstat (limited to 'base/root/scripts/setup_tsm_client.sh')
| -rwxr-xr-x | base/root/scripts/setup_tsm_client.sh | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/base/root/scripts/setup_tsm_client.sh b/base/root/scripts/setup_tsm_client.sh index 4b1c920..48e096c 100755 --- a/base/root/scripts/setup_tsm_client.sh +++ b/base/root/scripts/setup_tsm_client.sh @@ -1,6 +1,8 @@ #!/bin/bash -onnode all yum -y install TIVsm-BA TIVsm-HSM TIVsm-API +set -e + +onnode all yum -y install TIVsm-BA TIVsm-HSM TIVsm-API expect echo "Setting up dsm.sys" cat <<EOF > /opt/tivoli/tsm/client/ba/bin/dsm.sys @@ -22,15 +24,41 @@ EOF onnode all rsync $HOSTNAME:/opt/tivoli/tsm/client/ba/bin/dsm.opt /opt/tivoli/tsm/client/ba/bin onnode all "preprpnode `hostname -s`" -mkrpdomain -F /etc/ctdb/nodes SOFSDomain +mkrpdomain -F /etc/ctdb/nodes @@CLUSTER@@ + +echo "Setting TSM password" +cat <<EOF > /tmp/tsmpwd +spawn dsmsetpw +expect "enter password" +send "admin +" +sleep 2 +EOF +onnode all "rsync $HOSTNAME:/tmp/tsmpwd /tmp/; expect /tmp/tsmpwd" +onnode all rm -f /tmp/tsmpwd # we have to use a rather torturous procedure ... +echo "Killing ctdb" onnode all killall ctdbd + +echo "temporarily disabling automount of gpfs0" mmchfs gpfs0 -A no + +echo "Shutting down gpfs" mmshutdown -a -mmstartup -a + +echo "Starting up gpfs again" +mstartup -a + +echo "Enabling DMAPI in gpfs" mmchfs gpfs0 -z yes + +echo "enabling automount of gpfs0" mmchfs gpfs0 -A yes + +echo "Enabling DMAPI in gpfs" mmmount gpfs0 -a dsmmigfs add /gpfs + +echo "TSM client setup complete" |
