Modify Startup and Shutdown Scripts
I am using Debian Etch.
I have purchased a Belkin Universal UPS and have set it up using NUT, but in order to have the automatic shutdown and restart work I need to apply a fix.
The fix says to add a script to both the startup and shutdown scripts:
Never done that, but /etc/init.d is the folder where to find startup and shutdown script.
So i would create in root
1. a file in here, name could be belkin
chmod 755 belkin
2. vi belkin then add the following by typing i or use another editor
#!/bin/sh3. in Console, run the following
update-rc.d belkin defaults
( put update-rc.d -f belkin remove to remove it )
As i am a novice, it should be validated by a more experienced linux user.
hope it helps.
Thanks for the suggestion.
I don't think that is going to work as the startup script needs to be run before the disks go RW and the shutdown after they have been made Read-Only. I think the init.d scripts get run at the wrong time for that?
I will continue to dig, but did you ever had a look at this folder /etc/initramfs-tools/scripts/ ?
I did create a script named before in /etc/initramfs-tools/scripts/init-premount containing an echo command
then /usr/sbin/update-initramfs -k all -u
At boot, i can see it before disk are mounted.
Will try to confirm that with logs messages in couple of mn
|All times are GMT -5. The time now is 06:50 PM.|