Linux-Misc Digest #369, Volume #27 Thu, 15 Mar 01 19:13:02 EST
Contents:
how to make a script output required syntax? ("T Sutherland")
Re: can't kill! (Jean-David Beyer)
Re: Help with /usr symlink - Urgent!!! (Jean-David Beyer)
Re: JUNKBUSTER breaks website form logins? (John Thompson)
Re: can't kill! (Vilmos Soti)
Re: how to make a script output required syntax? (Vilmos Soti)
making a partition on an existing disk (SandMan)
Re: /dev/null removed (Juergen Heinzl)
Re: Openssh problem on Slackware Current (Armando Ortiz)
Re: How To remove top command bar in Ximian ? (Tyler Larson)
Re: No web based administration of cups ("Dr. Frank Preuschoff")
New Publishing Choice for Linux Applications (Open Country)
PPP dialer that handles dynamic one-time passwords? (John Marley)
Re: determine zombie? ("The Spook")
Beowulf cluster w/ virtual Linuxes in VMWare ? (Arctic Storm)
Re: Bizarre message (Juergen Heinzl)
----------------------------------------------------------------------------
From: "T Sutherland" <[EMAIL PROTECTED]>
Subject: how to make a script output required syntax?
Date: Thu, 15 Mar 2001 16:16:26 +0500
I am writing a simple script that requires the user to string the names
of two files after it on the command line:
#script [filename1] [filename2]
How can I get it to test if the user just typed
#script
and then output the preferred syntax (an echo command I type, obviously)?
I've tried
if [ $1 == "" ]
then
echo "Syntax: script [filename1] [filename2]"
exit
fi
but all I get is
./script: [: ==: unary operator expected
when I type in just
#script
any clues?
------------------------------
From: Jean-David Beyer <[EMAIL PROTECTED]>
Subject: Re: can't kill!
Date: Thu, 15 Mar 2001 16:22:54 -0500
[EMAIL PROTECTED] wrote:
>
> Jean-David Beyer <[EMAIL PROTECTED]> writes:
>
> > Tommy Tang wrote:
> > >
> > > Jean-David Beyer wrote:
> > > >
> > > > Tommy Tang wrote:
> ...<snip>...
> > > > > When my program run, it opens the /dev/video and
> > > > > soon it hangs. I try to kill that process but it
> ...<snip>...
> > > > Your process may be stuck in state D. If this is the case, you are
> ...<snip>...
> > > It is really in state D when top-ing. Why the process
> > > will go to this state? And how to prevent it from going
> > > to this state?
> > >
> > As far as I can tell, this is either because of a kernel software bug
> > or a hardware bug. The symptom (being in state D) indicates that the
> > process is waiting for an IO operation to complete, and it never will
> > complete, either due to the device failing to request an interrupt
> > indicating trouble or completion, or the hardware or software lost the
> > interrupt.
> >
> > I know of no way out of this other than rebooting.
> ...<snip>...
>
> I remember reading unix (not linux) documentation back in the early
> 90s that mentioned that a kill signal will not be acted upon until a
> current IO operation is completed, so if it is a 'bug' it's a long
> standing one and really a design decision. Shortly after reading this,
> at my job then, using SCO Unix I believe, a colleague had been trying to
> do something over a modem line and was complaining his process was hung
> and he couldn't kill it. We turned off the modem and the process
> terminated. I don't know if this helps Mr Tang but it suggests that the
> roots of his problem are pretty deep.
>
The same kind of thing happens to me from time to time. Sometimes the
problem seems to be a disk file, sometimes a tape drive. The disk
drives are on an Ultra-2 SCSI controller and the tape drive is on a
separate narrow SCSI controller.
Were I to try to turn something off, I am not sure what it would be,
since the controllers and drives are all internal. I normally do not
care to remove the case from my machines when the power is on.
Furthermore, unplugging the SCSI controllers would probably crash the
system, so I might as well reboot and not have to deal with a crashed
system. Bad enough that some device is locked up.
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 73926.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 4:20pm up 12 days, 23:24, 3 users, load average: 2.24, 2.20,
2.12
------------------------------
From: Jean-David Beyer <[EMAIL PROTECTED]>
Subject: Re: Help with /usr symlink - Urgent!!!
Date: Thu, 15 Mar 2001 16:24:43 -0500
Klein wrote:
>
> I'm having a problem creating a symlink. We're running on a Cobalt
> RaQ3 and the way its devices have been partitioned, there's no room to
> complete a DB2 install.
>
> The DB2 install tries to build into the /usr/IBMdb2/V7.1 directory.
> The process never gets a chance to start due to a "device full" error.
> So, what I want to try and do is relocate the /usr directory structure
> to the "/home" mount which has plenty of room and create a symlink in
> it's place: root/usr --> /home/usr
>
> Problem #1 - at this point, "mv" did not completely empty out the
> original /usr nesting, stating that about 7 directories could not be
> removed because they were not empty. "ls -a" shows absolutely nothing
> in all unremoved directories.
>
> Problem #2 - the new symlink for "/usr" can not be created while the
> old directory still exists!
>
> If it matters, device configuration looks as such:
>
> device size used mount
> ----------------------------------------------
> hda1 743466 743466 /
> hda3 198601 26855 /var
> hda4 13368150 1701872 /home
>
> Notice: 'df' shows absolutely no free space left on hda1. This is not
> the case. A good portition of the /usr
>
> Outside of the obvious question "how do we go about cleaning up this
> debacle",
> 1) will this stunt actually work?
> 2) is there a better way to do this? (without having the system
> rebuilt)
> 3) why does "df" show no free space on hda1 when there is
> 4) would any of this be contributing to the miserable performance
> we're experiencing with the RaQ3?
Have you tried comp.databases.ibm-db2?
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 73926.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 4:20pm up 12 days, 23:24, 3 users, load average: 2.24, 2.20,
2.12
------------------------------
From: John Thompson <[EMAIL PROTECTED]>
Subject: Re: JUNKBUSTER breaks website form logins?
Date: Thu, 15 Mar 2001 07:34:31 -0600
Flacco wrote:
> When using Junkbuster, website logins appear not to work.
>
> For example, when I log into Slashdot, it acts as if I never logged in at
> all. None of my settings are recognized, and my "preferences" options
> are not displayed next to my user name.
>
> As soon as I remove junkbuster from proxy settings, it works.
>
> Anyone know what's going on?
You probably have Junkbuster set to filter cookies (IIRC, that is
the default behavior). Add a line "slashdot.org" to your
/etc/junkbuster/cookiefile to allow slashdot to set cookies on
your machine. And make sure Mozilla is configured to accept
cookies.
--
-John ([EMAIL PROTECTED])
------------------------------
Subject: Re: can't kill!
From: Vilmos Soti <[EMAIL PROTECTED]>
Date: Thu, 15 Mar 2001 21:31:15 GMT
Jean-David Beyer <[EMAIL PROTECTED]> writes:
> As far as I can tell, this is either because of a kernel software bug
> or a hardware bug. The symptom (being in state D) indicates that the
> process is waiting for an IO operation to complete, and it never will
> complete, either due to the device failing to request an interrupt
> indicating trouble or completion, or the hardware or software lost the
> interrupt.
>
> I know of no way out of this other than rebooting.
I would recommend that give some time for the device. I work with a
machine which has a hard disk, a cdrom, two magneto optical drives,
and five tape drives. All scsi on two cards. Sometimes the tape drives
get into D state, but all the time after a short while (a minute maybe)
they started to work again. Some of the tape drives require a good
30 seconds just to recognize that a tape has been loaded and during
this time, if I try to read it, it is in D state.
Vilmos
------------------------------
Subject: Re: how to make a script output required syntax?
From: Vilmos Soti <[EMAIL PROTECTED]>
Date: Thu, 15 Mar 2001 21:35:53 GMT
"T Sutherland" <[EMAIL PROTECTED]> writes:
> #script [filename1] [filename2]
>
> How can I get it to test if the user just typed
>
> #script
>
> and then output the preferred syntax (an echo command I type, obviously)?
>
> I've tried
>
> if [ $1 == "" ]
> then
> echo "Syntax: script [filename1] [filename2]"
> exit
> fi
>
> but all I get is
> ./script: [: ==: unary operator expected
The $1 is missing, so the shell sees
if [ = "" ]
You should use
if [ "$1" = "" ]
Also, you might take a look into the $# variable:
if [ "$#" = 2 ]; then
strings $1 $2
else
echo Usage: $0 file1 file2
fi
Vilmos
------------------------------
From: SandMan
Subject: making a partition on an existing disk
Date: 15 Mar 2001 20:49:36 GMT
Hi there,
Here's what I'm trying to do. I have 2 disks on a Linux RH7 system. The first disk
has /, /boot and swap. There is also an extended partition like so:
Disk /dev/sda: 2231 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/sda1 * 63 48194 48132 83 Linux
/dev/sda2 48195 35841014 35792820 5 Extended
/dev/sda3 0 - 0 0 Empty
/dev/sda4 0 - 0 0 Empty
/dev/sda5 48258 3196934 3148677 82 Linux swap
/dev/sda6 3196998 4257224 1060227 83 Linux
There's a ton of space left behind that I'd like to make a partition on. However
sfdisk complains about creating a partition on /dev/sda3, because it is an active
disk. I understand the rationale behind this error, but is there any workaround where
I can:
1. Create a partition on /dev/sda3 that covers the remaining disk space.
2. Make a filesystem on it.
3. Fsck it.
4. Mount it.
5. Reboot.
Thanks in advance,
SandMan
==================================
Posted via http://nodevice.com
Linux Programmer's Site
------------------------------
From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: /dev/null removed
Date: Thu, 15 Mar 2001 22:12:31 GMT
In article <[EMAIL PROTECTED]>, Villy Kruse wrote:
>On Wed, 14 Mar 2001 22:49:32 GMT,
> Juergen Heinzl <[EMAIL PROTECTED]> wrote:
>
>
>>Scripts run with root permissions need to be in root's crontab and if
>>root's crontab is writable by everyone, then the one deserves to have
>>Win98 installed on the spot .. no mercy !!
>
>
>Deamons routinely open /dev/null; if not for anything else, then as
>standard input. This won't fill up /dev/null, but, once /dev/null is
>created that way as a regular file, the next non-root script that also
>opens /dev/null could easily fill up the root file system.
[-]
Since /dev/null (special file) is a hard to fill up one (I keep trying though)
I don't see the problem.
If there's none, though then I'm willing to argue about the # of daemons which
would create one, special or, even worse, normal file, out of the blue.
/dev/null is to be created by no-one but God on my machine and on my
machine *I* am God.
Ta',
Juergen
--
\ Real name : Juergen Heinzl \ no flames /
\ EMail Private : [EMAIL PROTECTED] \ send money instead /
------------------------------
From: Armando Ortiz <[EMAIL PROTECTED]>
Subject: Re: Openssh problem on Slackware Current
Date: Thu, 15 Mar 2001 22:19:07 GMT
I'm also having this issue with pl2. pl1 seems to work fine, so I am just
sticking with that until an answer is formed.
Martin Boening wrote:
> Hello there,
>
> on my workstation I am running Slackware 7.x (from the slackware-current
> directory on the ftp-server). This prerelease distro contains Openssh
> 2.5.1p2, which I installed, since I need it. However, I have a little
> problem with it: when I try to access a server also running Openssh
> using SSH Protocol Version 2, the public key authentication fails in
> a strange way, if I haven't loaded the key in id_dsa into the ssh-agent.
>
> What happens is, that I am asked to enter the passphrase for the key file
> /home/mboen/.ssh/id_dsa, which I do. However, the passphrase is not accep-
> ted, I am asked 2 times more, then the authentication falls back to
> password (or interactive keayboard, or whatchamacallit) authentication.
>
> I know that the passphrase is correct, because I can add the key to
> the ssh-agent with it and I can maintain the key information for
> the key using ssh-keygen.
>
> Has anybody else seen this? Did I missconfigure something?
>
> TIA,
> Martin
> --
> Martin Boening, MB3792-ARIN | [EMAIL PROTECTED]
>
> To find out a girl's faults, praise her to her girl friends.
> -- Benjamin Franklin
------------------------------
From: Tyler Larson <[EMAIL PROTECTED]>
Subject: Re: How To remove top command bar in Ximian ?
Date: 15 Mar 2001 22:06:26 GMT
public <[EMAIL PROTECTED]> wrote:
> I have RedHat 7. When I tried to upgrade GNOME, I was directed to
> Ximian GNOME.
> Ximian GNOME was fairly easy to install.
> Now, I have a command bar at the top of the screen, which resembles the
> Macintosh command bar.
> The command bar at the bottom of the screen is still intact.
> I prefer the command bar at the bottom.
> How can I remove the new command bar that appears at the top of the
> screen ,...
> Thanks.
You should be able to right-click it (on the bar where's there's no
menu-- so in other words, to the right of the last menu on the bar)
and select "Remove this panel" from the "Panel" submenu.
--
Tyler Larson | http://www.tlarson.com | [EMAIL PROTECTED]
A hermit is a deserter from the army of humanity.
------------------------------
From: "Dr. Frank Preuschoff" <[EMAIL PROTECTED]>
Subject: Re: No web based administration of cups
Date: Thu, 15 Mar 2001 23:35:33 +0100
Colonel Panic schrieb:
> Hi Frank
>
> Does /var/log/cups/error_log give any clues ?
>
Hello Colonel
Yes of course. The /usr/local/var/log/cups/error_log always shows a line
like this
PID 797 stopped with status 107!
when I access the http://192.168.7.34:631/admin.
No idea what this means status 107 :-((
------------------------------
From: Open Country <[EMAIL PROTECTED]>
Subject: New Publishing Choice for Linux Applications
Date: Thu, 15 Mar 2001 22:53:44 GMT
We've just started a new channel for people to get products
distributed. This channel charges the buyer a modest fee and rebates
part of the money collected back to the developer!
Open Country, (http://www.opencountry.net), helps the less technical
to use and enjoy Linux by repackaging open-source software in an easy
install, QwikClick(tm), format. QwikClick installs the application in
a QwikClick file standard and puts the application in a local web page
that becomes an easy to use application launcher. Good for regular
desktop users that want a more reliable operating platform like Linux
The base application remains unchanged. It's like putting the
application on a CD for distribution, except that it will be
downloaded and installed over the internet. A user will be able to
subscribe to the store, and as a subscriber obtain and install a
variety of common applications or games with only one click. A
nominal fee is charged for the install convenience and a part of the
revenue obtained is sent back to the open-source developer or his
designated charity.
Consider this an open-source effort, check out our web site,
http://www.opencountry.net, and tell us your reactions. If you have
authored an open-source product that you'd like us to consider for
non-exclusive redistribution, send us e-mail at
[EMAIL PROTECTED]
------------------------------
From: John Marley <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,comp.os.linux.security
Subject: PPP dialer that handles dynamic one-time passwords?
Date: 13 Mar 2001 13:12:40 +1100
Our company has decided to implement strong authentication for dial-in
access. They've issued us all with hardware tokens that generate a dynamic
password when we enter our PIN. Obviously, I can't put a dynamic password
into my chat script (can I?) so is there a ppp dialer that automates all
the modem configuration and dialing bits, but propmts the user for username
and password? I've look in FAQ's and HOWTO's but can't seem to find
anything.
Our IS Dept. has software for Windows boxes of course, but us Linux users
are left out in the cold as usual.
Thanks in advance,
John
--
Trust in the LORD with all your heart and | John Marley - System Admin
lean not on your own understanding; in all --+-- Alcatel Australia
your ways acknowledge him, and He will | Ph: +61 2 9690 5293
make your paths straight. Proverbs 3:5-6 | [EMAIL PROTECTED]
------------------------------
From: "The Spook" <[EMAIL PROTECTED]>
Subject: Re: determine zombie?
Date: Fri, 16 Mar 2001 00:29:54 +0100
dave michael kennedy wrote ...
>is there a function call for determining whether a process is
>zombied?
>
>Dave Kennedy
>Champaign Underwater Hockey
Try "ps -lp <Process ID>" -- replace "<Process ID>" with the process ID
(PID) of the process you want to watch. The second column contains a Z for a
zombied process.
/TRY
------------------------------
From: Arctic Storm <[EMAIL PROTECTED]>
Subject: Beowulf cluster w/ virtual Linuxes in VMWare ?
Date: Thu, 15 Mar 2001 23:43:07 GMT
With VMWare, of course it's possible to run multiple virtual Linuxes
simultaneously, but is it possible to create a Beawulf cluster among the
virtual machines?
If theoretically possible, has anyone successfully ran this virtual Beowulf?
------------------------------
From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: Bizarre message
Date: Thu, 15 Mar 2001 23:47:17 GMT
In article <98pfen$ara$[EMAIL PROTECTED]>, Dennis wrote:
[-]
re-quoted
[-]
>"Juergen Heinzl" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]...
>> In article <98njm2$4dd$[EMAIL PROTECTED]>, Dennis wrote:
>> [-]
>> >Exec : /usr/man/man4/squid : cannot execute : No such file or directory
>> >
>> >This message appears at least 10 times, then he gets this :
>> >
>> >
>> >
>> >INIT : Id "pa" respawning too fast : disabled for 5 minutes
>> [-]
>> See /etc/inittab and search for an entry like this ...
>>
>> xt:5:respawn:/opt/X11R6/GNUstep/Apps/Login.app/Login
>>
>> ... where what's xt: here must read pa. respawn means
>> re-start as soon as the process has died. Since squid
>> in /usr/man/man4 is hardly an executable init is trying
>> very hard but gives up after a time.
>>
>> You can put a # in front of the line, then (as root)
>> run /sbin/telinit q to re-read /etc/inittab.
>>
>> Then you can hunt down the problem since as long as
>> you don't remove the # init isn't going to try that
>> line again.
[-]
>Hi Juergen
>
>Thanks for your valuable help.
>If i disable it in the /etc/inittab, does it mean that Squid will no longer
>work?
[-]
Let's say as it looks like it never got a chance to work 8-)
So yes, you, or better your pal, had better track the problem down as
sure, here no-one can really tell whether the machine in question is
configured to be dependent in any way on squid running. E.g. the default
Netscape installation may not work if its proxy settings are such that
it tries to access a local squid (easily enough to change).
Else yes, once commented out init isn't going to be interested in that
entry anymore and you'll see when re-booting the machine again that the
error will, fingers crossed, be gone. Again it's still strange that it
could happen in the first place !!
In any case to a ps -ax first and see whether squid's running. Yes, it
*is* possible as starting a daemon from /etc/inittab is not the only way
and doing so is somewhat dangerous anyway as *any* error there can result
in a machine not coming up in a clean way at all.
A usual way to start daemons and stuff are those /etc/rc#.d/S##whatever
and (to stop them) K##whatever scripts.
To be honest why in God's name some setup would add squid to /etc/inittab
is something I can't really understand anyway. It's not an essential to
the system application at all.
As a side note, squid is a very powerful piece of software and given
most or all ISP's provide one with some proxy cache probably overkill
on a single user machine or one used by the family (even apache can
act as a caching proxy server).
Cheers,
Juergen
--
\ Real name : Juergen Heinzl \ no flames /
\ EMail Private : [EMAIL PROTECTED] \ send money instead /
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list by posting to comp.os.linux.misc.
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Misc Digest
******************************