1 |
#!/usr/bin/perl |
2 |
# $Id: wrapper 222393 2004-02-12 17:59:51Z tvignaud $ |
3 |
|
4 |
# Copyright (C) 1999-2002 MandrakeSoft |
5 |
# Damien Krotkine |
6 |
# Thierry Vignaud (tvignaud@mandrakesoft.com) |
7 |
# |
8 |
# This program is free software; you can redistribute it and/or modify it under |
9 |
# the terms of the GNU General Public License as published by the Free Software |
10 |
# Foundation; either version 2, or (at your option) any later version. |
11 |
# |
12 |
# This program is distributed in the hope that it will be useful, |
13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
# GNU General Public License for more details. |
16 |
# |
17 |
# You should have received a copy of the GNU General Public License |
18 |
# along with this program; if not, write to the Free Software |
19 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
20 |
|
21 |
# The mcc wrapper goals are : |
22 |
# - prevent bad gtk bugs if one launch it from the cli and suspend itt |
23 |
# - having less overhead for launching drakxconf if cli version must be used |
24 |
# |
25 |
# It's no more needed when using nptl on 2.6.x kernels |
26 |
|
27 |
use lib qw(/usr/lib/libDrakX); |
28 |
use common; |
29 |
|
30 |
if (!check_for_xserver()) { |
31 |
exec ("/usr/sbin/drakxconf @ARGV; reset"); |
32 |
} else { |
33 |
unless (my $pid = fork) { |
34 |
print "cannot fork\n" unless defined $pid; |
35 |
exec ("/usr/sbin/drakconf.real", @ARGV); |
36 |
} |
37 |
|
38 |
} |