Automatic unattended execution of '

hosking at convexs.UUCP hosking at convexs.UUCP
Thu Sep 18 19:46:00 AEST 1986


How sleezy are you willing to be ?
This is *really* crude, but it might work:

The general idea is to temporarily replace /etc/rc with a dump script.

1. Create  a dump script that does whatever you want.  Call it /etc/dump_rc.
   The last thing in it should be "cp /etc/real_rc /etc/rc;/etc/reboot."
   It should NOT start the normal daemons.  This eliminates possible races
   with cron jobs or other daemons.  The /etc/nologin trick shouldn't be
   needed here, since the system will have rebooted before rc finishes.

2. cp /etc/rc /etc/real_rc.

3. Create a crontab entry that does 'shutdown -r +5 "to do the dumps"'
   after it does "cp /etc/dump_rc /etc/rc."

Yes, there are plenty of possible problems if you crash in the middle, etc...
but it's hard to make it much simpler, and it might be useful enough to use.
You could do something similar with the .profile or .cshrc for root, too.

How well this works would depend on the characteristics of your particular
backup scheme.  Since I don't know much about your system, I can't guess
whether it's a workable solution for your needs.



More information about the Comp.unix mailing list