Revision 3d3c8094
Added by Renato Botelho over 9 years ago
src/etc/inc/globals.inc | ||
---|---|---|
121 | 121 |
/* TCP flags */ |
122 | 122 |
$tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg", "ece", "cwr"); |
123 | 123 |
|
124 |
if (file_exists("/etc/version.patch")) { |
|
125 |
$g["product_version_patch"] = trim(file_get_contents("/etc/version.patch"), " \n"); |
|
126 |
} else { |
|
127 |
$g["product_version_patch"] = "0"; |
|
128 |
} |
|
129 |
|
|
130 |
$g['product_version_string'] = $g['product_version']; |
|
131 |
if (is_numeric($g["product_version_patch"]) && $g["product_version_patch"] != "0") { |
|
132 |
$g['product_version_string'] .= "-p{$g['product_version_patch']}"; |
|
133 |
} |
|
134 |
|
|
124 | 135 |
if (file_exists("/etc/platform")) { |
125 | 136 |
$arch = php_uname("m"); |
126 | 137 |
|
src/etc/rc | ||
---|---|---|
25 | 25 |
# Set our current version |
26 | 26 |
version=`/bin/cat /etc/version` |
27 | 27 |
|
28 |
# Version patch |
|
29 |
version_patch="0" |
|
30 |
if [ -f /etc/version.patch ]; then |
|
31 |
version_patch=`/bin/cat /etc/version.patch` |
|
32 |
fi |
|
33 |
|
|
34 |
if [ "${version_patch}" = "0" ]; then |
|
35 |
version_patch="" |
|
36 |
else |
|
37 |
version_patch=" (Patch ${version_patch})" |
|
38 |
fi |
|
39 |
|
|
28 | 40 |
# Read product_name from $g, defaults to pfSense |
29 | 41 |
# Use php -n here because we are not ready to load extensions yet |
30 | 42 |
product=$(/usr/local/bin/php -n /usr/local/sbin/read_global_var product_name pfSense) |
... | ... | |
185 | 197 |
cat /etc/ascii-art/pfsense-logo-small.txt |
186 | 198 |
echo |
187 | 199 |
echo |
188 |
echo "Welcome to ${product} ${version}${platformbanner}..." |
|
200 |
echo "Welcome to ${product} ${version}${version_patch}${platformbanner}..."
|
|
189 | 201 |
echo |
190 | 202 |
|
191 | 203 |
/sbin/conscontrol mute off >/dev/null |
... | ... | |
439 | 451 |
# Log product version to syslog |
440 | 452 |
BUILDTIME=`cat /etc/version.buildtime` |
441 | 453 |
ARCH=`uname -m` |
442 |
echo "$product ($PLATFORM) $version $ARCH $BUILDTIME"
|
|
454 |
echo "$product ($PLATFORM) ${version}${version_patch} $ARCH $BUILDTIME"
|
|
443 | 455 |
|
444 | 456 |
echo "Bootup complete" |
445 | 457 |
|
src/etc/rc.banner | ||
---|---|---|
34 | 34 |
require_once("gwlb.inc"); |
35 | 35 |
require_once("interfaces.inc"); |
36 | 36 |
|
37 |
$platform = trim(file_get_contents("{$g['etc_path']}/platform")); |
|
38 | 37 |
$hostname = $config['system']['hostname']; |
39 | 38 |
$product = $g['product_name']; |
40 | 39 |
$machine = trim(`uname -m`); |
41 | 40 |
$hideplatform = $g['hideplatform']; |
42 | 41 |
|
43 | 42 |
if (!$hideplatform) { |
44 |
$platformbanner = "-{$platform}"; |
|
43 |
if ($g['platform'] == $g['product_name']) { |
|
44 |
$platform = "full-install"; |
|
45 |
} else { |
|
46 |
$platform = $g['platform']; |
|
47 |
} |
|
48 |
$platformbanner = " {$platform}"; |
|
45 | 49 |
} |
46 | 50 |
|
47 |
print "*** Welcome to {$product} {$g['product_version']}{$platformbanner} ({$machine}) on {$hostname} ***\n";
|
|
51 |
print "*** Welcome to {$product} {$g['product_version_string']} ({$machine}{$platformbanner}) on {$hostname} ***\n";
|
|
48 | 52 |
|
49 | 53 |
$iflist = get_configured_interface_with_descr(false, true); |
50 | 54 |
foreach ($iflist as $ifname => $friendly) { |
src/usr/local/www/widgets/widgets/system_information.widget.php | ||
---|---|---|
120 | 120 |
<tr> |
121 | 121 |
<th><?=gettext("Version");?></th> |
122 | 122 |
<td> |
123 |
<strong><?=$g['product_version']?></strong> |
|
123 |
<strong><?=$g['product_version_string']?></strong>
|
|
124 | 124 |
(<?php echo php_uname("m"); ?>) |
125 | 125 |
<br /> |
126 | 126 |
<?=gettext('built on')?> <?php readfile("/etc/version.buildtime"); ?> |
Also available in: Unified diff
Show patchlevel together with product version on banners and system information widget