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
|
use scire;
INSERT INTO scripts (scriptid, name, description, location, script_data, log_location, success_code, run_as) values (100, 'Gentoo Update Script', 'This script will run emerge sync and emerge -u world, logging the results.', '', '#!/bin/bash \n emerge sync \n emerge -u world', '/var/log/scire/updatelog.txt', 0, 'root');
INSERT INTO scripts (scriptid, name, description, location, script_data, log_location, success_code, run_as) values (101, 'Gentoo Install Package Script', 'This script will run emerge on a given package and log the results.', '', '#!/bin/bash \n emerge ', '/var/log/scire/installlog.txt', 0, 'root');
INSERT INTO scripts (scriptid, name, description, location, script_data, log_location, success_code, run_as) values (102, 'Gentoo Uninstall Package Script', 'This script will run emerge unmerge on a given package and log the results.', '', '#!/bin/bash \n emerge unmerge', '/var/log/scire/uninstalllog.txt', 0, 'root');
INSERT INTO scripts (scriptid, name, description, location, script_data, log_location, success_code, run_as) values (103, 'Gentoo Rollback Script', 'This script will roll back a given package to its previous version, logging the results.', '', '#!/bin/bash \n emerge -C && emerge ', '/var/log/scire/rollbacklog.txt', 0, 'root');
INSERT INTO scripts (scriptid, name, description, location, script_data, log_location, success_code, run_as) values (104, 'Gentoo PackageList Script', 'This script will return a list of packages installed on the system and the current version of those packages.', '', '#!/bin/bash \n stuff here', '/var/log/scire/packagelistlog.txt', 0, 'nobody');
INSERT INTO os (osid, osname, update_script, install_script, uninstall_script, rollback_script, packagelist_script) values (1,'Gentoo Linux',100 ,101 ,102 ,103, 104 );
INSERT INTO GLI_profiles (profileid, profile_name, location, description) values (1, 'printerserver', '/scire/gli_profiles/printerserver.xml', 'A typical printer server install profile. has like cups and shit.');
INSERT INTO GLI_profiles (profileid, profile_name, location, description) values (2, 'mta', '/scire/gli_profiles/mta.xml', 'A typical MTA install profile. has like very little except mailers.');
INSERT INTO users (userid, username, password, email, phone, pager, real_name, comment) values (1, 'root','444mwGdhEKuO.', 'root@localhost.com', '', '', 'Root User', 'This is the comment for the root user.');
INSERT INTO users (userid, username, password, email, phone, pager, real_name, comment) values (2, 'codeman','444mwGdhEKuO.', 'codeman@localhost.com', '', '', 'Preston Cody', 'Project lead and developer.');
INSERT INTO clients (clientid, assetid, digest, cert, hostname, mac, ip, gli_profile, osid, status, contact, installtime) values (1, 'ASSET01', 'D0:31:71:87:87:5D:F9:75:95:49:D9:9A:62:A0:6E:BB:21:0B:AE:E9', '', 'testhostlead', '00:0a:0b:0c:0d:0e', '192.168.3.4', 1, 1, 'Installed.', 2, '2006-01-01 00:00:00');
INSERT INTO clients (clientid, assetid, digest, cert, hostname, mac, ip, gli_profile, osid, status, contact, installtime) values (2, 'ASSET02', '00:01:02:03:87:5D:F9:75:95:49:D9:9A:62:A0:6E:BB:21:0B:AE:E9', '', 'testhostslave', '00:0a:0a:0a:0d:0e', '192.168.3.5', 1, 1, 'Not Installed', 2, NOW() );
INSERT INTO clients (clientid, assetid, digest, cert, hostname, mac, ip, gli_profile, osid, status, contact, installtime) values (3, 'MTA ASSET03', '08:07:06:05:87:5D:F9:75:95:49:D9:9A:62:A0:6E:BB:21:0B:AE:E9', '', 'testhostmtalead', '0b:0b:0b:0c:0d:0e', '192.168.3.6', 2, 1, 'Installed', 2, NOW());
INSERT INTO clients (clientid, assetid, digest, cert, hostname, mac, ip, gli_profile, osid, status, contact, installtime) values (4, 'MTA ASSET04', '11:22:33:33:33:5D:F9:75:95:49:D9:9A:62:A0:6E:BB:21:0B:AE:E9', '', 'testhostmtaslave', '0c:0c:0c:0c:0d:0e', '192.168.3.7', 2,1, 'Installed', 2, '2005-12-25 00:00:00');
INSERT INTO permissions (permid, name, description, creator) values (1, 'Update Packages', 'This permission is to allow the upgrading of packages.', 1);
INSERT INTO jobs (jobid, priority, created, creator, permission, script, description, pending, failed) values (1, 1, NOW(), 2, 1, 100, 'Upgrading a package on mtalead', 1,0);
INSERT INTO jobs_clients (jobid, clientid) values (1, 3);
#INSERT INTO jobs values (2, 1, 'Install Packages', 5, 'emerge cups', NOW(), NOW(), NOW(), NOW(), 'In Progress', 'root', 'Adding cups');
#INSERT INTO jobs values (3, 2, 'Install Packages', 6, 'emerge cups', NOW(), NOW(), NOW(), NOW(), 'Failed', 'root', 'Adding cups');
#INSERT INTO jobs values (4, 3, 'Update', 2, 'glsa-check', NOW(), NOW(), NOW(), NOW(), 'In Progress', 'root', 'Security Update');
#INSERT INTO jobs values (5, 3, 'Install Packages', 5, 'emerge postfix', NOW(), NOW(), NOW(), NOW(), 'Scheduled', 'root', 'Adding postfix, cause its an mta duh.');
#INSERT INTO modules values (1,'GLIMD','Gentoo Linux Installation Mangement Daemon','Description goes here and all that good stuff.','glimd.txt','Preston Cody','gentoo','deployment','http://www.gentoo.org/proj/en/releng/gli/');
#INSERT INTO modules values (2,'Exporter','Server Information Exporter','This is a utility that will take selected data from the central server about machines and export it into an XML format.','Exporter.php','Preston Cody',NULL,'information','http://www.gentoo.org/proj/en/releng/gli/');
|