"Fossies" - the Fresh Open Source Software Archive 
Member "freeha-1.0/service_scripts/metaset.start" (23 Nov 2006, 1183 Bytes) of package /linux/privat/old/freeha-1.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 #!/bin/sh
2
3 #-------------------------------------------------------------------------#
4 # Script to take ownership of a DiskSuite "metaset" (shared disks) #
5 # (Used in Solaris) #
6 # Specify the name of the metaset as the only argument #
7 # #
8 # Provided as a tool to be called from 'starthasrv' #
9 # #
10 # Standard UNIX status: returns 0 on okay, non-0 on fail. #
11 #-------------------------------------------------------------------------#
12
13
14 PATH=$PATH:/usr/sbin
15
16 if [ "$1" = "" ] ; then
17 error ERROR: no metaset specified
18 exit 1
19 fi
20
21 metaset -s $1 -t
22
23 if [ $? -ne 0 ] ; then
24 # This is REALLY REALLY DANGEROUS. It will CRASH THE OTHER NODE,
25 # if it is actually up. (a feature of DiskSuite, not FreeHA)
26 # But we have to use the flag, to cover the case where
27 # the other node has crashed.
28 # Rely on demon heartbeats to keep this safe.
29
30 metaset -s $1 -t -f
31
32 #if this errors, the status should fall through as exit status.
33 fi
34