summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-25 13:27:33 -0300
committerRenato Botelho <renato@netgate.com>2015-09-25 13:27:33 -0300
commit35ad2c72a73eae06c53bac7293ff47d013f0be82 (patch)
tree611f91236c6f4592433c0d018fdd68d7aac217f5 /src
parentf62ea19be4e81917ca46e435ca3902e59bd962db (diff)
downloadpfsense-35ad2c72a73eae06c53bac7293ff47d013f0be82.zip
pfsense-35ad2c72a73eae06c53bac7293ff47d013f0be82.tar.gz
Set environment var EVENT_PIPE, used by pkg to write out progress in json format
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/local/sbin/pfSense-upgrade10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade
index 1b180e5..521fbae 100755
--- a/src/usr/local/sbin/pfSense-upgrade
+++ b/src/usr/local/sbin/pfSense-upgrade
@@ -356,6 +356,9 @@ export ASSUME_ALWAYS_YES=true
# Disable automatic update
export REPO_AUTOUPDATE=false
+# pkg write progress in EVENT_PIPE
+export EVENT_PIPE="/tmp/pkg-progress.fifo"
+
unset yes
unset action
unset action_pkg
@@ -409,6 +412,13 @@ echo $$ > ${pid_file}
trap _exit 1 2 15 EXIT
+if [ ! -p "${EVENT_PIPE}" ]; then
+ if [ -e "${EVENT_PIPE}" ]; then
+ rm -rf ${EVENT_PIPE}
+ fi
+ mkfifo ${EVENT_PIPE}
+fi
+
case "${action}" in
upgrade)
pkg_upgrade
OpenPOWER on IntegriCloud