|
1 #!/bin/bash |
|
2 # |
|
3 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
|
4 # Use is subject to license terms. |
|
5 # |
|
6 # Permission is hereby granted, free of charge, to any person obtaining a |
|
7 # copy of this software and associated documentation files (the |
|
8 # "Software"), to deal in the Software without restriction, including |
|
9 # without limitation the rights to use, copy, modify, merge, publish, |
|
10 # distribute, and/or sell copies of the Software, and to permit persons |
|
11 # to whom the Software is furnished to do so, provided that the above |
|
12 # copyright notice(s) and this permission notice appear in all copies of |
|
13 # the Software and that both the above copyright notice(s) and this |
|
14 # permission notice appear in supporting documentation. |
|
15 # |
|
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
|
17 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
18 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
|
19 # OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
|
20 # HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL |
|
21 # INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING |
|
22 # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
|
23 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
|
24 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
25 # |
|
26 # Except as contained in this notice, the name of a copyright holder |
|
27 # shall not be used in advertising or otherwise to promote the sale, use |
|
28 # or other dealings in this Software without prior written authorization |
|
29 # of the copyright holder. |
|
30 # |
|
31 ########################################################################### |
|
32 # |
|
33 |
|
34 PATH=/usr/bin:/usr/sbin |
|
35 |
|
36 . /lib/svc/share/smf_include.sh |
|
37 |
|
38 USAGE="Usage: $0 { start | refresh }" |
|
39 |
|
40 if [ $# -ne 1 ] ; then |
|
41 echo $USAGE |
|
42 exit 2 |
|
43 fi |
|
44 |
|
45 CATALOG_INSTALL=/usr/share/sgml/docbook/docbook-style-dsssl-install.sh |
|
46 CATALOG_UNINSTALL=/usr/share/sgml/docbook/docbook-style-dsssl-uninstall.sh |
|
47 |
|
48 start_docbook_style_dsssl_update () |
|
49 { |
|
50 $CATALOG_INSTALL > /dev/null 2>&1 |
|
51 } |
|
52 |
|
53 refresh_docbook_style_dsssl_update () |
|
54 { |
|
55 $CATALOG_UNINSTALL > /dev/null 2>&1 |
|
56 $CATALOG_INSTALL > /dev/null 2>&1 |
|
57 } |
|
58 |
|
59 METHOD=$1 |
|
60 |
|
61 case "$METHOD" in |
|
62 'start') |
|
63 # Continue with rest of script |
|
64 ;; |
|
65 'refresh') |
|
66 # Continue with rest of script |
|
67 ;; |
|
68 -*) |
|
69 echo $USAGE |
|
70 exit 2 |
|
71 ;; |
|
72 *) |
|
73 echo "Invalid method $METHOD" |
|
74 exit 2 |
|
75 ;; |
|
76 esac |
|
77 |
|
78 ${METHOD}_docbook_style_dsssl_update |
|
79 |
|
80 exit $SMF_EXIT_OK |