2 static char rcsid_module_c[] = "$Header$";
5 /* This is the file menu.c for allmaint, the SMS client that allows
6 * a user to maintaint most important parts of the SMS database.
7 * It Contains: all menu definitions for allmaint.
10 * By: Chris D. Peterson
16 * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
18 * For further information on copyright and distribution
19 * see the file mit-copyright.h
24 #include "mit-copyright.h"
31 Menu attachmaint_filemenu = {
34 "Filesystem Maintenance",
37 { GetFS, NULLMENU, 2, {
38 {"get", "Get Filesystem Name Information"},
39 {"name", "Name of Filesystem: "}
41 { AddFS, NULLMENU, 2, {
42 {"add", "Add New Filesystem to Database"},
45 { ChangeFS, NULLMENU, 2, {
46 {"change", "Update Filesystem Information"},
49 { RenameFS, NULLMENU, 2, {
50 {"rename", "Rename Filesystem"},
51 {"name", "Current (Old) Name: "},
53 { DeleteFS, NULLMENU, 2, {
54 {"delete", "Delete Filesystem"},
55 {"name", "Filesystem Name: "}
60 Menu attachmaint_top_menu = {
63 "Attach/Filesystem Maintenance",
66 SUBMENU("filesystem", "Filesystem Work", &filemenu),
67 { GetFSAlias, NULLMENU, 2, {
68 {"check", "Check An Association."},
69 {"name", "name (user/group/course): "}
71 { CreateFSAlias, NULLMENU, 2, {
72 {"alais", "Associate with a Filesystem."},
73 {"name", "name (user/course/project): "},
75 { DeleteFSAlias, NULLMENU, 2, {
76 {"unalias", "Disassociate from a Filesystem."},
77 {"name", "name (user/course/project): "},
79 SIMPLEFUNC("verbose", "Toggle Verbosity of Delete.", ToggleVerboseMode),
80 SIMPLEFUNC("help", "Help ...", AttachHelp)
88 Menu clustermaint_machine_menu = {
91 "Machine Maintenence",
94 { ShowMachineInfo, NULLMENU, 2, {
95 {"ShowMachineInfo","Get machine information."},
96 {"name","Machine's Name: "}
98 { AddMachine, NULLMENU, 2, {
99 {"AddMachine","Add a new machine."},
100 {"name","Machine's Name: "},
102 { UpdateMachine, NULLMENU, 2, {
103 {"UpdateMachine","Update machine information."},
104 {"name","Machine's Name: "},
106 { ChangeMachineName, NULLMENU, 2, {
107 {"ChangeMachineName", "Change the name of machine"},
108 {"old", "Current (old) Machine's Name: "},
110 { DeleteMachine, NULLMENU, 2, {
111 {"DeleteMachine","Delete this machine."},
112 {"name","Machine's Name: "}
114 { AddMachineToCluster, NULLMENU, 3, {
115 {"AddMachineToCluster","Add this machine to a cluster."},
116 {"name","Machine's Name: "},
117 {"cluster","Name of the Cluster: "}
119 { DeleteMachineFromAllClusters, NULLMENU, 2, {
120 {"DeleteMachineFromAllClusters",
121 "Delete this machine from all clusters."},
122 {"name","Machine's Name: "},
127 Menu clustermaint_cluster_menu = {
130 "Cluster Information",
133 { ShowClusterInfo, NULLMENU, 2, {
134 {"info", "Get cluster information."},
135 {"name", "Cluster's Name: "}
137 { MachinesInCluster, NULLMENU, 2, {
138 {"machines", "List all machines in this cluster."},
139 {"clus", "Cluster's Name: "}
141 { AddCluster, NULLMENU, 2, {
142 {"add", "Add a new cluster."},
143 {"name","Cluster's Name: "},
145 { UpdateCluster, NULLMENU, 2, {
146 {"update", "Update cluster information."},
147 {"name","Cluster's Name: "},
149 { ChangeClusterName, NULLMENU, 2, {
150 {"cname", "Change the name of this cluster."},
151 {"old", "Current (old) Cluster's Name: "},
153 { DeleteCluster, NULLMENU, 2, {
154 {"delete", "Delete this cluster."},
155 {"name", "Cluster's Name: "}
160 Menu clustermaint_service_menu= {
163 "Service Cluster Maintenence",
166 { ShowServicesForCluster, NULLMENU, 2, {
167 {"show_one", "Show a Service Cluster"},
168 {"clus", "Cluster's Name: "}
170 { AddService, NULLMENU, 2, {
171 {"add", "Add a Service to a Cluster"},
172 {"clus", "Cluster Name: "},
174 { DeleteService, NULLMENU, 2, {
175 {"delete", "Delete a Service from a Cluster"},
176 {"clus", "Cluster's Name: "},
181 Menu clusetermaint_top_menu = {
184 "Cluster Maintenence",
187 SUBMENU("machine", "Work on Machines", &clustermaint_machine_menu),
188 SUBMENU("cluster", "Work on Clusters", &clustermaint_cluster_menu),
189 SUBMENU("service", "Service Clusters", &clustermaint_service_menu),
190 {MachineToClusterMap, NULLMENU, 3, {
191 {"map", "Machine to Cluster Mapping"},
192 {"machine", "Machine Name: "},
193 {"clus", "Cluster Name: "}
195 SIMPLEFUNC("verbose", "Toggle Delete Confirmation", ToggleVerboseMode),
203 /* Commenting out all DCM maint stuff.
205 Menu dcmmaint_service_menu = {
206 dcmmaint_service_menu_entry,
207 dcmmaint_service_menu_exit,
211 SIMPLEFUNC("show", "Show fields of service", show_service),
212 SIMPLEFUNC("interval", "Change the interval field", change_interval),
213 SIMPLEFUNC("target_path", "Change the target_path field",
215 SIMPLEFUNC("script", "Change the script field", change_script),
217 "Change the date of the latest generation of the db file",
222 Menu dcmmaint_host_info_menu = {
223 dcmmaint_host_info_menu_entry,
224 dcmmaint_host_info_menu_exit,
228 SIMPLEFUNC("show", "Show values of entry", show_host_info),
229 SIMPLEFUNC("last_time", "Change the last_time field", change_last_time),
230 SIMPLEFUNC("success", "Change the success field", change_success),
231 SIMPLEFUNC("override", "Change the override field", change_override),
232 SIMPLEFUNC("enable", "Change the enable field", change_enable),
233 SIMPLEFUNC("value1", "Change the value1 field", change_value1),
234 SIMPLEFUNC("value2", "Change the value2 field", change_value2),
235 SIMPLEFUNC("rvdacls", "Change the RVD ACLs (for RVD servers only)",
240 Menu dcmmaint_top_menu = {
243 "Data Control Manager Maintenance",
246 SUBMENU("hi_change", "Modify a service-host entry",
247 &dcmmaint_host_info_menu),
248 SIMPLEFUNC("hi_add", "Create new service-host entry", do_host_info),
249 SIMPLEFUNC("hi_delete", "Remove a service-host entry", do_host_info),
250 SIMPLEFUNC("hi_list", "List service-host entries", do_host_info),
251 SUBMENU("s_change", "Modify info for an existing service",
252 &dcmmaint_service_menu),
253 SIMPLEFUNC("s_add", "Create new service", do_service),
254 SIMPLEFUNC("s_delete", "Remove a service", do_service),
255 SIMPLEFUNC("s_list", "List services", do_service),
256 SIMPLEFUNC("help", "How to use this program", instructions)
260 Commenting out all DCM maint stuff. */
266 Menu listmaint_list_menu = {
273 "List all lists to which a given member belongs",
275 SIMPLEFUNC("administrator",
276 "List all lists which a given user can administer",
277 ListByAdministrator),
278 SIMPLEFUNC("groups", "List all lists which are groups",
280 SIMPLEFUNC("public", "List all public mailing lists",
281 ListAllPublicMailLists),
282 SIMPLEFUNC("maillists", "List all mailing lists",
287 Menu listmaint_member_menu = {
293 SIMPLEFUNC("add", "Add a member to the list",
295 SIMPLEFUNC("delete", "Delete a member from the list",
297 SIMPLEFUNC("all", "Show the members of the list",
299 SIMPLEFUNC("user", "Show the members of type USER",
301 SIMPLEFUNC("list", "Show the members of type LIST",
303 SIMPLEFUNC("string", "Show the members of type STRING",
308 Menu listmaint_top_menu = {
311 "List Maintenance Menu",
314 { NULLFUNC, &listmaint_member_menu, 2, {
315 {"add", "Create new List"},
316 {"list name", "Name of list: "}
318 { DeleteList, NULLMENU, 2, {
319 {"delete", "Delete a List"},
320 {"list name", "Name of list: "}
322 { ShowListInfo, NULLMENU, 2, {
323 {"show", "Display information about a list"},
324 {"list name", "Name of list: "}
326 { UpdateListInfo, NULLMENU, 2, {
327 {"update", "Update characteristics of a list"},
328 {"list name", "Name of list: "}
330 { NULLFUNC, &listmaint_member_menu, 2, {
331 {"members", "Change/Display the membership of a list"},
332 {"list name", "Name of list: "}
334 { DeleteUserFromLists, NULLMENU, 2, {
335 { "deluser", "Interactively query/delete user from all lists"},
336 { "user name", "Login name of user: "}
338 SUBMENU("list_lists", "Display inventory of lists",
339 &listmaint_list_menu),
340 SIMPLEFUNC("help", "How to use this program", Instructions)
348 Menu nfsmaint_top_menu = {
354 { ShowNFSService, NULLMENU, 3, {
355 { "show", "Show an NFS server " },
356 { "machine", "Machine Name: "},
357 { "device", "Device: "}
359 { AddNFSService, NULLMENU, 3, {
360 { "add", "Add NFS server" },
361 { "machine", "Machine Name: "},
362 { "device", "Device: "}
364 { UpdateNFSService, NULLMENU, 3, {
365 { "update", "Update NFS server"},
366 { "machine", "Machine Name: "},
367 { "device", "Device: "}
369 { DeleteNFSService, NULLMENU, 3, {
370 { "delete", "Delete NFS server"},
371 {"machine", "Machine Name: "},
372 {"device", "Device: "}
374 SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode),
375 SIMPLEFUNC("help", "Help", NFSHelp),
383 /* Queries have not been implemented yet :-(
388 "Server Maintenence",
391 { getserv, NULLMENU, 2, {
392 {"get", "Services Info"},
393 {"serv", "Service Name: "}
395 { addserv, NULLMENU, 4, {
396 {"add", "Add Service"},
398 {"proto", "Protocol: "},
401 { updserv, NULLMENU, 4, {
402 {"update", "Update Service"},
404 {"proto", "Protocol: "},
407 {delserv, NULLMENU, 3, {
408 {"delete", "Delete Service"},
409 {"serv", "Service Name: "},
410 {"proto", "Protocol: "}
412 { getassc, NULLMENU, 2, {
413 {"get_alias", "Get All Aliases for Service"},
414 {"srv", "Service Name: "}
416 { alas, NULLMENU, 3, {
418 {"srv", "Service Name: "},
421 { alas, NULLMENU, 3, {
422 {"-", "Delete Alias"},
423 {"srv", "Service Name: "},
426 SIMPLEFUNC("toggle", "Toggle Verbosity of Delete", toggle_verb)
439 Menu usermaint_quota_menu = {
442 "Edit User Quotas and Server Machines",
445 SIMPLEFUNC("shdef", "Show default user quota (in KB)", ShowDefaultQuota),
446 {ShowUserQuota, NULLMENU, 2, {
447 {"shquota", "Show a user's quota (in KB)"},
448 {"login", "Login name: "}
450 {ChangeDefaultQuota, NULLMENU, 2, {
451 {"chdef", "Change default user quota"},
452 {"quota", "New quota (in KB): "}
454 {ChangeUserQuota, NULLMENU, 2, {
455 {"chquota", "Change a user's disk quota"},
456 {"user", "Login name: "}
458 {AddUserLocker, NULLMENU, 5, {
459 {"create", "Create a quota & locker for a user"},
460 {"login", "User's login name: "},
461 {"machine", "Server host name: "},
462 {"device", "Physical device on host: "},
463 {"quota", "Quota in KB: "}
465 {DeleteUserLocker, NULLMENU, 2, {
466 {"del", "Delete a user's quota & locker"},
467 {"login", "User's login: "}
472 Menu usermaint_top_menu = {
475 "SMS User Maintenance",
478 {ShowUserByLogin, NULLMENU, 2, {
479 {"login", "Show user information by login name"},
480 {"login name", "Desired login name: "}
482 {ShowUserByName, NULLMENU, 3, {
483 {"full", "Show user information by name (use * for wildcard)."},
484 {"first", "First name: "},
485 {"last", "Last name: "}
487 {ShowUserByClass, NULLMENU, 2, {
488 {"login", "Show names of users in a give class."},
489 {"login name", "Desired class: "}
491 {ModifyUser, NULLMENU, 2, {
492 {"modify", "Change all user fields"},
493 {"login", "Login name: "}
495 /* SIMPLEFUNC("chpw", "Change a user's password", change_user_password), */
496 {ChangeUserPOBox, NULLMENU, 2, {
497 {"chpobox", "Change a user's post office box"},
498 {"login name", "login name: "}
500 /* {enter_user, NULLMENU, 6, {
501 {"enter", "Enter unregistered user"},
502 {"first", "User's first name: "},
503 {"middle", "User's middle initial: "},
504 {"last", "User's last name: "},
505 {"mit_id", "User's MIT ID: "},
506 {"mit_year", "User's MIT year: "}
508 {reg_user, NULLMENU, 5, {
509 {"register", "Register unregistered user"},
510 {"first", "User's first name: "},
511 {"last", "User's last name: "},
512 {"mit_id", "User's MIT ID: "},
513 {"login", "Login name to assign: "}
516 {DeleteUser, NULLMENU, 2, {
517 {"delete", "Delete user"},
518 {"login", "Login name: "}
520 {DeleteUserByUid, NULLMENU, 2, {
521 {"udelete", "Delete user by uid"},
522 {"uid", "User ID (not MIT ID!): "}
524 SUBMENU("quota", "User Quotas", &usermaint_quota_menu),
532 Menu allmaint_top_menu = {
535 "All Maint Top Level Menu",
538 SUBMENU("attachmaint","open the attachmaint menu",&attachmaint_top_menu),
539 SUBMENU("clustermaint","open the clustermaint menu",
540 &clustermaint_top_menu),
541 /* SUBMENU("dcmmaint","open the dcmmaint menu",&dcmmaint_top_menu), */
542 SUBMENU("listmaint","open the listmaint menu",&listmaint_top_menu),
543 SUBMENU("nfsmaint","open the nfsmaint menu",&nfsmaint_top_menu),
544 /* SUBMENU("portmaint","open the portmaint menu",&portmaint_top_menu), */
545 /* SUBMENU("smsmaint","open the smsmaint menu",&smsmaint_top_menu), */
546 SUBMENU("usermaint","open the usermaint menu",&usermaint_top_menu)