merge in changes to rt-setup-database
[freeside.git] / rt / sbin / rt-setup-database.in
index 9e990e5..0b9a107 100644 (file)
@@ -110,6 +110,9 @@ elsif ( $args{'action'} eq 'drop' ) {
     }
     drop_db();
 }
+elsif ( $args{'action'} eq 'insert_initial' ) {
+    insert_initial_data();
+}
 elsif ( $args{'action'} eq 'insert' ) {
     insert_data( $args{'datafile'} );
 }
@@ -450,6 +453,8 @@ sub insert_data {
                   $princ->LoadUserDefinedGroup( $item->{'GroupId'} );
                } elsif ($item->{'GroupDomain'} eq 'SystemInternal') {
                   $princ->LoadSystemInternalGroup( $item->{'GroupType'} );
+               } elsif ($item->{'GroupDomain'} eq 'RT::System-Role') {
+                  $princ->LoadSystemRoleGroup( $item->{'GroupType'} );
                } elsif ($item->{'GroupDomain'} eq 'RT::Queue-Role' &&
                         $item->{'Queue'}) {
                   $princ->LoadQueueRoleGroup( Type => $item->{'GroupType'},
@@ -589,6 +594,8 @@ $0: Set up RT's database
 --action        init    Initialize the database
                 drop    Drop the database. 
                         This will ERASE ALL YOUR DATA
+                insert_initial 
+                        Insert RT's core system objects
                 insert  Insert data into RT's database. 
                         By default, will use RT's installation data.
                         To use a local or supplementary datafile, specify it