summaryrefslogtreecommitdiffstats
path: root/src/etc/pfSense-rc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-02-12 11:03:17 +0545
committerPhil Davis <phil.davis@inf.org>2017-02-12 11:03:17 +0545
commit55f81e30a1ece64df69053657c029b0396f48b91 (patch)
treed6dc2420793167b97263b781b8c378da12861199 /src/etc/pfSense-rc
parentce437697cdd7e85c6e604f3bec821305600f7e39 (diff)
downloadpfsense-55f81e30a1ece64df69053657c029b0396f48b91.zip
pfsense-55f81e30a1ece64df69053657c029b0396f48b91.tar.gz
Update version string at end of boot
Diffstat (limited to 'src/etc/pfSense-rc')
-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