Hi PMP,
Tested your problem under Debian and the following worked for me.
Make test.sh script in /etc/init.d with the following shell code
Code:
#!/bin/sh
case "$1" in
start)
echo "Interactive test at startup"
read var
echo ${var}
;;
stop)
echo "Interactive test at shutdown"
read var
echo ${var}
;;
esac
After that create a link in the appropriate /etc/rc*.d (debians default runlevel is 2, Fedora's runlevel usually is 3 or 5)
Code:
ln -s /etc/init.d/test.sh S90test.sh
Of course you can do the same for the shutdown sequence, for example:
Code:
ln -s /etc/init.d/test.sh K10test.sh
That's it. Works like a charm.
Hope this helps.