[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: in difference time, can automatic change the default boot item?
From: |
Bean |
Subject: |
Re: in difference time, can automatic change the default boot item? |
Date: |
Sat, 26 Apr 2008 03:02:08 +0800 |
On Thu, Apr 24, 2008 at 5:39 PM, wolfman.wu <address@hidden> wrote:
>
>
> my computer have linux & xp, I want to set:
>
> 1. daytime, the default boot item is XP
> 2. night, the default boot item auto change to LINUX
>
> the grub have this feature?
No, grub doesn't have this feature, but some time ago, i write a patch
for grub4dos that implement a similar feature.It add a new command
checktime to test the current daytime:
checktime * * * * *
The five parameters for checktime is the same as in crontab:minute,
hour, day, month and day of week. this command check if the current
daytime is within the range specified by the parameters, and return
true or false accordingly. Combined this with the script support for
grub2, you can perform some operation in a selected time range.
It's relative easy to port this to grub2, anyone interested ?
--
Bean