Hi All,
using a product to deploy this script to Solaris 10 servers.....package is downloaded to /tmp and then run to install the files.....Any ideas why script below would fail with the following output?
Output:
./installer.sh
PCN0087
making directory /data/PCN/pcn087
cp: /data/PCN/pcn087: is a directory
cp: cannot access pcn087.sh
cp: data/PCN/pcn087: is a directory
cp: cannot access uninstall087.sh
Script being run:
!/bin/bash
# install script - read pcn number from pcn.ver file
VERSION="`cat pcn.ver`"
PKGDIR=/data/PCN/pcn${VERSION}
TITLE="PCN${VERSION} "
echo ${TITLE}
echo making directory ${PKGDIR}
mkdir -p ${PKGDIR}
cp -f pcn.ver ${PKGDIR}
cp -f pcn${VERSION}.sh ${PKGDIR}
cp -f uninstall${VERSION}.sh ${PKGDIR}
cd ${PKGDIR}
.....if i change the first cp line to:
cp pcn.ver ${PKGDIR}/pcn.ver
i get a message saying that the file is not a directory. but if I run the same commands on commandline it works ok 
would be most greatful anybody could explain why this wont work from a script and suggest a solution.