summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakxconf
blob: f4adb9989944a95fb53b19de8096f44b1a6799e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl

use lib qw(/usr/lib/libDrakX);


use interactive;
use keyboard;
use Xconfigurator_consts;
use common qw(:system);
use c;

local $_ = join '', @ARGV;

/-h/ and die "usage: draxconf\n";

$::isStandalone = 1;

my $in = vnew interactive('su');

my $choice = $in->ask_from_list("drakxconf",
_("Choose the tool you want to use"),
[ grep { my $prog = $_; int grep { -x "$_/$prog" } split ":", $ENV{PATH} }
  qw(XFdrake diskdrake keyboarddrake mousedrake netdrake printerdrake ) ]) or c::_exit(0); #- workaround for perl-GTK

$in->end;

exec $choice, @ARGV or $in->exit(1);