-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
150 lines (107 loc) · 4.6 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
############################
README for OpenAFSController
############################
weitz.jan@googlemail.com
This OpenAFSController Tool is Freeware.
Built with Xcode 2.4.1 as Universal Binary.
It was only tested on Powerbook G4 with Tiger (10.4) and MacBookPro with
Tiger (10.4).
The 'klog' Option and 'Start-All' Option might only work on Tiger (10.4).
It might work on older Versions but the Password dialog during 'klog' will
revail your password in plain text instead of bullets.
The aim of this tool was to have a simple GUI to authenticate against
the AFS 'kaserver' where the user can invoke the OpenAFS client command line
tools by just clicking buttons and combine the START- and STOP event with
her/his own shellscripts.
While begin unplugged from the network and still having the
OpenAFS client opened, I noticed a long delay until I could work again. So I
thought a little tool to temporarily stop the OpenAFS client might help.
Another problem was that symbolic links or aliases, I created, which pointed
into the /afs filesystem also made my laptop hang up if the OpenAFS client was
already shut down.
So I thought that it might be a good idea to create these
symbolic links/aliases only after the OpenAFS client is turned on and
destroy them before the client is shut down.
So this tool won't run a script unless the OpenAFS client is running
and the user has a token.
--- The functions ---
Its functions are pretty limited. With the buttons you can
START and STOP the AFS Client,
get a new token or destroy it,
and run your own scripts from your homefolder.
To make sure the tool works, you have to have the OpenAFSClient installed, and
to make sure that the files
/Library/StartupItems/OpenAFS/OpenAFS
/usr/bin/klog
/usr/bin/unlog
exist and that you have properly configured your CellServDB and ThisCell File.
Right now it can just use 'klog' for the cell configured in ThisCell.
Maybe in the future I will create an xml file or somthing like that where you
might run cell-dependend Start and Stop scripts.
--- The START/STOP Buttons ---
These buttons just invoke the command
/Library/StartupItems/OpenAFS/OpenAFS start || stop
which has to be done with administrator priviledges.
--- The klog/unlog Buttons ---
These buttons invoke just the shell commands 'klog' and 'unlog'
--- The Post-Start and Pre-Stop Buttons ---
After Starting the OpenAFS client and having a ticket it would be nice to have
a symbolic link or alias of some /afs directory on your Deskop or some other
place, so that you do not have to click through all folders.
And also it would be nice to remove these links before you shut down the client.
Because everbody wants to invoke different events during Starup or Stop,
it is all left to the users, by putting their Startup or Stop Options into
2 shell scripts in their HOME-Directory.
~/ControllerPostStart for events after OpenAFSClient started
and a token was gained
~/ControllerPreStop for events before tokens are
destroyed and the OpenAFSclient is shut down
Make sure that these files are marked executable
chmod +x filename
Please be aware that if you have created symbolic links and want to remove them
you actually might delete the contents in the /afs directory. It won't be any
problem if the OpenAFSClient is shutdown before the script is started. But some
reasons it might be important to leave the client still running.
A safer way having the same effect of symbolic links is to create aliases.
Aliases can safely be deleted before the OpenAFSClient is shut down.
In the "example" folder you will find a 'make_aliases' script which will create
these aliases and a ControllerPostStart and ControllerPreStop script, which will
use this script.
Also make sure these scripts are executable.
--- The Start-All and Stop-All Buttons ---
Start-All:
Check if OpenAFS Client is already running
Yes ->
Check if user already has a token
Yes ->
Check if user has a ControllerPostStart script
Yes ->
execute script
No ->
display message
No ->
Ask for AFS username -and password
Check if user has now a token
Yes ->
Check if user has a ControllerPostStart script
Yes ->
execute script
No ->
display message
No ->
display message
No ->
Start Client
Check if client is running
Check token, check script, etc...
Stop-All:
Check if user has a ControllerPreStop script
Yes ->
execute script
Check if OpenAfs client is running
Yes ->
stop the client
No -> display message
No-> display message
Hopefully this tool might help you and I could get some feedback what I can do
better. Feel free to email me.