-
Notifications
You must be signed in to change notification settings - Fork 6
Workflow
roubles edited this page Jun 9, 2015
·
4 revisions
The actual workflow is pretty simple:
macmounter first runs MOUNT_TEST_CMD
we run MOUNT_TEST_CMD:
if MOUNT_TEST_CMD returns 0: we do nothing, we assume the mount is active.
if MOUNT_TEST_CMD returns 1 (or no MOUNT_TEST_CMD) specified : we see if the server is
accessible. For this, macmounter runs PING_CMD
if PING_CMD returns 0 (or no PING_CMD specified): we start the mount process
we run PRE_MOUNT_CMD, we aren't really interested in the success or failure of this command
we run MOUNT_CMD
if MOUNT_CMD returns 0:
we will run MOUNT_SUCCESS_CMD (if this is the first time we succeeded mounting)
we will run POST_MOUNT_CMD, we aren't really interested in the success or failure of this command
we back off for RECHECK_INTERVAL_SECONDS_MOUNT_SUCCESS seconds
if MOUNT_CMD returns 1:
we will run LOST_MOUNT_CMD (if we were previously mounted)
we will run MOUNT_FAILURE_CMD (if this is the first time we failed)
we will run POST_MOUNT_CMD, we aren't really interested in the success or failure of this command
we backoff for RECHECK_INTERVAL_SECONDS_MOUNT_FAILURE seconds
if PING_CMD returns 1: we check if there is a wake up command
if there is a wakeup command (WAKE_CMD) we try that and retry the PING_CMD
We will retry the wakeup command WAKE_ATTEMPTS times
Finally, after waking up, if ping still fails, we back off for
RECHECK_INTERVAL_SECONDS_PING_FAILURE seconds
if there is no wakeup command, we back off for RECHECK_INTERVAL_SECONDS_PING_FAILURE seconds