Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 9875 - portmap init.d script restart option obliterates current portmap tables
portmap init.d script restart option obliterates current portmap tables
Status: CLOSED DUPLICATE of bug 14612
Product: Red Hat Linux
Classification: Retired
Component: portmap (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Depends On:
  Show dependency treegraph
Reported: 2000-02-29 21:32 EST by Richard Corrado
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-02-29 21:32:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard Corrado 2000-02-29 21:32:38 EST
The restart function of the init script supplied in the
portmap RPM (portmap-4.0-15 for RH 6.1) is severely flawed.
If a killproc of the portmap process is done without using
pmap_dump to save the current port tables, a reboot is in
order. The hapless victim (me) who edits, say, hosts.allow
information and attempts to use

# /etc/rc.d/init.d/portmap restart

to get portmap to read the new access rules quickly finds
that his server needs to be rebooted to get anything to
work.  This is certainly unintended behavior of an otherwise
very convenient (restart) service.

My solution (which doubtless could be improved upon) is
to edit the restart function to

	rm -f /var/tmp/pmap_table
        /usr/sbin/pmap_dump > /var/tmp/pmap_table
	$0 stop
	$0 start
	if [ -f /var/tmp/pmap_table ] ; then
                /usr/sbin/pmap_set < /var/tmp/pmap_table

Note that, so long as the admin is in the habit of using
restart function, rather than separate executions of
start and stop, those functions do not need to be edited.
Indeed, you wouldn't want to save the port table and then
reload it after a reboot. On the other hand, a stop of
portmap probably shouldn't result in having to reboot, but
maybe a slicker job of coding the reload should be
implemented, to take reboots into account.

This may not the cleanest way of doing things, but I
think it ultimately works.
Comment 1 Jeff Johnson 2000-07-27 17:44:56 EDT

*** This bug has been marked as a duplicate of 14612 ***

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