Bug 103094 - Invalid disk space checks in startkde with FC2 and Ubuntu
Summary: Invalid disk space checks in startkde with FC2 and Ubuntu
Status: RESOLVED WORKSFORME
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-02 20:56 UTC by Ilpo Kantonen
Modified: 2005-04-03 12:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilpo Kantonen 2005-04-02 20:56:03 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    RedHat RPMs
OS:                Linux

In script /usr/bin/starkde I found lines

   space_tmp=`df /tmp | xargs | cut -d" " -f11`
   homedir_mount=`df "$HOME" | xargs | cut -d" " -f8`

and then they are called in same script:

if [ $space_tmp -lt 50 ]; then     <- line 24
...
if [ $space_home -lt 25 ]; then   <- line 29

and that causes error lines in .xession-errors file in home directory:

/usr/bin/startkde: line 24: [: 6%: integer expression expected
/usr/bin/startkde: line 29: [: 40%: integer expression expected

I tried to execute space_tmp manually and that returned just 6%. Not an integer!
That occurred in Fedora Core 2 system and Ubuntu. Slackware linux works ok.
Add an check of operating system or change the space_tmp and space_home.

Maybe this is not bug of KDE but operating system.
Comment 1 Ilpo Kantonen 2005-04-02 21:58:30 UTC
I added this bug also to bugzilla.redhat.com as bug #153202.
Comment 2 Ilpo Kantonen 2005-04-02 22:19:53 UTC
Quick and dirty solution is to edit -f arguments in /usr/bin/startkde with FC2 and Ubuntu or such systems:

space_tmp=`df /tmp | xargs | cut -d" " -f10`
homedir_mount=`df "$HOME" | xargs | cut -d" " -f10`
Comment 3 Stephan Kulow 2005-04-03 12:16:01 UTC
just for the reference: this is a patch not part of KDE