gabriel rosenkoetter on Fri, 4 Jul 2003 12:38:09 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] pre-reboot scripted message?


On Fri, Jul 04, 2003 at 09:42:00AM -0400, kaze wrote:
> I will try to figure out what an rc script is and how this is triggered as
> I'm sure there's a bunch of ways to reboot. TX

Here, try this:

# cat > /etc/init.d/openlid.sh
#!/bin/sh

echo "Open the lid on ns2 and then press return to continue."
read foo
^D
# ln -s /etc/init.d/openlid.sh /etc/rc6.d/S01openlid.sh

That'll get everything you can get. (Any reboot that doesn't process
/etc/rc6.d won't process any scripts at all, so you're screwed
anyway.) I don't recall if Linux has reboot(8) parse /etc/rc6.d or
not. But you might want to have people only reboot the machine with
`shutdown -r now` or with `init 6`.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpbypie0fKBK.pgp
Description: PGP signature