Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: GRUB and nvram-wakeup
"Thomas Erdmann" <vdr@igt-gmbh.de> schrieb(en)/wrote:
> The GRUB doesn't have an option '-R' to reboot with a choosen boot
> menu entry.
> Has anyone used GRUB for this or any hint to give a shell command like
> "grub xyz" to reboot with a special image ?
How about managing that with having a script modify the entry "default
<num>" in /boot/grub/grub.conf? Not tested, only an idea:
--- snip! [chboot.sh] ---
#!/bin/sh
#
# change default boot entry in /boot/grub/grub.conf
#
CONF=/boot/grub/grub.conf
TMP=/tmp/grub.conf.$$
if [ $# -ne 1 ]; then
echo "`basename $0` <num>" >&2
exit
fi
ENTRY=$1 awk '/^default/{print "default", ENVIRON["ENTRY"]; next}//' \
"$CONF" > "$TMP"
cp "$TMP" "$CONF"
rm "$TMP"
--- snap! ---
Eckard
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index