RollbackAndAnythingDoc.tioga
Mike Spreitzer September 18, 1986 9:54:48 am PDT
RollbackAndAnything
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
RollbackAndAnything
Mike Spreitzer
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: RollbackAndAnything provides a way to have commands automatically executed after a rollback. It also exports a command file that implements an "Idle" command.
Created by: Mike Spreitzer
Maintained by: Mike Spreitzer <Spreitzer.pa>
Keywords: Rollback, Checkpoint, Command, Idle, Logout, Logoff
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. RollbackAndAnything
The command
% RollbackAnd foo bar gronk
will save "foo bar gronk" in a file (named something like ///Users/username/ToDoWhenRollback), and then invoke a Rollback, hoping that RollbackAndAnything will be there to use it.
If RollbackAndAnything is in the checkpoint, it will automatically wake up on rollback.
Another way to get RollbackAndAnything going is to invoke the DoRollbackStuff command (e.g., have it among your LoginCommands.PerLogin commands).
In either case, RollbackAndAnything will look for the file containing the saved commands, read them, rename the file (to something like ///Users/username/DidWhenRollbacked), and then stuff the commands into a command tool.
RollbackAnd gets registered as uninterpreted, so you don't have to worry about the CommandTool messing around with the rest of the command line. Of course, remember the misfeature concerning unregistered uninterpreted commands. As a workaround, RollbackAndAnything exports RollbackAndAnything.Load, but there is no command named RollbackAndAnything.
2. Idle
The command
% Idle
is equivalent to left-clicking the Idle button.
If you've been working on a machine, and have gotten its VM rather dirty, and want to leave, yet leave the machine in a reasonably clean state for the next user (maybe even yourself some time later), you can accomplish this with the following command
% RollbackAnd Idle