LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] /bin/dash - lessons from the front line

[ILUG] /bin/dash - lessons from the front line

Chris Higgins chris.higgins at darach.ie
Fri Mar 5 09:24:43 GMT 2004


Extract from apt-cache show dash

" It can be usefully installed as /bin/sh (because it executes scripts
 somewhat faster than "bash"), or as the default shell either of root ..."

I hit a weird problem recently upgrading the desktop systems we use
here for our staff. All but one went through the 
 "apt-get update, apt-get -u upgrade, apt-get -u dist-upgrade" commands
with no problems at all. 

One machine however ended up with all of the postrm scripts that
had anything to do with X ( xfree86, fonts, xlibs ) fail. So none
of the new packages would upgrade. They always failed with an 
"found end of file, expecting ) " syntax error. 

I've been keeping all the systems practically identical so that
I wouldn't see these problems. 

The scripts worked perfectly on my laptop, the line numbers where the
errors were listed didn't make any sense. 

When I hand ran the scripts I got the same error messages, and 
/bin/sh -x showed things dying shortly after an external
call to expr

I eventually tracked it down - the machine had /bin/sh linked
to dash. Switched it over to bash, ran apt-get -u upgrade
and it worked perfectly ( as it had on the other machines ).

I haven't had a chance to go into exactly how dash made it's
way in as /bin/sh ( but all machines have recently been
upgraded to 2.6.x - and dash seems to be 'required' for
2.6.x ). 

I also haven't had a opportunity to debug the dash process 
more completely - so I don't know if it's dash or something
in the root users profile which may be impacting on dash
(but I doubt this - as dash isn't an app that the
systems would either use or really care about so there
shouldn't have been any conf in place for dash).


So - if /bin/sh starts to behave strangely for you, 
just double check which shell you are actually using.

Chris. 

--

Chris Higgins                              Cisco Learning Partner
Darach Technology Ltd                      tel: +353-1-6204370
email: chris.higgins at darach.ie          fax: +353-1-6204371
http://www.darach.ie



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell