~ubuntu-x-swat/xorg-server/xsmoke

« back to all changes in this revision

Viewing changes to lib/xsmoke.lib

  • Committer: Bryce Harrington
  • Date: 2008-12-06 07:28:57 UTC
  • Revision ID: bryce@canonical.com-20081206072857-0z6r4g7jaazt3qt0
* Check running as non-root
* Check pre-requisites on initial startup
* Clear /tmp/.X*-lock files when restarting X
* Fix include paths
* Force xorg.conf backup

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
pass_count=0
8
8
fail_count=0
9
9
 
 
10
is_superuser() {
 
11
    test $(id -u) = 0
 
12
}
 
13
 
10
14
print_test_summary() {
11
15
    echo "Tests: $test_count;  Passed: $pass_count;  Failed: $fail_count"
12
16
}
155
159
    stop_command startx
156
160
    stop_command X
157
161
 
 
162
    # Remove any stray X lock files
 
163
    rm -f /tmp/.X*-lock
 
164
 
158
165
    echo "Starting X"
159
166
    startx &
160
167
 
170
177
    test_count=$(( $test_count + 1 ))
171
178
 
172
179
    if [ -e $DEFAULT_XORG_CONF ]; then
173
 
        if [ ! -e $DEFAULT_XORG_CONF.backup ]; then
174
 
            mv $DEFAULT_XORG_CONF $DEFAULT_XORG_CONF.backup
175
 
        else
176
 
            echo "Backup $DEFAULT_XORG_CONF.backup already exists"
177
 
            echo "Warning:  Not backing up!"
178
 
        fi
 
180
        mv -f $DEFAULT_XORG_CONF $DEFAULT_XORG_CONF.backup
179
181
    fi
180
182
 
181
183
    output=`dexconf 2>&1`