diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2005-02-08 14:41:46 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2005-02-08 14:41:46 +0000 |
commit | 8c30c712a136069a6450e447f191daa229aacf84 (patch) | |
tree | 1a5fe904269c3bac787dbfbe3ab8bb9cfb06a70d /perl-install/printer/detect.pm | |
parent | 29c3201c8dc00e3384afc32ae946a59992498fbe (diff) | |
download | drakx-8c30c712a136069a6450e447f191daa229aacf84.tar drakx-8c30c712a136069a6450e447f191daa229aacf84.tar.gz drakx-8c30c712a136069a6450e447f191daa229aacf84.tar.bz2 drakx-8c30c712a136069a6450e447f191daa229aacf84.tar.xz drakx-8c30c712a136069a6450e447f191daa229aacf84.zip |
- Prevented restarting of HPOJ and reloading the parallel port kernel modules
when printerdrake's queue generator is called by the hotplug script.
Diffstat (limited to 'perl-install/printer/detect.pm')
-rw-r--r-- | perl-install/printer/detect.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/printer/detect.pm b/perl-install/printer/detect.pm index c1f4f3aaa..a117604cb 100644 --- a/perl-install/printer/detect.pm +++ b/perl-install/printer/detect.pm @@ -8,8 +8,12 @@ use printer::data; sub local_detect() { modules::any_conf->read->get_probeall("usb-interface") and eval { modules::load($usbprintermodule) }; - eval { modules::unload(qw(lp parport_pc parport)) }; #- on kernel 2.4 parport has to be unloaded to probe again - eval { modules::load(qw(parport_pc lp)) }; #- take care as not available on 2.4 kernel (silent error). + # Reload parallel port modules only when we were not called from the + # hotplug script, to avoid the hotplug script running recursively + if (!$::noX) { + eval { modules::unload(qw(lp parport_pc parport)) }; #- on kernel 2.4 parport has to be unloaded to probe again + eval { modules::load(qw(parport_pc lp)) }; #- take care as not available on 2.4 kernel (silent error). + } whatPrinter(); } |