bug-grub
[Top][All Lists]
Advanced

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

grub --batch not returning exit code to calling shell?


From: Amit Dor-Shifer
Subject: grub --batch not returning exit code to calling shell?
Date: Tue, 10 Nov 2009 11:35:35 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090605)

reposting, +bug-grub.
Any takers?

<shell>
cm.stargate ~ # cat /tmp/grub.inst
root (hd1,0)
setup --prefix=/no/such/place (hd1)
cm.stargate ~ # cat /tmp/grub.inst |grub --batch --device-map
/tmp/device_map.grub


   GNU GRUB  version 0.97  (640K lower / 7168K upper memory)

[ Minimal BASH-like line editing is supported.  For the first word, TAB
  lists possible command completions.  Anywhere else TAB lists the possible
  completions of a device/filename. ]
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup --prefix=/no/such/place (hd1)
Checking if "/no/such/place/stage1" exists... no

Error 15: File not found
grub> cm.stargate ~ # echo $?
0
</shell>

I expected grub to return the error code (15), or at least indicate
through its return code that something went wrong.
How can I get a real exit code from grub?
10x,
Amit





reply via email to

[Prev in Thread] Current Thread [Next in Thread]