Stephen Gran on 7 Jan 2004 17:58:02 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] How to find parent in the shell?


On Wed, Jan 07, 2004 at 11:41:25AM -0500, Michael C. Toren said:
> On Wed, Jan 07, 2004 at 10:05:45AM -0500, LeRoy Cressy wrote:
> > I have a question, since this is a boot script that you are using for 
> > system startups, how about the Debian install boot scripts which only 
> > have ash?  Since bash is not even part of the install scripts if your 
> > script gets on the install disks it will not run if /bin/bash is not 
> > available.

This is for hdparm, a program that tunes (primarily IDE) hard disk
parameters.  It is unlikely to be part of a base install anytime soon.
If somebody tries to force it in, I'll argue against it, and rework it
then.

> The Debian bash package is flagged as "required", which I believe
> means it can't easily be removed without a few --force options:
> 
> 	[mct@ellesmere ~]$ apt-cache show bash
> 	Package: bash
> 	Essential: yes
> 	Priority: required
> 	[..]
> 
> mawk, textutils (which provides tr), and grep are also required packages,
> although mawk and tr live in /usr, which may be problematic depending on
> when in the boot process this particular init script will be run.  perl,
> on the other hand, is not a required package, which is why it's use in
> init scripts is frowned upon.

Yes, bash lives in /bin, so it is guaranteed to be available as early as
things can actually run (this is S07, so it is pretty early).  Adding a
Depends: bash since the script specifically calls bash as it's
interpreter is also no big deal.  Most people will have it installed,
and the few that don't will have it puled in automatically by dependency
tracking.  Note that Priority is not exactly what it seems - Priority
required and higher packages are those expected to be on any Unix-a-like
system,  but are not things that cannot be replaced - I could easily
replace bash with zsh or something, for instance.  You do get a nice
warning, though:

steve:~$ sudo apt-get remove bash
Password:
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
  bash
WARNING: The following essential packages will be removed
This should NOT be done unless you know exactly what you are doing!
  bash
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 1217kB disk space will be freed.
You are about to do something potentially harmful
To continue type in the phrase 'Yes, do as I say!'
 ?] no
Abort.

Nothing else was going to get removed, however.

Again, thanks all.
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | Hanging on in quiet desperation is the  |
|  steve@lobefin.net             | English way.   -- Pink Floyd            |
|  http://www.lobefin.net/~steve |                                         |
 --------------------------------------------------------------------------

Attachment: pgpAFaoIbTfCO.pgp
Description: PGP signature