ColdFusion 8 / ColdFusion 9 Beta 1 Bug 79630

The ColdFusion bugtracker mangled my text. It is provide here for readability
There are several problems with the Solaris portion of the cf-init.sh boot script installer.  Refer to the segment copied below.

---
1) The section for "Creating the Coldfusion 9 start script" appears as follows:
        echo "Creating the Coldfusion 9 start script /etc/init.d/$STARTSCRIPT"
        if [ "$MULTI_SERVER" = "false" ]; then 
           cp -f $CF_DIR/bin/coldfusion /etc/init.d/coldfusion_9
        else
           cp -f $CF_DIR/bin/cf-multi-startup /etc/init.d/coldfusion_9
        fi
Notice that the last argument of the "cp" command refers to "coldfusion_9".  The "else" part of the conditional is executed when using Multiserver, so the "cp" command should copy the cf-multi-startup file so that its final name is coldfusion9multi not coldfusion_9.

In fact, the conditional should use the STARTSCRIPT variable created earlier so that it reads like this instead:  
        echo "Creating the Coldfusion 9 start script /etc/init.d/$STARTSCRIPT"
        if [ "$MULTI_SERVER" = "false" ]; then 
           cp -f $CF_DIR/bin/coldfusion /etc/init.d/$STARTSCRIPT
        else
           cp -f $CF_DIR/bin/cf-multi-startup /etc/init.d/$STARTSCRIPT
        fi
---
2) Near the end of the install_sun() block, the following text appears:
        echo "Adding ColdFusion 9 start/kill links"
        ln -s /etc/init.d/STARTSCRIPT
        ln -s /etc/init.d/STARTSCRIPT
Here the variable STARTSCRIPT is used with out the variable notation "$".  When executed it literally creates a link called "STARTSCRIPT", incorrectly.

The script should read like the following to use "$":
        echo "Adding ColdFusion 9 start/kill links"
        ln -s /etc/init.d/$STARTSCRIPT
        ln -s /etc/init.d/$STARTSCRIPT

---
3) In the same block of code mentioned in item 2 above, the "ln" command is called twice in a row.  The second time it is run it produces an error that the link already exists.  The second "ln" command line should be removed to appear as follows:
        echo "Adding ColdFusion 9 start/kill links"
        ln -s /etc/init.d/STARTSCRIPT
        # REMOVE ME: ln -s /etc/init.d/STARTSCRIPT

---
4) You may have already corrected this as part of the CF8>CF9 transition, but references to cfsearch8 should be replaced by cfsearch9, and, references to CFMX should also be replaced by "ColdFusion 9".  Finally, the proper name for the product should be spelled with captial F, so for example "Creating the Coldfusion 9..." should be "Creating the ColdFusion 9..."



========== cf-init.sh / Solaris portion ===========

install_sun() {

        if [ "$MULTI_SERVER" = "false" ]; then 
             STARTSCRIPT=coldfusion_9
        else
             STARTSCRIPT=coldfusion9multi
        fi

        if [ ! -f /etc/init.d/cfsearch8 ] && [ -f $CF_DIR/bin/cfsearch ]; then
                echo "Creating the CFMX Search start script /etc/init.d/cfsearch8"
                cp -f $CF_DIR/bin/cfsearch /etc/init.d/cfsearch8

                echo "Adding CFMX Search start/kill links"
                ln -s /etc/init.d/cfsearch8 /etc/rc3.d/S25cfsearch8
                ln -s /etc/init.d/cfsearch8 /etc/rc1.d/K19cfsearch8
        fi

        if [ "$VERITYONLY" -ne 1 ]; then

        [ -f /etc/init.d/$STARTSCRIPT ] && {
                echo "Coldfusion 9 appears to already be set up to start on boot"
                exit 2
        }

        echo "Creating the Coldfusion 9 start script /etc/init.d/$STARTSCRIPT"
        if [ "$MULTI_SERVER" = "false" ]; then 
           cp -f $CF_DIR/bin/coldfusion /etc/init.d/coldfusion_9
        else
           cp -f $CF_DIR/bin/cf-multi-startup /etc/init.d/coldfusion_9
        fi


        echo "Adding ColdFusion 9 start/kill links"
        ln -s /etc/init.d/STARTSCRIPT
        ln -s /etc/init.d/STARTSCRIPT

        fi   # not verity only

        echo "Install complete"
}


uninstall_sun() {
        if [ "$MULTI_SERVER" = "false" ]; then 
             STARTSCRIPT=coldfusion_9
        else
             STARTSCRIPT=coldfusion9multi
        fi

        echo "Removing the CFMX Search start script /etc/init.d/cfsearch8"
        rm -f /etc/init.d/cfsearch8 > /dev/null 2>&1

        echo "Removing CFMX Search start/kill links"
        rm -f /etc/rc3.d/S25cfsearch8 > /dev/null 2>&1
        rm -f /etc/rc1.d/K19cfsearch8 > /dev/null 2>&1

        if [ "$VERITYONLY" -ne 1 ]; then
        [ -f /etc/init.d/$STARTSCRIPT ] || {
                echo "Coldfusion 9 does not appear to be added to your init system"
                exit 2
        }

        DIRPATH=/etc/rc3.d:/etc/rc1.d:/etc/init.d
        OLDIFS="$IFS"
        IFS=":"

        for DIR in $DIRPATH
        do
                        for RMFILE in `ls $DIR/*$STARTSCRIPT 2> /dev/null`
                        do
                                [ -f "$RMFILE" ] && {
                                echo "Removing $RMFILE"
                                                rm -f $RMFILE
                                }
                        done
        done

        IFS="$OLDIFS"
        fi   # not verity only

        echo "Uninstall complete"
}