summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-02-13 09:10:34 -0200
committerRenato Botelho <renato@netgate.com>2017-02-13 09:10:34 -0200
commit687dc9050c6d3996c8d864ffcac299171aac36bf (patch)
tree1de12669004d9edb46f4450f197b7b1c0d2b5737
parente8813e5183d9bfc6fea29c0f67d6d9131a466c7a (diff)
parent55f81e30a1ece64df69053657c029b0396f48b91 (diff)
downloadpfsense-687dc9050c6d3996c8d864ffcac299171aac36bf.zip
pfsense-687dc9050c6d3996c8d864ffcac299171aac36bf.tar.gz
Merge pull request #3531 from phil-davis/version-display-at-boot
-rwxr-xr-xsrc/etc/pfSense-rc30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/etc/pfSense-rc b/src/etc/pfSense-rc
index a18a990..4b9990d 100755
--- a/src/etc/pfSense-rc
+++ b/src/etc/pfSense-rc
@@ -32,20 +32,25 @@ HOME=/
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
export HOME PATH
-# Set our current version
-version=`/bin/cat /etc/version`
+get_version ()
+{
+ # Set our current version
+ version=`/bin/cat /etc/version`
+
+ # Version patch
+ version_patch="0"
+ if [ -f /etc/version.patch ]; then
+ version_patch=`/bin/cat /etc/version.patch`
+ fi
-# Version patch
-version_patch="0"
-if [ -f /etc/version.patch ]; then
- version_patch=`/bin/cat /etc/version.patch`
-fi
+ if [ "${version_patch}" = "0" ]; then
+ version_patch=""
+ else
+ version_patch=" (Patch ${version_patch})"
+ fi
+}
-if [ "${version_patch}" = "0" ]; then
- version_patch=""
-else
- version_patch=" (Patch ${version_patch})"
-fi
+get_version
# Read product_name from $g, defaults to pfSense
# Use php -n here because we are not ready to load extensions yet
@@ -403,6 +408,7 @@ fi
/usr/local/sbin/${product}-upgrade -y -b 3
# Log product version to syslog
+get_version
BUILDTIME=`cat /etc/version.buildtime`
ARCH=`uname -m`
echo "$product ${version}${version_patch} $ARCH $BUILDTIME"
OpenPOWER on IntegriCloud