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

Re: extra reboot for another kernel



Thanks for all your help,

I am indeed using the two stage installer for the boot process (we are attempting to stay exclusively in the "stable" distribution of debian.)

I did find a solution to the problem I was having. I run a script in my preseeded late_command of the base-config. In that script I appended the following lines to the very end:

cur_min=$(date +%M)
let "future_min=(cur_min+2)%60"
echo "$future_min * * * * root /root/install/reboot.sh" > /etc/cron.d/reboot

echo "#!/bin/sh" > /root/install/reboot.sh
echo "rm /etc/cron.d/reboot" >> /root/install/reboot.sh
echo "/sbin/reboot" >> /root/install/reboot.sh
chmod 744 /root/install/reboot.sh

As you can see it adds a cron job to reboot the machine. The cron job just runs a short script which does two things - removes the cron job and reboots the machines. The cron job is run just once - between one and two minutes after the end of the install.

Cheers - looking forward to Etch, keep up the great work

Mike



Reply to: