summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-05 23:37:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-05 23:37:50 +0000
commit3b2d17c12b80c8536a3deb58c8e44041adc1d807 (patch)
tree09e2916cd7d4b23fae4ca5cfc2f734292e987b36
parent7e472296d5c7890bf8a01c1e1ac1e9213bcc399c (diff)
downloaddrakx-backup-do-not-use-3b2d17c12b80c8536a3deb58c8e44041adc1d807.tar
drakx-backup-do-not-use-3b2d17c12b80c8536a3deb58c8e44041adc1d807.tar.gz
drakx-backup-do-not-use-3b2d17c12b80c8536a3deb58c8e44041adc1d807.tar.bz2
drakx-backup-do-not-use-3b2d17c12b80c8536a3deb58c8e44041adc1d807.tar.xz
drakx-backup-do-not-use-3b2d17c12b80c8536a3deb58c8e44041adc1d807.zip
do the job of devfsd in case devfsd doesn't do it
-rw-r--r--perl-install/any.pm32
-rw-r--r--perl-install/mouse.pm4
2 files changed, 21 insertions, 15 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 30816b056..d01bafa02 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -445,7 +445,7 @@ sub pppConfig {
my ($in, $modem, $prefix) = @_;
$modem or return;
- devfssymlinkf($modem, 'modem', $prefix) if $modem->{device} ne "/dev/modem";
+ devfssymlinkf($modem, 'modem') if $modem->{device} ne "/dev/modem";
$in->do_pkgs->install('ppp') if !$::testing;
my %toreplace;
@@ -937,31 +937,37 @@ sub report_bug {
}
sub devfssymlinkf {
- my ($o_if, $of, $prefix) = @_;
+ my ($o_if, $of) = @_;
my $if = $o_if->{device};
my $devfs_if = $o_if->{devfs_device};
- $devfs_if ||= devices::to_devfs($o_if->{device});
- $devfs_if ||= $o_if->{device};
-
- #- when creating a symlink on the system, use devfs name if devfs is mounted
- $if = $devfs_if if !$prefix && detect_devices::dev_is_devfs();
+ $devfs_if ||= devices::to_devfs($if);
+ $devfs_if ||= $if;
- symlinkf($if, "$prefix/dev/$of");
+ #- example: $of is mouse, $if is usbmouse, $devfs_if is input/mouse0
- output_p("$prefix/etc/devfs/conf.d/$of.conf",
+ output_p("$::prefix/etc/devfs/conf.d/$of.conf",
"REGISTER ^$devfs_if\$ CFUNCTION GLOBAL symlink $devfs_if $of
UNREGISTER ^$devfs_if\$ CFUNCTION GLOBAL unlink $of
");
+
+ output_p("$::prefix/etc/devfs/conf.d/$if.conf",
+"REGISTER ^$devfs_if\$ CFUNCTION GLOBAL symlink $devfs_if $if
+UNREGISTER ^$devfs_if\$ CFUNCTION GLOBAL unlink $if
+") if $devfs_if ne $if;
+
+ #- when creating a symlink on the system, use devfs name if devfs is mounted
+ symlinkf($devfs_if, "$::prefix/dev/$if") if $devfs_if ne $if && detect_devices::dev_is_devfs();
+ symlinkf($if, "$::prefix/dev/$of");
}
sub devfs_rawdevice {
- my ($o_if, $of, $prefix) = @_;
+ my ($o_if, $of) = @_;
my $devfs_if = $o_if->{devfs_device};
$devfs_if ||= devices::to_devfs($o_if->{device});
$devfs_if ||= $o_if->{device};
- output_p("$prefix/etc/devfs/conf.d/$of.conf",
+ output_p("$::prefix/etc/devfs/conf.d/$of.conf",
"REGISTER ^$devfs_if\$ EXECUTE /etc/dynamic/scripts/rawdevice.script add /dev/$devfs_if /dev/$of
UNREGISTER ^$devfs_if\$ EXECUTE /etc/dynamic/scripts/rawdevice.script del /dev/$of
");
@@ -1160,8 +1166,8 @@ sub config_dvd {
log::l("configuring DVD");
#- create /dev/dvd symlink
each_index {
- devfssymlinkf($_, 'dvd' . ($::i ? $::i + 1 : ''), $prefix);
- devfs_rawdevice($_, 'rdvd' . ($::i ? $::i + 1 : ''), $prefix) if $have_devfsd;
+ devfssymlinkf($_, 'dvd' . ($::i ? $::i + 1 : ''));
+ devfs_rawdevice($_, 'rdvd' . ($::i ? $::i + 1 : '')) if $have_devfsd;
} @dvds;
if (!$have_devfsd) {
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index eb1f44d8a..88c807e6e 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -202,8 +202,8 @@ sub write {
local $mouse->{XEMU3} = bool2yesno($mouse->{nbuttons} < 3);
local $mouse->{WHEEL} = bool2yesno($mouse->{nbuttons} > 3);
setVarsInSh("$prefix/etc/sysconfig/mouse", $mouse, qw(MOUSETYPE XMOUSETYPE FULLNAME XEMU3 WHEEL device));
- any::devfssymlinkf($mouse, 'mouse', $prefix);
- any::devfssymlinkf($mouse->{auxmouse}, 'mouse1', $prefix) if $mouse->{auxmouse};
+ any::devfssymlinkf($mouse, 'mouse');
+ any::devfssymlinkf($mouse->{auxmouse}, 'mouse1') if $mouse->{auxmouse};
if (arch() =~ /ppc/) {
my $s = join('',