[Ovirt-devel] [RFC][PATCH v2] edit-livecd : fail on error in arbitrary code
Alan Pevec
apevec at gmail.com
Tue Dec 15 09:36:36 UTC 2009
ACK - works as advertised and propagates the script return code correctly
I'm sorry for the delay - I've pushed this now with a minor modification
(delExit instead of setting EXIT variable directly):
--- a/edit-livecd
+++ b/edit-livecd
@@ -127,6 +127,11 @@ addExit() {
trap "$EXIT" EXIT HUP TERM INT QUIT
}
+delExit() {
+ EXIT=${EXIT/$@ ; /}
+ trap "$EXIT" EXIT HUP TERM INT QUIT
+}
+
mnt() {
local margs="$1" ; shift
local mp="$WDIR/$1"
@@ -164,7 +169,7 @@ if [ -n "$CODE" ]; then
cd $WDIR/ex
addExit "cd -"
eval "$CODE"
- EXIT=${EXIT/cd - ;/}
+ delExit "cd -"
cd -
else
echo "***"
Speaking of edit-livecd, David posted few months ago edit-livecd.py -
reimplementation in Python which was proposed for inclusion into
livecd-tools - we need to restart that thread on livecd list:
https://www.redhat.com/archives/ovirt-devel/2009-September/msg00139.html
Abhishek, could you please have a look at that script and gives us your
feedback?
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20091215/d4d14907/attachment.htm>
More information about the ovirt-devel
mailing list