setup.sh problem
John Quigley
jmquigs at bigfoot.com
Thu Apr 3 12:00:10 EST 2003
The current setup.sh script tries to launch setup.gtk, and if that program
fails and returns 2, it runs the console setup program. However, if setup.gtk
fails because a dynamic library (e.g.: gtk) is missing, it will set $? to 127
(on my system). Thus the console program won't run and the install will fail.
This can happen if, for instance, you are running the installer
on a machine without a complete windowing system.
I changed it as listed below, and it seems to work. Setup will return 3 if it is
aborted, in that case we don't want to run console installer.
I guess I could instead add a check for 127, but I'm not sure if all dynamic
loaders will return that...
Comments?
Index: setup.sh
===================================================================
RCS file: /cvs/cvsroot/loki_setup/image/setup.sh,v
retrieving revision 1.13
diff -u -w -r1.13 setup.sh
--- setup.sh 2002/12/07 00:57:32 1.13
+++ setup.sh 2003/04/03 16:54:44
@@ -249,7 +249,8 @@
# Try to run the setup program
try_run setup.gtk $args $*
status=$?
-if [ $status -eq 2 ]; then # setup.gtk couldn't connect to X11 server - ignore
+if [ ! $status -eq 0 ] && [ ! $status -eq 3 ]; then
+ # setup.gtk failed to run (it returns 3 if aborted)
try_run -fatal setup $args $* || {
# NOTE TTimo: with -fatal working correctly, this never happens
echo "The setup program seems to have failed on $arch/$libc"
More information about the Lokisetup
mailing list