August 4, 201015 yr I love the fact that "$var['version']" was added so we can act on the unRAID version. It would also help if a variable "$var['emhttp_port']" was populated so we can determine which port is in use by emhttp. Yes, it can be done with netstat, egrep, and awk, but it would be nice to have it available without having to shell out.
August 4, 201015 yr Added in -beta2 as "$var['emhttpPort']". About those $var's... From examining template.php you can see that: vars - general variables sec - security settings per share (for CIFS) devs - devices not yet added into array or assigned to cache disks - info about each array disk, including cache disk users - info about each user shares - info about each user share sec_nfs - security settings per share (for NFS) [starting in -beta2] are initialized by reading corresponding 'ini' formatted files in /var/local/emhttp. This set of variables is collectively referred to as the "config data" (i.e, the unRAID configuration data). Those files in /var/local/emhttp are re-generated each time, and prior to, any PHP file is rendered. Hence every time PHP is invoked, there is a fresh 'snapshot' of the the config data available to the PHP script. So if you are going to use lighttpd/php-cgi and intend to operate on the unRAID config, we will need to add a mechanism whereby those files can get regenerated... this shouldn't be too difficult. Some other notes concerning the config data: - variables in $var in all upper-case are generally used in other system scripts (there are some exceptions which will get fixed as beta proceeds) - you don't really need a separate utility to view the 'mdcmd' variables since they are all included in the config data - the set of 'config data' may undergo additions/deletions/name changes as 5.0-beta series progresses, but by the time 5.0 gets out of beta, it should be mostly "set in stone"
August 4, 201015 yr is it possible to add the unraid version into /etc as in /etc/unraid-release [rcotrone@underlord ~]$ cat /etc/redhat-release CentOS release 5.5 (Final) rcotrone@rgclws ~ $cat /etc/redhat-release Red Hat Linux release 7.2 (Enigma) I don't think we can always depend on uname -a as sometimes the kernel stays the same.
August 4, 201015 yr Author you don't really need a separate utility to view the 'mdcmd' variables since they are all included in the config data Understood. I wrote the plugin that does it, so some monitoring program on a windows desktop client (like FEMUR) can query them over http, and not have to query the whole bloody thing and then parse it on the client.
August 4, 201015 yr is it possible to add the unraid version into /etc as in /etc/unraid-release Sure I can do that, you don't want to "grep version /var/local/emhttp/var.ini"?
August 4, 201015 yr is it possible to add the unraid version into /etc as in /etc/unraid-release Sure I can do that, you don't want to "grep version /var/local/emhttp/var.ini"? I did not think of greping that file. I mentioned it more so it was like other distros which use the /etc/distroname-release Some use version, some use release. root@slacky:~# cat /etc/slackware-version Slackware 12.0.0
Archived
This topic is now archived and is closed to further replies.