Here is request script:
#!/bin/sh
echo "Current install root path is [ $BASEDIR ]"
CONFIRM="n"
while [ "$CONFIRM" != "y" ]
do
BASEDIR=""
while true
do
echo please input install root path then press [ENTER]:
read BASEDIR
if [ ! -d "$BASEDIR" ]
then
echo "$BASEDIR is not a valid path"
else
break
fi
done
echo "Are you sure to change install root path to [ $BASEDIR ]? (y/n)"
read CONFIRM
done
cat >$1 <<!
BASEDIR='$BASEDIR'
!
echo "Install root path is set to [ $BASEDIR ]"
exit 0
The request script is invoked and "BASEDIR" is set correctly. It can also be seen in postinstall script.
The problem is, the package is still installed to the default BASEDIR - "/" rather than the above one.
Any help will be appreciated!