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

Keeping a customized file from being updated during package upgrade



I have a question that I hope someone can help me with.

As some background, we had a problem where every once in a very long
while, someone (usually me O:) ) would get a little ahead of themselves
and issue a shutdown command to shut down the system they were logged in
on.  Problem was, the person would be in a rush and not notice they were
actually still ssh'ed into another machine when they typed it!  As you
can imagine, doing a "shutdown -h now" on your mail server when you're
sitting at home (over an hour away) is not a pleasant thing to have
happen.  

Sooooo, I had this bright idea to replace shutdown with a script that
would take an additional parameter of the hostname of the system.  The
script would then check the hostname given on the commandline against
the hostname of the system it was being run on and only pass on the rest
of the parameters to the real shutdown command if they matched.

Soooo, the short of it is that now, /sbin/shutdown is this script and
the stock shutdown command is /sbin/shutdown.real

So, here is my question.  How can I make it so that if I upgrade the
sysvinit package on a system, it will either just not touch the
/sbin/shutdown file, or better yet, redirect the new /sbin/shutdown file
to /sbin/shutdown.real instead?  Is that possible?

Thanks in advance for your help!

-Ken

-- 
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
|                    |                                                |
|     Ken Long       |       E-mail:   klong@memach.com               |
|                    |       Voice:    (757)494-0722                  |
|  Network Engineer  |       FAX:      (757)494-0748                  |
|                    |                                                |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
|    The opinions expressed here do not necessarily reflect those of  |
|                          Metro Machine Corp.                        |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+



Reply to: