Univention Bugzilla – Bug 40550
joinscript_run_in_container has wrong exit codes?
Last modified: 2016-04-13 14:58:44 CEST
# joinscript_run_in_container bash -c 'exit 1' # echo $? 0 # joinscript_run_in_container foo exec: "foo": executable file not found in $PATH Cannot run exec command 32b67781fdd9d16dc94bf132f0d2a6ee24f1abedf87b95ee140dd84498a5e205 in container 07217b84dbcb5cdefac5f1fe18942248d9c01a9519d4ffb52622bc0ab0921e56: [8] System error: exec: "foo": executable file not found in $PATH Error starting exec command in container 32b67781fdd9d16dc94bf132f0d2a6ee24f1abedf87b95ee140dd84498a5e205: Cannot run exec command 32b67781fdd9d16dc94bf132f0d2a6ee24f1abedf87b95ee140dd84498a5e205 in container 07217b84dbcb5cdefac5f1fe18942248d9c01a9519d4ffb52622bc0ab0921e56: [8] System error: exec: "foo": executable file not found in $PATH # echo $? 0
This is very annoying when developing joinscripts
Is also an issue with joinscripts that have set -e. univention-app shell "$APP" bash -c 'exit 0' univention-app shell "$APP" bash -c 'exit 1' joinscript_run_in_container bash -c 'exit 1' univention-appcenter 5.0.20-34.145.201603262252
OK: YAML OK: Code OK: fix root@xen3:~# joinscript_run_in_container bash -c 'echo foo'; echo $? foo 0 root@xen3:~# joinscript_run_in_container bash -c 'exit 2'; echo $? 2 root@xen3:~# univention-app shell "jenkins" bash -c 'exit 0' root@xen3:~# echo $? 0 root@xen3:~# univention-app shell "jenkins" bash -c 'exit 1'; echo $? 1 root@xen3:~# univention-app shell "jenkins" bash -c 'exit 2'; echo $? 2 root@xen3:~# univention-app shell; echo $? usage: univention-app shell [-h] app ... univention-app shell: error: too few arguments 2
<http://errata.software-univention.de/ucs/4.1/146.html>