Re: [Nut-upsuser] Correct shutdown scripts for Ubuntu or Suse
Thanks you both for your replies. I currently got it to work by hacking my halt script This is probably not the the best way to go about it, but I am using Suse 10.0 and could not find a nut package for it. I'm really interested to see how this should work, so I'd like to try out those source rpm's. I downloaded the Ubuntu source package and figured out that the halt script on Ubuntu looks for /etc/init.d/ups-monitor (which is a symlink to the /etc/init.d/nut). It's a pity that there is not a more standardized way to go about this, since I'm probably going to have do it again for an old FreeBSD box. Anyways, Thanks again Pico Arjen de Korte wrote: Charles Lepple wrote: However, if you are installing from source, you can still use the startup/shutdown scripts as a guide. I forgot to mention earlier that you will need to link /etc/init.d/nut into the appropriate shutdown directory (probably /etc/rc0.d; my Ubuntu box is not on at the moment). If you want to install a newer version than SuSE provides at the moment, it is probably best to install the sources from SuSE. You can then modify the .spec file that is provided to use a newer version. This does require some tweaking of the patches that are used, since SuSE installs some files in different locations or under different names. I usually have RPM's available for the latest version of the trunk and testing branches. I'm currently using openSUSE 10.2, but as far as I know, the source RPM's build cleanly on other versions as well. If you're interested, just let me know. Best regards, Arjen ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] Correct shutdown scripts for Ubuntu or Suse
Charles Lepple wrote: > However, if you are installing from source, you can still use the > startup/shutdown scripts as a guide. I forgot to mention earlier that > you will need to link /etc/init.d/nut into the appropriate shutdown > directory (probably /etc/rc0.d; my Ubuntu box is not on at the > moment). If you want to install a newer version than SuSE provides at the moment, it is probably best to install the sources from SuSE. You can then modify the .spec file that is provided to use a newer version. This does require some tweaking of the patches that are used, since SuSE installs some files in different locations or under different names. I usually have RPM's available for the latest version of the trunk and testing branches. I'm currently using openSUSE 10.2, but as far as I know, the source RPM's build cleanly on other versions as well. If you're interested, just let me know. Best regards, Arjen ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] Correct shutdown scripts for Ubuntu or Suse
On 12/19/06, Arjen de Korte <[EMAIL PROTECTED]> wrote: pico wrote: > I would like to switch off my UPS once all upsmon clients have been > disconnected from the upsd server, so that when power returns all the > hosts connected to the ups will be powered up again. > > In the documentation it states that I should edit my shutdown scripts to > add the command: > /usr/local/ups/bin/upsdrvctl shutdown > > Unfortunately I don't know what file to add the command to. > Does anyone know the correct file to edit for both Ubuntu and Suse. > If I had to take a guess, I should edit /etc/init.d/halt > Is this correct? I don't know about Unbutu, but from SuSE 10.1 onwards this is being dealt with in the installation of the nut package by default. You don't need to modify the startup scripts yourself. I may have made an incorrect assumption based on pico's original post. If you are installing NUT via the Ubuntu packages, then you should not have to do anything more than changing a few variables (in /etc/default/nut; refer to /usr/share/doc/nut/README.Debian for more Debian/Ubuntu-specific configuration). As Arjen explained for SuSE, Ubuntu already has changed the scripts in their package. However, if you are installing from source, you can still use the startup/shutdown scripts as a guide. I forgot to mention earlier that you will need to link /etc/init.d/nut into the appropriate shutdown directory (probably /etc/rc0.d; my Ubuntu box is not on at the moment). -- - Charles Lepple ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] Correct shutdown scripts for Ubuntu or Suse
On 12/19/06, pico <[EMAIL PROTECTED]> wrote: Does anyone know the correct file to edit for both Ubuntu and Suse. Not sure about SuSE, but there is an Ubuntu package already, and you can adapt the paths in their shutdown script if you want to use a later version than 2.0.4: http://archive.ubuntu.com/ubuntu/pool/universe/n/nut/nut_2.0.4-2.diff.gz look for nut-2.0.4/debian/nut.init. -- - Charles Lepple ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] Correct shutdown scripts for Ubuntu or Suse
pico wrote: > I would like to switch off my UPS once all upsmon clients have been > disconnected from the upsd server, so that when power returns all the > hosts connected to the ups will be powered up again. > > In the documentation it states that I should edit my shutdown scripts to > add the command: > /usr/local/ups/bin/upsdrvctl shutdown > > Unfortunately I don't know what file to add the command to. > Does anyone know the correct file to edit for both Ubuntu and Suse. > If I had to take a guess, I should edit /etc/init.d/halt > Is this correct? I don't know about Unbutu, but from SuSE 10.1 onwards this is being dealt with in the installation of the nut package by default. You don't need to modify the startup scripts yourself. Best regards, Arjen ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
[Nut-upsuser] Correct shutdown scripts for Ubuntu or Suse
Hi all. I would like to switch off my UPS once all upsmon clients have been disconnected from the upsd server, so that when power returns all the hosts connected to the ups will be powered up again. In the documentation it states that I should edit my shutdown scripts to add the command: /usr/local/ups/bin/upsdrvctl shutdown Unfortunately I don't know what file to add the command to. Does anyone know the correct file to edit for both Ubuntu and Suse. If I had to take a guess, I should edit /etc/init.d/halt Is this correct? Thanks in advance Pico ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser