summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston Cody <codeman@gentoo.org>2006-04-15 04:23:34 +0000
committerPreston Cody <codeman@gentoo.org>2006-04-15 04:23:34 +0000
commit95b130f0be2aba0d8c20fc635e0cbfef913a3c10 (patch)
tree7cc6a2a54aca4cfcf83fb1f6a6b77ec32c94a2e4 /webgli/webgliUtility.php
parentadded temp copy of webgli stuff (diff)
downloadscire-95b130f0be2aba0d8c20fc635e0cbfef913a3c10.tar.gz
scire-95b130f0be2aba0d8c20fc635e0cbfef913a3c10.tar.bz2
scire-95b130f0be2aba0d8c20fc635e0cbfef913a3c10.zip
adding client config screens to webgli
svn path=/; revision=9
Diffstat (limited to 'webgli/webgliUtility.php')
-rw-r--r--webgli/webgliUtility.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/webgli/webgliUtility.php b/webgli/webgliUtility.php
new file mode 100644
index 0000000..55c6d43
--- /dev/null
+++ b/webgli/webgliUtility.php
@@ -0,0 +1,16 @@
+<?php
+#Utility functions for WebGLI
+
+function get_eth_devices()
+{
+ $eth_devices = system("/sbin/ifconfig -a | grep -e '^[A-Za-z]'| cut -d ' ' -f 1");
+ return split(' ',$eth_devices);
+}
+
+function list_modules()
+{
+ exec("lsmod | grep -v ^Module | cut -d ' ' -f 1 ", $modules);
+ return $modules;
+}
+
+?>