#!/usr/bin/perl use lib qw(/usr/lib/libDrakX); use standalone; #- warning, standalone must be loaded very first, for 'explanations' use interactive; use keyboard; use common; use c; local $_ = join '', @ARGV; /-h/ and die "usage: drakxconf\n"; /-version/ and die "version: $Id$\n"; my $in = 'interactive'->vnew('su', 'default'); my @l=( { des => _("Display Configuration"), cmd => 'XFdrake'}, { des => _("KeyBoard Configuration"), cmd => 'keyboarddrake'}, { des => _("Mouse Configuration"), cmd => 'mousedrake'}, { des => _("Internet & Network"), cmd => 'drakconnect'}, { des => _("Printer Configuration"), cmd => 'printerdrake'}, { des => _("Add new users"), cmd => 'adduserdrake'}, { des => _("Service Configuration"), cmd => 'drakxservices'}, { des => _("Firewall"), cmd => 'tinyfirewall'}, { des => _("Boot Configuration"), cmd => 'drakboot'}, { des => _("Auto Install"), cmd => 'drakautoinst'}, { des => _("Connection Sharing"), cmd => 'drakgw'}, { des => _("Disk Partionning"), cmd => 'diskdrake'}, ); 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} : () }, \@l ) or $in->exit(1); $in->end; exec $choice->{cmd}, @ARGV or $in->exit(1);