2 # Common sh(1) procedures to be used in PCP rc scripts
4 # Minimalist version - use this if your system's init script regime
5 # does not follow the "chkconfig + runlevel" model.
7 # Copyright (c) 2000,2003 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by the
11 # Free Software Foundation; either version 2 of the License, or (at your
12 # option) any later version.
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 # You should have received a copy of the GNU General Public License along
20 # with this program; if not, write to the Free Software Foundation, Inc.,
21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 # source the PCP configuration environment variables
25 . $PCP_DIR/etc/pcp.env
27 # These functions use chkconfig if available, else tolerate missing chkconfig
28 # command (as on SUSE) by manipulating symlinks in /etc/rc.d directly.
32 # is_chkconfig_on : return 0 if $1 is chkconfig "on" else 1
33 # chkconfig_on : chkconfig $1 "on"
34 # chkconfig_off : chkconfig $1 "off"
35 # chkconfig_on_msg: echo a message about how to chkconfig $1 on
39 # Return 0 if $1 is chkconfig "on" (enabled) at the current run level
40 # Handles missing chkconfig command and other assorted atrocities.
49 # Handles missing chkconfig command.
50 # (this is used by the pcp rpm %post script)
59 # Handles missing chkconfig command.
60 # (this is used by the pcp rpm %preun script)
68 # Echo a message about how to chkconfig $1 "on"
69 # Tolerates missing chkconfig command