Linux-kernel mailing list archive 1997-48,: Re: ISSUE: lp0/lp1 incompatibility

# Re: ISSUE: lp0/lp1 incompatibility

dinon (dinon@csie.ncu.edu.tw)
Thu, 4 Dec 1997 07:17:49 +0800 (CST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Trever Adams: "Re: file ID redesign proposal"
- Previous message: Daniel Ryde: "Re: Examine route.c! (Was: memory leak detector, 2.0.32, patch)"

On Wed, 3 Dec 1997, Linux Developer wrote:

> On 3 Dec 1997, John Goerzen wrote:
>
> > This is a strange but very bothersome problem.
> > In 2.0.x, my printer (hooked up to the first parallel port) is
> > /dev/lp1. In 2.1.x (2.1.65, to be specific), it is /dev/lp0. This
> > means that I must edit my printcap every time I boot up with a
> > different kernel version.
> > Suggestions on how to fix this?
>
> Very simple way. (I'm not good with perl, so you'll have to write this)
>
> uname -a |grep 2.1.
> if 2.1 exist
> cp /etc/printcap-2.1.x /etc/printcap
> if 2.1 not exist
> cp /etc/printcap-2.0.x /etc/printcap

Will it be better to use 'ln -s' instead of 'cp' ?

#!/usr/bin/perl
$release = `uname -r`;
if (index($release, "2.0") == 0)
{
system("ln -s /etc/printcap-2.1.x /etc/printcap");
}
else
{
system("ln -s /etc/printcap-2.0.x /etc/printcap");
}

>
> Add this to your rc.d scripts. Should work nicely.
>
> -Phillip R. Jaenke [InterNIC Handle: PRJ5] (kernel@prj.pcimporters.com)
> MIS Department, PC Importers, Inc. 800.319.9284, x4262
> Head of Development, The Improvement Linux Project.
> Penguin0: Cyrix Cx6x86 PR200L+, 64M, 1.6G, 1.2G, 4.3G, EE/Pro, 2.0.30
> Penguin1: Intel P5-100, 32M, 4G, NE2k, 2.1.60-Improvement
> The Diamond FireGL Series - When you're ready for a REAL video card.
>
>

- Next message: Trever Adams: "Re: file ID redesign proposal"
- Previous message: Daniel Ryde: "Re: Examine route.c! (Was: memory leak detector, 2.0.32, patch)"