From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1020c6,c0b68e7f7e519d7b X-Google-Attributes: gid1020c6,public X-Google-Thread: fee84,c0b68e7f7e519d7b X-Google-Attributes: gidfee84,public From: Simon Wing-Tang Subject: Re: Inserting a system reboot in crontab script Date: 1996/11/14 Message-ID: <328B6DD7.5887@vttsvic1.telecom.com.au>#1/1 X-Deja-AN: 196316525 references: <01bbd05d$a6174760$99d3bb8b@pc-blg.nsc.com> content-type: text/plain; charset=us-ascii organization: Telstra mime-version: 1.0 newsgroups: comp.unix.admin,comp.unix.osf.osf1 x-mailer: Mozilla 3.0Gold (Win16; I) Benjie Gandionco wrote: > > Is it possible to insert a system reboot in a crontab script? > I want to do a reboot in the middle of a script and then continue > right where it left off. > > Thanks. I think it is possible, but I'd like to know why you want to do it. It's not a good idea to reboot the box while your not there, just in case something goes wrong. That said, here's something that may work. Split the script into 2 sections, 1 up to the reboot and 1 after the reboot. Just before the reboot write a temp file to a particular directory, then sync the disks and issue a reboot. In the system stratup files add a linr to check for the existance of the file the script wrote, if it exists then run the second part of the script. Don't forget to clean up the temp file when finished, still can't think of why you'd want to reboot in the middle of a script though ? Simon. -- -------------------------------------------------------------------- | Simon Wing-Tang | | Systems Administrator | | Telstra Learning " If at first you don't succeed.. | | swingtan@vttsvic1.telecom.com.au use a bigger hammer ! " | | http://www.alexia.net.au/~www/swt | | PH: 613-9295-4223 | --------------------------------------------------------------------