summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_nanobsd.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@G5.homeunix.net>2009-10-10 21:10:20 -0400
committerScott Ullrich <sullrich@G5.homeunix.net>2009-10-10 21:10:20 -0400
commitb000d6063f71c32c68f4a3a7dcac3dfbf2601278 (patch)
tree672ba730234d5c9a3353040eab914926e8ccdbcc /usr/local/www/diag_nanobsd.php
parentbfdb8779c507173b861b49d88aefd3ba06611a23 (diff)
downloadpfsense-b000d6063f71c32c68f4a3a7dcac3dfbf2601278.zip
pfsense-b000d6063f71c32c68f4a3a7dcac3dfbf2601278.tar.gz
Output NanoBSD image size
Diffstat (limited to 'usr/local/www/diag_nanobsd.php')
-rwxr-xr-xusr/local/www/diag_nanobsd.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php
index 754a354..f7c7881 100755
--- a/usr/local/www/diag_nanobsd.php
+++ b/usr/local/www/diag_nanobsd.php
@@ -58,6 +58,8 @@ function detect_slice_info() {
$REAL_BOOT_DEVICE=trim(`/sbin/glabel list | /usr/bin/grep -B2 ufs/{$BOOT_DEVICE} | /usr/bin/head -n 1 | /usr/bin/cut -f3 -d' '`);
$BOOT_DRIVE=trim(`/sbin/glabel list | /usr/bin/grep -B2 ufs/pfsense | /usr/bin/head -n 1 | /usr/bin/cut -f3 -d' ' | /usr/bin/cut -d's' -f1`);
+ $NANOBSD_SIZE = trim(`/sbin/fdisk ${COMPLETE_PATH} | /usr/bin/grep Meg | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d"(" -f2`);
+
// Detect which slice is active and set information.
if(strstr($REAL_BOOT_DEVICE, "s1")) {
$SLICE="2";
@@ -202,6 +204,12 @@ if ($savemsg)
<tr>
<td colspan="2" valign="top" class="listtopic">Bootup information</td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">NanoBSD Image size</td>
+ <td width="78%" class="vtable">
+ <?php echo format_bytes($NANOBSD_SIZE); ?>
+ </td>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell">Bootup</td>
<td width="78%" class="vtable">
OpenPOWER on IntegriCloud