From: Vladimir Serbinenko <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Automatic backup with grub
Date: Thu, 27 Oct 2005 19:35:54 +0200 [thread overview]
Message-ID: <43610FFA.3010407@gmail.com> (raw)
In-Reply-To: <87k6fyopyr.fsf@student.han.nl>
>
>So what needs to be done is place an image back once in a while. It
>should be possible to create a GRUB command for that, I guess. :-)
>
>
Why a command? A better way, IMO, is using some variables stored in file.
It could be presented as array SAVED_INTEGER of integers and SAVED_FLAGS
of flags.
Then with command
initsaved <file>
where <file> must be created from OS (what about a tool or shell script?)
then
initsaved /grub2/savedvars
if [[ SAVED_INTEGER[0] -ge 10]]; then
defwin = "";
defrest="--default";
else
defwin = "--default";
defrest="";
fi
menu $defwin windows
{
... # Load windows
((SAVED_INTEGER[0]++));
}
menu $defrest restore windows
{
... # Restore windows
SAVED_INTEGER[0]=0;
}
menu reset counter
{
SAVED_INTEGER[0]=0;
}
timeout=10;
In this way first 10 times $defwin expands to --default and "Load
windows" becomes default. Afterwards $defrest expands to --default and
"restore windows" becomes default
Vladimir 'phcoder' Serbinenko
next prev parent reply other threads:[~2005-10-27 17:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-27 12:04 Automatic backup with grub E Leibovich
2005-10-27 12:57 ` Tomas 'Ebik' Ebenlendr
2005-10-27 16:03 ` E Leibovich
2005-10-27 20:25 ` Timothy Baldwin
2005-10-27 16:59 ` Marco Gerards
2005-10-27 17:35 ` Vladimir Serbinenko [this message]
2005-10-27 19:34 ` E Leibovich
2005-10-28 12:56 ` Timothy Baldwin
[not found] <200510272026.j9RKQ7RC026870@dell01.dinaserver.com>
2005-11-02 9:41 ` adrian15
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43610FFA.3010407@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.