diff options
Diffstat (limited to 'src/etc/rc')
-rwxr-xr-x | src/etc/rc | 30 |
1 files changed, 18 insertions, 12 deletions
@@ -67,20 +67,25 @@ export HOME PATH # Set our operating platform PLATFORM=`/bin/cat /etc/platform` -# 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 @@ -509,6 +514,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 ($PLATFORM) ${version}${version_patch} $ARCH $BUILDTIME" |