The Solaris group is a forum where peers share technical expertise, solve problems, and discuss issues related to the Solaris operating system, including OS-related malfunctions, security issues, and network performance.

Actually All our servers are located in remote location, And I can't see the
booting screen. Some time due to power failure server gets rebooted, and
asks for press y for fsck. So that I need a script that will check the
filesystem with fsck -y if it gets the fiiesystem error. Without any en
traction of me.

I would recommend setting up the remote network console so you could see the
boot up screens, but if you do want the fsck to always answer yes instead,
you can change the startup script that calls fsck. I don't have solaris 8
around anymore so I can tell you exactly which script to edit, but if you:

# grep -l fsck /etc/rc*.d/S*

and edit each of those files and add the '-y' parameter to the fsck command
found there, then it should just run the fsck automatically. You might want
to check the lines around the fsck as well to understand the logic and
implications of what you are doing.