Skip to content

Commit

Permalink
[packaging] Fix solaris daemon restart during package relocate operat…
Browse files Browse the repository at this point in the history
…ions

If package in installed on non global zone from a global zone, it stop
daemon on global zone, this is not what we want.

So skip pre-install and pre-remove step when PKG_INSTALL_ROOT is not empty
  • Loading branch information
cgalibern committed Jun 3, 2020
1 parent 3d0b23a commit 5b2c3cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/preinstall
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh

if [ "$PKG_INSTALL_ROOT" != "/" -a "$PKG_INSTALL_ROOT" != "" ]; then
echo "skipped pre-install when PKG_INSTALL_ROOT=$PKG_INSTALL_ROOT"
exit 0
fi

# set OSVC_ROOT_PATH
test -f /etc/sysconfig/opensvc && . /etc/sysconfig/opensvc
test -f /etc/default/opensvc && . /etc/default/opensvc
Expand Down
4 changes: 4 additions & 0 deletions bin/preuninstall
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ ARGS=$1
OSFLAVOR=`uname`
if [ $OSFLAVOR = 'SunOS' -o $OSFLAVOR = 'FreeBSD' ]
then
if [ "$PKG_INSTALL_ROOT" != "/" -a "$PKG_INSTALL_ROOT" != "" ]; then
echo "skipped pre-install when PKG_INSTALL_ROOT=$PKG_INSTALL_ROOT"
exit 0
fi
ARGS=0
fi

Expand Down

0 comments on commit 5b2c3cc

Please sign in to comment.