diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 8 | ||||
-rw-r--r-- | perl-install/mouse.pm | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 87545a2a5..2696017d2 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -400,7 +400,7 @@ sub pppConfig { $modem or return; if ($modem->{device} ne "/dev/modem") { - symlinkf($modem->{device}, "$prefix/dev/modem") ? add_devfslink($prefix, "$prefix/dev/modem") : log::l("creation of $prefix/dev/modem failed") + devfssymlinkf($modem->{device}, 'modem', $prefix) or log::l("creation of $prefix/dev/modem failed") } $in->do_pkgs->install('ppp') if !$::testing; @@ -829,9 +829,9 @@ sub report_bug { map_index { even($::i) ? header($_) : $_ } @other; } -sub add_devfslink { - my ($prefix, $link) = @_; - commands::cp("-f", $link, "$prefix/lib/dev-state/"); +sub devfssymlinkf { + my ($if, $of, $prefix) = @_; + symlinkf($if, "$prefix/$_") foreach ("dev/$of", "lib/dev-state/$of"); } 1; diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 7a74dd857..c488c83f2 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -182,7 +182,7 @@ 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)); - symlinkf ($mouse->{device}, "$prefix/dev/mouse") ? any::add_devfslink($prefix, "$prefix/dev/mouse") : log::l("creating $prefix/dev/mouse symlink failed"); + any::devfssymlinkf ($mouse->{device}, 'mouse', $prefix) or log::l("creating $prefix/dev/mouse symlink failed"); if (arch() =~ /ppc/) { my $s = join('', |