summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-08 13:13:52 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-08 13:13:52 +0000
commitc0b1d35cafcf5b81e54be8a2078ded592631d96c (patch)
treeb29aec7f35569e4d2cc65f6d3b86f17825e4d845
parentd5ef2246b4ef6728eeb2932c380e13e99a49bfa1 (diff)
downloadcontrol-center-c0b1d35cafcf5b81e54be8a2078ded592631d96c.tar
control-center-c0b1d35cafcf5b81e54be8a2078ded592631d96c.tar.gz
control-center-c0b1d35cafcf5b81e54be8a2078ded592631d96c.tar.bz2
control-center-c0b1d35cafcf5b81e54be8a2078ded592631d96c.tar.xz
control-center-c0b1d35cafcf5b81e54be8a2078ded592631d96c.zip
reindent
-rwxr-xr-xcontrol-center761
1 files changed, 387 insertions, 374 deletions
diff --git a/control-center b/control-center
index ddaf442b..c0a6273d 100755
--- a/control-center
+++ b/control-center
@@ -751,390 +751,403 @@ sub wizard_format {
}
# [ [ class_label, class icon name, [ program_label, ... ] ]
-my @tree =
- (if_($isRpmDrake || $isParkRpmDrake,
- [ N("Software Management"), 'software',
- [
- if_($isRpmDrake,
- {
- title => N("Software Management"),
- list => [
- "Install Software",
- "Mandriva Update",
- ]
- },
- {
- title => N("Configure Software management"),
- list => [
- "Software Media Manager",
- ]
- },
- ),
+my @tree = (
+ if_($isRpmDrake || $isParkRpmDrake,
+ [
+ N("Software Management"), 'software',
+ [
+ if_($isRpmDrake,
+ {
+ title => N("Software Management"),
+ list => [
+ "Install Software",
+ "Mandriva Update",
+ ]
+ },
+ {
+ title => N("Configure Software management"),
+ list => [
+ "Software Media Manager",
+ ]
+ },
+ ),
+ {
+ title => N("Others"),
+ list => [
+ if_($isParkRpmDrake, "Manage park"),
+ if_($isDrakStats, "Package stats"),
+ "Mandriva Online"
+ ]
+ },
+ ]
+ ]
+ ),
+
+ if_(0, [ N("Server wizards"), 'wizard-mdk' ]),
+ [
+ N("Sharing"), 'file-sharing-mdk',
+ [
{
- title => N("Others"),
- list => [
- if_($isParkRpmDrake, "Manage park"),
- if_($isDrakStats, "Package stats"),
- "Mandriva Online"
- ]
- },
- ]
- ]),
+ title => N("Sharing"),
+ list => [
+ (wizard_format( # [ id, wizard file name, icon, description ]
+ [ "FTP wizard", "proftpd", 'ftp-mdk', N("Configure FTP"),
+ N("Set up an FTP server"), 'Proftpd.pm',
+ ],
+ [ "Samba wizard", "samba", 'samba_server-mdk', N("Configure Samba"),
+ N("Set up a file and print server for workstations running Linux and non-Linux systems"), 'Samba.pm',
+ ],
+ [ "Manage Samba share", "sambashare", 'wizard-mdk', N("Manage Samba share"),
+ N("Manage, create special share, create public/user share"), 'Sambashare.pm', 1,
+ ],
+ [ "Web wizard", "apache2", 'web_server-mdk', N("Configure web server"),
+ N("Set up a web server"), 'Apache.pm',
+ ],
+ [ "Installation server wizard", "installsrv", 'wizard-mdk', N("Configure installation server"),
+ N("Set up server for network installations of Mandriva Linux"), 'Installsrv.pm', 1,
+ ],
+ ),
+ ),
+ ]
+ },
+ ]
+ ],
+ [
+ N("Network Services"), 'network-services-mdk',
+ [
+ {
+ title => N("Network Services"),
+ list => [
+ (wizard_format( # [ id, wizard file name, icon, description ]
+ [ "DHCP wizard", "dhcp", 'dhcp_server-mdk', N("Configure DHCP"),
+ N("Set up a DHCP server"), 'Dhcp.pm',
+ ],
+ [ "DNS wizard", "bind", 'dns_server-mdk', N("Configure DNS"),
+ N("Set up a DNS server (network name resolution)"), 'Bind.pm',
+ ],
+ [ "Squid wizard", "squid", 'drakproxy-mdk', N("Configure proxy"),
+ N("Configure a web caching proxy server"), 'Squid.pm',
+ ],
+ [ "Time wizard", "ntp", 'ntp_server-mdk', N("Configure time"),
+ N("Set the time of the server to be synchronized with an external time server"), 'Ntp.pm',
+ ],
+ [ "SSHD wizard", "sshd", 'wizard-sshd', N("OpenSSH daemon configuration"),
+ N("OpenSSH daemon configuration"), 'Sshd.pm',
+ ],
+ ),
+ ),
+ ]
+ },
+ ]
+ ],
- if_(0, [ N("Server wizards"), 'wizard-mdk' ]),
- [ N("Sharing"), 'file-sharing-mdk',
- [
- {
- title => N("Sharing"),
- list => [
- (wizard_format(# [ id, wizard file name, icon, description ]
- [ "FTP wizard", "proftpd", 'ftp-mdk', N("Configure FTP"),
- N("Set up an FTP server"), 'Proftpd.pm',
- ],
- [ "Samba wizard", "samba", 'samba_server-mdk', N("Configure Samba"),
- N("Set up a file and print server for workstations running Linux and non-Linux systems"), 'Samba.pm',
- ],
- [ "Manage Samba share", "sambashare", 'wizard-mdk', N("Manage Samba share"),
- N("Manage, create special share, create public/user share"), 'Sambashare.pm', 1,
- ],
- [ "Web wizard", "apache2", 'web_server-mdk', N("Configure web server"),
- N("Set up a web server"), 'Apache.pm',
- ],
- [ "Installation server wizard", "installsrv", 'wizard-mdk', N("Configure installation server"),
- N("Set up server for network installations of Mandriva Linux"), 'Installsrv.pm', 1,
- ],
- ),
- ),
- ]
- },
- ]
- ],
- [ N("Network Services"), 'network-services-mdk',
- [
- {
- title => N("Network Services"),
- list => [
- (wizard_format(# [ id, wizard file name, icon, description ]
- [ "DHCP wizard", "dhcp", 'dhcp_server-mdk', N("Configure DHCP"),
- N("Set up a DHCP server"), 'Dhcp.pm',
- ],
- [ "DNS wizard", "bind", 'dns_server-mdk', N("Configure DNS"),
- N("Set up a DNS server (network name resolution)"), 'Bind.pm',
- ],
- [ "Squid wizard", "squid", 'drakproxy-mdk', N("Configure proxy"),
- N("Configure a web caching proxy server"), 'Squid.pm',
- ],
- [ "Time wizard", "ntp", 'ntp_server-mdk', N("Configure time"),
- N("Set the time of the server to be synchronized with an external time server"), 'Ntp.pm',
- ],
- [ "SSHD wizard", "sshd", 'wizard-sshd', N("OpenSSH daemon configuration"),
- N("OpenSSH daemon configuration"), 'Sshd.pm',
- ],
- ),
- ),
- ]
- },
- ]
- ],
+ [
+ N("Authentication"), 'drakauth-mdk',
+ [
+ {
+ title => N("Authentication"),
+ list => [
+ if_($is_auth_wizard_installed, "Authentication"),
+ (wizard_format( # [ id, wizard file name, icon, description ]
+ [ 'Nis+autofs wizard', "nisautofs", 'nisautofs', N("Configure NIS and Autofs"),
+ N("Configure the NIS and Autofs services"), 'Nisautofs.pm',
+ ],
+ [ "LDAP wizard", "ldap", "ldap-mdk", N("Configure LDAP"),
+ N("Configure the LDAP directory services"), 'Ldap.pm',
+ ],
+ ),
+ ),
+ ]
+ },
+ ]
+ ],
- [ N("Authentication"), 'drakauth-mdk',
- [
- {
- title => N("Authentication"),
- list => [
- if_($is_auth_wizard_installed, "Authentication"),
- (wizard_format(# [ id, wizard file name, icon, description ]
- [ 'Nis+autofs wizard', "nisautofs", 'nisautofs', N("Configure NIS and Autofs"),
- N("Configure the NIS and Autofs services"), 'Nisautofs.pm',
- ],
- [ "LDAP wizard", "ldap", "ldap-mdk", N("Configure LDAP"),
- N("Configure the LDAP directory services"), 'Ldap.pm',
- ],
- ),
- ),
- ]
- },
- ]
- ],
+ [
+ N("Groupware"), 'groupware-mdk',
+ [
+ {
+ title => N("Groupware"),
+ list => [
+ (wizard_format( # [ id, wizard file name, icon, description ]
+ if_(0, [ "News wizard", "inn", 'news-mdk', N("Configure news"),
+ N("Configure a newsgroup server"), 'Inn.pm',
+ ],
+ [ "Kolab wizard", "kolab", "kolab-mdk", N("Configure groupware"),
+ N("Configure a groupware server"), 'Kolab.pm',
+ ]),
+ [ "Postfix wizard", "postfix", 'postfix-mdk', N("Configure mail"),
+ N("Configure the Internet Mail services"), 'Postfix.pm'
+ ],
+ ),
+ ),
+ ]
+ },
+ ]
+ ],
+
+ if_($isWebAdmin || $isRfbDrake,
+ [
+ N("Online Administration"), 'online-administration-mdk',
+ [
+ {
+ title => N("Online Administration"),
+ list => [
+ if_($isWebAdmin,
+ (map {
+ my ($id, $icon, $op, $description, $long_description) = @$_;
+ $programs{$id} =
+ {
+ binary => "$bindir/mdkwebadmin.pl $op",
+ embedded => -1, # too big
+ description => $description,
+ long_description => $long_description,
+ icon => $icon,
+ };
+
+ $id;
+ } ( # [ id, wizard file name, icon, description ]
+ [ "Local Admin", 'local-administration-mdk', '--direct', N("Local administration"),
+ (-e "/usr/bin/webmin" ? N("Configure the local machine via web interface") : N("You don't seem to have webmin intalled. Local config is disabled"))
+ ],
+ [ "Remote Admin", 'remote-administration-mdk', '--link', N("Remote administration"),
+ N("Click here if you want to configure a remote box via Web interface"),
+ ])
+ )
+ ),
+ if_($isRfbDrake,
+ "Remote Control",
+ )
+ ]
+ },
+ ]
+ ]),
+
+ [
+ N("Hardware"), 'drakhard-mdk',
+ [
+ {
+ title => N("Manage your hardware"),
+ list => [
+ "Hardware List",,
+ ]
+ },
+ {
+ title => N("Configure graphics"),
+ list => [
+ "3D",
+ "Graphical server configuration",
+ ]
+ },
+ {
+ title => N("Configure mouse and keyboard"),
+ list => [
+ "Keyboard",
+ "Mouse",
+ ]
+ },
+ {
+ title => N("Configure printing and scanning"),
+ list => [
+ "Printer",
+ "Scanner",
+ if_(-x "$bindir/drakfax", "Fax"),
+ ]
+ },
+ {
+ title => N("Others"),
+ list => [
+ "UPS",
+ ]
+ },
+ ]
+ ],
- [ N("Groupware"), 'groupware-mdk',
- [
- {
- title => N("Groupware"),
- list => [
- (wizard_format(# [ id, wizard file name, icon, description ]
- if_(0, [ "News wizard", "inn", 'news-mdk', N("Configure news"),
- N("Configure a newsgroup server"), 'Inn.pm',
- ],
- [ "Kolab wizard", "kolab", "kolab-mdk", N("Configure groupware"),
- N("Configure a groupware server"), 'Kolab.pm',
- ]),
- [ "Postfix wizard", "postfix", 'postfix-mdk', N("Configure mail"),
- N("Configure the Internet Mail services"), 'Postfix.pm'
- ],
- ),
- ),
- ]
- },
- ]
- ],
+ [
+ N("Network & Internet"), 'net-mdk',
+ [
+ {
+ title => N("Manage your network devices"),
+ list => [
+ "Network Center",
+ if_(!-x "$sbindir/draknetcenter",
+ "Add Connection",
+ "Configure Internet",
+ "Manage Connection",
+ "Monitor Connection",
+ "Remove Interface",
+ ),
+ ]
+ },
+ {
+ title => N("Personalize and Secure your network"),
+ list => [
+ "Proxy Configuration",
+ "Connection Sharing",
+ "Network Profiles",
+ "Roaming",
+ "VPN",
+ ]
+ },
+ {
+ title => N("Others"),
+ list => [
+ "Hosts",
+ ]
+ },
+ ],
+ ],
- if_($isWebAdmin || $isRfbDrake,
- [ N("Online Administration"), 'online-administration-mdk',
- [
- {
- title => N("Online Administration"),
- list => [
- if_($isWebAdmin,
- (map {
- my ($id, $icon, $op, $description, $long_description) = @$_;
- $programs{$id} =
- {
- binary => "$bindir/mdkwebadmin.pl $op",
- embedded => -1, # too big
- description => $description,
- long_description => $long_description,
- icon => $icon,
- };
-
- $id;
- } (# [ id, wizard file name, icon, description ]
- [ "Local Admin", 'local-administration-mdk', '--direct', N("Local administration"),
- (-e "/usr/bin/webmin" ? N("Configure the local machine via web interface") : N("You don't seem to have webmin intalled. Local config is disabled"))
- ],
- [ "Remote Admin", 'remote-administration-mdk', '--link', N("Remote administration"),
- N("Click here if you want to configure a remote box via Web interface"),
- ])
- )
- ),
- if_($isRfbDrake,
- "Remote Control",
- )
- ]
- },
- ]
- ]),
-
- [ N("Hardware"), 'drakhard-mdk',
- [
- {
- title => N("Manage your hardware"),
- list => [
- "Hardware List",,
- ]
- },
- {
- title => N("Configure graphics"),
- list => [
- "3D",
- "Graphical server configuration",
- ]
- },
- {
- title => N("Configure mouse and keyboard"),
- list => [
- "Keyboard",
- "Mouse",
- ]
- },
- {
- title => N("Configure printing and scanning"),
- list => [
- "Printer",
- "Scanner",
- if_(-x "$bindir/drakfax", "Fax"),
- ]
- },
- {
- title => N("Others"),
- list => [
- "UPS",
- ]
- },
+ [
+ N("System"), 'system-mdk',
+ [
+ {
+ title => N("Manage system services"),
+ list => [
+ if_(!$is_auth_wizard_installed, "Authentication"),
+ "Menus",
+ "Services",
+ "Fonts",
+ ]
+ },
+ {
+ title => N("Localization"),
+ list => [
+ "Date & Time",
+ "Localization",
+ ]
+ },
+ {
+ title => N("Administration tools"),
+ list => [
+ "Logs",
+ if_($ENV{LANGUAGE} !~ /^zh/, "Console"),
+ "Users",
+ if_(-x "/usr/X11R6/bin/drakcronat", "Programs scheduling"),
+ "Backups",
+ "Virtualization",
+ ]
+ },
]
- ],
-
- [ N("Network & Internet"), 'net-mdk',
- [
- {
- title => N("Manage your network devices"),
- list => [
- "Network Center",
- if_(!-x "$sbindir/draknetcenter",
- "Add Connection",
- "Configure Internet",
- "Manage Connection",
- "Monitor Connection",
- "Remove Interface",
- ),
- ]
- },
- {
- title => N("Personalize and Secure your network"),
- list => [
- "Proxy Configuration",
- "Connection Sharing",
- "Network Profiles",
- "Roaming",
- "VPN",
- ]
- },
- {
- title => N("Others"),
- list => [
- "Hosts",
- ]
- },
+ ],
+
+ [
+ N("Network Sharing"), 'partition-mdk',
+ [
+ {
+ title => N("Configure Windows(R) shares"),
+ list => [
+ "Samba mount points",
+ "Samba configuration",
+ ]
+ },
+ {
+ title => N("Configure NFS shares"),
+ list => [
+ "NFS mount points",
+ "NFS exports",
+ ]
+ },
+ {
+ title => N("Configure WebDAV shares"),
+ list => [
+ "WebDAV mount points",
+ ]
+ },
],
- ],
-
- [ N("System"), 'system-mdk',
- [
- {
- title => N("Manage system services"),
- list => [
- if_(!$is_auth_wizard_installed, "Authentication"),
- "Menus",
- "Services",
- "Fonts",
- ]
- },
- {
- title => N("Localization"),
- list => [
- "Date & Time",
- "Localization",
- ]
- },
- {
- title => N("Administration tools"),
- list => [
- "Logs",
- if_($ENV{LANGUAGE} !~ /^zh/, "Console"),
- "Users",
- if_(-x "/usr/X11R6/bin/drakcronat", "Programs scheduling"),
- "Backups",
- "Virtualization",
- ]
- },
- ]
- ],
-
- [
- N("Network Sharing"), 'partition-mdk',
- [
- {
- title => N("Configure Windows(R) shares"),
- list => [
- "Samba mount points",
- "Samba configuration",
- ]
- },
- {
- title => N("Configure NFS shares"),
- list => [
- "NFS mount points",
- "NFS exports",
- ]
- },
- {
- title => N("Configure WebDAV shares"),
- list => [
- "WebDAV mount points",
- ]
- },
- ],
- ],
-
- [ N("Local disks"), 'partition-mdk',
- [
- {
- title => N("Local disks"),
- list => [
- "Hard Drives",
- (map {
- my ($type, $scan, $text, $long_text) = @$_;
- map_index {
- my $full_name = $text . ($::i ? $::i + 1 : '');
- $programs{$full_name} =
- {
- binary => "$sbindir/diskdrake --removable=$_->{device}",
- embedded => 1,
- description => $text,
- long_description => sprintf(translate($long_text), $_->{info}),
- icon => "diskdrake_$type",
- };
- $full_name;
- } $scan->();
- } do {
- my %cdroms_by_type;
- foreach (detect_devices::cdroms()) {
- my $type = detect_devices::isBurner($_) ? 'burner' : detect_devices::isDvdDrive($_) ? 'DVD' : 'cdrom';
- push @{$cdroms_by_type{$type}}, $_;
- }
- ([ 'cdrom', sub { @{$cdroms_by_type{cdrom} || []} }, N("CD-ROM",),
- N_("Set where your \"%s\" CD-ROM drive is mounted"),
- ],
- [ 'dvd', sub { @{$cdroms_by_type{DVD} || []} }, N("DVD-ROM (%s)"),
- N_("Set where your \"%s\" DVD-ROM drive is mounted"),
- ],
- [ 'cdwriter', sub { @{$cdroms_by_type{burner} || []} }, N("CD/DVD burner (%s)"),
- N_("Set where your \"%s\" CD/DVD burner is mounted"),
- ],
- [ 'floppy', \&detect_devices::floppies, N("Floppy drive"),
- N_("Set where your floppy drive is mounted"),
- ],
- [ 'zip', \&detect_devices::zips, N("ZIP drive"),
- N_("Set where your ZIP drive is mounted"),
- ],
- );
- }),
- "Partition Sharing",
- ]
- },
+ ],
+
+ [
+ N("Local disks"), 'partition-mdk',
+ [
+ {
+ title => N("Local disks"),
+ list => [
+ "Hard Drives",
+ (map {
+ my ($type, $scan, $text, $long_text) = @$_;
+ map_index {
+ my $full_name = $text . ($::i ? $::i + 1 : '');
+ $programs{$full_name} =
+ {
+ binary => "$sbindir/diskdrake --removable=$_->{device}",
+ embedded => 1,
+ description => $text,
+ long_description => sprintf(translate($long_text), $_->{info}),
+ icon => "diskdrake_$type",
+ };
+ $full_name;
+ } $scan->();
+ } do {
+ my %cdroms_by_type;
+ foreach (detect_devices::cdroms()) {
+ my $type = detect_devices::isBurner($_) ? 'burner' : detect_devices::isDvdDrive($_) ? 'DVD' : 'cdrom';
+ push @{$cdroms_by_type{$type}}, $_;
+ }
+ ([ 'cdrom', sub { @{$cdroms_by_type{cdrom} || []} }, N("CD-ROM",),
+ N_("Set where your \"%s\" CD-ROM drive is mounted"),
+ ],
+ [ 'dvd', sub { @{$cdroms_by_type{DVD} || []} }, N("DVD-ROM (%s)"),
+ N_("Set where your \"%s\" DVD-ROM drive is mounted"),
+ ],
+ [ 'cdwriter', sub { @{$cdroms_by_type{burner} || []} }, N("CD/DVD burner (%s)"),
+ N_("Set where your \"%s\" CD/DVD burner is mounted"),
+ ],
+ [ 'floppy', \&detect_devices::floppies, N("Floppy drive"),
+ N_("Set where your floppy drive is mounted"),
+ ],
+ [ 'zip', \&detect_devices::zips, N("ZIP drive"),
+ N_("Set where your ZIP drive is mounted"),
+ ],
+ );
+ }),
+ "Partition Sharing",
+ ]
+ },
]
- ],
-
- [ N("Security"), 'security-mdk',
- [
- {
- title => N("Security"),
- list => [
- "Security Level",
- "Security Permissions",
- "Firewall",
- "Invictus Firewall",
- ]
- },
+ ],
+
+ [
+ N("Security"), 'security-mdk',
+ [
+ {
+ title => N("Security"),
+ list => [
+ "Security Level",
+ "Security Permissions",
+ "Firewall",
+ "Invictus Firewall",
+ ]
+ },
]
- ],
-
- [ N("Boot"), 'boot-mdk',
- [
- {
- title => N("Configure boot steps"),
- list => [
- #if_(detect_devices::floppies, "Boot Disk"), # kernel is too big
- "Auto login Config",
- "Boot Config",
- "Display Manager chooser",
- ]
- },
- {
- title => N("Boot look'n feel"),
- list => [
- "Boot Theme",
- ]
- },
- {
- title => N("Others"),
- list => [
- if_(0, "Auto Install"),
- ]
- },
+ ],
+
+ [
+ N("Boot"), 'boot-mdk',
+ [
+ {
+ title => N("Configure boot steps"),
+ list => [
+ #if_(detect_devices::floppies, "Boot Disk"), # kernel is too big
+ "Auto login Config",
+ "Boot Config",
+ "Display Manager chooser",
+ ]
+ },
+ {
+ title => N("Boot look'n feel"),
+ list => [
+ "Boot Theme",
+ ]
+ },
+ {
+ title => N("Others"),
+ list => [
+ if_(0, "Auto Install"),
+ ]
+ },
]
- ],
- );
+ ],
+);
if (scalar glob_("$more_wizard_dir/*.conf")) {
my @leaf = (