summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2001-08-31 17:27:12 +0000
committerYves Duret <yduret@mandriva.com>2001-08-31 17:27:12 +0000
commit1f16a4f100d51e647d2615d88e9bf66421a7bbb7 (patch)
treebd5a40b2da86aed1728d77729d7c8e9e013fa3ee /perl-install
parente3626a297c409f40865ef0a47c3c9d60a38295ef (diff)
downloaddrakx-1f16a4f100d51e647d2615d88e9bf66421a7bbb7.tar
drakx-1f16a4f100d51e647d2615d88e9bf66421a7bbb7.tar.gz
drakx-1f16a4f100d51e647d2615d88e9bf66421a7bbb7.tar.bz2
drakx-1f16a4f100d51e647d2615d88e9bf66421a7bbb7.tar.xz
drakx-1f16a4f100d51e647d2615d88e9bf66421a7bbb7.zip
updated code
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootlook.pm22
1 files changed, 6 insertions, 16 deletions
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm
index 80f9863d1..2781c29a2 100644
--- a/perl-install/bootlook.pm
+++ b/perl-install/bootlook.pm
@@ -219,8 +219,7 @@ sub get_main_menu {
# launch X functions
#-------------------------------------------------------------
-sub isXlaunched
-{
+sub isXlaunched {
my $line;
open INITTAB, "/etc/inittab" or die _("can not open /etc/inittab for reading: %s", $!);
while (<INITTAB>) {
@@ -231,8 +230,7 @@ sub isXlaunched
return ($line-3);
}
-sub updateInit
-{
+sub updateInit {
my $runlevel = ($x_mode) ? 5 : 3;
substInFile { s/^id:\d:initdefault:\s*$/id:$runlevel:initdefault:\n/ } "/etc/inittab";
}
@@ -243,8 +241,7 @@ sub updateInit
-sub updateAurora
-{
+sub updateAurora {
if ($a_mode) {
if ($a_c_button->get_active()) {
symlinkf("/lib/aurora/Monitors/NewStyle-Categorizing-WsLib", "/etc/aurora/Monitor");
@@ -272,10 +269,8 @@ sub updateAurora
# launch autologin functions
#-------------------------------------------------------------
-sub isAutologin
-{
+sub isAutologin {
my $line;
-
open AUTOLOGIN, "/etc/sysconfig/autologin" or die _("can not open /etc/sysconfig/autologin for reading: %s", $!);
while (<AUTOLOGIN>) {
if (/AUTOLOGIN=(yes|no)/) { $line = $_; last; }
@@ -298,10 +293,8 @@ sub get_autologin {
%o;
}
-sub updateAutologin
-{
+sub updateAutologin {
my ($usern,$deskt)=($user_combo->entry->get_text(), $desktop_combo->entry->get_text());
-
if ($x_yes_button->get_active()) {
$in->do_pkgs->install('autologin') if $x_mode;
set_autologin('',$usern,$deskt);
@@ -312,9 +305,7 @@ sub updateAutologin
sub set_autologin {
my ($prefix, $user, $desktop) = @_;
-
output "$prefix/etc/sysconfig/desktop", uc($desktop), "\n" if $user;
-
setVarsInSh("$prefix/etc/sysconfig/autologin",
{ USER => $user, AUTOLOGIN => bool2yesno($user), EXEC => "/usr/X11R6/bin/startx" });
chmod 0600, "$prefix/etc/sysconfig/autologin";
@@ -325,8 +316,7 @@ sub set_autologin {
#-------------------------------------------------------------
# lilo/grub functions
#-------------------------------------------------------------
-sub lilo_choice
-{
+sub lilo_choice {
my $bootloader = bootloader::read('', '/etc/lilo.conf');
local ($_) = `detectloader`;
$bootloader->{methods} = { lilo => 1, grub => !!/grub/i };