summaryrefslogtreecommitdiffstats
path: root/src/usr/local/sbin/pfSense-upgrade
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-10-02 07:08:16 -0300
committerRenato Botelho <renato@netgate.com>2015-10-02 07:08:16 -0300
commit54d0134ba073e5e5bf7fa9173fb557c4b7aeae49 (patch)
treed75e9da689574b36245a94e99e3694859f2a34eb /src/usr/local/sbin/pfSense-upgrade
parentf07d791305c9d0d8f339afc80d2c0aae1a5568a7 (diff)
downloadpfsense-54d0134ba073e5e5bf7fa9173fb557c4b7aeae49.zip
pfsense-54d0134ba073e5e5bf7fa9173fb557c4b7aeae49.tar.gz
Remove more cases of hard coded pfSense and use product_name
Diffstat (limited to 'src/usr/local/sbin/pfSense-upgrade')
-rwxr-xr-xsrc/usr/local/sbin/pfSense-upgrade10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade
index cdbd51b..f40efd9 100755
--- a/src/usr/local/sbin/pfSense-upgrade
+++ b/src/usr/local/sbin/pfSense-upgrade
@@ -131,10 +131,10 @@ _exit() {
pkg_upgrade_first_step() {
# figure out which kernel variant is running
- kernel_pkg=$(pkg query %n $(pkg info pfSense-kernel-\*))
+ kernel_pkg=$(pkg query %n $(pkg info ${product}-kernel-\*))
if [ -z "${kernel_pkg}" ]; then
- _echo "ERROR: It was not possible to identify which pfSense kernel is installed"
+ _echo "ERROR: It was not possible to identify which ${product} kernel is installed"
_exit 1
fi
@@ -156,7 +156,7 @@ pkg_upgrade_first_step() {
_echo "ERROR: You are using a newer kernel version than remote repository"
_exit 1
else
- _echo "ERROR: Error comparing pfSense kernel local and remote versions"
+ _echo "ERROR: Error comparing ${product} kernel local and remote versions"
_exit 1
fi
@@ -192,7 +192,7 @@ pkg_upgrade_first_step() {
# First upgrade kernel and reboot
if [ ${kernel_update} -eq 1 ]; then
- _exec "pkg upgrade ${kernel_pkg}" "Upgrading pfSense kernel"
+ _exec "pkg upgrade ${kernel_pkg}" "Upgrading ${product} kernel"
touch ${upgrade_in_progress}
_echo "Rebooting..."
/etc/rc.reboot
@@ -363,6 +363,8 @@ export ASSUME_ALWAYS_YES=true
# Disable automatic update
export REPO_AUTOUPDATE=false
+export product=$(/usr/local/bin/php -n /usr/local/sbin/read_global_var product_name pfSense)
+
unset yes
unset progress_fifo
unset action
OpenPOWER on IntegriCloud