Bugzilla – Bug 102963
Post-install shell problem
Last modified: 2005-09-10 10:23:08 UTC
Post-install = YAST from harddisk after CD install After the post-install has finished and we're finally going to runlevel 3/5 the first time, /usr/lib/YaST2/startup/YaST2.call: line 612: [: =: unary operator expected See shot.
Created attachment 45237 [details] For reference, here's a screenie
I'll check it
Marcus this is a bug in YaST2.call script: --- cut --- if [ $server_running = 1 ];then sleep 1 && kill $xserver_pid while kill -0 $xserver_pid 2>/dev/null ; do sleep 1 done fi --- cut --- it seems that the $server_running variable is undefined (empty) and bash cannot handle that. Debugging Example: --- y2call.sh --- #!/bin/bash if [ $server_running = 1 ];then echo "1" fi --- y2call.sh --- produces --> ./y2call.sh: line 3: [: =: unary operator expected Solution (quoting): --- y2call.sh --- server_running=1 if [ "$server_running" = "1" ];then echo "1" fi --- y2call.sh --- produces --> ./y2call.sh 1 And works also with the undefined $server_running variable too
has been fixed yesterday *** This bug has been marked as a duplicate of 100729 ***
Rule of thumb: put "" around every var.