何を入力してもshutdownされてしまうのですが
どうして?

echo -n "shutdown? "
read yn

if [ "$yn"="y" ]; then
shutdown -h now
fi