LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices

Reply
 
Search this Thread
Old 08-12-2009, 10:10 AM   #1
julian16
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Rep: Reputation: 0
RH 2.4.21-58 vs. 2.6.18-128


I have 2 linux servers:

OLD OS: RedHat GNU/Linux 2.4.21-58.ELsmp (i686/i386), A NewTech machine
NEW OS: RedHat GNU/Linux 2.6.18-128.1.16.el5 (x86_64/x86_64), A Dell machine

I installed a SmartList package on the old server, it worked
perfectly fine. But on the new server, when I do:

> sh install.sh /usr/local/slist

- this generates endlessly the following line:
"install.sh3: line 3: cd: .: Not a directory"
...

that took 99% of one CPU and eventually I had to kill it.

I don't think it's the install scripts problem. Anything occur to you that I may need to look into?

Joe
 
Old 08-12-2009, 10:59 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Did you check to see what is on line 3 of the install.sh3 (or install.sh)?

My guess is the directory it is trying to cd to is a variable (e.g. $DIR) and it didn't get set properly. Are you supposed to input a directory? Is it setting it with pwd?

By the way - The info you provided is kernel versions. The actual RedHat versions can be found in /etc/redhat-release.

There are significant changes between the 2.4.x kernels and the 2.6.x kernels. Things that worked on 2.4.x might not work on 2.6.x if they're not written to be portable. Many applications have separate install scripts for 2.4.x (up to RHEL3) and 2.6.x (RHEL 4 and beyond).
 
Old 08-13-2009, 10:01 AM   #3
julian16
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jlightner View Post
Did you check to see what is on line 3 of the install.sh3 (or install.sh)?

My guess is the directory it is trying to cd to is a variable (e.g. $DIR) and it didn't get set properly. Are you supposed to input a directory? Is it setting it with pwd?

By the way - The info you provided is kernel versions. The actual RedHat versions can be found in /etc/redhat-release.

There are significant changes between the 2.4.x kernels and the 2.6.x kernels. Things that worked on 2.4.x might not work on 2.6.x if they're not written to be portable. Many applications have separate install scripts for 2.4.x (up to RHEL3) and 2.6.x (RHEL 4 and beyond).

First 3 lines of "install.sh":
#! /bin/sh
: &&O='cd .' || exec /bin/sh "$0" $argv:q
$O || exec /bin/sh "$0" "$@"

First 3 lines of "install.sh3":
#! /bin/sh
: &&O='cd .' || exec /bin/sh install.sh3
$O || exec /bin/sh install.sh3

-- There is a "cd . " on line 2, not line 3.
It's beyond me... Any further insight?

Thank you,
Joe
 
Old 08-13-2009, 02:35 PM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
The error says "." (dot) is not a directory. Since "." is the link for the current directory in any directory you're in this shouldn't be the case. I have seen on rare occasion the "." (or ".." for parent directory) somehow go missing. This is usually a sign of something having gone horribly wrong.

Try running "ls -la" in the directory you attempted this in and see if the "." and ".." files are there. Then try running "cd ." to see what happens. Try running "ls -id ." to get the inode number then run "ls -id <fullpath to directory> to insure they have the same inode number.
 
Old 08-13-2009, 05:06 PM   #5
julian16
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Thumbs up

o "." and ".." is always there in the current and other dirs.
o "cd . " -- nothing happens (expected).
o "ls -id ." and "ls -id /full/path/to'.'" give the same inode number ("68304901" in this case). I tested on a few related directories, the inode numbers are consistently the same from "." and "/full/path/" (different dir has different numbers).

... I am still in mist. Further suggestion?

Joe
 
Old 08-14-2009, 06:54 AM   #6
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Since the error is coming out of install.sh3 it might be worthwhile to temporarily change the interpreter line in install.sh3 to "#!/bin/sh -x" so it runs in debug mode. That way you'd see what it was doing up to the point of failure.

I'm assuming that install.sh is calling install.sh3 so if setting debug in the latter doesn't help it might be worthwhile to try setting it in the former.
 
Old 08-14-2009, 08:50 AM   #7
julian16
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Thumbs up

Thank you.

I put debug bit "#!/bin/sh -x" in either or both, all show the following:

