Bug 24932 - small inconsistency in pre-install script
Summary: small inconsistency in pre-install script
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dev
Version: 7.0
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-25 14:58 UTC by Need Real Name
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-01-25 14:58:25 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-01-25 14:58:22 UTC
The "dev" package's preinstall script does the following:

/usr/sbin/groupadd -g 19 -r -f floppy > /dev/null 2>/dev/null ||:

This groupadd is necessary because files like /dev/fd0 will be installed
under this group. However, this script, as written cannot run if "dev" was
never previously installed, because /dev/null doesn't exist yet! It's the
classic chicken-and-egg problem :)

This problem is never visible during normal installations, perhaps because
of
the way the standard Redhat installer works (maybe it creates a simple /dev
when
starting - I don't know). But it did present itself whenI tried to create a
"custom"
distribution by opening up a list of rpms myself using something like
        rpm -root $DIR file.rpm ....

Possible solutions are to remove the redirection (perhaps a "-q", quit flag
should be added to the groupadd program?), to do an mknod of /dev/null
in the preinstall script (this is probably ugly), or to move /dev/null to
another
package (e.g., "setup").

Comment 1 Nalin Dahyabhai 2001-01-25 20:46:24 UTC
I'll add this workaround to dev-3.1.0-3 (source tarball already out in
http://people.redhat.com/nalin/MAKEDEV/):

If /dev doesn't exist, create it.  Redirection to /dev/null will work, and the
temporaray file which is created will be nuked when the package's payload is
extracted.

I'm going to hold off on committing this to our tree until I can test it
(removing /dev is non-trivial), so it may take a while for the package to show
up in Raw Hide, but it will eventually.


Note You need to log in before you can comment on or make changes to this bug.