|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 5153 (0x1421)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
└─⟦6f12a12be⟧ »DATA«
└─⟦this⟧
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
with Compilation, Library, Links, Operator, Text_Io;
with Destroy_Library;
package body Admin is
function User_World (For_User : String) return String is
begin
return "!users." & For_User;
end User_World;
procedure Add_Link_To_User_World (For_User : String; The_Link : String) is
begin
Text_Io.Put_Line ("adding link: " & The_Link &
" for user: " & For_User);
Links.Add (Source => The_Link,
Link => "#",
World => User_World (For_User));
end Add_Link_To_User_World;
procedure Add_Links_From_File
(The_File : String := "links"; For_User : String) is
Link_List : Text_Io.File_Type;
The_Link : String (1 .. 80);
The_Length : Natural;
begin
Text_Io.Open (Link_List, Text_Io.In_File, The_File);
while not Text_Io.End_Of_File (Link_List) loop
Text_Io.Get_Line (Link_List, The_Link, The_Length);
if The_Length /= 0 then
Add_Link_To_User_World (For_User, The_Link (1 .. The_Length));
end if;
end loop;
Text_Io.Close (Link_List);
end Add_Links_From_File;
procedure Create_User (With_Name : String;
Using_Links : String := "links") is
begin
Text_Io.Put_Line ("creating user: " & With_Name);
Operator.Create_User (User => With_Name,
Password => "aModifier",
Volume => 0,
Response => "<PROFILE>");
Add_Links_From_File (Using_Links, With_Name);
Install_Login (For_User => With_Name);
Install_S1_Switches (For_User => With_Name);
Install_Xr6us (For_User => With_Name);
end Create_User;
function User_Unit_Name (For_User : String; Unit : String) return String is
begin
return "!users." & For_User & "." & Unit;
end User_Unit_Name;
procedure Promote_User_Unit (For_User : String;
Unit : String;
To_State : Compilation.Unit_State) is
begin
Compilation.Promote (Unit => User_Unit_Name (For_User, Unit),
Scope => Compilation.All_Parts,
Goal => To_State,
Limit => "<WORLDS>",
Effort_Only => False,
Response => "<PROFILE>");
end Promote_User_Unit;
procedure Install_User_Unit
(For_User : String;
Unit_Name : String;
To_State : Compilation.Unit_State := Compilation.Coded) is
begin
Library.Copy (From => Unit_Name,
To => User_World (For_User),
Recursive => True,
Response => "<PROFILE>",
Copy_Links => True,
Options => "");
Promote_User_Unit (For_User, Unit_Name, To_State);
end Install_User_Unit;
procedure Install_Login (For_User : String) is
begin
Install_User_Unit (For_User, "login", To_State => Compilation.Coded);
end Install_Login;
procedure Install_Xr6us (For_User : String) is
begin
Install_User_Unit (For_User, "Xr6us_Commands",
To_State => Compilation.Installed);
end Install_Xr6us;
procedure Install_S1_Switches (For_User : String) is
begin
Library.Copy (From => "S_1_Switches", To => User_World (For_User));
end Install_S1_Switches;
procedure Delete_User (With_Name : String) is
begin
Text_Io.Put_Line ("deleting user: " & With_Name);
Operator.Delete_User (With_Name);
end Delete_User;
procedure For_All_Users (Contained_In_File : String := "users";
Do_Command : Operation := Admin.Nothing;
Using_Links : String := "links") is
User_List : Text_Io.File_Type;
User_Name : String (1 .. 80);
Name_Length : Natural;
begin
Text_Io.Open (User_List, Text_Io.In_File, Contained_In_File);
while not Text_Io.End_Of_File (User_List) loop
Text_Io.Get_Line (User_List, User_Name, Name_Length);
if Name_Length /= 0 then
case Do_Command is
when Create =>
Create_User (User_Name (1 .. Name_Length), Using_Links);
when Delete =>
Delete_User (User_Name (1 .. Name_Length));
when Remove_World =>
Destroy_Library ("!users." &
User_Name (1 .. Name_Length),
Effort_Only => False);
when Nothing =>
null;
end case;
end if;
end loop;
Text_Io.Close (User_List);
end For_All_Users;
procedure Associate_Library_Switches (For_User : String) is
begin
[statement]
end Associate_Library_Switches;
end Admin;