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

[LDM #OVK-233439]: Now that I've worked with LDM 6.7.0.1 for a week...



Hi Gilbert,

re:
> It worked!

Excellent!

> So the question is:
> 
> Why did my other script in /etc/rc.d/rc.local stop working properly after
> I installed (clean) Fedora 8, when it worked in Fedora 7 and previous?

Evidently, the way that 'su' works changed subtly between Fedora 7 and 8.
The major difference in what you were doing out of rc.local and what we
did out of /etc/init.d was show 'su' is used:

/etc/rc.d/rc.local (now commented out):

echo "STOPPING LDM"
/bin/su -c "/home/ldm/bin/ldmadmin stop" ldm
echo "CLEANING LDM pids"
/bin/su -c "/home/ldm/bin/ldmadmin clean" ldm
 ...

/etc/init.d/ldmd:

 ...asLdmUser()
{
    su - ldm -c "$@"
}
 ...

Note the difference:

/bin/su -c "/home/ldm/bin/ldmadmin start" ldm

vs

su - ldm -c "/home/ldm/bin/ldmadmin start"

i.e., 'su - ldm -c "command"' vs 'su -c "command" ldm'

We figured this out by comparing the man page for 'su' on weather2 (Fedora 8
dated March 2008(!)) and the man page for 'su' on a RedHat Enterprise 4 system
(dated February 2007).  It looks like 'su' may have been changed very recently.

Moving the LDM startup from /etc/rc.d/rc.local to /etc/init.d was
done to standardize your setup with the rest of the LDM world, AND
because it is the standard way of doing business in Unix/Linux.

Now, for instance, 'root' can do the following:

<as 'root'>
/etc/init.d/ldmd stop
/etc/init.d/ldmd start

The same accessiblity to stopping/starting the LDM by 'root' is not available
in the /etc/rc.d/rc.local approach.

Finally, we (Mike Schmidt and I) are under the impression that the system
should run a 'stop' action for all configured scripts in /etc/init.d/ldmd
when it is shutdown (halted by a 'shutdown' command).  This working has been
iffy on various versions of Linux, however.

Cheers,

Tom
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303) 497-8642                                                 P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage                       http://www.unidata.ucar.edu
****************************************************************************


Ticket Details
===================
Ticket ID: OVK-233439
Department: Support LDM
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.