fix for bug 4374: support running postscripts under directories in /intall/postscripts/
This commit is contained in:
parent
a049714a3e
commit
f0987c908f
4
xCAT-server/share/xcat/install/scripts/post.ubuntu
Normal file → Executable file
4
xCAT-server/share/xcat/install/scripts/post.ubuntu
Normal file → Executable file
@ -63,7 +63,9 @@ do
|
||||
export XCATSERVER
|
||||
mv $i/postscripts /xcatpost
|
||||
rm -rf $i
|
||||
chmod +x /xcatpost/*
|
||||
# To support the postscripts in the subdirectories under /install/postscripts
|
||||
#chmod +x /xcatpost/*
|
||||
chmod -R +x `find /xcatpost/ -maxdepth 1 -print | grep -E -v '^(/xcatpost/|/xcatpost/_xcat|/xcatpost/_ssh|/xcatpost/ca|/xcatpost/hostkeys)$'`
|
||||
/xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/</</g' -e 's/>/>/g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript
|
||||
MYCONT=`grep MASTER /xcatpost/mypostscript`
|
||||
MAX_RETRIES=10
|
||||
|
@ -43,7 +43,9 @@ do
|
||||
# If mypostscript doesn't exist, we will get it through getpostscript.awk
|
||||
if [ ! -x /xcatpost/mypostscript ]; then
|
||||
|
||||
chmod +x /xcatpost/*
|
||||
# To support the postscripts in the subdirectories under /install/postscripts
|
||||
# chmod +x /xcatpost/*
|
||||
chmod -R +x `find /xcatpost/ -maxdepth 1 -print | grep -E -v '^(/xcatpost/|/xcatpost/_xcat|/xcatpost/_ssh|/xcatpost/ca|/xcatpost/hostkeys)$'`
|
||||
/xcatpost/getpostscript.awk |sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' | sed -e 's/</</g' -e 's/>/>/g' -e 's/&/\&/g' -e 's/"/"/g' -e "s/'/'/g" > /xcatpost/mypostscript
|
||||
|
||||
|
||||
|
@ -478,8 +478,9 @@ if grep 'rw /rw tmpfs ' /proc/mounts >/dev/null 2>&1; then
|
||||
ln -sf /etc/rc6.d/K10xcatmounts /etc/rc0.d/K10xcatmounts
|
||||
fi
|
||||
|
||||
|
||||
chmod +x /$xcatpost/*;
|
||||
# To support the postscripts in the subdirectories under /install/postscripts
|
||||
#chmod +x /$xcatpost/*;
|
||||
chmod -R +x `find $xcatpost/ -maxdepth 1 -print | grep -E -v "^($xcatpost/|$xcatpost/_xcat|$xcatpost/_ssh|$xcatpost/ca|$xcatpost/hostkeys)$"`
|
||||
|
||||
cd /$xcatpost;
|
||||
PATH=/$xcatpost:$PATH
|
||||
|
@ -33,7 +33,9 @@ done
|
||||
cd /xcatpost;
|
||||
PATH=/xcatpost:$PATH
|
||||
export PATH
|
||||
chmod +x /xcatpost/*;
|
||||
# To support the postscripts in the subdirectories under /install/postscripts
|
||||
#chmod +x /xcatpost/*;
|
||||
chmod -R +x `find /xcatpost/ -maxdepth 1 -print | grep -E -v '^(/xcatpost/|/xcatpost/_xcat|/xcatpost/_ssh|/xcatpost/ca|/xcatpost/hostkeys)$'`
|
||||
|
||||
POST_IN_DIR="/xcatpost"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user