LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-02-2008, 12:26 PM   #1
Camarade_Tux
LQ Newbie
 
Registered: Dec 2007
Location: Paris
Distribution: Slackware-current
Posts: 27

Rep: Reputation: 15
Bashism in rc.udev - anyone uses ash as /bin/sh ?


Hi all,

I'm running slackware-current and building a livecd from it. Trying to spare some memory and speed up the boot, I made /bin/sh point to /bin/ash. Upon reboot I noticed an error for rc.udev :
Code:
/etc/rc.d/rc.udev: 57: Syntax error: Bad substitution
Except for this script, all others can run with ash.

I can make my slackware with udev, hal and all others boot in 20 seconds or so on my *laptop* and most of this time is caused by the kernel or a few commands so using ash wouldn't speed things much anyway.

However this makes me curious : do many people use, or would like to use, ash for their startup script ?

Thanks.
 
Old 03-02-2008, 12:52 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8114Reputation: 8114Reputation: 8114Reputation: 8114Reputation: 8114Reputation: 8114Reputation: 8114Reputation: 8114Reputation: 8114Reputation: 8114Reputation: 8114
Slackware requires bash as the shell for startup scripts.

Eric
 
Old 03-02-2008, 01:22 PM   #3
e5150
Member
 
Registered: Oct 2005
Location: Sweden
Distribution: lackware and alpine
Posts: 134

Rep: Reputation: 103Reputation: 103
I've been using ash as /bin/sh for about a year (runnings 11.0), however I don't use udev. But I don't think it would be all that hard to replace the bash-magic with some sed/awk/whatever if you really would want to use ash. IIRC rc.inet1 also uses some of that bash substitution, that could have been removed in -current since you didn't have any problems except for udev.
But in general I would advice against ash as /bin/sh, there seem to be a lot of scripts floating around assuming that /bin/sh is bash. If you don't want to manually read all the scripts in your system making sure they are ash compatible you might be in for a nasty surprise, and lots of debugging, when some yearly cronjob bails out in a couple of months or so. And what you gain isn't really worth the hassle..
 
Old 03-02-2008, 02:26 PM   #4
Camarade_Tux
LQ Newbie
 
Registered: Dec 2007
Location: Paris
Distribution: Slackware-current
Posts: 27

Original Poster
Rep: Reputation: 15
This was mere meant as a test and was solely motivated by curiosity. At that time I was playing with bootchart.

I did not intend to use ash as sh for everything as I knew some things would break but changing the symbolic link was the fastest and easiest way to check whether replacing sh would still give me a working system or not. I intended to revert it as soon as the system was up again and only change the boot scripts. I've stopped before that though.

As for rc.inet, I have to say I don't know because I don't use it anymore : one day after a fresh slackware install I've been too lazy to reconfigure the network (this shows how lazy I am ;p ) and created rather a new script in my home which I could run with "./n<TAB><TAB>". :P
 
  


Reply


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
CJK support in ash shell uiqbal Linux - General 0 10-18-2005 08:24 AM
SATA on Adaptec ASH-1205sa KJ Jantzen Linux - Hardware 1 06-13-2005 01:37 PM
Use bash as an alternative to ash? J_Szucs Linux - General 3 05-30-2005 04:44 AM
Sarge - only ASH in shell no BASH jriis Debian 1 12-25-2003 03:25 PM
ash script (please) sourceman Linux - General 1 04-18-2002 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:32 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration