summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakxconf
blob: 30a8468b0d782eccbab33bb506d5c754e3884a0c (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/perl

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


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

local $_ = join '', @ARGV;

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

my $in = vnew interactive('su');
my @l=(
       { des => 'Display Configuration',
	 cmd => 'XFdrake'},
       { des => 'Hard Drive Configuration',
	 cmd => 'diskdrake'},
       { des => 'KeyBoard Configuration',
	 cmd => 'keyboarddrake'},
       { des => 'Mouse Configuration',
	 cmd => 'mousedrake'},
       { des => 'Hardware Information',
	 cmd => 'harddrake'},
       { des => 'Internet & Network',
	 cmd => 'draknet'},
       { des => 'Firewalling',
	 cmd => 'tinyfirewall'},
       { des => 'Printer Configuration',
	 cmd => 'printerdrake'},
       { des => 'Add new users',
	 cmd => 'adduserdrake'},
       { des => 'Service Configuration',
	 cmd => 'drakxservices'},
       { des => 'Security Levels',
	 cmd => 'draksec'},
       { des => 'Boot Configuration',
	 cmd => 'drakboot'},
      );
my $choice = $in->ask_from_listf(_("Control Center"),
			    _("Choose the tool you want to use"),
			    sub { (int grep { -x "$_/" . $_[0]{cmd} } split (":", $ENV{PATH})) ? $_[0]{des} : ()  },#grep { my $prog = $_; int grep { -x "$_/$prog" } split ":", $ENV{PATH} } $_[0]{des} },
			    \@l ) or $in->exit(1);
$in->end;

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