make: `gethome' is up to date.
Hardwiring '$HOME' as the list directory owned by 'slist'.
make: `multigram' is up to date.
/bin/sh: line 3: cd: .: Not a directory
install.sh3: line 3: cd: .: Not a directory
install.sh3: line 3: cd: .: Not a directory
install.sh3: line 3: cd: .: Not a directory
(... repeat this line endlessly ...)

Note: in "sh install.sh /usr/local/slist", the path fed to the install script is the $HOME of 'slist'.

What to try next? (Thank you for your patience for newbie like me

Joe
 
Old 08-14-2009, 09:31 AM   #8
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
It might be a nesting issue. Since install.sh and install.sh3 both have interpreter lines they're each invoking subshells. However you started with "sh" so by the time it gets to install.sh3 it is at least in its 3rd subshell (perhaps more if there were other things invoked like install.sh2).

Try running just ./install.sh <direcory> instead of sh install.sh <directory> to see if it makes a difference. If it says not executable you can make it so with the chmod command.
 
Old 08-14-2009, 04:56 PM   #9
julian16
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Thumbs up

Here is what I tried:

First I commented out the trouble line in 'install.sh3':

# : &&O='cd .' || exec /bin/sh install.sh3

-- Now the install proceeded but ended up with the target location having a bunch of missing directories/files (not installed).

Next, I tried to put the target dir path for that 'cd', as in:

: &&O='cd /usr/local/slist' || exec /bin/sh install.sh3

-- Now it complains it cannot find a file "targetdir.tmp" which I see is in the source dir.

Therefore I put the source path for 'cd', as in:

: &&O='cd /data/procmail-3.15/SmartList' || exec /bin/sh install.sh3

or

: &&O='cd /data/procmail-3.15/SmartList/' || exec /bin/sh install.sh3

-- in both cases I got errors:

------------------------------------------------
install.sh3: line 4: cd: /data/procmail-3.15/SmartList: Not a directory
------------------------------------------------

-- which is the same error originally observed. Through the trials
I made sure my shell is '/bin/sh'. I also manually tried
"cd /data/procmail-3.15/SmartList" that works well. Just don't understand why in the script it got that complain...

-- Recall that it works no problem on an older version of RH linux.

Run by "sh install.sh ..." or "./install.sh ..." have the same behavior.

Joe

Last edited by julian16; 08-14-2009 at 07:02 PM.
 
Old 08-15-2009, 08:39 AM   #10
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Check to see what /bin/sh is linked to in the older version and the newer version. Typically it is /bin/bash but this may be the crux of the problem if one has /bin/bash and the other has /bin/zsh (or one has /bin/ksh and the other has /bin/bash).

sh was the original Bourne Shell (on HP-UX however it is the Posix Shell which is more like ksh).
ksh was Korn Shell which had many enhancements over Bourne.
bash is Bourne Again Shell and has even more enhancements.

To make things even more fun there are different versions of the above. For example on RHEL4 one had to use pdksh to get ksh whereas on RHEL5 there is a more posix compliant ksh and I've found a couple of differences between them.
 
Old 08-15-2009, 10:34 AM   #11
julian16
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Thumbs up

They are all linked to 'bash':

On the old machine:
GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
585908 bytes

On the new machine:
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
801512 bytes

I was bold enough to try this: Copy over the /bin/bash file from the old machine (it didn't complain "architecture" problem or else upon trial), and used it to do the "install" - it produces the same error ("Not a directory"). I suppose it's from the lib of (ba)sh on the system?

Looks like there won't be any easy fix for my problem at this point..

Perhaps this worthies to be registered for developers?

Joe
 
  


Reply

Tags
install, rh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to connect to wap at work or home - 128 bit - Linux: 128 hex only option? pearsdb Linux - Newbie 5 05-28-2009 05:27 PM
128 GB limit exit3219 Linux - Hardware 3 06-21-2005 05:40 AM
Commodore 128 Cron General 7 12-21-2004 09:36 AM
problems with sb 128 tortoise Linux - Hardware 3 09-24-2003 09:51 AM
16, 32, 64, 128, 256..... Yuuzhan Vong General 4 07-20-2001 06:14 AM


All times are GMT -5. The time now is 10:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration