musther
September 17th, 2007, 04:38 AM
I developed and maintain a small script - AutoFsck - which automates fsck in an interactive manner. It makes it possible to run fsck when you logout, rather than on boot.
The biggest problem with it in its current state is that it restarts the machine, runs fsck, and then shuts the machine down - ideally it would run fsck on shutdown.
So, I'm playing around with ways to do that, first I created /etc/rc0.d/S89autofsck - I used S89 because it was after unmount root and before S90halt.
The file contained:
#!/bin/bash
#
echo -ne \\a
fsck -A
exit
This was to be the initial test, and indeed, the machine beeped at the echo command, and then shut down, fsck -A didn't seem to do anything, I've also tried 'fsck' and 'fsck /dev/sda2' with no luck.
Anyone know why it's not working?
Cheers
The biggest problem with it in its current state is that it restarts the machine, runs fsck, and then shuts the machine down - ideally it would run fsck on shutdown.
So, I'm playing around with ways to do that, first I created /etc/rc0.d/S89autofsck - I used S89 because it was after unmount root and before S90halt.
The file contained:
#!/bin/bash
#
echo -ne \\a
fsck -A
exit
This was to be the initial test, and indeed, the machine beeped at the echo command, and then shut down, fsck -A didn't seem to do anything, I've also tried 'fsck' and 'fsck /dev/sda2' with no luck.
Anyone know why it's not working?
Cheers