1 &version 2
2 &trace off
3 &-
4 &- Re-written 1985-03-21 by E. Swenson.
5 &-
6 &- This exec_com is used to enable RCP Resource Management. It is intended
7 &- to be executed by a system administrator preferably on the SysAdmin
8 &- project.
9 &-
10 &- First check to see if there are any registries in >sc1>rcp. If so,
11 &- abort, since this most likely means that RM has already been enabled.
12 &- If it hasn't, there will be errors later on attempting to install the
13 &- RTDT anyway, so we've better give the administrator a change to delete
14 &- these registries.
15 &-
16 &set ME rcprm_start_up.ec
17 &-
18 &- If we're debugging, first argument specifies the location of the
19 &- ">system_control_1" directory.
20 &-
21 &if &exists argument &1
22 &then &set SC1 &1
23 &else &set SC1 >system_control_1
24 &-
25 &- If we're debugging, second argument specifies the location of the
26 &- ">udd>SysAdmin>admin" directory.
27 &-
28 &if &exists argument &2
29 &then &set ADMIN &2
30 &else &set ADMIN >user_dir_dir>SysAdmin>admin
31 &-
32 &- If we're debugging, third argument specifies the location of the
33 &- ">tools" directory.
34 &-
35 &if &exists argument &3
36 &then &set TOOLS &3
37 &else &set TOOLS >system_library_tools
38 &-
39 &- Save working directory so we can restore it at end.
40 &-
41 &set WORKING_DIR &wd
42 &-
43 &- Check to see if registries already present. If so, abort.
44 &-
45 &if &exists entry &SC1>rcp>**.rcpr
46 &then &do
47 &print &ME Registries already exist in &SC1>rcp.
48 &print &ME This usually results from Resource Management's
49 &print &ME already being enabled.
50 &quit
51 &end
52 &-
53 &- Now create the exec_com, register.ec, which contains the commands
54 &- necessary to register all the devices with RM.
55 &-
56 change_wdir &ADMIN
57 &-
58 &print &ME Creating &ADMIN>register.ec which will be used
59 &print &ME later to register all the peripheral devices.
60 &-
61 qedx &TOOLS>make_rgr_commands
62 &-
63 &- Now check to see if there is an rtdt to install.
64 &-
65 &if ¬ exists entry RTMF.rtdt
66 &then &do
67 &if ¬ exists entry RTMF.rtmf
68 &then &do
69 &if ¬ exists entry >tools>RTMF.rtmf
70 &then &do
71 &print &ME Cannot locate RTMF.rtmf in >tools or
72 &print &ME or in &ADMIN
73 &goto CLEANUP
74 &end
75 copy >tools>RTMF.rtmf
76 &end
77 cv_rtmf RTMF
78 &if &ngreater severity cv_rtmf 0
79 &then &do
80 &print &ME Errors converting &ADMIN>RTMF.rtmf.
81 &goto CLEANUP
82 &end
83 &end
84 &-
85 &- Now enable RM.
86 &-
87 change_wdir &SC1
88 &print &ME Enabling RM in the installation parameters.
89 &attach
90 ed_installation_parms
91 c rsc_ on
92 w
93 q
94 &detach
95 &print &ME Enabled RM in the installation parameters.
96 &-
97 &- Now install the new RTDT under RM
98 &-
99 change_wdir &ADMIN
100 &-
101 &print &ME Now installing RTDT which will create the
102 &print &ME registries.
103 install RTMF.rtdt
104 &print &ME Pausing for 60 seconds to allow RTDT to
105 &print &ME be installed and registeries to be created.
106 pause 60
107 &if &query "rcprm_start_up.ec: Did the RTDT get installed ok?"
108 &then &do
109 &print &ME Executing &ADMIN>register.ec
110 &print &ME to register all devices in the registries.
111 exec_com register
112 &print &ME Enabling of RCP/RM complete.
113 &end
114 &else &print &ME Aborting. Manual intervention required.
115 &label CLEANUP
116 change_wdir &WORKING_DIR
117 &quit