I'm not familiar with pkgadd but it looks like it's running the script with input redirected from /dev/null. The recommendation for package installation scripts is to avoid user interaction, anyway. I'd suggest you avoid this dialog altogether; if it's absolutely necessary, I'm imagining the pkgadd documentation will have suggestions for how to properly engage the administrator in a dialogue (probably even before this script runs).
According to Solaris packaging documentation, the only place, which the installer can solicit user input, is through "request script". That's a stage far before post-install.