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

Re: Disabling some services indivually and easily (nut)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/11/06 03:44, Marc SCHAEFER wrote:
> Hi,
> 
> I have the following issue:
> 
>    if the cable to the UPS is removed, nut will shutdown the server.
> 
> This is perfectly correct, when the UPS is supposed to be there. But
> when it has failed and is not in house ?
> 
> First, I thought that nut could consider the system boot as a special
> case, and if the cable/UPS is not present, just quit gracefully,
> possibly with a warning mail. However, this could be dangerous in some
> environments.  Thus the comportment of nut always shutting down when
> configurer is correct.
> 
> So, another idea came to me, which was to use run-levels (e.g. normal
> with nut as init 2, and without nut as init 3. Selection done easily

Debian *always* uses runlevel 2.

> through a LILO menu). However this adds a lot of complexity, and this is
> not wanted.
> 
> So, what about a kernel option `disable-services=nut,apache,whatever'
> which would be processed by Debian init script and disable the named
> services ?

There should be a script named /etc/init.d/*nut* and
/etc/rc2.d/S*nut*.  For example, for Samba, they are:
  /etc/init.d/samba
  /etc/rc2.d/S20samba

To shutdown Samba, I'd run "/etc/init.d/samba stop", and to disable
it from starting at boot, I'd
  # mv /etc/rc2.d/S20samba /etc/rc2.d/__S20samba

Do something similar with the *nut* script and that will do what you
want.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBWnUS9HxQb37XmcRAo8iAJ49hTGocZcaI6uU6XPz7oNGhQAKLACgi0uK
4d1Ze3AhQ0OGB3YDcBMTy2w=
=sqbf
-----END PGP SIGNATURE-----



Reply to: