#!/bin/bash # prefcsd # # $Id: prefcsd 41 2005-03-16 19:41:35Z jhealy $ # # This is a hook script that ties into commands issued by the # FC Core Services controller, located at /usr/sbin/fcsctl. # Please see that file for an idea of the types of commands that # can be processed. # # Commands run in this script are run just BEFORE fcsctl starts # the Core Services daemon on the machine. Any arguments provided to # fcsctl are passed directly to this script as well, one argument # per invocation. For example: # # /usr/sbin/fcsctl start status # # Would call this script with an arg of "start", then start the # fcs service. Next, it would call this script with an arg of # "status", and then process the status argument itself. # # Finally, this script has access to any variable defined in the calling # script. Examples include: # # SERVICE_NAME # SERVICE_APP # SERVICE_FOLDER # SERVICE_PID # USERDOCS # ARG="${1}" echo "prefcsd: Executing preflight script with arg '${ARG}':" case $ARG in start) # parent confirms that PID does not exist before calling preflight echo "prefcsd: No preflight operations for action '${ARG}'; skipping" ;; stop) # parent confirms that PID exists before calling preflight echo "prefcsd: No preflight operations for action '${ARG}'; skipping" ;; restart) # parent confirms that PID exists before calling preflight # after this invocation, parent calls $0 start, so # you do not need to duplicate "start" options here echo "prefcsd: No preflight operations for action '${ARG}'; skipping" ;; *) echo "prefcsd: Unknown argument '${ARG}'; skipping" ;; esac