Username should be obtained by getting user name for effective UID. Using USERNAME or USER variables is not the right way (when you just "su" and not "su - " it keeps previous username):
id : uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=user_u:system_r:unconfined_t
./validate.php: [FAIL] You need to run this script as root
echo $USER: <name of user that did su>
* Implement an autoloader
When cleaning up classes for psr2, things got a bit unwieldy, so I implemented a class autoloader.
I created a PSR-0 compliant LibreNMS directory and moved all classes there that made sense.
Implemented LibreNMS\ClassLoader which supports adding manual class mappings
This reduces the file includes needed and only loads classes when needed.
* Add teh autoloader to graph.php
* Add a small bit of docs
Fix incomplete class in includes/discovery/functions.inc.php
* Check that $config['install_dir'] is set correctly by checking that config.php exists there.
* Check if the local branch is not master, warn that it will prevent updates
* Check for modified files and list them (this will not include staged files)