* Fixed display issues when showing a summary of what will be done if the user confirms the reconfiguration of the Striker.
Signed-off-by: Digimer <digimer@alteeve.ca>
We've decided to give up on trying to keep ScanCore, AN::Tools and Striker as three separate things. We had originally hoped to make ScanCore easily separatable from the Anvil!, but this was adding increasing complexity to the project and complexity is the enemy of reliability.
In this release, AN::Tools becomes Anvil::Tools, all configuration files move to /etc/anvil and all programs and data files move to /usr/sbin/anvil. Words files are now merged, as are SQL schemas (ScanCore agents will still maintain their own, later). The journald tag has changed from 'an-tools' to 'anvil'.
Other changes;
* Tools.t has been updated to handle existing tests. New methods and parameters still need to have tests added though.
* Added a simple test.pl script used for testing things outside the main program. It will be removed before final release.
* Added the simple 'watch_logs' bash script to more easily tail output.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Created Validate->form_field() which makes it a little quicker/easier to sanity check a form field that uses one of the other Validate methods.
* Added Validate->is_mac to validate MAC addresses.
* Got config_step2 finishes and sanity checked.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Added a start-check to make sure 'home' could read the host UUID and exit if not.
* Removed network_interface_current_name / network_interface_requested_name from the network_interfaces DB table and used simply network_interface_name.
* Added caching to Storage->read_file().
* Now record form answers in the variables table as 'form::<form_name>::<variable>::value' and read the same when the form is first loaded.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Updated Database->connect to always test if hosts table exists and load the core schema if not.
* Fixed Database->write to log all SQL when 'sys::database::log_transactions' is set.
* Got tools/scancore-update-states scanning and recording network interface data to the database. Also removed it writing out the XML status file.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Added a check to Database->archive_database() to return immediately if the check_tables array is empty.
* Created the new Get->cgi() method that reads in CGI variables (as set by the special 'cgi_list' variable).
* Got more work done on the config_step1 funtions.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Fixed a pronlem where I entered into the check for missing records before reading the data from all the DBs.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Got System->manage_firewall to the point where it can get a list of open TCP and UDP ports for the active zone.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Changed Storage->write_file to touch the target file and set it's permissions before writing it out when 'secure' is set.
* Did a bunch of general cleanup and minor bug fixes.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Changed all methods that returned 'undef' on error to return '!!error!!' instead.
* Created Convert->round(), ->comma(), ->bytes_to_human_readable() and ->human_readable_to_bytes().
* Created Database->archive_databases(), ->check_lock_age(), ->lock_file() and ->resync_databases() (last one is not started yet).
Signed-off-by: Digimer <digimer@alteeve.ca>
* Created the new System->determine_host_type() method that tries to determine the host type based on the host name (or via sys::host_type).
Signed-off-by: Digimer <digimer@alteeve.ca>
* Fixed more typo-related bugs.
* Created System->enable_daemon().
* Changed the 'database::general' to 'sys::database' to avoid accidental collisions with database IDs.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Added the variables table to the core SQL schema.
* Added Databsae->insert_or_update_variables() and ->read_variable().
Signed-off-by: Digimer <digimer@alteeve.ca>
This continues the work of adding database support (and ancilliary functions) to m3.
* Adds Alert->check_alert_sent() and Alert->register_alert(), providing similar functions as in m2.
* Adds Database->disconnect(), Database->insert_or_update_states(), Database->locking() (still in progress), Database->mark_active(), Database->_find_behind_database(), Database->_mark_database_as_behind() and Database->_test_access().
Signed-off-by: Digimer <digimer@alteeve.ca>
* This is an in-progress commit working on adding the Database methods. Much of it is copy/pasted from v2 and none of the new code is tested yet. It will certainly fail to compile.
Signed-off-by: Digimer <digimer@alteeve.ca>
* Created Convert->cidr() that will convert dotted decimal subnets to CIDR notation and vice versa.
* Created Database->get_local_id that returns the ID from striker.conf that matches the local host, if any,
* Created Get->network_details that returns the host name and a list of interfaces and their IP addresses (if any).
* Created System->call() that takes a shell call and returns the output.
* Created icon for the top-right bar that are "on" (lit up).
* Created a skeleton striker.conf file.
* Created the new scancore-database tool that will manage ScanCore databases.
Signed-off-by: Digimer <digimer@alteeve.ca>