Bug 102963 - Post-install shell problem
Summary: Post-install shell problem
Status: VERIFIED DUPLICATE of bug 100729
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Installation (show other bugs)
Version: Beta 1
Hardware: All Linux
: P5 - None : Normal
Target Milestone: ---
Assignee: Marcus Schaefer
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-09 09:21 UTC by Jan Engelhardt
Modified: 2005-09-10 10:23 UTC (History)
0 users

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
For reference, here's a screenie (44.96 KB, image/png)
2005-08-09 09:22 UTC, Jan Engelhardt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Engelhardt 2005-08-09 09:21:29 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.
Comment 1 Jan Engelhardt 2005-08-09 09:22:00 UTC
Created attachment 45237 [details]
For reference, here's a screenie
Comment 2 Lukas Ocilka 2005-08-09 20:59:22 UTC
I'll check it
Comment 3 Lukas Ocilka 2005-08-10 10:21:39 UTC
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
Comment 4 Marcus Schaefer 2005-08-10 10:30:15 UTC
has been fixed yesterday  

*** This bug has been marked as a duplicate of 100729 ***
Comment 5 Jan Engelhardt 2005-08-10 16:35:03 UTC
Rule of thumb: put "" around every var.