Prevent rpm post scripts from running during install into image

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1472 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
bp-sawyers 2008-05-21 20:33:25 +00:00
parent f458bcba2e
commit 4b9dee5853
2 changed files with 6 additions and 5 deletions

View File

@ -82,7 +82,7 @@ rm -rf $RPM_BUILD_ROOT
%post
%ifos linux
if [ "$1" -gt 1 ]; then #Ugrade only, restart daemon and migrate settings
if [ -x /etc/init.d/xcatd ]; then
if [ -x /etc/init.d/xcatd ] && [ -f "/proc/cmdline" ]; then
. /etc/profile.d/xcat.sh
/etc/init.d/xcatd restart
#THE NEXT BIT SHOULD NOT BE RELEVANT TO RELEASE, IT SHOULD HELP A BETA INSTALL UPDATE GRACEFULLY

View File

@ -52,10 +52,11 @@ cd -
%post
if [ "$1" == "2" ]; then #only on upgrade, as on install it's probably not going
#to work...
. /etc/profile.d/xcat.sh
mknb %{tarch}
if [ "$1" == "2" ]; then #only on upgrade, as on install it's probably not going to work...
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
. /etc/profile.d/xcat.sh
mknb %{tarch}
fi
fi
%Files