summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2002-08-27 16:30:39 +0000
committerDaouda Lo <daouda@mandriva.com>2002-08-27 16:30:39 +0000
commit8f6466c4a1960b37229fc4225ffbc25514c27d0c (patch)
tree24ab1d42eede37f0b4c1b76bbdd0022a92b1ebfc
parentfa9b0ea724a59d6d90bd0a8caf26a6aae27dd5d2 (diff)
downloadcontrol-center-8f6466c4a1960b37229fc4225ffbc25514c27d0c.tar
control-center-8f6466c4a1960b37229fc4225ffbc25514c27d0c.tar.gz
control-center-8f6466c4a1960b37229fc4225ffbc25514c27d0c.tar.bz2
control-center-8f6466c4a1960b37229fc4225ffbc25514c27d0c.tar.xz
control-center-8f6466c4a1960b37229fc4225ffbc25514c27d0c.zip
- add drakxconf
-rw-r--r--Makefile1
-rwxr-xr-xdrakxconf50
2 files changed, 51 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 207b06c5..9fc1b582 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@ install: all
install -m755 clock.pl $(DESTDIR)/usr/sbin/
install -m755 menus_launcher.pl $(DESTDIR)/usr/sbin/
install -m755 print_launcher.pl $(DESTDIR)/usr/sbin/
+ install -m755 drakxconf $(DESTDIR)/usr/sbin/
install -m644 COPYING $(DESTDIR)/usr/share/doc/$(NAME)-$(VERSION)/
for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
diff --git a/drakxconf b/drakxconf
new file mode 100755
index 00000000..37a473c7
--- /dev/null
+++ b/drakxconf
@@ -0,0 +1,50 @@
+#!/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);